@istmx/skills 1.0.1 → 1.2.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.
Files changed (50) hide show
  1. package/CODE_OF_CONDUCT.md +47 -0
  2. package/LICENSE +30 -0
  3. package/README.md +64 -27
  4. package/RELEASE_v1.2.0.md +40 -0
  5. package/bin/cli.js +99 -114
  6. package/istm-animate/SKILL.md +25 -60
  7. package/istm-architecture/SKILL.md +10 -1
  8. package/istm-awwward-designer/SKILL.md +16 -20
  9. package/istm-design/SKILL.md +2 -1
  10. package/istm-workflow/istm-audit/SKILL.md +7 -7
  11. package/istm-workflow/istm-audit/agent-prompt.md +20 -20
  12. package/istm-workflow/istm-audit/modes/area.md +1 -1
  13. package/istm-workflow/istm-audit/modes/greenfield.md +4 -4
  14. package/istm-workflow/istm-audit/modes/tool-skills.md +1 -1
  15. package/istm-workflow/istm-check/SKILL.md +10 -10
  16. package/istm-workflow/istm-check/modes/review.md +9 -9
  17. package/istm-workflow/istm-check/modes/verify.md +19 -19
  18. package/istm-workflow/istm-check/review-agent-prompt.md +2 -2
  19. package/istm-workflow/istm-check/review-guide.md +4 -4
  20. package/istm-workflow/istm-craft/SKILL.md +20 -11
  21. package/istm-workflow/istm-craft/agent-modes/architecture.md +1 -1
  22. package/istm-workflow/istm-craft/agent-prompt.md +8 -8
  23. package/istm-workflow/istm-craft/internal/after-subagent.md +11 -11
  24. package/istm-workflow/istm-craft/internal/design-conversation.md +9 -9
  25. package/istm-workflow/istm-craft/internal/tool-discovery.md +2 -2
  26. package/istm-workflow/istm-craft/spec-template.md +18 -18
  27. package/istm-workflow/istm-debug/SKILL.md +6 -6
  28. package/istm-workflow/istm-develop/SKILL.md +31 -16
  29. package/istm-workflow/istm-develop/checklist.md +1 -1
  30. package/istm-workflow/istm-develop/flow/build.md +21 -21
  31. package/istm-workflow/istm-develop/flow/git.md +4 -4
  32. package/istm-workflow/istm-develop/logical-guide.md +5 -5
  33. package/istm-workflow/istm-develop/ui/implementation.md +2 -2
  34. package/istm-workflow/istm-develop/ui-guide.md +3 -3
  35. package/istm-workflow/istm-document/SKILL.md +6 -6
  36. package/istm-workflow/istm-document/templates/postmortem.md +1 -1
  37. package/istm-workflow/istm-scope/SKILL.md +20 -20
  38. package/istm-workflow/istm-scope/modes/add.md +1 -1
  39. package/istm-workflow/istm-scope/modes/plan-brownfield.md +2 -2
  40. package/istm-workflow/istm-scope/modes/plan-greenfield.md +4 -4
  41. package/istm-workflow/istm-scope/modes/plan-monorepo.md +3 -3
  42. package/istm-workflow/istm-scope/modes/plan.md +16 -16
  43. package/istm-workflow/istm-scope/modes/replan.md +2 -2
  44. package/istm-workflow/istm-scope/scope-template.md +29 -29
  45. package/istm-workflow/istm-sync/SKILL.md +37 -25
  46. package/istm-workflow/istm-sync/agent-prompt.md +37 -19
  47. package/istm-workflow/istm-test/SKILL.md +12 -12
  48. package/istm-workflow/istm-test/modes/setup.md +6 -6
  49. package/istm-workflow/istm-test/writing-guide.md +1 -1
  50. package/package.json +4 -4
@@ -1,6 +1,6 @@
1
- # /check review (fresh model code review)
1
+ # /istm-check review (fresh model code review)
2
2
 
3
- The `review` mode of `/check`: a senior code review, before merge, on a different model than wrote the code. Follow it fully.
3
+ The `review` mode of `/istm-check`: a senior code review, before merge, on a different model than wrote the code. Follow it fully.
4
4
 
5
5
  ## What this skill does
6
6
 
@@ -16,7 +16,7 @@ Owns review findings (`.istm-context/reviews/`). Does not write code, tests, spe
16
16
 
17
17
  Acts, with one deliberate exception: it confirms which model wrote the code before reviewing (a single MCQ, with the detected value selected by default), because the model can't reliably detect itself and a wrong guess silently breaks the cross model guarantee (see Step 1). Everything else (scoping, reviewing, writing findings) it does without asking. It states which model is reviewing so you can still redirect, and pauses if there is nothing to review (clean tree, no branch diff). The confirm is skipped when you pass an explicit `with <model>` override and detection was unambiguous.
18
18
 
19
- Steering: `/check review` (default contrasting model), `/check review with opus` (force a reviewer), or `/check review uncommitted` (scope to working tree changes only).
19
+ Steering: `/istm-check review` (default contrasting model), `/istm-check review with opus` (force a reviewer), or `/istm-check review uncommitted` (scope to working tree changes only).
20
20
 
21
21
  ## Artifact ownership
22
22
 
@@ -89,13 +89,13 @@ If the user passed `uncommitted`, force `MODE=uncommitted` regardless of branch.
89
89
 
90
90
  De-duplicate the file list. Exclude lock files and generated output (`dist/`, `build/`, `.next/`, `coverage/`) from the count, but the subagent still sees the full diff.
91
91
 
92
- If the change set is empty: stop and tell the engineer there's nothing to review (make a change first, or point /check review at a branch). Do not spawn.
92
+ If the change set is empty: stop and tell the engineer there's nothing to review (make a change first, or point /istm-check review at a branch). Do not spawn.
93
93
 
94
94
  ### 3. Gather lightweight pointers (do NOT read heavy files here)
95
95
 
96
96
  Paths and cheap signals only; the subagent reads on demand. Using your file tools: list the 3 most-recent spec files under `.istm-context/specs/` (paths only), and resolve the test signal, one of three states, not a yes/no:
97
97
  - `TESTS = configured`: `test-preferences.json` sets `"tool"` to a framework (a runner is set up). Judge test adequacy normally.
98
- - `TESTS = none-by-design`: `test-preferences.json` has `"tool": null` and a `"gate"` (e.g. `"typecheck+verify"`), or the nearest `.istm-context/agents.md`/governing spec states a "no test runner" convention. Deliberate: the gate is typecheck + `/check verify`, not a suite.
98
+ - `TESTS = none-by-design`: `test-preferences.json` has `"tool": null` and a `"gate"` (e.g. `"typecheck+verify"`), or the nearest `.istm-context/agents.md`/governing spec states a "no test runner" convention. Deliberate: the gate is typecheck + `/istm-check verify`, not a suite.
99
99
  - `TESTS = none-yet`: no `test-preferences.json` at all, and no stated convention. A genuine gap.
100
100
 
101
101
  Pass to the subagent: project-context contents inline (read `.istm-context/agents.md`, canonical, or `CLAUDE.md` as fallback; short), the 3 recent spec paths, the base ref / merge-base, and the diff scope. The subagent reads a governing spec's **build-spec sections only** (`index.md`: Requirements, Decision, the design section, Consequences), the contract to review against; not `rationale.md` (decision history), unless a specific finding hinges on the reasoning. It runs `git diff` itself and reads the changed files and their tests.
@@ -120,7 +120,7 @@ Resolve this skill's folder to an absolute path (you, the main agent, already re
120
120
  If the subagent errored or wrote no findings file, report the failure and offer to re-run; don't relay an empty or fabricated review. Otherwise it writes the findings file and returns a compact summary. Relay:
121
121
 
