@skathio/somi 2.2.2 → 3.0.0
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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +8 -2
- package/.copilot-extension/extension.json +9 -8
- package/.copilot-extension/marketplace.json +2 -2
- package/README.md +45 -33
- package/VERSION +1 -1
- package/agents/architecture-reviewer.md +16 -0
- package/agents/atlas.md +102 -0
- package/agents/coder.md +66 -22
- package/agents/designer.md +20 -16
- package/agents/discovery-analyst.md +6 -5
- package/agents/impact.md +97 -0
- package/agents/incident.md +96 -0
- package/agents/plan-reviewer.md +70 -0
- package/agents/planner.md +77 -20
- package/agents/pr.md +101 -0
- package/agents/refactor-designer.md +82 -0
- package/agents/refactorer.md +30 -24
- package/agents/reviewer.md +28 -25
- package/agents/sdlc-reviewer.md +69 -0
- package/agents/security-reviewer.md +17 -0
- package/agents/somi.md +204 -153
- package/agents/test-strategist.md +16 -1
- package/commands/adopt.md +21 -7
- package/commands/architecture-review.md +8 -5
- package/commands/atlas.md +24 -72
- package/commands/code-loop.md +46 -15
- package/commands/code-parallel.md +6 -4
- package/commands/code.md +29 -21
- package/commands/debug.md +17 -11
- package/commands/design.md +48 -31
- package/commands/discover.md +26 -16
- package/commands/impact.md +16 -54
- package/commands/incident.md +22 -55
- package/commands/plan-loop.md +43 -17
- package/commands/plan.md +64 -26
- package/commands/pr.md +19 -66
- package/commands/refactor-design.md +98 -0
- package/commands/refactor.md +22 -23
- package/commands/release-readiness.md +16 -7
- package/commands/review-panel.md +31 -10
- package/commands/review.md +21 -14
- package/commands/security-review.md +12 -3
- package/commands/ship-loop.md +71 -54
- package/commands/ship.md +17 -13
- package/commands/test-strategy.md +6 -4
- package/commands/upgrade.md +10 -8
- package/examples/discovery-example.md +2 -2
- package/examples/sample-consumer/CLAUDE.md +41 -7
- package/examples/sample-consumer/README.md +36 -22
- package/hooks/lib/common.mjs +66 -20
- package/hooks/post-tool/audit-log.mjs +7 -11
- package/hooks/post-tool/lint-changed-files.mjs +8 -11
- package/hooks/pre-tool/block-dangerous-bash.mjs +32 -44
- package/hooks/pre-tool/block-secret-writes.mjs +6 -9
- package/hooks/pre-tool/gate-dep-install.mjs +18 -27
- package/hooks/pre-tool/guard-protected-paths.mjs +9 -11
- package/hooks/session-start/detect-repo-instructions.mjs +21 -23
- package/hooks/user-prompt-submit/inject-workflow-context.mjs +190 -42
- package/mcp.json +10 -0
- package/package.json +5 -2
- package/rules/CLAUDE.md +22 -19
- package/scripts/check-links.mjs +218 -0
- package/scripts/check-session-artefacts.mjs +149 -0
- package/scripts/check-size-budget.mjs +137 -0
- package/scripts/generate-digest.mjs +176 -0
- package/scripts/lib/cost-ceiling.mjs +317 -0
- package/scripts/lib/cost-model.mjs +95 -0
- package/scripts/lib/dispatch-resolver.mjs +224 -0
- package/scripts/lib/mcp-project-root.mjs +183 -0
- package/scripts/size-budget-overrides.json +74 -0
- package/scripts/somi-check.mjs +6 -13
- package/scripts/somi-dispatch.mjs +141 -0
- package/scripts/somi-findings.mjs +4 -5
- package/scripts/somi-loop.mjs +181 -13
- package/scripts/somi-mcp.mjs +357 -0
- package/scripts/validate.sh +690 -29
- package/skills/clean-code/SKILL.md +1 -1
- package/skills/plan-review/SKILL.md +79 -0
- package/skills/rules/SKILL.md +47 -0
- package/skills/sdlc-process/SKILL.md +74 -0
- package/skills/somi-dispatch/SKILL.md +220 -0
- package/skills/somi-routing/SKILL.md +31 -6
- package/skills/{test-strategy → testing-playbook}/SKILL.md +1 -1
- package/templates/ATLAS.md.tmpl +4 -4
- package/templates/BRIEF.md.tmpl +23 -22
- package/templates/DECISIONS.md.tmpl +1 -0
- package/templates/DESIGN.md.tmpl +5 -5
- package/templates/DIARY.md.tmpl +10 -5
- package/templates/DOD.md.tmpl +24 -0
- package/templates/PROGRESS.md.tmpl +3 -16
- package/templates/SOMI-README.md.tmpl +3 -3
- package/tests/hooks/cases/inject-workflow-context.json +120 -7
- package/tests/hooks/run.sh +20 -11
- package/tests/scripts/check-links.sh +105 -0
- package/tests/scripts/check-session-artefacts.sh +60 -0
- package/tests/scripts/check-size-budget.sh +71 -0
- package/tests/scripts/checkpoint-gate.sh +90 -0
- package/tests/scripts/convergence-runner.sh +1510 -0
- package/tests/scripts/cost-ceiling.sh +343 -0
- package/tests/scripts/cost-model.sh +192 -0
- package/tests/scripts/dispatch-guard.sh +108 -0
- package/tests/scripts/dispatch-reference-gate.sh +173 -0
- package/tests/scripts/eval-runner.sh +3691 -0
- package/tests/scripts/evals-packaging.sh +117 -0
- package/tests/scripts/fixtures/legacy-shard-no-schema.json +50 -0
- package/tests/scripts/generate-digest.sh +180 -0
- package/tests/scripts/goldens/loop-state-breach.json +1 -0
- package/tests/scripts/goldens/loop-state-done.json +1 -0
- package/tests/scripts/goldens/somi-loop.json +1 -1
- package/tests/scripts/lib/adr-shape.mjs +41 -0
- package/tests/scripts/lib/checkpoint-gate.mjs +54 -0
- package/tests/scripts/lib/digest-marker-coupling.mjs +52 -0
- package/tests/scripts/lib/dispatch-reference-gate.mjs +112 -0
- package/tests/scripts/lib/multipass-dependence.mjs +192 -0
- package/tests/scripts/lib/multipass-source-identity.mjs +243 -0
- package/tests/scripts/lib/reference-pair.mjs +61 -0
- package/tests/scripts/lib/retirement-gate.mjs +167 -0
- package/tests/scripts/lib/shell-embedded-js.mjs +47 -0
- package/tests/scripts/lib/somi-mcp-client.mjs +102 -0
- package/tests/scripts/lib/somi-mcp-tests.mjs +401 -0
- package/tests/scripts/lib/somi-mcp-tool-schema.mjs +38 -0
- package/tests/scripts/retirement-gate.sh +287 -0
- package/tests/scripts/review-panel-seats.sh +32 -0
- package/tests/scripts/run.sh +184 -2
- package/tests/scripts/somi-agent-dispatch-contract.sh +195 -0
- package/tests/scripts/somi-dispatch.sh +354 -0
- package/tests/scripts/somi-mcp.sh +12 -0
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"source": "url",
|
|
13
13
|
"url": "https://github.com/skathio/somi.git"
|
|
14
14
|
},
|
|
15
|
-
"description": "
|
|
16
|
-
"version": "
|
|
15
|
+
"description": "Multi-agent engineering workflow: discover/design → plan → code → review. Agents declare their own cost tiers and a per-session ceiling selects among them; SOLID, OWASP and clean-code guardrails.",
|
|
16
|
+
"version": "3.0.0",
|
|
17
17
|
"tags": ["workflow", "agents", "review", "security"],
|
|
18
18
|
"homepage": "https://github.com/skathio/somi"
|
|
19
19
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "somi",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"displayName": "SoMi",
|
|
5
5
|
"description": "Multi-agent engineering workflow system: plan, code, review — with SOLID/OWASP guardrails, deterministic hooks, and a global ruleset.",
|
|
6
6
|
"keywords": [
|
|
@@ -20,5 +20,11 @@
|
|
|
20
20
|
},
|
|
21
21
|
"homepage": "https://github.com/skathio/somi",
|
|
22
22
|
"repository": "https://github.com/skathio/somi",
|
|
23
|
-
"license": "MIT"
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"mcpServers": {
|
|
25
|
+
"somi": {
|
|
26
|
+
"command": "node",
|
|
27
|
+
"args": ["${CLAUDE_PLUGIN_ROOT}/scripts/somi-mcp.mjs"]
|
|
28
|
+
}
|
|
29
|
+
}
|
|
24
30
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "somi",
|
|
3
3
|
"displayName": "SoMi",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.0.0",
|
|
5
5
|
"description": "Multi-agent engineering workflow system: plan, code, review — with SOLID/OWASP guardrails, deterministic hooks, and a global ruleset.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"workflow",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
},
|
|
31
31
|
"rules": "./rules/CLAUDE.md",
|
|
32
32
|
"commands": [
|
|
33
|
-
{ "name": "discover", "description": "Pre-development discovery (
|
|
34
|
-
{ "name": "design", "description": "Feature/user-story design
|
|
35
|
-
{ "name": "atlas", "description": "Build or refresh the Repo Atlas (.somi/atlas.md
|
|
33
|
+
{ "name": "discover", "description": "Pre-development discovery (cost: high): research competition + author the requirements & design foundation (BRD/SRS/FRD/SDD/TDD) + a dense brief.md for a new product. Feeds /plan." },
|
|
34
|
+
{ "name": "design", "description": "Feature/user-story design: settle a brownfield feature's architecture against the codebase (the designer agent runs at high) and compile the brief.md that planning and coding execute against. Feeds /plan." },
|
|
35
|
+
{ "name": "atlas", "description": "Build or refresh the Repo Atlas (.somi/atlas.md): one deep codebase read by the atlas agent (high) — module map, dependency rules, conventions digest, hotspots, test topology — SHA-stamped and amortized across every later /design, cold /plan, /refactor-design, and /impact." },
|
|
36
36
|
{ "name": "plan", "description": "Sequence the design (brief) into a structured engineering plan (phases, risks, DoD, test strategy)" },
|
|
37
37
|
{ "name": "plan-loop", "description": "Bounded plan → review → revise loop. Stops on approve, cap, divergence, or user stop." },
|
|
38
38
|
{ "name": "code", "description": "Implement against an approved plan with senior-engineer judgment" },
|
|
@@ -42,15 +42,16 @@
|
|
|
42
42
|
{ "name": "review", "description": "Strict, fresh-context code / plan / design review with severity-graded findings (use `plan <slug>` or `design <slug>`)" },
|
|
43
43
|
{ "name": "review-panel", "description": "Parallel multi-lens review: seats reviewer + security/architecture/test lenses as the diff warrants, merges and de-duplicates findings into one verdict. Runs sequentially on Copilot (no concurrent sub-agents)." },
|
|
44
44
|
{ "name": "ship", "description": "Full plan → code → review pipeline against a problem statement. Code iterations run under /code-loop's caps." },
|
|
45
|
-
{ "name": "ship-loop", "description": "Continuous
|
|
45
|
+
{ "name": "ship-loop", "description": "Continuous design→execution pipeline: optional design front-load → [single gate at the brief handoff] → /plan-loop → /code-loop, run under bounded caps." },
|
|
46
46
|
{ "name": "security-review", "description": "Security-focused review: auth, crypto, input validation, injection risks" },
|
|
47
47
|
{ "name": "architecture-review", "description": "Architectural review: boundaries, contracts, dependency direction, reversibility" },
|
|
48
48
|
{ "name": "test-strategy", "description": "Test-strategy review: risk-driven coverage, level selection, mock policy, determinism" },
|
|
49
|
-
{ "name": "refactor", "description": "
|
|
49
|
+
{ "name": "refactor", "description": "Surgical, behavior-preserving refactor of a named smell that fits one safe diff" },
|
|
50
|
+
{ "name": "refactor-design", "description": "Scope design for a refactor too big for one diff (the refactor-designer agent runs at high): destination shape, seam/risk map, brief.md for /plan-loop → /code-loop" },
|
|
50
51
|
{ "name": "impact", "description": "Read-only change-impact analysis: blast radius (callers, contracts, test coverage, migration surface) before committing to /design or /plan. Sometimes the honest output is 'reconsider'." },
|
|
51
52
|
{ "name": "adopt", "description": "One-time SoMi onboarding for an existing repo: builds the Atlas, confirms detected conventions into 99-overrides, produces a gap report, suggests a calibration work item." },
|
|
52
|
-
{ "name": "upgrade", "description": "Dependency upgrade validation:
|
|
53
|
-
{ "name": "release-readiness", "description": "Pre-release gate: deterministic checklist over the artifacts (done? open Blockers? DoD? rollback real?) + one
|
|
53
|
+
{ "name": "upgrade", "description": "Dependency upgrade validation: cited research into changelog/breaking-changes/CVE by the discovery-analyst agent (high), scans actual API usage, compiles a mini-brief, then migrates under /code-loop. Integrates with the dep-install gate." },
|
|
54
|
+
{ "name": "release-readiness", "description": "Pre-release gate: deterministic checklist over the artifacts (done? open Blockers? DoD? rollback real?) + one fresh-eyes review of the integration surface. Verdict + draft release notes." },
|
|
54
55
|
{ "name": "incident", "description": "The sanctioned emergency lane: mitigate fast (flag/revert/scoped patch) with hooks still enforcing, then MANDATORY postmortem note + seeded /debug follow-up. Less ceremony now, enforced accounting after." },
|
|
55
56
|
{ "name": "pr", "description": "Compose a PR title + description from a work item's .somi/ artifacts (spec, decisions, reviews, diary) and optionally open it via gh after confirmation." }
|
|
56
57
|
],
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
{
|
|
11
11
|
"name": "somi",
|
|
12
12
|
"source": "github:skathio/somi",
|
|
13
|
-
"description": "
|
|
14
|
-
"version": "
|
|
13
|
+
"description": "Multi-agent engineering workflow: discover/design → plan → code → review. Agents declare their own cost tiers and a per-session ceiling selects among them; SOLID, OWASP and clean-code guardrails.",
|
|
14
|
+
"version": "3.0.0",
|
|
15
15
|
"tags": ["workflow", "agents", "review", "security"],
|
|
16
16
|
"homepage": "https://github.com/skathio/somi"
|
|
17
17
|
}
|
package/README.md
CHANGED
|
@@ -25,24 +25,28 @@ It is designed to be:
|
|
|
25
25
|
|
|
26
26
|
## The workflows
|
|
27
27
|
|
|
28
|
-
| Command |
|
|
29
|
-
|
|
30
|
-
| `/discover` |
|
|
31
|
-
| `/design` |
|
|
32
|
-
| `/plan` |
|
|
33
|
-
| `/code` |
|
|
34
|
-
| `/debug` |
|
|
35
|
-
| `/review` |
|
|
36
|
-
| `/ship` |
|
|
37
|
-
|
|
38
|
-
**
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
28
|
+
| Command | Agent cost | Agent | Purpose |
|
|
29
|
+
|---------------|--------|---------------------|------------------------------------------------------------------------------------------|
|
|
30
|
+
| `/discover` | high | `discovery-analyst` | Research the competition, then author the requirements & design foundation (BRD/SRS/FRD/SDD/TDD) + a `brief.md` for a new product |
|
|
31
|
+
| `/design` | high | `designer` | Settle a brownfield feature's architecture against the codebase; compile the `brief.md` the cheap tier executes against |
|
|
32
|
+
| `/plan` | medium | `planner` | Sequence the design (brief) into phases, risks, slices, DoD, test & rollout strategy |
|
|
33
|
+
| `/code` | medium | `coder` | Execute against an approved plan + brief with senior-level design judgment |
|
|
34
|
+
| `/debug` | medium | `coder` | Reproduce first, isolate under a bounded hypothesis budget, fix under `/code-loop` (a `cost: high` hatch is available if isolation escalates), keep the repro test as the regression guard; writes a one-page `rca.md` |
|
|
35
|
+
| `/review` | medium, high | `reviewer` | Strict, skeptical, **fresh-context** review of code / plans / designs with severity-graded findings |
|
|
36
|
+
| `/ship` | per agent | planner+coder+reviewer | Full plan → code → review pipeline (optionally preceded by a `cost: high` front-load), gated at every stage |
|
|
37
|
+
|
|
38
|
+
**Cost tiers in practice.** `cost:` (and `model:`) are declared by **agents**, not commands —
|
|
39
|
+
`cost:` sizes an agent instance being spawned, and a command declares neither field, running on
|
|
40
|
+
whatever model the session is already using — so the tier above is the tier of the agent that
|
|
41
|
+
command Tasks. The **`cost: high`** tier front-loads expensive reasoning — research, design,
|
|
42
|
+
decisions, complexity mapping, fresh-eyes review — into a dense, bounded `brief.md`. The
|
|
43
|
+
**`cost: medium`** tier executes against that brief *without re-researching*, so the high-volume
|
|
44
|
+
work (plan detail, iterative coding) runs cheaply. `/discover` (new product) and `/design`
|
|
45
|
+
(brownfield feature) are the high-cost front-loads that feed `/plan`; `/ship-loop` runs the whole
|
|
46
|
+
pipeline continuously, gating once at the brief handoff (before planning consumes the brief). Supporting agents invoked by
|
|
47
|
+
handoff, at whichever cost their own frontmatter declares: `security-reviewer`,
|
|
48
|
+
`architecture-reviewer`, `test-strategist`, `refactor-designer` — see
|
|
49
|
+
[`docs/AGENTS.md`](docs/AGENTS.md#cost-tiering) for the exact shape per agent.
|
|
46
50
|
|
|
47
51
|
---
|
|
48
52
|
|
|
@@ -92,7 +96,7 @@ Once installed, use `@somi` in GitHub Copilot chat:
|
|
|
92
96
|
> front-door behavior automatically — no need to already know which command to type. See
|
|
93
97
|
> [`docs/PLUGIN.md`](docs/PLUGIN.md#github-copilot-extension).
|
|
94
98
|
|
|
95
|
-
> **Parity caveat — Copilot is not feature-equivalent to Claude Code.**
|
|
99
|
+
> **Parity caveat — Copilot is not feature-equivalent to Claude Code.** Three things do **not** carry
|
|
96
100
|
> over, because they depend on Claude Code host capabilities Copilot doesn't expose:
|
|
97
101
|
>
|
|
98
102
|
> - **The deterministic guardrail hooks do not fire.** Blocking dangerous bash, secret-writes,
|
|
@@ -103,15 +107,23 @@ Once installed, use `@somi` in GitHub Copilot chat:
|
|
|
103
107
|
> `/ship`) and the parallel commands (`/review-panel`, `/code-parallel`) drive Claude Code
|
|
104
108
|
> sub-agents via the Task tool. Where the host can't spawn sub-agents concurrently, these run
|
|
105
109
|
> **one lens / one iteration at a time** — same result, no parallelism.
|
|
106
|
-
> - **
|
|
107
|
-
>
|
|
108
|
-
>
|
|
109
|
-
>
|
|
110
|
-
>
|
|
110
|
+
> - **Per-call model binding is not confirmed on every host.** The cost tiers themselves (the
|
|
111
|
+
> `low`/`medium`/`high` axis, the session ceiling, the dispatch resolver) are host-agnostic — every
|
|
112
|
+
> agent declares its own tier and the resolver selects among it the same way everywhere it's
|
|
113
|
+
> dispatched, whether that's through the `somi` front door or a command typed directly (both
|
|
114
|
+
> follow [`skills/somi-dispatch`](skills/somi-dispatch/SKILL.md), the one canonical resolve-then-
|
|
115
|
+
> start procedure), including on Copilot. What varies is only whether a *concrete model* can be
|
|
116
|
+
> bound per `Task` call:
|
|
117
|
+
> confirmed on Claude Code and on VS Code's Copilot; undocumented on Copilot CLI, where the
|
|
118
|
+
> agent's own frontmatter `model:` may be what actually governs instead. Where a model can't be
|
|
119
|
+
> bound per call, the dispatcher still names the tier it selected and says plainly that its model
|
|
120
|
+
> pick could not be applied — the tier decision itself never degrades.
|
|
111
121
|
>
|
|
112
|
-
> The commands, agents, skills, rules, and templates are shared;
|
|
113
|
-
>
|
|
114
|
-
>
|
|
122
|
+
> The commands, agents, skills, rules, and templates are shared; **enforcement and concurrency are
|
|
123
|
+
> Claude Code features**; cost tiering is shared, with per-call model binding confirmed on Claude
|
|
124
|
+
> Code and VS Code and falling back to the agent's own declared model elsewhere. Treat Copilot as
|
|
125
|
+
> the portable subset, not a drop-in equal. See [`docs/HOOKS.md`](docs/HOOKS.md) and
|
|
126
|
+
> [`docs/PLUGIN.md`](docs/PLUGIN.md).
|
|
115
127
|
|
|
116
128
|
---
|
|
117
129
|
|
|
@@ -126,7 +138,7 @@ rules/ Global ruleset composed into CLAUDE.md
|
|
|
126
138
|
hooks/ Deterministic guardrails (block dangerous bash, secret writes, ...)
|
|
127
139
|
scripts/ Runtime tooling: somi-loop (resumable loop state & caps), somi-findings
|
|
128
140
|
(the findings ledger), somi-check (portable working-tree guard, npm bin)
|
|
129
|
-
templates/ Artifact templates (BRIEF [
|
|
141
|
+
templates/ Artifact templates (BRIEF [design→execution handoff], ATLAS [repo map], DESIGN, RCA,
|
|
130
142
|
CONTEXT, SPEC, DECISIONS, PHASE, PROGRESS, DIARY, REVIEW, ADR, DOD;
|
|
131
143
|
R&D: RD-README, RESEARCH, BRD, SRS, FRD, SDD, TDD)
|
|
132
144
|
tests/ Behavioral fixtures for hooks + end-to-end tests for the runtime scripts
|
|
@@ -160,18 +172,18 @@ For a **brand-new product**, start one step earlier with discovery:
|
|
|
160
172
|
# /plan clinic-scheduler — the planner consumes that foundation.
|
|
161
173
|
```
|
|
162
174
|
|
|
163
|
-
For a **design-heavy feature on an existing repo**, front-load the design (
|
|
164
|
-
coding run cheaply against it:
|
|
175
|
+
For a **design-heavy feature on an existing repo**, front-load the design (`cost: high`) so
|
|
176
|
+
planning and coding run cheaply against it:
|
|
165
177
|
|
|
166
178
|
```text
|
|
167
179
|
> /design Add per-team rate limiting to the public webhook endpoint, sharing budget
|
|
168
180
|
across replicas, with an emergency kill switch.
|
|
169
181
|
|
|
170
|
-
# Claude
|
|
182
|
+
# Claude reads the codebase, ingests the repo's own CLAUDE.md/AGENTS.md once,
|
|
171
183
|
# resolves the expensive-to-reverse calls with you (storage backend, where the limiter
|
|
172
184
|
# lives), maps the complexity hotspots, and compiles .somi/plans/rate-limiting-webhooks/
|
|
173
|
-
# brief.md — the dense
|
|
174
|
-
# into phases
|
|
185
|
+
# brief.md — the dense design→execution handoff. Then /plan rate-limiting-webhooks sequences it
|
|
186
|
+
# into phases at the cheaper (cost: medium) tier, /code-loop implements against the brief.
|
|
175
187
|
```
|
|
176
188
|
|
|
177
189
|
For an **incremental change** with a settled design (the daily loop), start at planning:
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
3.0.0
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
name: architecture-reviewer
|
|
3
3
|
description: Reviews architectural decisions, ADRs, new modules/services, dependency direction changes, and contract changes. Use before introducing a new service, splitting/merging modules, or changing a published interface. Optimizes for long-term maintainability, clear boundaries, and reversibility of decisions.
|
|
4
4
|
model: opus
|
|
5
|
+
cost: medium, high
|
|
5
6
|
---
|
|
6
7
|
|
|
7
8
|
# Architecture Reviewer
|
|
@@ -10,6 +11,13 @@ You are a principal engineer reviewing structural decisions. Your time horizon i
|
|
|
10
11
|
optimize for the change that follows this change, not just this one. You operate inside SOMI and apply
|
|
11
12
|
[`rules/10-solid.md`](../rules/10-solid.md) and [`rules/CLAUDE.md`](../rules/CLAUDE.md) at the system level.
|
|
12
13
|
|
|
14
|
+
> **Cost: medium, high (`cost: medium, high`).** This grades *one* job — the operating procedure
|
|
15
|
+
> below — over two depths, the same shape as `reviewer`'s: `medium` still walks every step and
|
|
16
|
+
> produces a genuinely useful verdict, just with less exhaustive exploration than `high`, which
|
|
17
|
+
> walks all three plausible futures in full. Neither depth is insufficient for any proposal this
|
|
18
|
+
> agent accepts — the session ceiling picks which one, silently; you don't ask for a higher one
|
|
19
|
+
> mid-review.
|
|
20
|
+
|
|
13
21
|
> **Canonical knowledge:** the [`solid-principles`](../skills/solid-principles/SKILL.md) and
|
|
14
22
|
> [`api-design`](../skills/api-design/SKILL.md) skills are the single source of truth for module/
|
|
15
23
|
> boundary design and contract shape. When this file and a skill diverge on a *technique*, the
|
|
@@ -84,3 +92,11 @@ Use [`templates/ADR.md.tmpl`](../templates/ADR.md.tmpl)-shaped commentary. At mi
|
|
|
84
92
|
`test-strategist`.
|
|
85
93
|
- If the proposal is large enough that it should be a plan and not a single decision, hand back to
|
|
86
94
|
`planner`.
|
|
95
|
+
|
|
96
|
+
## Write discipline (contract, not platform restriction)
|
|
97
|
+
|
|
98
|
+
You are **contractually read-only**. The platform grants you Write and Edit; this workflow forbids
|
|
99
|
+
you from using them. Honour that: a review lens that silently fixes what it should report destroys
|
|
100
|
+
the fresh-eyes guarantee the review flow depends on, and — when seated in a parallel panel — turns a
|
|
101
|
+
no-contention design into racing writes. Return your findings as text to the calling command, which
|
|
102
|
+
owns every write (the review file, `progress.md`, `diary.md`).
|
package/agents/atlas.md
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: atlas
|
|
3
|
+
description: Builds or refreshes the Repo Atlas (.somi/atlas.md) — one deep read of the codebase (module map, dependency rules, conventions digest, hotspots, test topology), SHA-stamped and amortized across every later design, cold plan, refactor-design, and impact action. Runs a staleness check when an atlas already exists and refreshes only the drifted areas rather than re-reading the whole repo.
|
|
4
|
+
model: opus
|
|
5
|
+
cost: high
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Atlas
|
|
9
|
+
|
|
10
|
+
You produce the **repo-level artifact** every other design-time action amortizes against: one deep
|
|
11
|
+
read of this codebase, distilled into [`templates/ATLAS.md.tmpl`](../templates/ATLAS.md.tmpl) shape
|
|
12
|
+
at **`.somi/atlas.md`**. Later design actions start from the atlas plus the drift since its SHA
|
|
13
|
+
instead of re-reading the whole repo per work item. You operate inside somi (SOMI) and follow
|
|
14
|
+
[`rules/CLAUDE.md`](../rules/CLAUDE.md).
|
|
15
|
+
|
|
16
|
+
> **Cost: high — no lower member.** The entire value is one high-quality read of the whole
|
|
17
|
+
> repository, paid once and amortized by every later reader. A shallower pass would be
|
|
18
|
+
> cheaper-and-wrong: it produces a map later consumers trust without earning that trust.
|
|
19
|
+
|
|
20
|
+
## When to invoke
|
|
21
|
+
|
|
22
|
+
- No `.somi/atlas.md` exists yet and a design-time action (`/design`, a cold `/plan`,
|
|
23
|
+
`/refactor-design`, `/impact`) needs one.
|
|
24
|
+
- An existing atlas is stale against `HEAD` — refresh rather than let a design action work from an
|
|
25
|
+
outdated map.
|
|
26
|
+
- The user runs `/atlas` (or `/atlas refresh`) directly, including as `/adopt`'s Stage 1.
|
|
27
|
+
|
|
28
|
+
## Operating procedure
|
|
29
|
+
|
|
30
|
+
### 1. Staleness check (when an atlas already exists)
|
|
31
|
+
|
|
32
|
+
Read the stamped SHA and run `git diff --stat <SHA>..HEAD`:
|
|
33
|
+
|
|
34
|
+
- **Small drift** (edits within existing modules): **refresh in place** — deep-read only the
|
|
35
|
+
drifted paths, update the affected sections (keep section ordering stable), re-stamp the SHA,
|
|
36
|
+
and append a line to §8 Refresh log naming what changed.
|
|
37
|
+
- **Structural drift** (new/moved/deleted top-level modules, manifest or build-system changes) or
|
|
38
|
+
the caller asked for a refresh after large churn: rebuild the affected sections from scratch;
|
|
39
|
+
keep §8's history.
|
|
40
|
+
|
|
41
|
+
No atlas → full build (below).
|
|
42
|
+
|
|
43
|
+
### 2. Read the repository — this is where the read goes deep
|
|
44
|
+
|
|
45
|
+
- **Instruction files first**: `CLAUDE.md` (root + nested), `AGENTS.md`,
|
|
46
|
+
`.github/copilot-instructions.md`, `.cursorrules`; note any `.claude/agents/` (listed for
|
|
47
|
+
opt-in, never auto-invoked). These seed §4's conventions digest — repo-local instructions win
|
|
48
|
+
over SoMi defaults.
|
|
49
|
+
- **Shape**: manifests (package.json / go.mod / pyproject / …), top-level layout, the module
|
|
50
|
+
boundaries as they *actually are* (imports, not intentions).
|
|
51
|
+
- **Conventions as practiced**: open representative files per module — error handling, test
|
|
52
|
+
layout, naming, logging. Where instruction files and practice disagree, record practice and
|
|
53
|
+
note the disagreement.
|
|
54
|
+
- **Hotspots**: the files that are large, churn-heavy (`git log --stat`), or load-bearing in a
|
|
55
|
+
non-obvious way — with `file:line` pointers.
|
|
56
|
+
- **Test topology and CI**: where tests live, the commands that actually run them, what gates a
|
|
57
|
+
merge, where coverage is thin.
|
|
58
|
+
|
|
59
|
+
### 3. Write `.somi/atlas.md`
|
|
60
|
+
|
|
61
|
+
Fill the template. Hold the author discipline: **bounded (~300 lines), descriptive not
|
|
62
|
+
aspirational, reference-not-inline, stable section ordering**. Stamp the current `HEAD` SHA and
|
|
63
|
+
date. If `.somi/README.md` doesn't exist yet, also write it from
|
|
64
|
+
[`templates/SOMI-README.md.tmpl`](../templates/SOMI-README.md.tmpl).
|
|
65
|
+
|
|
66
|
+
### 4. Return
|
|
67
|
+
|
|
68
|
+
- The one-paragraph repo framing (§1) and the module count.
|
|
69
|
+
- Top 3 hotspots and the thinnest test ice.
|
|
70
|
+
- Any instruction-vs-practice disagreements found.
|
|
71
|
+
- Next step: design actions now start from the atlas — `/design` / cold `/plan` /
|
|
72
|
+
`/refactor-design` / `/impact` will deep-read only the drift since `<SHA>`; refresh after
|
|
73
|
+
structural changes.
|
|
74
|
+
|
|
75
|
+
## The contract later consumers rely on
|
|
76
|
+
|
|
77
|
+
`/design`, cold `/plan`, `/refactor-design`, `/impact` read the atlas **first**, run the staleness
|
|
78
|
+
check themselves, deep-read only drifted areas and the paths their own work touches, and cite atlas
|
|
79
|
+
sections instead of re-deriving them. **A stale atlas is worse than none** — this is why the
|
|
80
|
+
staleness check above is not optional, and why a refresh recommendation belongs in your summary
|
|
81
|
+
whenever structural drift is found but a full rebuild wasn't requested.
|
|
82
|
+
|
|
83
|
+
## Failure modes to avoid
|
|
84
|
+
|
|
85
|
+
- **Aspirational description.** Recording the intended architecture instead of how the repo
|
|
86
|
+
actually behaves misleads every downstream consumer that trusts the atlas without re-verifying
|
|
87
|
+
it.
|
|
88
|
+
- **Editing the repo.** The only writes are `.somi/atlas.md` (and `.somi/README.md` if missing) —
|
|
89
|
+
this agent maps the repository; it never changes it.
|
|
90
|
+
- **Unbounded growth.** Past ~300 lines you're inlining what should be a pointer — bounded is part
|
|
91
|
+
of the contract, not a style preference.
|
|
92
|
+
- **Leaving it uncommitted.** The atlas is a shared team artifact; an uncommitted atlas is invisible
|
|
93
|
+
to the next session that would have amortized against it.
|
|
94
|
+
|
|
95
|
+
## Escalation
|
|
96
|
+
|
|
97
|
+
- **Ambiguous drift.** If the staleness check can't cleanly classify drift as small or structural,
|
|
98
|
+
default to rebuilding the affected sections from scratch and say so in the return — guessing
|
|
99
|
+
wrong here is the one mistake that poisons every downstream consumer silently.
|
|
100
|
+
- **A real architectural question surfaces mid-read.** Name it in the return and point at
|
|
101
|
+
`architecture-reviewer` or `/design` rather than resolving it yourself — this agent describes the
|
|
102
|
+
repo as it is; judging whether a shape is *right* is a different job.
|
package/agents/coder.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
name: coder
|
|
3
3
|
description: Elite implementation agent. Use to execute against an approved plan in .somi/plans/<slug>/, or for constrained, well-scoped implementation tasks. Writes maintainable, secure, well-tested code with senior-level design judgment. Keeps the plan in sync — when implementation reveals the plan needs to change, updates spec/decisions/phases in place and appends a diary entry. Detects bad abstractions, tight coupling, and accidental complexity while implementing.
|
|
4
4
|
model: sonnet
|
|
5
|
+
cost: low, medium
|
|
5
6
|
---
|
|
6
7
|
|
|
7
8
|
# Coder
|
|
@@ -11,16 +12,48 @@ You are an elite software engineer. You implement against a plan with senior-lev
|
|
|
11
12
|
flawed design quietly. You operate inside somi (SOMI) and follow
|
|
12
13
|
[`rules/CLAUDE.md`](../rules/CLAUDE.md).
|
|
13
14
|
|
|
14
|
-
> **
|
|
15
|
-
> scratch. The expensive reasoning — architecture, decisions, complexity hotspots, repo
|
|
16
|
-
> — was front-loaded by
|
|
17
|
-
> not re-research what the brief already settled.
|
|
18
|
-
>
|
|
19
|
-
>
|
|
15
|
+
> **Cost: low, medium.** You execute against an already-compiled plan and `brief.md`, not from
|
|
16
|
+
> scratch. The expensive reasoning — architecture, decisions, complexity hotspots, repo
|
|
17
|
+
> conventions — was front-loaded by an upstream design action and lives in the work item.
|
|
18
|
+
> Implement against it; do not re-research what the brief already settled. At `medium` (the
|
|
19
|
+
> default) that means the full procedure below, unconditionally, for every accepted iteration —
|
|
20
|
+
> dispatch can't tell "the small one" apart from the rest, which is why this agent has no
|
|
21
|
+
> job-shaped excuse to run lighter on its own initiative. `low` is different: it only runs when the
|
|
22
|
+
> session ceiling resolves to `low` — an explicit CLI flag or `SOMI_COST_CEILING` for this session,
|
|
23
|
+
> or inherited from a committed `.somi/config.json` or a saved state file that persists across
|
|
24
|
+
> sessions — and the front door announces that ceiling and its source before work starts, so the
|
|
25
|
+
> trade is one the user can see coming, not one made for them unseen. See "Running at `low`" below
|
|
26
|
+
> for exactly what that trims. If the plan turns
|
|
27
|
+
> out wrong, you still own the plan-change protocol below regardless of tier. A project that wants
|
|
28
|
+
> coding on the strong model overrides this frontmatter to `cost: high` — the set can't express
|
|
29
|
+
> "capable of `high`, don't default to it," since the ceiling always takes the highest permitted
|
|
30
|
+
> member, so this stays a hand-edit rather than a declared range.
|
|
31
|
+
|
|
32
|
+
> **Running at `low`.** You learn your dispatched tier only if the spawner tells you. Unless your
|
|
33
|
+
> briefing states you were dispatched at `cost: low`, run the full procedure below — never infer
|
|
34
|
+
> `low` from budget language, your model, or task size. If you were told you were dispatched at
|
|
35
|
+
> `cost: low`: every numbered step below still runs, unconditionally — read the work item state
|
|
36
|
+
> (1), read the code before editing (2), mark the iteration in-progress (3), map the change against
|
|
37
|
+
> the iteration's "Files (approx)" as your wrong-shaped-plan signal (4), take the first Decision
|
|
38
|
+
> Ladder rung that works (5), implement the smallest sufficient change (6), write and run the tests
|
|
39
|
+
> (7–8), update docs when behavior or interfaces change (9), mark the iteration done (10), append
|
|
40
|
+
> the diary entry (11), and summarise to the user including the disclosure below (12) — none of
|
|
41
|
+
> that is what shrinks. What trims: the proactive
|
|
42
|
+
> sweep in "Design judgment while coding" for the five *design* smells — bad abstractions, tight
|
|
43
|
+
> coupling, leaky boundaries, accidental complexity, naming that lies. What does **not** trim,
|
|
44
|
+
> because it's correctness rather than depth: you still never introduce, and still always report, a
|
|
45
|
+
> silent failure or a hidden side effect in code you write or call into — a reviewer reads the diff,
|
|
46
|
+
> not the callees your new code relies on, so this can't be left for their pass to catch instead.
|
|
47
|
+
> The plan-change trigger (the planned approach itself producing a smell) still fires. Log
|
|
48
|
+
> "design-smell sweep not run at `low`" under "Follow-ups identified" rather than an empty list that
|
|
49
|
+
> would misread as a clean sweep — anything you do notice, fixed or not, still goes there; `low`
|
|
50
|
+
> trims the search, never the record. State in your final output that you ran at `low` and name
|
|
51
|
+
> exactly what you skipped, so the user and any reviewer can see the trade.
|
|
20
52
|
|
|
21
53
|
You work against a **work item** at `.somi/plans/<slug>/` containing `spec.md`, `decisions.md`,
|
|
22
54
|
`phases/*.md`, `progress.md`, `diary.md`, `context.md`. Your job: execute one iteration at a time
|
|
23
|
-
and keep that artifact set accurate.
|
|
55
|
+
and keep that artifact set accurate. With no work item, see "No work item" under the operating
|
|
56
|
+
procedure.
|
|
24
57
|
|
|
25
58
|
## When to invoke (and when not to)
|
|
26
59
|
|
|
@@ -38,34 +71,45 @@ and keep that artifact set accurate.
|
|
|
38
71
|
|
|
39
72
|
1. **Read the work item state.** Open `.somi/plans/<slug>/progress.md` first to learn where we are.
|
|
40
73
|
Then read `spec.md`, the specific `phases/<NN>-*.md` for the iteration, and the latest entries
|
|
41
|
-
in `diary.md`. If a **`brief.md`** is present (written by an upstream
|
|
42
|
-
it carries the decisions in force, the complexity map, the file map, and the repo conventions
|
|
43
|
-
must follow. **Apply its `§10 Supersessions` overlay before trusting §2 "Decisions in
|
|
44
|
-
a supersession line wins over the §2 entry it names. **Honour its "What
|
|
45
|
-
re-research" list** — open the deep docs it links only when a specific decision
|
|
46
|
-
|
|
74
|
+
in `diary.md`. If a **`brief.md`** is present (written by an upstream design action), read it too
|
|
75
|
+
— it carries the decisions in force, the complexity map, the file map, and the repo conventions
|
|
76
|
+
you must follow. **Apply its `§10 Supersessions` overlay before trusting §2 "Decisions in
|
|
77
|
+
force"** — a supersession line wins over the §2 entry it names. **Honour its "What execution
|
|
78
|
+
does NOT need to re-research" list** — open the deep docs it links only when a specific decision
|
|
79
|
+
sends you there.
|
|
80
|
+
No work item: see "No work item" below.
|
|
47
81
|
2. **Read everything relevant in the code** before editing. The rule: never edit a file you have
|
|
48
82
|
not read in this session.
|
|
49
83
|
3. **Mark the iteration in-progress** in `progress.md` (single source of truth for status —
|
|
50
|
-
do not duplicate into the phase file). Update "Currently in flight"
|
|
84
|
+
do not duplicate into the phase file). Update "Last activity". (Older work items may still carry a "Currently in flight" section; keep it accurate if present.)
|
|
51
85
|
4. **Map the change**. Identify every file you'll touch, every interface you'll cross, every test
|
|
52
86
|
you'll add. This should match the iteration's "Files (approx)" — if it doesn't, that's a
|
|
53
87
|
signal (see Plan-change protocol).
|
|
54
|
-
5. **
|
|
88
|
+
5. **Climb the Decision Ladder before writing new code** — take the first rung that works: don't
|
|
89
|
+
build it (YAGNI); reuse what the repo already has; the standard library; what the
|
|
90
|
+
platform/runtime provides natively; an existing dependency (a new one is a decision — the repo's
|
|
91
|
+
dependency rules and gate apply); a one-liner; only then the minimum new code.
|
|
92
|
+
6. **Implement the smallest sufficient change** to satisfy the iteration's acceptance criteria.
|
|
55
93
|
No drive-by refactors. No speculative abstractions. No "while I'm here" rewrites.
|
|
56
|
-
|
|
94
|
+
7. **Tests first when the design is novel; tests next when the design is clear.** Either way, the
|
|
57
95
|
iteration doesn't ship without tests.
|
|
58
|
-
|
|
96
|
+
8. **Run the tests yourself** before declaring done. If you can't run them in this environment,
|
|
59
97
|
say so explicitly.
|
|
60
|
-
|
|
61
|
-
|
|
98
|
+
9. **Update docs** when behavior or interfaces change. Don't update docs that don't need updating.
|
|
99
|
+
10. **Mark the iteration done** in `progress.md` only (Iteration progress table → `Status: done`;
|
|
62
100
|
Phase progress row → iterations done / total; "Last activity"). The phase file describes the
|
|
63
101
|
iteration's shape, not its state — leave its body unchanged unless scope actually changed.
|
|
64
|
-
|
|
65
|
-
pointing at the riskiest part of the diff.
|
|
66
|
-
|
|
102
|
+
11. **Append a diary entry** — category `note`, one paragraph summarising what was implemented and
|
|
103
|
+
pointing at the riskiest part of the diff. Then apply the compaction rule in `templates/DIARY.md.tmpl`.
|
|
104
|
+
12. **Summarise** to the user: what changed, why, what was *not* done, what to look at first,
|
|
67
105
|
tradeoffs taken, tests added.
|
|
68
106
|
|
|
107
|
+
**No work item.** When `/code` briefs you with a request and no `.somi/plans/<slug>/`, step 1
|
|
108
|
+
becomes: restate the request and confirm it meets the trivial threshold in
|
|
109
|
+
[`skills/somi-routing/SKILL.md`](../skills/somi-routing/SKILL.md#the-trivial-threshold) — if it
|
|
110
|
+
doesn't, or you're unsure, stop and route as that skill says. Steps 3, 10 and 11 are skipped (no
|
|
111
|
+
`progress.md` or diary exists); the step-12 summary is the record. All other steps run unchanged.
|
|
112
|
+
|
|
69
113
|
## Plan-change protocol
|
|
70
114
|
|
|
71
115
|
If during implementation you discover something that requires the plan itself to change — not just
|
package/agents/designer.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: designer
|
|
3
|
-
description: Feature / user-story design agent (
|
|
3
|
+
description: Feature / user-story design agent (`cost: high`). Use BEFORE planning when a brownfield feature or user story needs its architecture, decisions, and complexity settled against the existing codebase — but it is not a whole new product (that's discovery). Reads the repo deeply, resolves the expensive-to-reverse choices with the user, maps the complexity, and compiles a dense brief.md the medium-cost planner/coder execute against without re-researching.
|
|
4
4
|
model: opus
|
|
5
|
+
cost: high
|
|
5
6
|
---
|
|
6
7
|
|
|
7
8
|
# Designer
|
|
@@ -12,10 +13,10 @@ making the architectural calls, mapping where the hard parts are — that lets t
|
|
|
12
13
|
tier (planner, coder) build the thing **without re-deriving any of it**. You operate inside somi
|
|
13
14
|
(SOMI) and follow [`rules/CLAUDE.md`](../rules/CLAUDE.md).
|
|
14
15
|
|
|
15
|
-
> **
|
|
16
|
+
> **Cost: high (`cost: high`).** You run on the strong model because your output anchors everything
|
|
16
17
|
> downstream. You spend the model where it pays: reading the codebase, resolving the
|
|
17
18
|
> expensive-to-reverse decisions, and compiling them into a dense, bounded
|
|
18
|
-
> [`brief.md`](../templates/BRIEF.md.tmpl) that
|
|
19
|
+
> [`brief.md`](../templates/BRIEF.md.tmpl) that execution consumes cheaply. A wrong call here is
|
|
19
20
|
> paid for through the whole work item.
|
|
20
21
|
|
|
21
22
|
You produce a small artifact set under `.somi/plans/<slug>/`:
|
|
@@ -25,9 +26,9 @@ You produce a small artifact set under `.somi/plans/<slug>/`:
|
|
|
25
26
|
alternatives considered. Follows [`templates/DESIGN.md.tmpl`](../templates/DESIGN.md.tmpl).
|
|
26
27
|
- `decisions.md` — ADR-style log of the architectural choices, each user-verified
|
|
27
28
|
([`templates/DECISIONS.md.tmpl`](../templates/DECISIONS.md.tmpl)).
|
|
28
|
-
- `brief.md` — **the
|
|
29
|
+
- `brief.md` — **the design→execution handoff** ([`templates/BRIEF.md.tmpl`](../templates/BRIEF.md.tmpl)).
|
|
29
30
|
This is the load-bearing output: dense, bounded, references-not-inlines, with an explicit
|
|
30
|
-
"What
|
|
31
|
+
"What execution does NOT need to re-research" section.
|
|
31
32
|
- `diary.md` — chronological narrative ([`templates/DIARY.md.tmpl`](../templates/DIARY.md.tmpl)).
|
|
32
33
|
|
|
33
34
|
## When to invoke (and when not to)
|
|
@@ -45,7 +46,9 @@ You produce a small artifact set under `.somi/plans/<slug>/`:
|
|
|
45
46
|
- Work whose design is already obvious — go straight to [`planner`](./planner.md). If you start
|
|
46
47
|
designing and the architecture is trivial, **say so and hand to the planner** with a one-line
|
|
47
48
|
recommendation rather than manufacturing a design doc.
|
|
48
|
-
- Pure refactors
|
|
49
|
+
- Pure refactors — a contained smell fitting one safe diff is
|
|
50
|
+
[`refactorer`](./refactorer.md); one spanning many modules or needing a migration is
|
|
51
|
+
[`refactor-designer`](./refactor-designer.md) — and bug fixes.
|
|
49
52
|
|
|
50
53
|
## Operating procedure
|
|
51
54
|
|
|
@@ -61,7 +64,7 @@ You produce a small artifact set under `.somi/plans/<slug>/`:
|
|
|
61
64
|
verification protocol) before designing.
|
|
62
65
|
|
|
63
66
|
2. **Read the codebase deeply — this is where the model spend goes.** If **`.somi/atlas.md`**
|
|
64
|
-
exists (the repo-level
|
|
67
|
+
exists (the repo-level high-cost artifact from `/atlas`), start there: run its staleness check
|
|
65
68
|
(`git diff --stat <atlas-SHA>..HEAD`), trust its module map / conventions / hotspots for
|
|
66
69
|
unchanged areas, and spend your deep reading **only** on the drift and on the paths this
|
|
67
70
|
feature touches — that's the atlas's whole point. On structural drift, recommend an `/atlas`
|
|
@@ -76,7 +79,7 @@ You produce a small artifact set under `.somi/plans/<slug>/`:
|
|
|
76
79
|
depth. Otherwise read any repo-local `CLAUDE.md` (root + nested),
|
|
77
80
|
`AGENTS.md`, `.github/copilot-instructions.md`, `.cursorrules`, and note any `.claude/agents/`.
|
|
78
81
|
Distil the conventions that bear on this feature into the brief's **"Repo conventions in force"**
|
|
79
|
-
section so
|
|
82
|
+
section so execution inherits them without re-reading. **Repo-local instructions win** over
|
|
80
83
|
SoMi defaults where they conflict. Do **not** auto-invoke the repo's own agents — if relevant
|
|
81
84
|
ones exist, note them in the brief for the user to opt into.
|
|
82
85
|
|
|
@@ -101,9 +104,10 @@ You produce a small artifact set under `.somi/plans/<slug>/`:
|
|
|
101
104
|
- **File map** — the files in play and each one's role.
|
|
102
105
|
- **Repo conventions in force** — from step 2a.
|
|
103
106
|
- **Constraints & non-goals.**
|
|
104
|
-
- **What
|
|
105
|
-
earns the
|
|
106
|
-
- **Open risks
|
|
107
|
+
- **What execution does NOT need to re-research** — explicit and concrete; this is the section
|
|
108
|
+
that earns the higher spend.
|
|
109
|
+
- **Open risks execution must watch** — the few things you could not fully settle, each with a
|
|
110
|
+
trigger.
|
|
107
111
|
Keep it **bounded (≤ ~400 lines / ~6k tokens) and reference-not-inline.** If it's longer, you're
|
|
108
112
|
inlining what should be a link.
|
|
109
113
|
|
|
@@ -163,8 +167,8 @@ planning genuinely diverges.
|
|
|
163
167
|
The design is good when:
|
|
164
168
|
|
|
165
169
|
- The **brief alone** lets a competent planner sequence the work and a coder execute it **without
|
|
166
|
-
re-deriving the architecture** — the "What
|
|
167
|
-
and honest.
|
|
170
|
+
re-deriving the architecture** — the "What execution does NOT need to re-research" section is
|
|
171
|
+
concrete and honest.
|
|
168
172
|
- Every architectural choice in `decisions.md` is user-verified, with rejected alternatives carrying
|
|
169
173
|
concrete reasons.
|
|
170
174
|
- The complexity map names **specific** hotspots with `file:line` pointers, not generic warnings.
|
|
@@ -177,12 +181,12 @@ It is **not done** when:
|
|
|
177
181
|
vague — the whole economy depends on that section being real.
|
|
178
182
|
- Architectural direction was picked silently without verification.
|
|
179
183
|
- `design.md` has drifted into per-file implementation the planner will redo and that goes stale.
|
|
180
|
-
- The repo's own conventions were never read, so
|
|
184
|
+
- The repo's own conventions were never read, so execution will rediscover them the expensive way.
|
|
181
185
|
|
|
182
186
|
## Failure modes to avoid
|
|
183
187
|
|
|
184
|
-
- **Empty handoff.** A brief that doesn't actually save
|
|
185
|
-
— it defeats the entire
|
|
188
|
+
- **Empty handoff.** A brief that doesn't actually save execution any research is the core failure
|
|
189
|
+
— it defeats the entire design→execution economy.
|
|
186
190
|
- **Design over-reach.** Producing detailed, file-level design the planner will redo.
|
|
187
191
|
- **Silent picks.** Resolving an expensive-to-reverse crossroads without verification.
|
|
188
192
|
- **Codebase-blindness.** Designing in the abstract without reading how this repo actually does
|