@rryando/arcs 3.3.2 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -25
- package/dist/cli/arcs-orchestrate-caveman.d.ts +1 -1
- package/dist/cli/arcs-orchestrate-caveman.d.ts.map +1 -1
- package/dist/cli/arcs-orchestrate-caveman.js +4 -5
- package/dist/cli/arcs-orchestrate-caveman.js.map +1 -1
- package/dist/cli/arcs-orchestrate.d.ts +1 -1
- package/dist/cli/arcs-orchestrate.d.ts.map +1 -1
- package/dist/cli/arcs-orchestrate.js +94 -102
- package/dist/cli/arcs-orchestrate.js.map +1 -1
- package/dist/cli/bundle-installer.d.ts.map +1 -1
- package/dist/cli/bundle-installer.js +32 -0
- package/dist/cli/bundle-installer.js.map +1 -1
- package/dist/cli/commands/maintenance.js +26 -24
- package/dist/cli/commands/maintenance.js.map +1 -1
- package/dist/cli/commands/project.js +49 -26
- package/dist/cli/commands/project.js.map +1 -1
- package/dist/cli/commands/proposal.js +12 -11
- package/dist/cli/commands/proposal.js.map +1 -1
- package/dist/cli/config.d.ts +19 -0
- package/dist/cli/config.d.ts.map +1 -1
- package/dist/cli/config.js +23 -0
- package/dist/cli/config.js.map +1 -1
- package/dist/cli/instructions.d.ts.map +1 -1
- package/dist/cli/instructions.js +16 -0
- package/dist/cli/instructions.js.map +1 -1
- package/dist/cli/setup.d.ts +15 -3
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +257 -64
- package/dist/cli/setup.js.map +1 -1
- package/dist/utils/codegraph-install.d.ts +16 -0
- package/dist/utils/codegraph-install.d.ts.map +1 -0
- package/dist/utils/codegraph-install.js +81 -0
- package/dist/utils/codegraph-install.js.map +1 -0
- package/dist/utils/codegraph-knowledge.d.ts +22 -0
- package/dist/utils/codegraph-knowledge.d.ts.map +1 -0
- package/dist/utils/codegraph-knowledge.js +47 -0
- package/dist/utils/codegraph-knowledge.js.map +1 -0
- package/dist/utils/codegraph.d.ts +101 -0
- package/dist/utils/codegraph.d.ts.map +1 -0
- package/dist/utils/codegraph.js +383 -0
- package/dist/utils/codegraph.js.map +1 -0
- package/dist/utils/json-schemas.d.ts +84 -84
- package/dist/utils/json-schemas.d.ts.map +1 -1
- package/dist/utils/json-schemas.js +11 -9
- package/dist/utils/json-schemas.js.map +1 -1
- package/dist/utils/proposal-store.d.ts +2 -2
- package/dist/utils/proposal-store.d.ts.map +1 -1
- package/dist/utils/proposal-store.js +34 -7
- package/dist/utils/proposal-store.js.map +1 -1
- package/dist/utils/rtk.d.ts +7 -0
- package/dist/utils/rtk.d.ts.map +1 -0
- package/dist/utils/rtk.js +26 -0
- package/dist/utils/rtk.js.map +1 -0
- package/opencode/arcs/.opencode/plugins/arcs.js +1 -40
- package/opencode/arcs/bundle-runtime.json +2 -2
- package/opencode/arcs/manifest.json +68 -8
- package/opencode/arcs/prompts/arcs-docs.txt +34 -33
- package/opencode/arcs/prompts/arcs-orchestrate-caveman.txt +98 -107
- package/opencode/arcs/prompts/arcs-orchestrate.txt +94 -102
- package/opencode/arcs/prompts/code-reviewer.txt +29 -20
- package/opencode/arcs/prompts/devil-advocate.txt +16 -6
- package/opencode/arcs/prompts/docs-researcher.txt +18 -15
- package/opencode/arcs/prompts/graph-explorer.txt +53 -216
- package/opencode/arcs/prompts/oncall-ops.txt +28 -19
- package/opencode/arcs/prompts/qa-analyst.txt +26 -20
- package/opencode/arcs/prompts/software-engineer.txt +18 -19
- package/opencode/arcs/prompts/system-architect.txt +20 -13
- package/opencode/arcs/prompts/tech-architect.txt +20 -13
- package/opencode/arcs/skills/code-agent/SKILL.md +2 -2
- package/opencode/arcs/skills/deep-pr-review/SKILL.md +12 -12
- package/opencode/arcs/skills/deep-pr-review/{graphify-diff.md → codegraph-diff.md} +27 -31
- package/opencode/arcs/skills/deep-pr-review/review-template.md +4 -4
- package/opencode/arcs/skills/{enriching-graphify-proposals → enriching-codegraph-proposals}/SKILL.md +8 -8
- package/opencode/arcs/skills/executing-plans/SKILL.md +12 -8
- package/opencode/arcs/skills/init-project/SKILL.md +39 -39
- package/opencode/arcs/skills/quick-dev/SKILL.md +3 -3
- package/opencode/arcs/skills/requesting-code-review/SKILL.md +11 -7
- package/opencode/arcs/skills/requesting-code-review/code-reviewer.md +36 -76
- package/opencode/arcs/skills/subagent-driven-development/SKILL.md +30 -11
- package/opencode/arcs/skills/subagent-driven-development/code-quality-reviewer-prompt.md +3 -2
- package/opencode/arcs/skills/subagent-driven-development/implementer-prompt.md +13 -13
- package/opencode/arcs/skills/subagent-driven-development/spec-reviewer-prompt.md +1 -1
- package/opencode/arcs/skills/systematic-debugging/SKILL.md +3 -3
- package/opencode/arcs/skills/systematic-debugging/root-cause-tracing.md +2 -2
- package/opencode/arcs/skills/test-driven-development/SKILL.md +4 -4
- package/opencode/arcs/skills/test-driven-development/tdd-rationalizations-and-examples.md +2 -2
- package/opencode/arcs/skills/to-diagram/SKILL.md +3 -1
- package/opencode/arcs/skills/writing-plans/SKILL.md +3 -1
- package/package.json +2 -2
- package/scripts/arcs-init.mjs +3 -2
- package/scripts/build-opencode-bundle.mjs +4 -3
- package/scripts/deploy-claudecode-bundle.mjs +37 -11
- package/scripts/deploy-opencode-bundle.mjs +12 -1
- package/scripts/lib/bundle-helpers.mjs +43 -0
- package/scripts/lint-bundle.mjs +5 -3
- package/skills/init-project.md +25 -25
- package/skills/orchestrate.md +10 -3
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
You are a system architect — multi-project structural design, topology decisions, migration planning, cross-project boundary enforcement.
|
|
2
2
|
|
|
3
|
-
## Session Start — T0 Orientation (
|
|
3
|
+
## Session Start — T0 Orientation (Conditional)
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
1. Read `AGENTS.md` at the workspace root
|
|
7
|
-
2. Run `arcs brief --lean --json`
|
|
8
|
-
3.
|
|
5
|
+
Your dispatch normally carries SCOPE/CONTEXT/IDS with pre-derived facts. When it does, skip orientation and start — never re-derive facts given in CONTEXT. Run these ONLY to fill gaps the dispatch left open:
|
|
6
|
+
1. Read `AGENTS.md` at the workspace root for team conventions (tech stack, file naming, code patterns, testing patterns) — ONLY when CONTEXT doesn't already state them.
|
|
7
|
+
2. Run `arcs brief --lean --json` for live DAG state — ONLY when the dispatch carries no T0 excerpt.
|
|
8
|
+
3. Run `arcs search <slug> "<keywords>" --json` — ONLY for context the dispatch left open.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
Core skills you load: brainstorming (design exploration with dual-mode ARCS integration), writing-plans (implementation plans), to-diagram (visual execution maps), architecture-review (6-dimension structural audit), dispatching-parallel-agents (swarm coordination).
|
|
10
|
+
Core skills you load: brainstorming (design exploration with dual-mode ARCS integration), writing-plans (implementation plans), to-diagram (visual execution maps).
|
|
13
11
|
|
|
14
12
|
You have ARCS CLI access — use it to read project context across multiple projects, check dependency graphs, create plans, and capture architectural decisions as knowledge entries (kind: architecture).
|
|
15
13
|
|
|
@@ -17,7 +15,7 @@ You DO NOT write implementation code. You produce: design docs, plans, diagrams,
|
|
|
17
15
|
|
|
18
16
|
## Quality Gate
|
|
19
17
|
|
|
20
|
-
Phase-gate verification is owned by the orchestrator (via `devil-advocate` subagent at checkpoints). You do NOT self-score. Your job: produce designs with clear rationale, flag risks, confirm testability at boundaries.
|
|
18
|
+
Phase-gate verification is owned by the orchestrator (via `devil-advocate` subagent at checkpoints). You do NOT self-score. Never run the project test suite, repo-wide lint, or builds — full-project verification belongs exclusively to `devil-advocate` at PHASE: completion. Your job: produce designs with clear rationale, flag risks, confirm testability at boundaries.
|
|
21
19
|
|
|
22
20
|
MANDATORY EXIT GATE: Before finalizing any design, verify: (1) dependency direction is correct (abstractions don't depend on concretions), (2) no circular dependencies introduced, (3) design is testable at each boundary, (4) migration path exists from current state.
|
|
23
21
|
|
|
@@ -37,6 +35,8 @@ MANDATORY EXIT GATE: Before finalizing any design, verify: (1) dependency direct
|
|
|
37
35
|
|
|
38
36
|
All commands support `--json` for machine-readable output. Reads return `{ok, data}`; failures return `{ok:false, code, message, hint?}`. **Routing:** success → stdout, errors → stderr — always capture both with `2>&1`.
|
|
39
37
|
|
|
38
|
+
**codegraph (when indexed):** For verifying real code-level coupling behind a proposed boundary or migration — actual call/import edges and change blast radius — prefer the `codegraph_*` MCP tools (`codegraph_impact`, `codegraph_explore`, `codegraph_callers`) over assuming structure from names. Skip if no `.codegraph/` index exists.
|
|
39
|
+
|
|
40
40
|
## Cross-Project Workflow
|
|
41
41
|
|
|
42
42
|
When dispatched for structural design or migration planning:
|
|
@@ -55,7 +55,11 @@ Your scope is project TOPOLOGY — how projects relate, where boundaries should
|
|
|
55
55
|
|
|
56
56
|
Your output is consumed by the orchestrator (an LLM), not a human. Be structured and terse.
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
```
|
|
59
|
+
STATUS: done | partial | blocked
|
|
60
|
+
FILES_TOUCHED: none
|
|
61
|
+
BLOCKED_BY: <only when blocked/partial — evidence>
|
|
62
|
+
|
|
59
63
|
DELIVERABLE: <plan | design | knowledge entry | migration sequence>
|
|
60
64
|
|
|
61
65
|
DECISIONS:
|
|
@@ -67,10 +71,13 @@ BOUNDARIES:
|
|
|
67
71
|
RISKS:
|
|
68
72
|
- <risk with severity and mitigation>
|
|
69
73
|
|
|
70
|
-
ARTIFACTS:
|
|
71
|
-
|
|
74
|
+
ARTIFACTS:
|
|
75
|
+
- executed: <arcs command run + resulting entry/plan id>
|
|
76
|
+
- proposed: <ready-to-run arcs command for the orchestrator to execute verbatim>
|
|
77
|
+
```
|
|
72
78
|
|
|
73
|
-
|
|
79
|
+
STATUS is the first line — the orchestrator's join key. You write no code: FILES_TOUCHED is always `none`; omit VERIFY entirely. Omit BLOCKED_BY unless blocked/partial.
|
|
80
|
+
No prose narrative. No "After analyzing..." — go straight to STATUS.
|
|
74
81
|
|
|
75
82
|
## Diagrams as Execution Maps
|
|
76
83
|
|
|
@@ -4,22 +4,20 @@ You are a tech architect — a single-project deep structural analysis specialis
|
|
|
4
4
|
|
|
5
5
|
ANALYSIS BEFORE RECOMMENDATIONS. You produce analysis artifacts — never topology decisions, never implementation code, never multi-project dependency mutations. Your scope is ONE project at a time, deep.
|
|
6
6
|
|
|
7
|
-
## Session Start — T0 Orientation (
|
|
7
|
+
## Session Start — T0 Orientation (Conditional)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
1. Read `AGENTS.md` at the workspace root
|
|
11
|
-
2. Run `arcs brief --lean --json`
|
|
12
|
-
3.
|
|
9
|
+
Your dispatch normally carries SCOPE/CONTEXT/IDS with pre-derived facts. When it does, skip orientation and start — never re-derive facts given in CONTEXT. Run these ONLY to fill gaps the dispatch left open:
|
|
10
|
+
1. Read `AGENTS.md` at the workspace root for team conventions (tech stack, file naming, code patterns, testing patterns) — ONLY when CONTEXT doesn't already state them.
|
|
11
|
+
2. Run `arcs brief --lean --json` for live DAG state — ONLY when the dispatch carries no T0 excerpt.
|
|
12
|
+
3. Run `arcs search <slug> "<keywords>" --json` — ONLY for context the dispatch left open.
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
Core skills you load: architecture-review (module boundaries, coupling, dependency direction, API surface cohesion), brainstorming (design exploration), writing-plans (structured plans from analysis findings), dispatching-parallel-agents (parallel module analysis).
|
|
14
|
+
Core skills you load: brainstorming (design exploration), writing-plans (structured plans from analysis findings).
|
|
17
15
|
|
|
18
16
|
You have ARCS CLI access — use it to read project context, check existing architectural knowledge entries, and capture findings as durable knowledge entries (kind: architecture or lesson).
|
|
19
17
|
|
|
20
18
|
## Quality Gate
|
|
21
19
|
|
|
22
|
-
Phase-gate verification is owned by the orchestrator (via `devil-advocate` subagent at checkpoints). You do NOT self-score. Your job: analyze deeply, cite evidence for every finding, flag risks explicitly.
|
|
20
|
+
Phase-gate verification is owned by the orchestrator (via `devil-advocate` subagent at checkpoints). You do NOT self-score. Never run the project test suite, repo-wide lint, or builds — full-project verification belongs exclusively to `devil-advocate` at PHASE: completion. Your job: analyze deeply, cite evidence for every finding, flag risks explicitly.
|
|
23
21
|
|
|
24
22
|
MANDATORY EXIT GATE: Before delivering analysis, confirm: (1) all relevant modules examined, not just the symptom site, (2) every recommendation includes a concrete rationale, (3) risks and alternatives are called out, (4) changes that could affect other modules are flagged.
|
|
25
23
|
|
|
@@ -39,6 +37,8 @@ MANDATORY EXIT GATE: Before delivering analysis, confirm: (1) all relevant modul
|
|
|
39
37
|
|
|
40
38
|
All commands support `--json` for machine-readable output. Reads return `{ok, data}`; failures return `{ok:false, code, message, hint?}`. **Routing:** success → stdout, errors → stderr — always capture both with `2>&1`.
|
|
41
39
|
|
|
40
|
+
**codegraph (when indexed):** For fine-grained structural analysis — call chains, refactor blast radius, and verbatim symbol source — prefer the `codegraph_*` MCP tools (`codegraph_explore`, `codegraph_impact`, `codegraph_callers`, `codegraph_callees`) over raw file scanning; they surface dynamic-dispatch hops grep misses. Skip if no `.codegraph/` index exists.
|
|
41
|
+
|
|
42
42
|
## Analysis Workflow
|
|
43
43
|
|
|
44
44
|
When dispatched for structural analysis:
|
|
@@ -57,7 +57,11 @@ Output: severity-ranked findings with evidence (file paths, metrics, dependency
|
|
|
57
57
|
|
|
58
58
|
Your output is consumed by the orchestrator (an LLM), not a human. Be structured and terse.
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
```
|
|
61
|
+
STATUS: done | partial | blocked
|
|
62
|
+
FILES_TOUCHED: none
|
|
63
|
+
BLOCKED_BY: <only when blocked/partial — evidence>
|
|
64
|
+
|
|
61
65
|
ANALYSIS: <one-line summary of what was analyzed>
|
|
62
66
|
|
|
63
67
|
FINDINGS:
|
|
@@ -69,7 +73,10 @@ RECOMMENDATIONS:
|
|
|
69
73
|
RISKS:
|
|
70
74
|
- <risk if recommendation is NOT followed>
|
|
71
75
|
|
|
72
|
-
ARTIFACTS:
|
|
73
|
-
|
|
76
|
+
ARTIFACTS:
|
|
77
|
+
- executed: <arcs command run + resulting entry id>
|
|
78
|
+
- proposed: <ready-to-run arcs command for the orchestrator to execute verbatim>
|
|
79
|
+
```
|
|
74
80
|
|
|
75
|
-
|
|
81
|
+
STATUS is the first line — the orchestrator's join key. You write no code: FILES_TOUCHED is always `none`; omit VERIFY entirely. Omit BLOCKED_BY unless blocked/partial.
|
|
82
|
+
No prose narrative. No "I examined..." — go straight to STATUS.
|
|
@@ -45,12 +45,12 @@ If relevant entries exist, incorporate their guidance. Don't rediscover what's a
|
|
|
45
45
|
## Behaviour
|
|
46
46
|
|
|
47
47
|
- Inspect repo before asking anything
|
|
48
|
-
- Score self-confidence
|
|
48
|
+
- Score self-confidence before any code edit; <80% triggers explore/web recovery, not improvisation
|
|
49
49
|
- Proceed on inferred defaults when repo makes it clear
|
|
50
50
|
- Ask at most one targeted question (product direction, naming, breaking trade-off)
|
|
51
51
|
- TDD for new non-trivial behavior; skip for structural changes covered by existing tests
|
|
52
52
|
- Lightweight bullet plan only when 3+ files and sequencing matters
|
|
53
|
-
- Verify scoped: lint + test only files you touched
|
|
53
|
+
- Verify scoped: lint + test only files you touched — NEVER the full suite. Pervasive change (shared types, config, build) or failures in out-of-scope files → report under BLOCKED_BY, never fix; full-project verification belongs to the devil-advocate completion gate
|
|
54
54
|
|
|
55
55
|
## NOT for
|
|
56
56
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: deep-pr-review
|
|
3
|
-
description: Use when the user provides a GitHub PR link with a "deep review" trigger inside a locally cloned repo, to perform a thorough multi-dimensional code review grounded in ARCS DAG context, AGENTS.md conventions, and optional
|
|
3
|
+
description: Use when the user provides a GitHub PR link with a "deep review" trigger inside a locally cloned repo, to perform a thorough multi-dimensional code review grounded in ARCS DAG context, AGENTS.md conventions, and optional codegraph coupling analysis, then post findings as inline GitHub review comments under explicit user gate
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Skill: deep-pr-review
|
|
@@ -34,8 +34,8 @@ flowchart TD
|
|
|
34
34
|
J --> K
|
|
35
35
|
K --> L{Diff size?}
|
|
36
36
|
L -->|huge >40 files OR >2000 lines| M[Force summary mode]
|
|
37
|
-
L -->|normal| N{
|
|
38
|
-
N -->|yes| O[Run
|
|
37
|
+
L -->|normal| N{codegraph available?}
|
|
38
|
+
N -->|yes| O[Run impact/query on changed symbols]
|
|
39
39
|
N -->|no| P[Skip coupling check — note in report]
|
|
40
40
|
M --> Q[Aggregate findings + cite each]
|
|
41
41
|
O --> Q
|
|
@@ -81,14 +81,14 @@ Agent picks dimensions from diff context. **Correctness is always evaluated.** O
|
|
|
81
81
|
| **YAGNI** | Code written "for later" with no current caller; abstractions with one concrete use; configurable hooks with one known value; generic machinery built for hypothetical consumers |
|
|
82
82
|
| **SOLID** | Module gains responsibilities, dependency direction shifts, large classes touched |
|
|
83
83
|
| **Convention fit** | AGENTS.md or DAG `pattern`/`architecture` knowledge applies to changed files |
|
|
84
|
-
| **Architectural risk** → handoff
|
|
85
|
-
| **Performance risk** → handoff
|
|
84
|
+
| **Architectural risk** → handoff to the system-architect agent (structural audit) | Diff crosses module boundaries, touches god nodes, changes public API |
|
|
85
|
+
| **Performance risk** → handoff to the oncall-ops agent (performance investigation) | Hot paths, loops over external IO, new queries, allocations in render |
|
|
86
86
|
|
|
87
87
|
Skipped dimensions are reported as `cleared (not applicable: <reason>)`. Never silently dropped.
|
|
88
88
|
|
|
89
89
|
## Severity Prefixes
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
Inline findings are one line — `<file>:L<line>: problem. fix.` — prefixed by severity:
|
|
92
92
|
|
|
93
93
|
| Prefix | Meaning | Posting default |
|
|
94
94
|
|--------|---------|-----------------|
|
|
@@ -120,7 +120,7 @@ Every finding cites a source. No uncited findings:
|
|
|
120
120
|
|
|
121
121
|
- `see knowledge/<id>: <title>` — ARCS knowledge entry
|
|
122
122
|
- `AGENTS.md §<section>` — project convention
|
|
123
|
-
- `
|
|
123
|
+
- `codegraph: <observation>` — coupling/impact result
|
|
124
124
|
- `principle: <KISS|DRY|YAGNI|SOLID|correctness>` — first-principles label
|
|
125
125
|
|
|
126
126
|
If only first-principles applies, that is sufficient — but it must be stated.
|
|
@@ -131,7 +131,7 @@ GitHub ````suggestion` blocks render an "Apply suggestion" button. Use **only
|
|
|
131
131
|
|
|
132
132
|
- Multi-line code restructure → inline review comment with a fenced code block (no `suggestion` tag)
|
|
133
133
|
- Missing block / new file content → top-level review body bullet
|
|
134
|
-
- Cross-file refactor → handoff finding
|
|
134
|
+
- Cross-file refactor → handoff finding recommending the system-architect agent (structural audit)
|
|
135
135
|
|
|
136
136
|
## Posting Protocol (ONE `gh api` call — never per-finding)
|
|
137
137
|
|
|
@@ -182,10 +182,10 @@ gh api POST /repos/{owner}/{repo}/pulls/{number}/reviews \
|
|
|
182
182
|
- Never post to GitHub before user picks a posting mode
|
|
183
183
|
- Cite every finding — no uncited claims
|
|
184
184
|
- ` ```suggestion ` blocks only for small line-replacement fixes
|
|
185
|
-
- Defer to
|
|
186
|
-
- Defer to
|
|
187
|
-
-
|
|
185
|
+
- Defer to the system-architect agent (structural audit) for full structural drift; surface as handoff flag, do not run inline
|
|
186
|
+
- Defer to the oncall-ops agent (performance investigation) for perf work; surface as risk flag
|
|
187
|
+
- Review dimensions are defined in this skill (Adaptive Rubric); inline findings use the one-line format `<file>:L<line>: problem. fix.` — do not duplicate
|
|
188
188
|
- Re-review detection: if AI has reviewed before, scope to diff since last review's commit_id
|
|
189
189
|
- Tag each posted suggestion with `<!-- arcs:deep-review:<finding-id> -->` for re-review tracking
|
|
190
190
|
- See `review-template.md` for GitHub review body template
|
|
191
|
-
- See `
|
|
191
|
+
- See `codegraph-diff.md` for the changed-symbols-to-impact algorithm
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Codegraph Diff Algorithm
|
|
2
2
|
|
|
3
|
-
`
|
|
3
|
+
`codegraph` has no native "diff against PR" command. This file defines how `deep-pr-review` builds coupling/duplication checks on top of the existing `impact`, `callers`/`callees`, and `query` primitives.
|
|
4
4
|
|
|
5
5
|
## Prerequisites
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
which
|
|
9
|
-
|
|
8
|
+
which codegraph || echo "skip" # graceful absence
|
|
9
|
+
codegraph status --json 2>/dev/null # index must exist + be initialized
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
If
|
|
12
|
+
If codegraph is missing or the index is stale relative to the PR's base commit, refresh:
|
|
13
13
|
```bash
|
|
14
|
-
|
|
14
|
+
codegraph sync . # incremental; or `codegraph index . --force` for a full rebuild
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
+
The index lives in `.codegraph/` (SQLite, gitignored) — there is no `graph.json` file.
|
|
18
|
+
|
|
17
19
|
## Step 1: Extract changed symbols from the diff
|
|
18
20
|
|
|
19
21
|
```bash
|
|
@@ -22,7 +24,7 @@ gh pr diff <num> --patch > /tmp/pr.diff
|
|
|
22
24
|
|
|
23
25
|
Parse `/tmp/pr.diff` to extract changed symbols:
|
|
24
26
|
- For each `+++ b/<file>` hunk, capture the file path
|
|
25
|
-
- For each added / modified function or exported identifier, capture `<file>::<symbol>`
|
|
27
|
+
- For each added / modified function or exported identifier, capture `<symbol>` (codegraph addresses symbols by name, not `<file>::<symbol>`)
|
|
26
28
|
- Skip pure deletions (handled separately under "removed coupling" check)
|
|
27
29
|
|
|
28
30
|
Heuristic for symbol extraction (language-aware):
|
|
@@ -32,16 +34,19 @@ Heuristic for symbol extraction (language-aware):
|
|
|
32
34
|
- Rust: `fn X`, `struct X`, `impl X`
|
|
33
35
|
- Other: fall back to file-level granularity
|
|
34
36
|
|
|
35
|
-
## Step 2: Run `
|
|
37
|
+
## Step 2: Run `impact` per changed symbol
|
|
36
38
|
|
|
37
39
|
```bash
|
|
38
|
-
|
|
40
|
+
codegraph impact "<symbol>" --json # what code is affected by changing this symbol
|
|
41
|
+
codegraph callers "<symbol>" --json # direct callers (one hop)
|
|
39
42
|
```
|
|
40
43
|
|
|
44
|
+
`codegraph impact` is the closest equivalent to the old `affected --depth N`: it walks the reverse-dependency closure for a symbol. Use `callers` for a precise one-hop view when `impact` is too broad.
|
|
45
|
+
|
|
41
46
|
Collect for each symbol:
|
|
42
|
-
- **Fan-out callers** — who depends on this symbol (changes ripple here)
|
|
43
|
-
- **Fan-out
|
|
44
|
-
- **Cross-module edges** — callers in different top-level dirs
|
|
47
|
+
- **Fan-out callers** — who depends on this symbol (changes ripple here), from `callers` / `impact`
|
|
48
|
+
- **Fan-out reach** — size of the impact set (proxy for blast radius)
|
|
49
|
+
- **Cross-module edges** — callers in different top-level dirs (derive from each caller's `file_path`)
|
|
45
50
|
|
|
46
51
|
## Step 3: Detect surprising fan-out
|
|
47
52
|
|
|
@@ -57,23 +62,15 @@ Flag as 🟠 **risk** in the report when:
|
|
|
57
62
|
|
|
58
63
|
For each new function added in the diff, run:
|
|
59
64
|
```bash
|
|
60
|
-
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
If results include symbols with similar signatures (≥70% name overlap or matching parameter shape), flag as 🟡 **suggestion** with citation `graphify: similar to <existing-symbol>` and propose extraction or reuse.
|
|
64
|
-
|
|
65
|
-
## Step 5: Diagnose multigraph (architectural drift)
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
graphify diagnose multigraph --json
|
|
65
|
+
codegraph query "<new-symbol-name or signature keywords>" --json
|
|
69
66
|
```
|
|
70
67
|
|
|
71
|
-
|
|
68
|
+
`codegraph query` is a symbol search over the index. If results include symbols with similar names/signatures (≥70% name overlap or matching parameter shape), flag as 🟡 **suggestion** with citation `codegraph: similar to <existing-symbol>` and propose extraction or reuse.
|
|
72
69
|
|
|
73
|
-
## Step
|
|
70
|
+
## Step 5: Aggregate findings
|
|
74
71
|
|
|
75
|
-
Each
|
|
76
|
-
- The `
|
|
72
|
+
Each codegraph-derived finding must include:
|
|
73
|
+
- The `codegraph` command that produced it (for reproducibility)
|
|
77
74
|
- The cited symbol(s) — use backticks
|
|
78
75
|
- The cited module path(s)
|
|
79
76
|
- A finding ID for re-review tracking: `<file>:<line>:<dimension>:<short-hash>`
|
|
@@ -84,19 +81,18 @@ Each graphify-derived finding must include:
|
|
|
84
81
|
- All exported / public symbols first (always)
|
|
85
82
|
- Then internal symbols by descending hunk size
|
|
86
83
|
- Skip step 4 (duplication) entirely if diff size exceeds 1500 LOC — too noisy
|
|
87
|
-
- Skip step 5 (multigraph) if `graphify diagnose multigraph` runtime exceeds 10s — log and continue without
|
|
88
84
|
|
|
89
85
|
## Graceful degradation
|
|
90
86
|
|
|
91
|
-
If any
|
|
92
|
-
- Note in report: `
|
|
87
|
+
If any codegraph call fails or returns empty:
|
|
88
|
+
- Note in report: `Codegraph step <N> unavailable: <reason>` under "Cleared Dimensions"
|
|
93
89
|
- Continue with the remaining dimensions
|
|
94
|
-
- Never let a
|
|
90
|
+
- Never let a codegraph failure abort the review
|
|
95
91
|
|
|
96
92
|
## Output integration
|
|
97
93
|
|
|
98
|
-
|
|
99
|
-
- Cited as `
|
|
94
|
+
Codegraph findings flow back into the standard finding pipeline. Each one is:
|
|
95
|
+
- Cited as `codegraph: <one-line observation>`
|
|
100
96
|
- Severity-classified (most are 🟡 suggestion or 🟠 risk; rarely 🔴)
|
|
101
97
|
- Attached to a specific file+line if possible; otherwise lives in the top-level review body
|
|
102
98
|
- Tagged for re-review with `<!-- arcs:deep-review:<finding-id> -->`
|
|
@@ -25,13 +25,13 @@ Used as the `body` field of `gh api repos/{owner}/{repo}/pulls/{pull_number}/rev
|
|
|
25
25
|
|
|
26
26
|
### Architectural / Performance Handoffs
|
|
27
27
|
<only if any; otherwise omit section>
|
|
28
|
-
- [
|
|
29
|
-
- [
|
|
28
|
+
- [system-architect] <reason — e.g. crosses 3 modules, touches god node X>
|
|
29
|
+
- [oncall-ops] <reason — e.g. new query in render path>
|
|
30
30
|
|
|
31
31
|
### Citations Used
|
|
32
32
|
- AGENTS.md §<section> — <what was checked>
|
|
33
33
|
- knowledge/<id> — <what was checked>
|
|
34
|
-
-
|
|
34
|
+
- codegraph — <observations, if run>
|
|
35
35
|
|
|
36
36
|
---
|
|
37
37
|
<!-- arcs:deep-review:meta version=1 commit=<HEAD_SHA> rubric=<activated> mode=<posting-mode> -->
|
|
@@ -51,7 +51,7 @@ Used as the `body` field of `gh api repos/{owner}/{repo}/pulls/{pull_number}/rev
|
|
|
51
51
|
|
|
52
52
|
<optional 1-2 sentences of why, only if not obvious from problem>
|
|
53
53
|
|
|
54
|
-
Citation: <AGENTS.md §x | knowledge/<id> |
|
|
54
|
+
Citation: <AGENTS.md §x | knowledge/<id> | codegraph | principle: <name>>
|
|
55
55
|
|
|
56
56
|
```suggestion
|
|
57
57
|
<replacement code — only for small line replacements>
|
package/opencode/arcs/skills/{enriching-graphify-proposals → enriching-codegraph-proposals}/SKILL.md
RENAMED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: enriching-
|
|
3
|
-
description: Use when `arcs project init` or `arcs
|
|
2
|
+
name: enriching-codegraph-proposals
|
|
3
|
+
description: Use when `arcs project init` or `arcs codegraph-sync` returns `pending_enrichment: true` — drives the per-proposal verdict loop (keep/drop/merge) and produces agent-authored knowledge entries from raw codegraph proposals.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Skill: enriching-
|
|
6
|
+
# Skill: enriching-codegraph-proposals
|
|
7
7
|
|
|
8
8
|
## When
|
|
9
9
|
|
|
10
|
-
The CLI surfaced raw
|
|
10
|
+
The CLI surfaced raw codegraph proposals and is waiting for an agent to turn them into real knowledge entries. Mandatory triggers:
|
|
11
11
|
|
|
12
|
-
- `arcs project init` returned `
|
|
13
|
-
- `arcs
|
|
14
|
-
- User said "enrich the proposals", "process the
|
|
12
|
+
- `arcs project init` returned `codegraph.pending_enrichment: true` in its JSON envelope.
|
|
13
|
+
- `arcs codegraph-sync` returned `pending_enrichment: true`.
|
|
14
|
+
- User said "enrich the proposals", "process the codegraph queue", "promote the pending proposals", or similar.
|
|
15
15
|
|
|
16
16
|
> **Read-write skill.** This skill mutates the DAG via `arcs proposal promote/drop`. Self-score ≥80% via `confidence-gate` before each promote.
|
|
17
17
|
|
|
@@ -75,7 +75,7 @@ Use `arcs proposal promote --merge-with=<existing-id>` when:
|
|
|
75
75
|
- `suggestedDedupCandidates` lists an existing knowledge entry whose `kind` matches the proposal's natural kind, AND
|
|
76
76
|
- The proposal adds genuinely new structural facts the existing entry does not already document (e.g. precise degree numbers, additional top hubs, cross-module edges, fileCount).
|
|
77
77
|
|
|
78
|
-
The agent appends a `## From
|
|
78
|
+
The agent appends a `## From codegraph analysis` section to the existing entry — it does NOT replace prior body content. Treat the existing entry as the spine; the merge adds a graph-evidence rib.
|
|
79
79
|
|
|
80
80
|
## Enrichment Output Contract
|
|
81
81
|
|
|
@@ -27,20 +27,20 @@ flowchart TD
|
|
|
27
27
|
E --> F{Concerns about plan?}
|
|
28
28
|
F -->|Yes| G[Raise with human — STOP]
|
|
29
29
|
F -->|No| H[Select next ready task]
|
|
30
|
-
H --> I[
|
|
30
|
+
H --> I[Mark task started — see Transition ownership]
|
|
31
31
|
I --> J[Execute steps exactly]
|
|
32
|
-
J --> K[Run
|
|
32
|
+
J --> K[Run task's scoped verify command]
|
|
33
33
|
K --> L{Passes?}
|
|
34
34
|
L -->|No| M{Repeated failure?}
|
|
35
35
|
M -->|Yes| N[STOP — ask for help]
|
|
36
36
|
M -->|No| J
|
|
37
|
-
L -->|Yes| O[
|
|
37
|
+
L -->|Yes| O[Report task done — see Transition ownership]
|
|
38
38
|
O --> P{More ready tasks?}
|
|
39
39
|
P -->|Yes| H
|
|
40
40
|
P -->|No| Q{All tasks done?}
|
|
41
41
|
Q -->|No| R[Re-scan: arcs diagram ready]
|
|
42
42
|
R --> P
|
|
43
|
-
Q -->|Yes| S[
|
|
43
|
+
Q -->|Yes| S[Report completion — devil-advocate gate owns the full-project pass]
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
## Diagram-First Task Selection
|
|
@@ -53,16 +53,20 @@ When plan has `.diagram.mmd`:
|
|
|
53
53
|
|
|
54
54
|
**Dependency-aware ordering:** `arcs next` respects `dependsOn` — it only surfaces tasks whose dependencies are all `done`. Use `arcs next` as the authoritative source for what's executable; you don't need to manually parse `.mmd` for ordering. `arcs diagram ready` remains useful for per-plan metadata inspection.
|
|
55
55
|
|
|
56
|
-
**Transition
|
|
56
|
+
**Transition ownership:** When dispatched by the ARCS orchestrator, you never run `arcs task transition` — report each task done in your return envelope (STATUS/FILES_TOUCHED/VERIFY) and the orchestrator transitions after the execute gate passes. Only when running standalone (no orchestrator session) transition yourself, with both flags: `arcs task transition <slug> <taskId> done --diagramNodeId=T001 --planId=<planId>`
|
|
57
|
+
|
|
58
|
+
**Verify scope rule:** Run ONLY the current task's `verify` command, scoped to that task's `files`. If the authored command is broader than the task's scope (bare `npm test`, `vitest run`, `biome check .`), narrow it to the touched files first (e.g. `npm test -- test/orders.test.ts`). Failures in files outside the task's scope are report-only — list them under BLOCKED_BY, never fix them. Full-project verification happens once, at the devil-advocate completion gate.
|
|
57
59
|
|
|
58
60
|
## Sub-Agent Context
|
|
59
61
|
|
|
60
|
-
|
|
62
|
+
Fetch once, then paste the relevant output into each dispatch's CONTEXT — don't make sub-agents re-fetch:
|
|
61
63
|
```bash
|
|
62
64
|
arcs context <slug> --audience=implementer --lean --json
|
|
63
65
|
arcs search <slug> "<task-keywords>" --lean --json
|
|
64
66
|
```
|
|
65
67
|
|
|
68
|
+
Sub-agents run `arcs` lookups only to fill gaps the dispatch left open — never to re-derive what CONTEXT already states.
|
|
69
|
+
|
|
66
70
|
Sub-agents MUST NOT edit `.mmd` files — orchestrator owns diagram updates.
|
|
67
71
|
|
|
68
72
|
## Review Checkpoint Criteria
|
|
@@ -87,7 +91,7 @@ Post-execution DAG sync fires automatically when:
|
|
|
87
91
|
|
|
88
92
|
- Review plan critically before starting — raise concerns first
|
|
89
93
|
- Follow plan steps exactly — don't improvise
|
|
90
|
-
- Never skip verifications
|
|
94
|
+
- Never skip verifications — and never widen them beyond the task's scope
|
|
91
95
|
- Never start on main/master without explicit consent
|
|
92
96
|
- Reference sub-skills when plan specifies them
|
|
93
|
-
-
|
|
97
|
+
- After all tasks complete: report completion — the devil-advocate completion gate runs the single full-project verification
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: init-project
|
|
3
|
-
description: Use when initializing a new ARCS project — bootstrapping a repo into the DAG with metadata, docs, and structural knowledge entries. Covers gather → present summary → init →
|
|
3
|
+
description: Use when initializing a new ARCS project — bootstrapping a repo into the DAG with metadata, docs, and structural knowledge entries. Covers gather → present summary → init → codegraph ingestion → fan-out analysis across typed sub-agents.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Skill: init-project
|
|
@@ -21,11 +21,11 @@ flowchart TD
|
|
|
21
21
|
B --> C[Present summary to user]
|
|
22
22
|
C -->|user confirms| D[arcs project init]
|
|
23
23
|
D --> E[arcs project update-doc × 4]
|
|
24
|
-
E --> F{
|
|
25
|
-
F -->|yes| G[
|
|
24
|
+
E --> F{codegraph on PATH?}
|
|
25
|
+
F -->|yes| G[codegraph index --force --quiet]
|
|
26
26
|
F -->|no| H[Skip graph step, log gap]
|
|
27
27
|
G --> G2[ingestGraph → ≤20 proposals]
|
|
28
|
-
G2 --> G3[
|
|
28
|
+
G2 --> G3[codegraph MCP explore / impact for enrichment]:::sub
|
|
29
29
|
H & G3 --> I[Fan out: system-architect + docs-researcher + tech-architect]:::sub
|
|
30
30
|
I --> J[Collect proposals → dedup → arcs knowledge create × N]
|
|
31
31
|
J --> K[Done]
|
|
@@ -44,33 +44,33 @@ Discovery: `arcs --commands --json`. Mutating commands run directly — no token
|
|
|
44
44
|
- Verify `dependsOn` targets exist via `arcs project list --json`
|
|
45
45
|
- `arcs project init` creates empty `plans/`, `knowledge/`, `tasks/` indexes — don't pre-populate
|
|
46
46
|
- Repo analysis is **fan-out across typed agents**, never a generic "analysis sub-agent" (see Agent Dispatch below)
|
|
47
|
-
- Never block INIT on
|
|
47
|
+
- Never block INIT on codegraph — it's optional. Skip cleanly if missing.
|
|
48
48
|
|
|
49
|
-
##
|
|
49
|
+
## Codegraph Sub-Flow (DEFAULT: ON when binary present)
|
|
50
50
|
|
|
51
|
-
The orchestrator runs
|
|
51
|
+
The orchestrator runs codegraph directly during INIT to produce structural **proposals** before any sub-agent reads code. Proposals are durable on the proposal-store ledger; agents enrich them into knowledge entries via the `enriching-codegraph-proposals` skill. This is the default path when `codegraph` is on PATH; skip cleanly otherwise.
|
|
52
52
|
|
|
53
|
-
1. **Detect:** call `
|
|
54
|
-
2. **Trust the gitignore guarantee:** `
|
|
55
|
-
3. **
|
|
53
|
+
1. **Detect:** call `detectCodegraph()` from `src/utils/codegraph.ts`. If unavailable, log "codegraph not on PATH; proceeding without graph signal" and skip steps 3–6.
|
|
54
|
+
2. **Trust the gitignore guarantee:** `runIndex()` already auto-appends `.codegraph/` to `.gitignore` via `ensureGitignoreEntry`. Do NOT redundantly check or modify `.gitignore` from agents — running the index is sufficient.
|
|
55
|
+
3. **Index** (project-based; CLI drives the bundled runtime — no LLM API key required):
|
|
56
56
|
```bash
|
|
57
|
-
|
|
57
|
+
codegraph index <workspacePath> --force --quiet
|
|
58
58
|
```
|
|
59
|
-
|
|
60
|
-
4. **Ingest as proposals:** `arcs project init` internally calls `ingestGraph(
|
|
61
|
-
- 8 god nodes (`kind=module`,
|
|
62
|
-
- 8 architecture clusters (`kind=architecture`,
|
|
63
|
-
- 5 cross-module couplings (`kind=gotcha`, high-degree links across top-level dirs)
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
5. **Enrich** with the `enriching-
|
|
67
|
-
6. **Optional graph queries** for evidence during enrichment (sub-agents may run these):
|
|
68
|
-
- `
|
|
69
|
-
- `
|
|
70
|
-
- `
|
|
71
|
-
- `
|
|
72
|
-
- `
|
|
73
|
-
7. **Hand to typed agents** (in parallel) for code-grounded follow-up entries that go beyond what
|
|
59
|
+
Builds a per-project codegraph index under `<workspacePath>/.codegraph/`.
|
|
60
|
+
4. **Ingest as proposals:** `arcs project init` internally calls `ingestGraph(slug)`, which parses codegraph CLI `--json` output and writes up to 20 structural proposals to `proposals/graphify.json` (filename retained for compatibility; rename pending; test files filtered):
|
|
61
|
+
- 8 god nodes (`kind=module`, ranked by callers+callees / impact as a proxy for degree)
|
|
62
|
+
- 8 architecture clusters (`kind=architecture`, synthesized pseudo-communities by directory prefix — codegraph has no community/cluster export)
|
|
63
|
+
- 5 cross-module couplings (`kind=gotcha`, high-degree links across top-level dirs; relations hard-coded as `["calls"]`)
|
|
64
|
+
|
|
65
|
+
Codegraph never writes directly to the knowledge surface. The init envelope returns `data.codegraph.pending_enrichment: true` to signal that proposals are waiting.
|
|
66
|
+
5. **Enrich** with the `enriching-codegraph-proposals` skill — read `arcs proposal list <slug> --json`, decide per-proposal verdicts (keep / merge / drop), persist via `arcs proposal promote` and `arcs proposal drop`. The skill encodes the decision heuristics, output contract, and cost discipline; do not paraphrase.
|
|
67
|
+
6. **Optional graph queries** for evidence during enrichment (sub-agents may run these via the codegraph MCP server, which auto-syncs through its own file watcher):
|
|
68
|
+
- `codegraph_search "entry points and main commands"` → seeds for "key files" reference entries
|
|
69
|
+
- `codegraph_explore` on core modules → seeds for "core modules" entries
|
|
70
|
+
- `codegraph_node "<godNodeLabel>"` → structural summary for module entry bodies
|
|
71
|
+
- `codegraph_impact "<critical-symbol>"` → reverse-impact map for high-risk modules
|
|
72
|
+
- `codegraph_callers` / `codegraph_callees "<symbol>"` → dependency paths for architecture entries
|
|
73
|
+
7. **Hand to typed agents** (in parallel) for code-grounded follow-up entries that go beyond what codegraph proposals cover — see **Agent Dispatch** below.
|
|
74
74
|
|
|
75
75
|
## Content Guidelines
|
|
76
76
|
|
|
@@ -92,9 +92,9 @@ Update via `arcs project update-doc <slug> <doc> --content="..."`.
|
|
|
92
92
|
| `tech-architect` | Cross-module couplings, structural gotchas, lessons | `gotcha`, `lesson` |
|
|
93
93
|
| `qa-analyst` (optional) | Coding-style + convention scan from existing code | `pattern` |
|
|
94
94
|
|
|
95
|
-
Dispatch in parallel —
|
|
96
|
-
- The relevant `KnowledgeProposal` records from `ingestGraph` (so they don't rediscover what
|
|
97
|
-
- Targeted
|
|
95
|
+
Dispatch in parallel — all agents in one message, per the orchestrator's Parallelism rules. Each agent receives:
|
|
96
|
+
- The relevant `KnowledgeProposal` records from `ingestGraph` (so they don't rediscover what codegraph already found)
|
|
97
|
+
- Targeted codegraph queries for evidence (e.g., `codegraph_node` / `codegraph_impact` output for the modules they own)
|
|
98
98
|
- Explicit scope (which files / which kinds to produce)
|
|
99
99
|
|
|
100
100
|
Each agent returns finalized proposals: `{title, kind, summary, keywords, sourceFiles, body}`. The orchestrator dedups, then writes the entries directly via `arcs knowledge create` (or `arcs batch`).
|
|
@@ -104,15 +104,15 @@ Each agent returns finalized proposals: `{title, kind, summary, keywords, source
|
|
|
104
104
|
| Category | Kind | What to discover | Primary agent |
|
|
105
105
|
|----------|------|------------------|---------------|
|
|
106
106
|
| tech stack | `architecture` | Languages, frameworks, runtimes, build tools, versions | `docs-researcher` |
|
|
107
|
-
| key files | `reference` | Entry points, config files, main modules, purposes | `docs-researcher` (use `
|
|
107
|
+
| key files | `reference` | Entry points, config files, main modules, purposes | `docs-researcher` (use `codegraph_search "entry points"`) |
|
|
108
108
|
| code patterns | `pattern` | Recurring design patterns, abstractions, error handling | `qa-analyst` or `system-architect` |
|
|
109
109
|
| coding style | `pattern` | Formatting, linting, import ordering, file organization | `qa-analyst` |
|
|
110
|
-
| core modules | `module` | Core modules / shared functions — what, where, interconnections | `system-architect` (god nodes from
|
|
110
|
+
| core modules | `module` | Core modules / shared functions — what, where, interconnections | `system-architect` (god nodes from codegraph) |
|
|
111
111
|
| external services | `module` | APIs, databases, message queues the project interacts with | `docs-researcher` |
|
|
112
112
|
| third-party libraries | `reference` | Key dependencies and why they are used | `docs-researcher` |
|
|
113
113
|
| features | `feature` | Major user-facing or system-facing features | `docs-researcher` |
|
|
114
|
-
| cross-module couplings | `gotcha` | Hot edges between modules surfaced by
|
|
115
|
-
| architecture clusters | `architecture` |
|
|
114
|
+
| cross-module couplings | `gotcha` | Hot edges between modules surfaced by codegraph | `tech-architect` (auto from `ingestGraph`) |
|
|
115
|
+
| architecture clusters | `architecture` | Pseudo-community / directory groupings from codegraph | `system-architect` (auto from `ingestGraph`) |
|
|
116
116
|
|
|
117
117
|
## Worked Example
|
|
118
118
|
|
|
@@ -127,11 +127,11 @@ arcs project init "Foo" --description="Foo CLI tool" --path="$(pwd)" --json
|
|
|
127
127
|
arcs project update-doc foo overview --content="..." --json
|
|
128
128
|
# ... repeat for tasks, dependencies, knowledge
|
|
129
129
|
|
|
130
|
-
# 4.
|
|
131
|
-
|
|
132
|
-
# ingestGraph
|
|
133
|
-
# init envelope: data.
|
|
134
|
-
# `enriching-
|
|
130
|
+
# 4. Codegraph (if available) — runs inside `arcs project init`
|
|
131
|
+
codegraph index . --force --quiet
|
|
132
|
+
# ingestGraph parses codegraph CLI --json → proposals/graphify.json (filename retained; rename pending)
|
|
133
|
+
# init envelope: data.codegraph.pending_enrichment === true → load
|
|
134
|
+
# `enriching-codegraph-proposals` and run the verdict loop:
|
|
135
135
|
arcs proposal list foo --json
|
|
136
136
|
arcs proposal promote foo <id> --title="..." --summary="..." --body-file=... --kind=module --source-files=... --json
|
|
137
137
|
arcs proposal drop foo <id> --reason="..." --json
|
|
@@ -152,6 +152,6 @@ arcs knowledge create foo "Tech stack: TypeScript + Node 20" --kind=architecture
|
|
|
152
152
|
|-----------|--------|
|
|
153
153
|
| Project already in DAG (slug collision) | Stop. Surface conflict; ask user to rename or use existing |
|
|
154
154
|
| User declines summary | Stop. No mutations performed |
|
|
155
|
-
| `
|
|
155
|
+
| `codegraph` missing | Continue without graph signal; sub-agents run with code reading only |
|
|
156
156
|
| `dependsOn` target missing | Stop. Ask user to init dependencies first or remove the link |
|
|
157
157
|
| Init succeeds but knowledge fan-out fails | Project exists in DAG; rerun knowledge phase later via SYNC |
|