122
122
  ```
123
- ## /check review complete
123
+ ## /istm-check review complete
124
124
 
125
125
  **Reviewed by**: <reviewer-model> (you're on <author-model>)
126
126
  **Scope**: <N> files, <branch vs base | uncommitted>
@@ -142,11 +142,11 @@ If the subagent errored or wrote no findings file, report the failure and offer
142
142
  Show all blockers and majors in chat; collapse minors/nits to a count with a pointer to the file. If there are zero blockers and zero majors, lead with the verdict and keep it short.
143
143
 
144
144
  For a high-stakes change (verdict was Blocked or Changes requested, or the change is high/critical severity), append one line:
145
- > "For an independent second opinion from a different provider, switch your model with `/model` (or paste the diff into another assistant) and re-run /check review, no API keys needed."
145
+ > "For an independent second opinion from a different provider, switch your model with `/model` (or paste the diff into another assistant) and re-run /istm-check review, no API keys needed."
146
146
 
147
- **Tick the scope box (closing gate).** If the reviewed feature has a row in `.istm-context/scope/`, tick its `Review it` box (the review ran; the box marks that, not that it passed) and confirm it in the report: "Scope: ticked `Review it`." No matching row → say so ("no scope row matched `<feature>`, tick it manually or enroll it"). This is the only scope edit review makes; it writes no code, tests, or specs.
147
+ **Tick the scope box (closing gate).** If the reviewed feature has a row in `.istm-context/istm-scope/`, tick its `Review it` box (the review ran; the box marks that, not that it passed) and confirm it in the report: "Scope: ticked `Review it`." No matching row → say so ("no scope row matched `<feature>`, tick it manually or enroll it"). This is the only scope edit review makes; it writes no code, tests, or specs.
148
148
 
149
- This skill is complete after relaying. It does not fix the findings (the implementer does that) and does not invoke other skills. If the engineer wants the issues fixed, that's a normal follow-up; /check review's job is the assessment.
149
+ This skill is complete after relaying. It does not fix the findings (the implementer does that) and does not invoke other skills. If the engineer wants the issues fixed, that's a normal follow-up; /istm-check review's job is the assessment.
150
150
 
151
151
  ---
152
152
 
@@ -1,29 +1,29 @@
1
- # /check verify (runtime proof)
1
+ # /istm-check verify (runtime proof)
2
2
 
3
- The `verify` mode of `/check`: run the real app and prove the change works. Follow it fully.
3
+ The `verify` mode of `/istm-check`: run the real app and prove the change works. Follow it fully.
4
4
 
5
5
  ## What this skill does
6
6
 
7
7
  Your role: the acceptance engineer. Trust observed behavior over green checkmarks; a passing suite proves the code the author thought to test, not that the feature exists. Ask: "If I had to sign off that this is real, what would I need to watch happen with my own eyes?" Then drive the actual thing and judge what you see against what the slice was supposed to deliver.
8
8
 
9
- `/check verify` closes the gap between "the tests are green" and "the feature actually works":
9
+ `/istm-check verify` closes the gap between "the tests are green" and "the feature actually works":
10
10
 
11
11
  1. Scopes what changed (from git) into observable behaviors to check, anchored to the spec's acceptance criteria when a governing spec exists.
12
12
  2. Runs the app the project's own way, reusing its launch method when one exists.
13
13
  3. Exercises the changed flow and observes: screenshots for UI, response bodies for APIs, output for CLIs, logs for jobs.
14
- 4. Reports pass/fail per behavior and per acceptance criterion, anything anomalous, and what `/test` should turn into permanent assertions.
14
+ 4. Reports pass/fail per behavior and per acceptance criterion, anything anomalous, and what `/istm-test` should turn into permanent assertions.
15
15
 
16
- Runtime counterpart to `/test`: `/test` writes assertions that run forever; `/check verify` opens the app once and confirms it's real before review.
16
+ Runtime counterpart to `/istm-test`: `/istm-test` writes assertions that run forever; `/istm-check verify` opens the app once and confirms it's real before review.
17
17
 
18
18
  Spec conformance gate: when a governing spec has IDed acceptance criteria (`## Requirements`, `AC-1…`), also prove the implementation conforms to the contract: every criterion met, every specced surface (page, route, table) actually built. Green tests and a working happy path never reveal a surface that was specced but never built, or a migration never applied. See Step 0b and Step 4b.
19
19
 
20
20
  ## Asks vs acts
21
21
 
22
- Acts: scopes from git, works out the launch, runs, observes, reports. Asks only when it cannot determine how to start the app or which flow to exercise (e.g. a route needing seeded data or credentials). Never modifies application code; report breakage and point to `/debug` or `/develop`.
22
+ Acts: scopes from git, works out the launch, runs, observes, reports. Asks only when it cannot determine how to start the app or which flow to exercise (e.g. a route needing seeded data or credentials). Never modifies application code; report breakage and point to `/istm-debug` or `/istm-develop`.
23
23
 
24
24
  ## Artifact ownership
25
25
 
26
- Owns no durable files. Chat output only (plus screenshots/logs saved to the scratch area). Does not write code (`/develop`), tests (`/test`), or context files.
26
+ Owns no durable files. Chat output only (plus screenshots/logs saved to the scratch area). Does not write code (`/istm-develop`), tests (`/istm-test`), or context files.
27
27
 
28
28
  ---
29
29
 
@@ -47,15 +47,15 @@ Only in refactor mode. It drives the app twice and holds two output sets, so run
47
47
  2. Capture BEFORE (the state before the change). Prefer a throwaway git worktree at the ref before the change (the base branch, or the commit before the refactor): `git worktree add <tmp> <ref>`, start the app in that worktree, hit each surface, save the raw outputs, `git worktree remove <tmp>`. This keeps the working tree and untracked files intact. Only if worktrees aren't available, fall back to `git stash --include-untracked` (plain `git stash` leaves new files behind and contaminates the "before"), restore with `git stash pop` after.
48
48
  3. Capture AFTER: with the change applied, start the app, hit the same surfaces the same way, save the outputs.
49
49
  4. Diff before vs after per surface. For a behavior preserving change they must be byte identical (modulo intentional, documented differences). Report any diff as a regression.
50
- - Relay: surfaces diffed, identical vs differing, the exact diff for any that changed → run `/debug`. Then stop (skip the feature mode steps).
50
+ - Relay: surfaces diffed, identical vs differing, the exact diff for any that changed → run `/istm-debug`. Then stop (skip the feature mode steps).
51
51
 
52
52
  ### Step 0b: Load the spec contract (if a governing spec exists)
53
53
 
54
- Before scoping, find the governing spec: the feature dir `.istm-context/specs/NNNN-<feature>/` (or single file `.istm-context/specs/NNNN-<feature>.md`) this change implements. Match by branch/feature name or touched surfaces; a scope under `.istm-context/scope/` points to the spec. No governing spec (a trivial change with no record)? Skip this step and verify against observed behavior only.
54
+ Before scoping, find the governing spec: the feature dir `.istm-context/specs/NNNN-<feature>/` (or single file `.istm-context/specs/NNNN-<feature>.md`) this change implements. Match by branch/feature name or touched surfaces; a scope under `.istm-context/istm-scope/` points to the spec. No governing spec (a trivial change with no record)? Skip this step and verify against observed behavior only.
55
55
 
56
56
  The spec carries the contract: `## Requirements` with IDed acceptance criteria (`AC-1`, `AC-2`, …) plus the surfaces it specs (pages, routes, tables, migrations). Load the checklist:
57
57
 
58
- 1. Prefer the per feature `verify.md` beside the spec (`.istm-context/specs/NNNN-<feature>/verify.md`) if present; `/develop` emits it as concrete, already resolved verify steps tagged with the `AC-N` each exercises:
58
+ 1. Prefer the per feature `verify.md` beside the spec (`.istm-context/specs/NNNN-<feature>/verify.md`) if present; `/istm-develop` emits it as concrete, already resolved verify steps tagged with the `AC-N` each exercises:
59
59
  ```markdown
60
60
  # Verify: <feature> · spec NNNN
61
61
  ## UI / manual
@@ -81,7 +81,7 @@ Base branch `BASE`: `git rev-parse --verify main`; on success use `main`, otherw
81
81
 
82
82
  Spec contract loaded (Step 0b)? The checklist is your scope: each `verify.md` step / `AC-N` is an observable behavior to exercise, each specced surface (page, route, table, migration) a thing to confirm was built. Don't narrow to only the changed files: an AC or surface with no implementation is exactly the miss this gate catches; keep it listed and let Step 4b flag it. Use the git diff to locate where each is (or isn't) implemented.
83
83
 
84
- No spec? From the changed files write the 2 to 5 concrete things a human could watch to know the change works, e.g. "the /pricing page renders all three tiers and the CTA opens checkout". If a feature scope exists (in `.istm-context/scope/`), anchor these to that feature's acceptance criteria / sub tasks. Keep them observable, not internal.
84
+ No spec? From the changed files write the 2 to 5 concrete things a human could watch to know the change works, e.g. "the /pricing page renders all three tiers and the CTA opens checkout". If a feature scope exists (in `.istm-context/istm-scope/`), anchor these to that feature's acceptance criteria / sub tasks. Keep them observable, not internal.
85
85
 
86
86
  ### Step 2: Determine how to run the app
87
87
 
@@ -146,17 +146,17 @@ Overall verdict PASS requires every behavior verified with cited evidence, and (
146
146
 
147
147
  ### Step 5: Report
148
148
 
149
- Update the scope: if this feature is on the scope (`.istm-context/scope/`) and the verdict is PASS, tick its `Verify it` box. **Also tick, in this feature's `verify.md`, each step you actually ran and that passed** (`- [ ]` → `- [x]`); leave a step unticked if it failed or you could not run it. This is per feature: only the feature you verified gets ticked, other features' `verify.md` files stay unchecked until you verify them (expected, not a miss). What happens next depends on the workflow tier (the effective tier: the feature's own tier tag if set, else the scope header `**Workflow:**` default):
149
+ Update the scope: if this feature is on the scope (`.istm-context/istm-scope/`) and the verdict is PASS, tick its `Verify it` box. **Also tick, in this feature's `verify.md`, each step you actually ran and that passed** (`- [ ]` → `- [x]`); leave a step unticked if it failed or you could not run it. This is per feature: only the feature you verified gets ticked, other features' `verify.md` files stay unchecked until you verify them (expected, not a miss). What happens next depends on the workflow tier (the effective tier: the feature's own tier tag if set, else the scope header `**Workflow:**` default):
150
150
 
151
- - **Lean** → `/check verify` is the last required stage, so on PASS also set the feature `done` (At a glance table and heading) and mirror the governing spec's `**Status**:` line `In Progress` → `Accepted` (surgically; not `In Progress` → flag, don't clobber). Exception: an `Assumed` spec blocks `done`, leave it `in-progress` and point to `/architect <feature>` to ratify first. Then point to `/sync`.
152
- - **Medium / Full** → leave `Test it` and the `done` status to `/test` and `/sync`; point to `/test <feature>` next.
151
+ - **Lean** → `/istm-check verify` is the last required stage, so on PASS also set the feature `done` (At a glance table and heading) and mirror the governing spec's `**Status**:` line `In Progress` → `Accepted` (surgically; not `In Progress` → flag, don't clobber). Exception: an `Assumed` spec blocks `done`, leave it `in-progress` and point to `/architect <feature>` to ratify first. Then point to `/istm-sync`.
152
+ - **Medium / Full** → leave `Test it` and the `done` status to `/istm-test` and `/istm-sync`; point to `/istm-test <feature>` next.
153
153
 
154
154
  On FAIL or BLOCKED, tick nothing and report the gaps. Advise `/clear` before moving to a new feature (the spec and `verify.md` hold the state, so a fresh session loses nothing and stays cheap).
155
155
 
156
156
  **Confirm the update as a closing gate** (don't skip it): state in the report exactly what you ticked in each file, e.g. "Scope: ticked `Verify it`. Spec: status → `Accepted`." No matching scope row → say so ("no scope row matched `<feature>`"), don't finish silently.
157
157
 
158
158
  ```
