Repository navigation
tools deps graph
pnpm deps:graph (implemented in tools/deps-graph/src/cli.mjs) is a standalone, read-only dependency-graph visualizer for the monorepo. It parses pnpm-workspace.yaml, turbo.json-style members, and every package.json to build the inter-package dependency graph and render it as DOT, Mermaid, ASCII, or SVG. It is a manual/CI-optional aid — not a governance gate — and never mutates packages, manifests, or lockfiles. It has zero runtime dependencies (manual YAML parsing, no external CLI libraries).
| File | Purpose |
|---|---|
tools/deps-graph/src/cli.mjs |
CLI: format/output/cycle detection |
tools/deps-graph/src/workspace.mjs |
Manual pnpm-workspace.yaml parsing + glob resolution |
tools/deps-graph/src/packages.mjs |
Reads package metadata, builds nodes/edges |
tools/deps-graph/src/graph.mjs |
Cycle detection (DFS) and reverse-edge (dependentsOf) |
tools/deps-graph/src/render.mjs |
DOT, Mermaid, ASCII, and (via Graphviz dot) SVG renderers |
tools/deps-graph/package.json |
Package metadata (@safrs/deps-graph) |
-
tools/deps-graph/src/workspace.mjsparses thepackages:glob list frompnpm-workspace.yaml(a minimal YAML reader that only extracts that key), then resolves the leading-*segments to concrete package directories. -
tools/deps-graph/src/packages.mjsreads each member'spackage.jsonand collects workspace-only edges acrossdependencies,devDependencies,peerDependencies, andoptionalDependenciesthat point at known workspace package names. -
tools/deps-graph/src/graph.mjsdetectCycleruns a DFS with white/grey/black colouring and returns the first cycle path;dependentsOflists reverse dependents. -
tools/deps-graph/src/render.mjsrenders DOT, Mermaid (flowchart LR), a deterministic ASCII edge list, or SVG by shelling out to the Graphvizdotbinary when available (falling back to Mermaid ifdotis missing).
pnpm deps:graph # ASCII to stdout
pnpm deps:graph --format mermaid # Mermaid flowchart
pnpm deps:graph --format dot --output deps.dot
pnpm deps:graph --format svg --output deps.svg
pnpm deps:graph --cycles # print cycles; exit non-zero if found
pnpm deps:graph --repo-root /abs/path
pnpm deps:graph --helpWith --cycles, the tool prints circular dependencies and exits non-zero when a cycle exists; otherwise it reports No circular dependencies detected.
-
tools/AGENTS.mdclassifies it: read-only, zero runtime dependencies, and not a governance gate. Changes are R1; wiring it into CI or governance would make that R2 and require review. -
.safrs/tool-inventory.jsonregisters thedeps-graphtool (read-only, approved), which letscheck_actions_pinning.pytreat its endpoints correctly.
node --test tools/deps-graph/test/*.test.mjs- Tools overview
- Shared packages — the packages and dependency graph it renders
- SAFRS governance checkers — the governance gate (of which this tool is deliberately not part)
SAFRS — the Sentra Agent-First Repository Standard — defines how a software repository should be structured, governed, and enforced when autonomous Artificial Intelligence agents perform a substantial share of engineering work by Sentra Artificial Intelligence.
SAFRS v1.1 addresses that problem through five coupled mechanisms:
- a six-layer repository architecture from Trust Boundary to Human Authority;
- a role-based permission model in which capability never implies trust;
- a four-tier risk model with cumulative mandatory controls;
- a multi-agent execution protocol with explicit task states and one mutation owner per bounded scope;
- a knowledge governance model that distinguishes current architecture, historical decisions, execution plans, Git history, and running code.
Built in Indonesia as part of the Sentra Artificial Intelligence ecosystem.
Sentra Artificial Intelligence · Source Repository · Official Website
Dr Ferdi Iskandar — Creator & Maintainer
LinkedIn ·
ORCID ·
Hugging Face ·
Kaggle ·
Medium ·
Substack ·
X ·
Threads
MyPrompt · Sentra Artificial Intelligence · Indonesia
- SentraBot
- Kediri History
- Academic Smartboard
- Avery
- Portfolio Dr. Novia
- Golden Path (legacy demonstrator)
- Control Center
- Capsule template
- Risk model (R0–R3)
- Agent roles and permissions
- Capsule sovereignty
- Multi-agent protocol
- Document lifecycle
- Sensitive paths
- Verification integrity
Lore — how this repository grew
- Schemas (
@safrs/schemas) - Environment (
@safrs/env) - Database (
@safrs/database) - API (
@safrs/api) - UI (
@safrs/ui) - Telemetry (
@safrs/telemetry) - Token (
@sentra/token) - Config (
@safrs/config) - Auth (
packages/auth)
- SAFRS governance checkers
- SAFRS Automation Control Plane
- Gaffer Runtime
- Doctor
- Project wizard
- project-standalone
- Capabilities
- Codegen
- Deps-graph
- Status CLI
- Task CLI