159
- ## /check verify complete
159
+ ## /istm-check verify complete
160
160
 
161
161
  **Ran**: <how the app was started: the exact command or url. "Not started" if you never ran it, in which case no ✅ or PASS is allowed>
162
162
  **Scope**: <N> behaviors checked, <M> not exercised
@@ -166,7 +166,7 @@ On FAIL or BLOCKED, tick nothing and report the gaps. Advise `/clear` before mov
166
166
  - <behavior>: <what you observed>, evidence: <command + exit code | url + screenshot path | request + status + fields | query + result>
167
167
 
168
168
  **Failed** ❌:
169
- - <behavior>: <what went wrong + exact error/screenshot path> → run /debug
169
+ - <behavior>: <what went wrong + exact error/screenshot path> → run /istm-debug
170
170
 
171
171
  **Blocked** ⚠️:
172
172
  - <behavior>: <what's needed to verify it (seed data, credentials, env)>
@@ -183,15 +183,15 @@ On FAIL or BLOCKED, tick nothing and report the gaps. Advise `/clear` before mov
183
183
  **Not applied** ⚠️ (built but not live/correct at runtime):
184
184
  - <surface / criterion>: <the runtime failure, e.g. "migration committed, column absent from live schema"> → <apply/fix>
185
185
 
186
- **What /test should lock in**:
186
+ **What /istm-test should lock in**:
187
187
  - <the behaviors above, as permanent assertions>
188
188
 
189
- **For /check review**:
189
+ **For /istm-check review**:
190
190
  - <anything that worked but looked fragile: slow response, console warning, missing empty state>
191
191
  ```
192
192
 
193
193
  Drop the Spec conformance / Missed surfaces / Not applied sections when there was no governing spec. Keep them but write "none" when a contract was loaded and every item is met.
194
194
 
195
- Clean up any process you started. `/check verify` confirms reality, never fixes or asserts: `/debug` for failures, `/develop` to build a surface that is missing or not applied, `/test` to make passing behaviors permanent. A FAIL conformance verdict means the feature is not done, even if every test is green.
195
+ Clean up any process you started. `/istm-check verify` confirms reality, never fixes or asserts: `/istm-debug` for failures, `/istm-develop` to build a surface that is missing or not applied, `/istm-test` to make passing behaviors permanent. A FAIL conformance verdict means the feature is not done, even if every test is green.
196
196
 
197
197
  A BLOCKED verdict is an honest, useful result: it says the change could not be exercised and names what would make it exercisable. A fabricated PASS is the one output this skill must never produce, because every later step trusts it.
@@ -38,7 +38,7 @@ PROJECT_CONTEXT
38
38
  ## Decisions the change must respect (read only if relevant)
39
39
 
40
40
  - **Recent spec paths**: SPEC_PATHS
41
- - **Test signal**: TEST_SIGNAL (`configured` → weigh missing coverage as findings · `none-by-design` → the project gates on typecheck + `/check verify`; do NOT raise "missing tests" or "no safety net" · `none-yet` → note the gap once)
41
+ - **Test signal**: TEST_SIGNAL (`configured` → weigh missing coverage as findings · `none-by-design` → the project gates on typecheck + `/istm-check verify`; do NOT raise "missing tests" or "no safety net" · `none-yet` → note the gap once)
42
42
 
43
43
  ## Where to write findings
44
44
 
@@ -51,7 +51,7 @@ OUTPUT_PATH (e.g. .istm-context/reviews/2026-06-20-main.md, create the .istm-c
51
51
  1. **Follow the Review guide above**, it's your rubric: what to inspect, the severity scale, how to judge test adequacy, and the exact findings format for both the file and your summary.
52
52
  2. Run the diff command to see exactly what changed. Read each changed file in full for context: a diff hunk alone hides the surrounding code that determines whether the change is correct.
53
53
  3. Read a spec path only if it governs the changed code. Check the change against .istm-context/agents.md conventions.
54
- 4. If `TEST_SIGNAL = configured`, check whether the change is actually covered, untested new logic is a finding. If `none-by-design`, skip test coverage findings entirely (the gate is typecheck + `/check verify`).
54
+ 4. If `TEST_SIGNAL = configured`, check whether the change is actually covered, untested new logic is a finding. If `none-by-design`, skip test coverage findings entirely (the gate is typecheck + `/istm-check verify`).
55
55
  5. Evaluate against every category in the guide. Assign a severity to each finding. Reach an overall verdict.
56
56
  6. Write the findings file at OUTPUT_PATH using the guide's format.
57
57
  7. Return the compact summary block from the guide, verbatim, no extra prose. Do not paste the full diff or the whole findings file back; summarise.
@@ -34,13 +34,13 @@ The **test signal** has three states, judge accordingly:
34
34
  - Look for tests that assert nothing meaningful, only cover the happy path, or test mocks instead of behavior, call these out.
35
35
  - A change to existing behavior with no corresponding test update is a finding.
36
36
 
37
- `TESTS = none-by-design` (the project deliberately has no test runner, it gates on typecheck + `/check verify`):
38
- - **Do not raise "missing tests" / "add coverage" findings, and do not call it a "no safety net."** The safety net is the typecheck/`/check verify` gate, treat that as the equivalent of tests. Nagging for a suite the project chose not to have is noise.
39
- - Instead, weight correctness/security findings on their own merit, and where a change is risky, point to what the gate should catch (e.g. "typecheck won't catch this runtime shape, `/check verify` should exercise it").
37
+ `TESTS = none-by-design` (the project deliberately has no test runner, it gates on typecheck + `/istm-check verify`):
38
+ - **Do not raise "missing tests" / "add coverage" findings, and do not call it a "no safety net."** The safety net is the typecheck/`/istm-check verify` gate, treat that as the equivalent of tests. Nagging for a suite the project chose not to have is noise.
39
+ - Instead, weight correctness/security findings on their own merit, and where a change is risky, point to what the gate should catch (e.g. "typecheck won't catch this runtime shape, `/istm-check verify` should exercise it").
40
40
 
41
41
  `TESTS = none-yet` (no runner, no stated convention, a genuine gap): note the absence **once** at the verdict level (don't repeat per file), and weigh correctness findings more heavily since there's no safety net.
42
42
 
43
- Do not write tests, that's /test's job. Flag a gap only when it's `none-yet`.
43
+ Do not write tests, that's /istm-test's job. Flag a gap only when it's `none-yet`.
44
44
 
45
45
  ---
46
46
 
@@ -4,6 +4,13 @@ allowed-tools: Bash, Read, Grep, Glob, Write, Edit, Agent, AskUserQuestion
4
4
  description: "Run /istm-craft to design and architect a new feature. It strictly reads the global .istm-context/ blueprints and generates a detailed build spec in .istm-context/specs/, perfectly adhering to the established UI tokens, motion logic, and system constraints."
5
5
  ---
6
6
 
7
+
8
+ ## Documentation & URL Handling
9
+ - **Bleeding-Edge Frameworks**: If the user provides a URL to official documentation in their prompt (e.g., Next.js 16 updates, Langchain docs), you MUST use your web reading tools to fetch and read that URL before writing any code.
10
+ - **Override Training Data**: The syntax and patterns found in the provided URLs absolutely override your internal training data.
11
+ - **Cache for the Future**: If you learn a critical breaking change from a URL, document it in a markdown file inside `.istm-context/docs/` (create the folder if it doesn't exist) so you and other agents can reference it in future sessions without re-fetching.
12
+ - **When in Doubt**: If you are building with a framework and are unsure about the latest syntax, ask the user to provide the official documentation link.
13
+
7
14
  ## What this skill does
8
15
 
9
16
  This is the Day-to-Day Feature Architect. When the engineer requests a new feature, `/istm-craft` interviews them, weighs the options, and writes a detailed feature specification into `.istm-context/specs/`.
@@ -18,20 +25,22 @@ Before asking any questions, you MUST silently read the global blueprints to und
18
25
  - Read `.istm-context/.istm-context/design.md` (for typography, color tokens, and the Dual Motion standard).
19
26
  - Read `.istm-context/project-overview.md` (for business logic context).
20
27
 
21
- ### Step 2: The Feature Interview
22
- Ask the engineer targeted questions to design the specific feature.
23
- - INFER what you can from the global blueprints. Do not ask them what database to use if `.istm-context/architecture.md` already specifies PostgreSQL.
24
- - ASK for business requirements, edge cases, and feature-specific data models.
25
- - RECOMMEND the best approach, but let them decide.
28
+ ### Step 2: The Hyper-Focused Interview
29
+ Ask the engineer targeted questions to design ONE specific feature.
30
+ - **CRITICAL RULE (One Spec At A Time)**: You must refuse to design multiple features simultaneously. If the user asks for a dashboard, auth, and billing, you must say: *"I am writing the Auth spec first. We will write the Dashboard spec after Auth is built."*
31
+ - INFER what you can from the global blueprints.
32
+ - ASK for business requirements and edge cases.
26
33
 
27
34
  ### Step 3: Spec Generation
28
- Write the feature design into a new file: `.istm-context/specs/NNNN-feature-name.md` (e.g., `.istm-context/specs/0001-user-auth.md`).
35
+ Write the feature design into a new file: `.istm-context/specs/NNNN-feature-name.md`.
29
36
  The spec must include:
30
- - **Summary**: What the feature does.
31
- - **Requirements**: Acceptance criteria.
32
- - **Data Model**: Any new tables or schemas.
33
- - **UI & Motion**: Exactly how it implements the design tokens from `.istm-context/.istm-context/design.md`. Hallucinated hex codes or unapproved UI libraries are strictly forbidden.
37
+ - **Summary & Requirements**: What the feature does and acceptance criteria.
38
+ - **Step 1: Global Setup (CSS & Layouts)**: The very first step of the Build Plan must dictate setting up the global CSS (`globals.css` or `index.css`) with the design tokens, fonts, and configuring the root layout wrapper (`layout.tsx`).
39
+ - **UI & Architecture**:
40
+ - How it implements `.istm-context/design.md`.
41
+ - **Component Rule**: It is perfectly acceptable to use `shadcn/ui` components (do not hardcode everything from scratch), but they MUST be styled using the `design.md` tokens.
42
+ - **Strict Typing & Constants**: Explicitly mandate that all types go in a dedicated `types/` folder, and constants go in a `constants/` folder. Absolutely forbid the use of `any` types.
34
43
  - **Build Plan**: The step-by-step implementation guide.
35
44
 
36
45
  ### Step 4: Completion
37
- Do not write application code. Once the spec is written, instruct the user to run `/develop` (or equivalent) to begin the implementation phase based on your spec.
46
+ Do not write application code. Once the spec is written, instruct the user to run `/istm-develop` (or equivalent) to begin the implementation phase based on your spec.
@@ -49,7 +49,7 @@ Reason in the durable CATEGORY, then pick the current product fresh. The table n
49
49
 
50
50
  **Step 4: Write the spec**
51
51
 
52
- This is a **decision spec**: record the decision, not an implementation plan. Apply `Decision-only specs` under "Expert rules that apply to all modes": no `## Build plan` of scaffold steps (init the framework, create the project, add the health route, and so on), no meta acceptance criteria like "spec records the stack." The spec IS `## Proposed stack`; scaffold work is executed by this feature's scaffold sub task and derived by `/develop` from the Proposed stack at build time.
52
+ This is a **decision spec**: record the decision, not an implementation plan. Apply `Decision-only specs` under "Expert rules that apply to all modes": no `## Build plan` of scaffold steps (init the framework, create the project, add the health route, and so on), no meta acceptance criteria like "spec records the stack." The spec IS `## Proposed stack`; scaffold work is executed by this feature's scaffold sub task and derived by `/istm-develop` from the Proposed stack at build time.
53
53
 
54
54
  Compare full stacks in `## Options considered`, not individual technologies. Include required `## Proposed stack` section:
55
55
 
@@ -38,7 +38,7 @@ You are a Staff Engineer and Principal Architect with 15+ years of production ex
38
38
  - Stack & conventions: STACK_AND_CONVENTIONS
39
39
  - Constraints / compliance: CONSTRAINTS_OR_NONE
40
40
 
41
- **Build approach** (the project's delivery strategy, read in pre-flight from .istm-context/agents.md/scope header, or a noted default): BUILD_APPROACH
41
+ **Build approach** (the project's delivery strategy, read in pre-flight from .istm-context/agents.md/istm-scope header, or a noted default): BUILD_APPROACH
42
42
  <!-- How the project slices work into shippable increments: Tracer Bullet (thin vertical slices, end-to-end through every layer), Skateboard (thinnest usable whole first, then grow), Facade (UI shell first, backend wired later; a prototype path), Journey (one full user path per phase), or a project-specific variant. Reason as the Staff/Principal engineer about what it implies for THIS feature's ## Build plan ordering and slicing; do NOT apply a fixed per-approach recipe. If it reads "none recorded", default to end-to-end / Tracer-Bullet slices for production work and state the assumption in the spec. -->
43
43
 
44
44
  **Engineer's answers, staged design conversation (feature specific, stage by stage):**
@@ -48,7 +48,7 @@ ANSWER_ALL_ROUNDS
48
48
 
49
49
  **Spec number**: SPEC_NUMBER
50
50
  **Spec path & shape**: SPEC_FILE_PATH
51
- <!-- Single decision, single file at that path: write the whole spec inline (build spec + the decision-record sections Context/Options considered/Rationale/References), kept tight. Directory spec (umbrella, OR a heavy/foundational single decision): split into two core files, never a doubled NNNN-title/NNNN-title.md. index.md = the build spec /develop reads: ## Summary, ## Requirements, ## Decision, the design/spec section, ## Build plan, ## Consequences, ## Follow-up, plus a one-line ## Rationale pointer ("Reasoning and options: see rationale.md"). rationale.md = the decision record /develop skips: ## Context, ## Options considered, ## Rationale, the ## References section, and any bulky evidence (inventories/audits/landscape scan) under its own subheading. There is NO research/ folder; all evidence goes in rationale.md. For an umbrella, index.md also opens with a ## Structure manifest listing and linking EVERY child spec (one line each: what it is + which decision it supports) and holds any cross-child contract. Child specs are flat NNNN-child.md files, each self-sufficient to build from with a SHORT inline rationale (not their own rationale.md); promote a child to its own directory only if it grows heavy. NEVER write into .istm-context/scope/ (the scope), never loose in the code tree. -->
51
+ <!-- Single decision, single file at that path: write the whole spec inline (build spec + the decision-record sections Context/Options considered/Rationale/References), kept tight. Directory spec (umbrella, OR a heavy/foundational single decision): split into two core files, never a doubled NNNN-title/NNNN-title.md. index.md = the build spec /istm-develop reads: ## Summary, ## Requirements, ## Decision, the design/spec section, ## Build plan, ## Consequences, ## Follow-up, plus a one-line ## Rationale pointer ("Reasoning and options: see rationale.md"). rationale.md = the decision record /istm-develop skips: ## Context, ## Options considered, ## Rationale, the ## References section, and any bulky evidence (inventories/audits/landscape scan) under its own subheading. There is NO research/ folder; all evidence goes in rationale.md. For an umbrella, index.md also opens with a ## Structure manifest listing and linking EVERY child spec (one line each: what it is + which decision it supports) and holds any cross-child contract. Child specs are flat NNNN-child.md files, each self-sufficient to build from with a SHORT inline rationale (not their own rationale.md); promote a child to its own directory only if it grows heavy. NEVER write into .istm-context/istm-scope/ (the scope), never loose in the code tree. -->
52
52
  **Operation**: OPERATION
53
53
 
54
54
  **References level** (what to cite, chosen by the engineer): REFERENCES_LEVEL
@@ -98,7 +98,7 @@ Apply the knowledge these ways:
98
98
  **Implementation skills**: `<skill>` (`<owner>/<repo>`, `<skills-dir>/<skill>/`) · `<skill>` (`<owner>/<repo>`, `<skills-dir>/<skill>/`)
99
99
  ```
100
100
 
101
- `<skills-dir>` is the project's real skills dir (`.claude/skills/`, `.agents/skills/`, or `skills/`), never hardcoded, since the spec is read by whichever tool runs `/develop`; `<owner>/<repo>` is the tool agnostic identity. List every installed skill that shaped this design, including any just installed during the tool skills offer (in COMMUNITY_SKILLS_CONTENT_OR_NONE). Do NOT copy skill content into the spec; the field is a pointer, not a paste.
101
+ `<skills-dir>` is the project's real skills dir (`.claude/skills/`, `.agents/skills/`, or `skills/`), never hardcoded, since the spec is read by whichever tool runs `/istm-develop`; `<owner>/<repo>` is the tool agnostic identity. List every installed skill that shaped this design, including any just installed during the tool skills offer (in COMMUNITY_SKILLS_CONTENT_OR_NONE). Do NOT copy skill content into the spec; the field is a pointer, not a paste.
102
102
 
103
103
  **3. Add Follow-up items for any skill not yet in .istm-context/agents.md.** For each skill in COMMUNITY_SKILLS_NOT_IN_PROJECT_CONTEXT_OR_NONE, decide where its conventions should live. Root .istm-context/agents.md loads on every task and always costs context; a nested .istm-context/agents.md loads only when working in that directory. Scope rule: place conventions at the level matching their actual reach, judged by the skill's scope, not its name.
104
104
 
@@ -178,7 +178,7 @@ Read MODE_FILE_PATH now and follow that mode file as the only mode specific inst
178
178
  - The spec opens with `## Summary` right after the `**Status**:` line and before `## Context`. Write it first. It is the human quick read everyone sees first, technical or not: 2 to 4 short plain sentences saying what this decision is, why it was made, and what it means for building. A busy reader should get the gist in about 20 seconds. Gloss any jargon in plain words. No dashes. (Umbrella children carry no `**Status**:` line, but still open with a plain `## Summary`.)
179
179
 
180
180
  **On the initial `**Status**:` line, set it correctly at creation (do not always write `Proposed`):**
181
- - **Feature linked spec**: a buildable scope feature links (or will link) this spec (typical FEATURE/ENHANCEMENT, or an ARCHITECTURE foundation with a scope row). Write **`Proposed`**. Its status is mirrored from the feature: /develop advances it to `In Progress`, then `Accepted`, as the feature ships.
181
+ - **Feature linked spec**: a buildable scope feature links (or will link) this spec (typical FEATURE/ENHANCEMENT, or an ARCHITECTURE foundation with a scope row). Write **`Proposed`**. Its status is mirrored from the feature: /istm-develop advances it to `In Progress`, then `Accepted`, as the feature ships.
182
182
  - **Standalone decision spec**: MODE is ARCHITECTURE or CROSS-CUTTING with no buildable scope feature tied to it. Also write **`Proposed`** at creation; ratification (not a build phase) promotes it to `Accepted`, and the main agent sets that on the engineer's confirmation.
183
183
  - **Documenting already shipped work**: DOCUMENTATION_CONTEXT is provided, OR the linked scope feature is already `existing` (shipped, before the workflow). Write **`Accepted`**: the spec describes reality that already exists (see the documentation path rule below).
184
184
  - Umbrella children still omit the `**Status**:` line entirely (governed by the umbrella `index.md`).
@@ -191,14 +191,14 @@ Read MODE_FILE_PATH now and follow that mode file as the only mode specific inst
191
191
  - In `## Options considered`: briefly note the alternatives the engineer considered. If none were mentioned, write "Options considered were not documented at decision time."
192
192
  - Focus on: what was decided, why, what it enables, what it constrains, what the team now lives with.
193
193
 
194
- **On value sourcing (trace every produced value to a named source, so `/develop` never has to invent one):**
194
+ **On value sourcing (trace every produced value to a named source, so `/istm-develop` never has to invent one):**
195
195
  - For each action, endpoint, or read path, list every value it must **produce, compute, or display** to satisfy the acceptance criteria, and name the **source** of each: an input param, a DB column, derived from a named value, or decided in another spec. Fill the **Value sourcing** table in the design section. A required value whose source is not an input, a column, or a prior decision is an **undecided input**: resolve it now (ASK the engineer when only they know it, RECOMMEND otherwise), never leave it for the build to fill.
196
196
  - This is procedural, not a checklist: trace each value the ACs need to a source; do not work from a fixed list of "sources to check". The gaps that hide here are the ones the API table omits, a value an AC requires that no input carries. Diverse illustrations of the pattern (not rules): a read that must show "the user's local day" names where the timezone comes from; a displayed total names the source of its rounding/currency rule; a per tenant query names how the tenant is resolved.
197
197
 
198
198
  **On the acceptance criteria spine & build plan (any data backed feature, FEATURE / ENHANCEMENT):**
199
- - Write **`## Requirements`** with the engineer's confirmed, already IDed acceptance criteria (`AC-1`, `AC-2`, …) verbatim, plus the user stories. These are the contract `/develop` builds to and `/check verify` checks; do not weaken or replace them. If one is genuinely missing, add it and flag it in `## Follow-up`.
199
+ - Write **`## Requirements`** with the engineer's confirmed, already IDed acceptance criteria (`AC-1`, `AC-2`, …) verbatim, plus the user stories. These are the contract `/istm-develop` builds to and `/istm-check verify` checks; do not weaken or replace them. If one is genuinely missing, add it and flag it in `## Follow-up`.
200
200
  - Write **`## Build plan`**: an ordered list of build tasks derived from the confirmed surface (data model, API, config) and the acceptance criteria. Order and slice it through the project's build approach (BUILD_APPROACH), reasoning in your Staff/Principal role about what the approach implies for this feature, not a fixed recipe: a Tracer Bullet plan stands up a working end to end slice through every layer before thickening it; a Skateboard plan delivers the thinnest usable whole first; a Facade/prototype plan puts the UI shell first and wires the backend later; a Journey plan sequences one complete user path per phase. The confirmed data model is the coherent **target** (designed whole for this feature); its migration lands in the Build plan **sized to the feature**, not as one mandatory up front task: one migration for a normal feature; sliced across the slices that need it when the feature is large or the approach wants a thin thread first (Tracer Bullet), deferred under Facade; omitted for a slice touching no schema. The build realizes the target incrementally; a real model change mid build routes back through `/architect`. Tag each task with the AC(s) it satisfies (`, satisfies AC-2`). Every AC traces to at least one task; every task to at least one AC.
201
- - **Decision only specs record the decision, NOT an implementation build plan.** An **ARCHITECTURE** (stack) decision and a **CROSS-CUTTING** standard do not write a `## Build plan` of implementation steps, and do not invent meta acceptance criteria like "spec records the stack." Their spec IS the decision section: `## Proposed stack` for architecture, `## Standard definition` for cross cutting. The steps that execute the decision belong to the feature that runs it (for a stack decision, the scaffold sub task) and are derived by `/develop` at build time, not written here in advance; otherwise the same work is specced twice.
201
+ - **Decision only specs record the decision, NOT an implementation build plan.** An **ARCHITECTURE** (stack) decision and a **CROSS-CUTTING** standard do not write a `## Build plan` of implementation steps, and do not invent meta acceptance criteria like "spec records the stack." Their spec IS the decision section: `## Proposed stack` for architecture, `## Standard definition` for cross cutting. The steps that execute the decision belong to the feature that runs it (for a stack decision, the scaffold sub task) and are derived by `/istm-develop` at build time, not written here in advance; otherwise the same work is specced twice.
202
202
 
203
203
  **On making the recommendation:**
204
204
  - You are the expert. Make a clear recommendation. Do not hide behind "the team should decide."
@@ -225,7 +225,7 @@ Read MODE_FILE_PATH now and follow that mode file as the only mode specific inst
225
225
  1. **Project sources** (strongest, verifiable in the repo): the project's `.istm-context/agents.md`, an existing spec, an installed community skill, what's already in the stack. E.g. `(basis: your .istm-context/agents.md, the repository-layer convention)`.
226
226
  2. **Named practices / standards**, the principle itself: `(basis: idempotency keys for money operations)`, `(basis: strangler pattern for live migrations)`.
227
227
  3. **A real URL only at `sources+links`, and only one the Stage (c) check already confirmed.** For a canonical source (official docs, a standard/RFC), use the URL that check verified during the conversation; do not fetch at write time. At `sources`, no links, cite the practice by name. A link never verified in that check → cite by name, no URL.
228
- - **Never invent, guess, or fetch a URL at write time.** A fabricated or unverified link must not appear; and the links are human facing, so no later AI step (design review, /develop, /audit) fetches them again.
228
+ - **Never invent, guess, or fetch a URL at write time.** A fabricated or unverified link must not appear; and the links are human facing, so no later AI step (design review, /istm-develop, /istm-audit) fetches them again.
229
229
  - When the level includes a `## References` section, every entry must trace to a `(basis: …)` in the body: *Project sources* (verifiable), *Practices & standards* (named), and (only at `sources+links`) *Links* (web verified only, else "none verified").
230
230
  - Keep it lean: cite the load bearing decisions, not every sentence. Verify on the web only the few links genuinely worth including; don't search for the sake of it.
231
231
 
@@ -11,7 +11,7 @@ You wrote the spec yourself on the main thread. Now check your own work for comp
11
11
  - Data backed modes: `## Build plan`: ordered tasks, each tagged with the AC(s) it satisfies, the data model migration sized to the feature (one normally; sliced for a large feature or thin thread/Facade); every AC traces to at least one task
12
12
  - Feature mode: `## Feature design` with the confirmed data model, the **Value sourcing** table (every value each action produces, computes, or displays has a named source; no blank source for a value an AC requires, that would be an undecided input left for the build), and Critical test scenarios (mapped to ACs) populated
13
13
  - Architecture mode: `## Proposed stack` with every relevant layer filled
14
- - Decision only specs (Architecture, Cross cutting): no `## Build plan` of implementation steps and no invented meta ACs; the spec is `## Proposed stack` / `## Standard definition`, and the executing feature (e.g. the scaffold sub task) derives its steps at `/develop` time. If a scaffold style build plan appears in a stack spec, strip it before presenting.
14
+ - Decision only specs (Architecture, Cross cutting): no `## Build plan` of implementation steps and no invented meta ACs; the spec is `## Proposed stack` / `## Standard definition`, and the executing feature (e.g. the scaffold sub task) derives its steps at `/istm-develop` time. If a scaffold style build plan appears in a stack spec, strip it before presenting.
15
15
  - Enhancement mode (a migration that is not trivial): `## Migration plan` with Strategy, Phases, Rollback, and Risks
16
16
  - Cross cutting mode: `## Standard definition` with Canonical pattern, Replaces, Enforcement, Rollout, and Exceptions
17
17
 
@@ -56,31 +56,31 @@ Act on the pick:
56
56
  - **options**: `Accept, looks solid (recommended)` · `Change something, I'll tell you what` · `Rethink the approach`
57
57
  On **Change something**, ask what to change (this also covers overriding a ⚠️ Premise note: if the engineer disagrees with it, remove it and proceed with their direction) and apply targeted **Edit**s to the sections called out, never a from scratch rewrite. On **Rethink the approach**, revisit the relevant stage(s)/options and revise. Either way, present the SAME panel again (not a plain "reply yes") and loop until the engineer picks **Accept**.
58
58
  2. **On Accept: ratify the decision; the status follows the spec kind** (per the status model in *What this skill does*; discriminator: whether a buildable scope feature links this spec, computed in step 3):
59
- - Feature linked spec: do not edit the status line; a confirmed but unbuilt spec correctly stays `Proposed` (/develop advances it).
60
- - Standalone decision spec: set `**Status**:` to `Accepted` on this confirmation (ratification is the deliverable; /develop won't advance it, `Proposed` would strand it).
61
- - Already shipped documentation path: born `Accepted`; leave it, /sync reconciles against the scope.
59
+ - Feature linked spec: do not edit the status line; a confirmed but unbuilt spec correctly stays `Proposed` (/istm-develop advances it).
60
+ - Standalone decision spec: set `**Status**:` to `Accepted` on this confirmation (ratification is the deliverable; /istm-develop won't advance it, `Proposed` would strand it).
61
+ - Already shipped documentation path: born `Accepted`; leave it, /istm-sync reconciles against the scope.
62
62
  3. **Derive tasks + link the scope (after confirmation).** Use the scope feature found in pre-flight (or find it again cheaply by scanning scope filenames/headings across per workspace subdirs; open only the single scope file containing it, `scope.md` or the matching `<epic>.md`).
63
63
 
64
- **Finding the decision box (do not match on one fixed string).** Every feature carries exactly one decision box: the sub task whose label ends with `(spec)`. Its wording varies by feature, `Design it (spec)` on a normal feature and `Decide the stack (spec)` on the Stack and architecture feature, so locate it by that `(spec)` suffix, not by an exact label. Every other sub task is an execution box (`Scaffold from the decision: /develop …`, `Build it: /develop …`, `Verify it`, `Test it`) and is never ticked here.
64
+ **Finding the decision box (do not match on one fixed string).** Every feature carries exactly one decision box: the sub task whose label ends with `(spec)`. Its wording varies by feature, `Design it (spec)` on a normal feature and `Decide the stack (spec)` on the Stack and architecture feature, so locate it by that `(spec)` suffix, not by an exact label. Every other sub task is an execution box (`Scaffold from the decision: /istm-develop …`, `Build it: /istm-develop …`, `Verify it`, `Test it`) and is never ticked here.
65
65
 
66
- - **Decision only spec** (ARCHITECTURE stack decision or CROSS-CUTTING standard, no `## Build plan` by rule) → no build tasks to copy. Link the row's `spec` cell (relative path, as below), tick the decision box `[x]`, and leave the execution sub task(s) untouched (e.g. `Scaffold from the decision: /develop …` on the Stack and architecture feature) so `/develop` derives those steps from the decision at build time. Do not write scaffold or implementation steps into the row (the double spec bug this avoids).
66
+ - **Decision only spec** (ARCHITECTURE stack decision or CROSS-CUTTING standard, no `## Build plan` by rule) → no build tasks to copy. Link the row's `spec` cell (relative path, as below), tick the decision box `[x]`, and leave the execution sub task(s) untouched (e.g. `Scaffold from the decision: /istm-develop …` on the Stack and architecture feature) so `/istm-develop` derives those steps from the decision at build time. Do not write scaffold or implementation steps into the row (the double spec bug this avoids).
67
67
  - **A matching scope feature exists (buildable feature spec)** → update the feature to the built ready shape (the scope's main living update, done every time a spec is captured). Make exactly these edits, nothing else:
68
68
  1. Tick the decision box `[x]` (located as above) and remove the `· needs a decision` tag from the heading (it is decided now).
69
- 2. Link the spec on the feature's pointer line, computed as a relative path from the scope file to the spec: from `.istm-context/scope/api/…` to `.istm-context/specs/api/0001-x.md` is `[0001](../../specs/api/0001-x.md)`; to a directory spec (umbrella or single with files), `[0001](../../specs/api/0001-x/index.md)`; single repo `.istm-context/scope/` → `.istm-context/specs/` is `../specs/…`.
70
- 3. Define the build milestones, a rollup, never the atomic dump: add a `- [ ] Build it: /develop <feature>` box, and under it 2 to 5 milestone sub items rolled up from the spec's `## Build plan` by grouping its atomic tasks into coherent chunks (by AC cluster or by layer), each tagged with the ACs it covers. The atomic tasks and per task detail stay in the spec's `## Build plan`. The 2-to 5 is a guideline you reason about, not a rule: if it won't fit in about five milestones the feature is too big and should be split. Never a fixed milestone list; derive them from THIS spec's Build plan.
71
- 4. Add the closing boxes after Build, per the feature's workflow tier (so every box the feature will run has an owner): `- [ ] Verify it: /check verify <feature>` (Lean and up) and `- [ ] Test it: /test <feature>` (Medium and up); for a `Full` tier feature also `- [ ] Review it (fresh model): /check review <feature>` and `- [ ] Document it: /document <feature>`. A `Vibe` feature needs none of these (it closes at `/develop`). Match the boxes to the tier; don't add a box no stage will run.
69
+ 2. Link the spec on the feature's pointer line, computed as a relative path from the scope file to the spec: from `.istm-context/istm-scope/api/…` to `.istm-context/specs/api/0001-x.md` is `[0001](../../specs/api/0001-x.md)`; to a directory spec (umbrella or single with files), `[0001](../../specs/api/0001-x/index.md)`; single repo `.istm-context/istm-scope/` → `.istm-context/specs/` is `../specs/…`.
70
+ 3. Define the build milestones, a rollup, never the atomic dump: add a `- [ ] Build it: /istm-develop <feature>` box, and under it 2 to 5 milestone sub items rolled up from the spec's `## Build plan` by grouping its atomic tasks into coherent chunks (by AC cluster or by layer), each tagged with the ACs it covers. The atomic tasks and per task detail stay in the spec's `## Build plan`. The 2-to 5 is a guideline you reason about, not a rule: if it won't fit in about five milestones the feature is too big and should be split. Never a fixed milestone list; derive them from THIS spec's Build plan.
71
+ 4. Add the closing boxes after Build, per the feature's workflow tier (so every box the feature will run has an owner): `- [ ] Verify it: /istm-check verify <feature>` (Lean and up) and `- [ ] Test it: /istm-test <feature>` (Medium and up); for a `Full` tier feature also `- [ ] Review it (fresh model): /istm-check review <feature>` and `- [ ] Document it: /istm-document <feature>`. A `Vibe` feature needs none of these (it closes at `/istm-develop`). Match the boxes to the tier; don't add a box no stage will run.
72
72
  5. Move the feature's status to `in-progress` (designing is progress) in the At a glance table and beside the heading.
73
73
  6. Enroll what the spec surfaced: a `## Follow-up` item that is really a separate feature (not part of this one) becomes a new scope feature tagged `from spec NNNN`. Deferred follow ups that block nothing go to the Deferred list.
74
74
 
75
75
  Edit only this feature (and any newly enrolled follow-up), never other features' contents. The result stays coarse (a milestone rollup, not a task dump) while every box is a command or a tracked milestone: Design → Build (+ milestones) → Verify → Test.
76
- - **NO matching feature** → the atomic tasks stay in the spec's `## Build plan`; ask via a panel (capability first): question "Track this feature on the scope?", header "Scope", options `Yes, enroll it` · `No, keep it in the spec only`. On **Yes**, enroll a coarse scope feature (heading + intent + `Done when:` line) with the same built ready shape as above (Design ticked + spec link + the milestone rollup + Verify + Test boxes). On **No**, leave the scope untouched and note in your final message: "This spec isn't on the scope. Its build tasks live in `## Build plan`; run `/scope` later to enroll it." (Silent orphan specs are exactly the drift a later bare `/scope` reconcile has to surface.)
76
+ - **NO matching feature** → the atomic tasks stay in the spec's `## Build plan`; ask via a panel (capability first): question "Track this feature on the scope?", header "Scope", options `Yes, enroll it` · `No, keep it in the spec only`. On **Yes**, enroll a coarse scope feature (heading + intent + `Done when:` line) with the same built ready shape as above (Design ticked + spec link + the milestone rollup + Verify + Test boxes). On **No**, leave the scope untouched and note in your final message: "This spec isn't on the scope. Its build tasks live in `## Build plan`; run `/istm-scope` later to enroll it." (Silent orphan specs are exactly the drift a later bare `/istm-scope` reconcile has to surface.)
77
77
  4. **Spoken summary in chat (plain words, no dashes).** After acceptance and scope linking, show a short plain language summary (per *Output style*): what the spec decided, why in one line, and what happens next (the build tasks it produced, and which skill to run next). A template:
78
78
 
79
79
  ```
80
80
  Done. Here is the quick version.
81
81
  What we decided: <one plain sentence>.
82
82
  Why: <one plain sentence>.
83
- What is next: run /clear to start a fresh session (it reads this spec from disk, so nothing is lost and the long design chat you just had stops costing tokens), then /develop <feature> to build it.
83
+ What is next: run /clear to start a fresh session (it reads this spec from disk, so nothing is lost and the long design chat you just had stops costing tokens), then /istm-develop <feature> to build it.
84
84
  ```
85
85
 
86
86
  Keep it plain; gloss any jargon in parentheses. This is the human read, separate from the spec file's own `## Summary`.
@@ -56,7 +56,7 @@ Mechanics (every question, no exceptions):
56
56
 
57
57
  Still infer the framing, but ASK the design inputs. Within each stage, sort every dimension INFER / ASK / RECOMMEND (see *Asks vs acts*): INFER silently from the prompt/codebase/`.istm-context/agents.md`; ASK the engineer the design inputs (data model, stack, provider, methods, rules) one phase at a time with a suggested pick; RECOMMEND the small internal implementation details they don't want to weigh in on.
58
58
 
59
- **Your mandate (senior+ role):** you are the Staff/Principal engineer accountable if this ships wrong. The spec is the complete build spec `/develop` implements from; any blank dimension becomes a question partway through the build, or a wrong guess. Leaving a gap is the failure mode; be exhaustive, cover everything a senior engineer would pin down before writing code.
59
+ **Your mandate (senior+ role):** you are the Staff/Principal engineer accountable if this ships wrong. The spec is the complete build spec `/istm-develop` implements from; any blank dimension becomes a question partway through the build, or a wrong guess. Leaving a gap is the failure mode; be exhaustive, cover everything a senior engineer would pin down before writing code.
60
60
 
61
61
  **Before the stages, enumerate every load bearing dimension of this feature and assign each to the stage that owns it,** sorting each INFER / ASK / RECOMMEND. Checklist (not all apply; add feature specific ones):
62
62
 
@@ -73,18 +73,18 @@ Still infer the framing, but ASK the design inputs. Within each stage, sort ever
73
73
  - **Security & compliance**: PII, encryption, audit logging, rate limiting, regulatory scope
74
74
  - **Observability**: what to log, metrics, alerts
75
75
  - **Configuration & secrets**: new env vars, feature flags, credentials
76
- - **UX surface (if UI in scope)**: capture the requirements (what each screen must show/do, states, accessibility); leave pixel/layout detail to `/develop`
76
+ - **UX surface (if UI in scope)**: capture the requirements (what each screen must show/do, states, accessibility); leave pixel/layout detail to `/istm-develop`
77
77
  - **Discoverability & SEO (public facing features)**: for any publicly indexed page: metadata, structured data (JSON-LD), OG/social cards, canonical URLs, sitemap/robots, SSR/SSG vs client render. Skip for internal/auth walled surfaces.
78
78
  - **UI design (when the topic IS a page/screen, e.g. "home page UI", "shop page UI")**: a real design decision; the spec is the page's build spec. Settle:
79
- - **Design source: ASK, never assume.** Never auto pick the source (not even "a Figma MCP is connected, so use it"). Ask *"How should I get the design for this?"* as a panel with no recommendation picked in advance: **From Figma** (use, or offer to connect, the Figma MCP to pull the real tokens, spacing, components, and frames) · **From a screenshot or images I'll give you** · **From the existing `.istm-context/design.md` / current UI** · **No design yet, suggest a direction** (only if picked do you propose a style). The picker adds its own Other. Record the chosen source in the spec (for Figma, which file and frames) so `/develop` uses the same one. If they pick Figma but no MCP is connected, point them to connect it (see *Tool skills & MCP*), then proceed.
80
- - **Design system**: a `.istm-context/design.md` (or a design tool MCP as above) is the source of truth if present. If not, decide the direction so `/develop` isn't inventing a look. A design system that doesn't exist yet is itself spec worthy (cross cutting; every page depends on it).
79
+ - **Design source: ASK, never assume.** Never auto pick the source (not even "a Figma MCP is connected, so use it"). Ask *"How should I get the design for this?"* as a panel with no recommendation picked in advance: **From Figma** (use, or offer to connect, the Figma MCP to pull the real tokens, spacing, components, and frames) · **From a screenshot or images I'll give you** · **From the existing `.istm-context/design.md` / current UI** · **No design yet, suggest a direction** (only if picked do you propose a style). The picker adds its own Other. Record the chosen source in the spec (for Figma, which file and frames) so `/istm-develop` uses the same one. If they pick Figma but no MCP is connected, point them to connect it (see *Tool skills & MCP*), then proceed.
80
+ - **Design system**: a `.istm-context/design.md` (or a design tool MCP as above) is the source of truth if present. If not, decide the direction so `/istm-develop` isn't inventing a look. A design system that doesn't exist yet is itself spec worthy (cross cutting; every page depends on it).
81
81
  - **Page composition**: what sections/blocks the page contains and in what order (e.g. home: hero → featured categories → product grid → social proof → footer); the "what goes on the page" the engineer alone knows.
82
82
  - **Component inventory**: the reusable components the page needs (cards, nav, filters, carousel), existing vs net new.
83
- - **Asset strategy**: when no screenshot/design was given and the repo has no images, decide the fallback (real assets the engineer will add, or an online placeholder source, e.g. a stock photo or avatar placeholder service), so `/develop` doesn't stall or invent broken paths.
83
+ - **Asset strategy**: when no screenshot/design was given and the repo has no images, decide the fallback (real assets the engineer will add, or an online placeholder source, e.g. a stock photo or avatar placeholder service), so `/istm-develop` doesn't stall or invent broken paths.
84
84
 
85
85
  Then walk the stages in order as one continuous, step by step interview. Ask each dimension as its own question with a suggested pick, take the answer, move on. Do NOT lead any stage with a proposed bundle for accept or change; assemble as you go.
86
86
 
87
- **Stage (a): Requirements (ask step by step, then DERIVE the acceptance criteria).** Do not open with a finished acceptance criteria list. Ask the requirements one question at a time, seeding each from the scope row's intent + seeds when present and suggesting an answer: the core job, the main (happy path) flow, the key rules and limits, the important failure cases. From the answers, derive the acceptance criteria (`AC-1`, `AC-2`, …) as you go; they are the contract `/develop` builds to and `/check verify` checks, the spine every later stage and build task hangs off. The engineer reviews the assembled ACs in the final spec, not partway through.
87
+ **Stage (a): Requirements (ask step by step, then DERIVE the acceptance criteria).** Do not open with a finished acceptance criteria list. Ask the requirements one question at a time, seeding each from the scope row's intent + seeds when present and suggesting an answer: the core job, the main (happy path) flow, the key rules and limits, the important failure cases. From the answers, derive the acceptance criteria (`AC-1`, `AC-2`, …) as you go; they are the contract `/istm-develop` builds to and `/istm-check verify` checks, the spine every later stage and build task hangs off. The engineer reviews the assembled ACs in the final spec, not partway through.
88
88
 
89
89
  **Stage (b): Data model (MANDATORY, ASK → assemble → SHOW → confirm → iterate).** Never skipped for a data backed feature. ASK, don't guess: elicit in batched questions, never open with a finished schema: first the **entities**, then per entity the **fields** (name, type, required or nullable), then the **relationships** (which relates to which, cardinality 1:1 / 1:N / N:M), then the **rules and constraints** (uniqueness, retention, invariants). Offer example options inside a question to make answering fast, but no complete ERD filled in advance to accept or reject. Then assemble the model from their answers and SHOW it as an ERD style table: entities, primary keys, foreign keys, cardinality. Gate (a confirm panel, one recommended option): *"This matches what I described (recommended)"* · *"Change/add/remove a field or entity"* · *"A relationship is wrong"*. ITERATE (revise and SHOW again) until Accept. The signed off model is the coherent **target**; its migration lands in `## Build plan` sized to the feature (one migration normally; sliced across slices only for a large feature or a thin thread/Facade approach; omitted for a slice touching no schema), not one mandatory up front task.
90
90
 
@@ -103,7 +103,7 @@ Then walk the stages in order as one continuous, step by step interview. Ask eac
103
103
 
104
104
  **Agent Skills & MCP servers.** When this stack walk settles one or more NEW tools not already installed or declined, read `internal/tool-discovery.md` and follow it. Its Step 1 asks the engineer whether to look for Agent Skills and MCP servers at all, and nothing is searched, fetched, or installed until they say yes. On yes, the search runs in the background (a read only, fast, low cost subagent) so it overlaps with the rest of this interview, and the found skills and servers are offered on the main thread. Asking is mandatory; searching is not. Skip the file entirely when no new tool is chosen (an ENHANCEMENT reusing the existing stack).
105
105
 
106
- **Stage (d): API / interface surface (walk each endpoint).** First which surfaces the feature needs, then per endpoint its method, inputs, outputs, auth requirement, and key errors. Then **close the value sourcing loop**: for each acceptance criterion, take every value it needs an action to produce, compute, or display, and confirm the surface names a source for it (an input param, a DB column, derived from a named value, or a prior decision). A required value with no named source is an undecided input, not a build detail: ASK the engineer when only they know it, RECOMMEND otherwise, and add the resolution to the surface before moving on. Procedural, not a checklist: trace each value the ACs need, do not scan a fixed list of sources. Illustrations of the pattern only: an AC that reads "streak is 0 when the last read is before yesterday in the user's local day" needs "the user's local day", so name where the timezone comes from (a column, a client param, request headers); a displayed total names its rounding/currency source; a per tenant view names how the tenant is resolved. This is what fills the spec's **Value sourcing** table and stops `/develop` from inventing the missing source.
106
+ **Stage (d): API / interface surface (walk each endpoint).** First which surfaces the feature needs, then per endpoint its method, inputs, outputs, auth requirement, and key errors. Then **close the value sourcing loop**: for each acceptance criterion, take every value it needs an action to produce, compute, or display, and confirm the surface names a source for it (an input param, a DB column, derived from a named value, or a prior decision). A required value with no named source is an undecided input, not a build detail: ASK the engineer when only they know it, RECOMMEND otherwise, and add the resolution to the surface before moving on. Procedural, not a checklist: trace each value the ACs need, do not scan a fixed list of sources. Illustrations of the pattern only: an AC that reads "streak is 0 when the last read is before yesterday in the user's local day" needs "the user's local day", so name where the timezone comes from (a column, a client param, request headers); a displayed total names its rounding/currency source; a per tenant view names how the tenant is resolved. This is what fills the spec's **Value sourcing** table and stops `/istm-develop` from inventing the missing source.
107
107
 
108
108
  **Stage (e): Security & authorization (walk each rule).** Who may do what, rule by rule (ownership, roles, scoping across tenants and orgs), plus any compliance scope this feature triggers (payments/PII/health).
109
109
 
@@ -111,7 +111,7 @@ Then walk the stages in order as one continuous, step by step interview. Ask eac
111
111
 
112
112
  **(UI page features**, topic IS a page/screen: insert a page design stage between (a) and (d) that walks page composition/sections, design system direction, component inventory, and asset strategy (the UI design checklist bullet) one question at a time, suggesting a pick each. No upfront full layout to accept or reject.**)**
113
113
 
114
- **(ARCHITECTURE stack decisions**, the topic IS choosing the stack/foundation (e.g. `/architect stack & architecture`): do NOT lead with Stage (a) acceptance criteria as a set to confirm. The conversation IS the Stage (c) stack walk: layer by layer (application type → framework → database → auth → hosting → API → observability, and so on, plus every finer tool and setup decision this project needs), batched per the mechanics, suggesting a pick and letting the engineer choose. Any light acceptance criteria and a data model sketch are derived from the chosen stack afterward, not gated up front. Stages (b), (d), (e), (f) collapse into "derived from the chosen stack"; the walk is the work. After the stack walk, ALWAYS run the Tool skills & MCP offer for the tools just chosen (a stack decision picks the most tools: framework, database, auth, ORM, hosting). Do not skip it or defer it to a `/audit` follow-up; run it before you write the spec.**)**
114
+ **(ARCHITECTURE stack decisions**, the topic IS choosing the stack/foundation (e.g. `/architect stack & architecture`): do NOT lead with Stage (a) acceptance criteria as a set to confirm. The conversation IS the Stage (c) stack walk: layer by layer (application type → framework → database → auth → hosting → API → observability, and so on, plus every finer tool and setup decision this project needs), batched per the mechanics, suggesting a pick and letting the engineer choose. Any light acceptance criteria and a data model sketch are derived from the chosen stack afterward, not gated up front. Stages (b), (d), (e), (f) collapse into "derived from the chosen stack"; the walk is the work. After the stack walk, ALWAYS run the Tool skills & MCP offer for the tools just chosen (a stack decision picks the most tools: framework, database, auth, ORM, hosting). Do not skip it or defer it to a `/istm-audit` follow-up; run it before you write the spec.**)**
115
115
 
116
116
  **Quality bar per stage:** every option maps to a real, feature specific decision (never a placeholder like "how complex is the data model?"), each with a one line tradeoff; allow several answers where they are not exclusive. One question per dimension, suggested pick marked with a one line why, and never add your own Other. No `(basis: …)` tag or source citation in option labels; the source and reasoning behind a recommendation belong in the written spec (its Rationale, which always stays, and its References section when opted in), not the live panel.
117
117
 
@@ -119,7 +119,7 @@ Then walk the stages in order as one continuous, step by step interview. Ask eac
119
119
 
120
120
  **Completeness gate (before writing, do not skip).** Do not start writing the spec until every load bearing dimension above is accounted for: each is ASKED, or INFERRED with the inference stated back, or explicitly not applicable. Any still open → keep asking; an unasked dimension becomes a guess partway through the build. Depth is the goal: when in doubt, ask the extra question. Never fold two distinct dimensions into one option, never end with a dimension silently skipped. A short interview is a red flag; a real feature spans many dimensions and many batched rounds.
121
121
 
122
- **After all stages are signed off** (buildable feature spec): the confirmed acceptance criteria seed the spec's `## Requirements`; the confirmed data model, API surface, and stack derive `## Build plan` (each task tagged with the AC it satisfies; the data model is the target, its migration sized to the feature per the build approach, not one mandatory up front task). For a decision only spec (an ARCHITECTURE stack decision or a CROSS-CUTTING standard) there is no `## Requirements`/`## Build plan`: the spec is the decision itself (`## Proposed stack` / `## Standard definition`), and the feature that executes it (e.g. the scaffold sub task) derives its steps at `/develop` time. Order and slice the plan through your Staff/Principal lens on the feature's build approach (read in pre-flight: row override, else project default), reasoning about what it implies rather than a fixed recipe (e.g. Facade defers the migration; Tracer Bullet migrates only the thin thread's schema first, growing it per slice). With no approach on record, default to end to end slices and note the assumption. Then write the spec (below).
122
+ **After all stages are signed off** (buildable feature spec): the confirmed acceptance criteria seed the spec's `## Requirements`; the confirmed data model, API surface, and stack derive `## Build plan` (each task tagged with the AC it satisfies; the data model is the target, its migration sized to the feature per the build approach, not one mandatory up front task). For a decision only spec (an ARCHITECTURE stack decision or a CROSS-CUTTING standard) there is no `## Requirements`/`## Build plan`: the spec is the decision itself (`## Proposed stack` / `## Standard definition`), and the feature that executes it (e.g. the scaffold sub task) derives its steps at `/istm-develop` time. Order and slice the plan through your Staff/Principal lens on the feature's build approach (read in pre-flight: row override, else project default), reasoning about what it implies rather than a fixed recipe (e.g. Facade defers the migration; Tracer Bullet migrates only the thin thread's schema first, growing it per slice). With no approach on record, default to end to end slices and note the assumption. Then write the spec (below).
123
123
 
124
124
  **What good, feature specific staged grilling looks like** (illustrations of depth, not a script; generate the equivalent, and current options, for the feature at hand):
125
125
  - `/architect auth` (no auth yet) → (a) ACs for sign in/session/reset · (b) identity/session data model · (c) which sign in methods (email+password · magic link · OAuth · passkeys · SSO)? then which auth approach, options fresh & current, aligned to the stack (a project platform with built in auth is the aligned recommended pick, vs a hosted provider, a library you host yourself, roll your own) → its config · (e) roles (customer/admin), ownership · (f) lockout, token refresh failure; mobile: token storage, biometric, deep link callback.
@@ -4,7 +4,7 @@ Read this only when the stack walk (Stage c) settles one or more **new** tools (
4
4
 
5
5
  ## Step 1: Ask first (the consent gate)
6
6
 
7
- <!-- TOOL-CONSENT:START (identical in /architect, /audit and /sync; edit all or none) -->
7
+ <!-- TOOL-CONSENT:START (identical in /architect, /istm-audit and /istm-sync; edit all or none) -->
8
8
  **Asking is mandatory. Searching is not.** Nothing is searched, fetched, installed, or spawned for Agent Skill and MCP discovery until the engineer has picked. Offer four choices: find them for me, I will name the ones I want, no and record the decline, or not now. Only the first may run a search command. Never silently skip the offer, and never run a search before the engineer agrees to one.
9
9
  <!-- TOOL-CONSENT:END -->
10
10
 
@@ -51,7 +51,7 @@ Skill: `npx skills add <owner>/<repo> -y` (into the project's agent). MCP: conne
51
51
 
52
52
  ## Step 5: Record
53
53
 
54
- Skills installed → carry into the spec's `## Decision` **Implementation skills** field when you write it, and flag for the `## Agent skills` section of `.istm-context/agents.md` (one bullet per skill, with its location, so only the needed skills load). Servers connected → flag for that section's compact `MCP servers:` line. Anything declined or skipped → flag for its compact `Declined:` line so a later stage does not offer it again (root for project wide tech, the nested area doc for area specific tech). `/audit` and `/sync` own writing `.istm-context/agents.md`.
54
+ Skills installed → carry into the spec's `## Decision` **Implementation skills** field when you write it, and flag for the `## Agent skills` section of `.istm-context/agents.md` (one bullet per skill, with its location, so only the needed skills load). Servers connected → flag for that section's compact `MCP servers:` line. Anything declined or skipped → flag for its compact `Declined:` line so a later stage does not offer it again (root for project wide tech, the nested area doc for area specific tech). `/istm-audit` and `/istm-sync` own writing `.istm-context/agents.md`.
55
55
 
56
56
  ## Step 6: When nothing can be searched, installed, or connected
57
57