its-magic 0.1.2-9 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1602 -755
- package/bin/its-magic.js +121 -11
- package/bin/postinstall.js +21 -0
- package/installer.ps1 +759 -0
- package/installer.py +981 -0
- package/installer.sh +649 -0
- package/package.json +18 -14
- package/scripts/check_intake_template_parity.py +284 -0
- package/scripts/doc_profile_lib.py +415 -0
- package/scripts/guard_installer_publish.py +88 -0
- package/scripts/intake_bug_routing_guard.py +67 -0
- package/scripts/intake_evidence_lib.py +802 -0
- package/scripts/intake_evidence_validate.py +73 -0
- package/scripts/materialize_codebase_map.py +184 -0
- package/scripts/remote_config_summary.py +243 -0
- package/template/.cursor/agents/curator.mdc +35 -0
- package/template/.cursor/agents/dev.mdc +29 -0
- package/template/.cursor/agents/po.mdc +141 -0
- package/template/.cursor/agents/qa.mdc +28 -0
- package/template/.cursor/agents/release.mdc +28 -0
- package/template/.cursor/agents/security.mdc +98 -0
- package/template/.cursor/agents/tech-lead.mdc +57 -0
- package/template/.cursor/commands/architecture.md +127 -0
- package/template/.cursor/commands/ask.md +55 -0
- package/template/.cursor/commands/auto.md +533 -0
- package/template/.cursor/commands/discovery.md +47 -0
- package/template/.cursor/commands/execute.md +343 -0
- package/template/.cursor/commands/intake.md +323 -0
- package/template/.cursor/commands/map-codebase.md +46 -0
- package/template/.cursor/commands/memory-audit.md +175 -0
- package/template/.cursor/commands/milestone-complete.md +51 -0
- package/template/.cursor/commands/milestone-start.md +59 -0
- package/template/.cursor/commands/pause.md +64 -0
- package/{.cursor/commands/gsd-phase-context.md → template/.cursor/commands/phase-context.md} +6 -2
- package/template/.cursor/commands/plan-verify.md +34 -0
- package/template/.cursor/commands/qa.md +226 -0
- package/template/.cursor/commands/quick.md +41 -0
- package/template/.cursor/commands/refresh-context.md +82 -0
- package/template/.cursor/commands/release.md +505 -0
- package/template/.cursor/commands/research.md +49 -0
- package/template/.cursor/commands/resume.md +67 -0
- package/template/.cursor/commands/security-review.md +81 -0
- package/template/.cursor/commands/sprint-plan.md +103 -0
- package/template/.cursor/commands/status-reconcile.md +95 -0
- package/template/.cursor/commands/verify-work.md +152 -0
- package/template/.cursor/dev-environment.json.example +22 -0
- package/{.cursor → template/.cursor}/hooks/README.md +3 -2
- package/{.cursor/hooks/gsd-hook.py → template/.cursor/hooks/hook.py} +15 -6
- package/template/.cursor/hooks.json +26 -0
- package/template/.cursor/remote.json +31 -0
- package/template/.cursor/rules/caveman.mdc +184 -0
- package/template/.cursor/rules/coding-standards.mdc +39 -0
- package/template/.cursor/rules/core.mdc +111 -0
- package/template/.cursor/rules/handoffs.mdc +27 -0
- package/template/.cursor/rules/quality.mdc +49 -0
- package/template/.cursor/scratchpad.local.example.md +323 -0
- package/template/.cursor/scratchpad.md +324 -0
- package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/SKILL.md +2 -2
- package/template/.cursorignore +6 -0
- package/template/.env.example +28 -0
- package/template/.github/workflows/ci.yml +194 -0
- package/{.github → template/.github}/workflows/deploy.yml +5 -2
- package/template/.its-magic-version +1 -0
- package/template/README.md +1602 -0
- package/template/decisions/DEC-0001.md +11 -0
- package/template/decisions/DEC-0002.md +11 -0
- package/template/docs/developer/README.md +44 -0
- package/template/docs/engineering/architecture.md +9 -0
- package/template/docs/engineering/artifact-ordering-policy.md +48 -0
- package/template/docs/engineering/artifact-ownership-policy.md +57 -0
- package/template/docs/engineering/auto-orchestration-reference.md +1211 -0
- package/{docs → template/docs}/engineering/codebase-map.md +0 -5
- package/template/docs/engineering/compatibility-report.md +20 -0
- package/template/docs/engineering/compatibility-signals.md +7 -0
- package/template/docs/engineering/component-scope-report.md +16 -0
- package/template/docs/engineering/component-scope.md +19 -0
- package/template/docs/engineering/context/installer-owned-paths.manifest +96 -0
- package/template/docs/engineering/context/readme-section-affinity.json +30 -0
- package/template/docs/engineering/decisions.md +16 -0
- package/template/docs/engineering/legacy-drift-audit.md +21 -0
- package/template/docs/engineering/manifests/components/api-gateway.manifest.yaml +12 -0
- package/template/docs/engineering/manifests/registry.manifest.yaml +20 -0
- package/template/docs/engineering/manifests/repo.manifest.yaml +11 -0
- package/template/docs/engineering/phase-context.md +16 -0
- package/template/docs/engineering/release-targets.json +123 -0
- package/template/docs/engineering/research.md +29 -0
- package/template/docs/engineering/runbook.md +2320 -0
- package/template/docs/engineering/runtime-connectivity.md +81 -0
- package/template/docs/engineering/security-review.md +33 -0
- package/template/docs/engineering/spec-pack/README.md +20 -0
- package/template/docs/engineering/state-archive/README.md +15 -0
- package/template/docs/engineering/state.md +20 -0
- package/template/docs/engineering/status-normalization-report.md +19 -0
- package/template/docs/engineering/token-cost-parity-manifest.md +16 -0
- package/template/docs/engineering/us-0084-remote-e2e.md +44 -0
- package/template/docs/product/acceptance.md +1 -0
- package/template/docs/product/backlog.md +5 -0
- package/template/docs/product/vision.md +11 -0
- package/template/docs/user-guides/README.md +40 -0
- package/{handoffs → template/handoffs}/dev_to_qa.md +0 -3
- package/{handoffs → template/handoffs}/po_to_tl.md +0 -3
- package/{handoffs → template/handoffs}/qa_to_dev.md +1 -2
- package/template/handoffs/release_notes.md +51 -0
- package/template/handoffs/release_queue.md +47 -0
- package/template/handoffs/release_to_dev.md +31 -0
- package/template/handoffs/releases/Sxxxx-release-notes.md +62 -0
- package/template/handoffs/resume_brief.md +14 -0
- package/{handoffs → template/handoffs}/tl_to_dev.md +0 -2
- package/template/handoffs/token_cost_runs/README.md +26 -0
- package/template/its_magic/.its-magic-version +1 -0
- package/template/its_magic/README.md +9 -0
- package/template/scripts/auto_outer_driver.py +521 -0
- package/template/scripts/caveman_compress_input.py +903 -0
- package/template/scripts/check_downstream_ci_guard.py +67 -0
- package/template/scripts/check_intake_template_parity.py +284 -0
- package/template/scripts/check_token_cost_parity.py +69 -0
- package/template/scripts/dev_environment_lib.py +463 -0
- package/template/scripts/doc_profile_lib.py +415 -0
- package/template/scripts/downstream_ci_guard_lib.py +222 -0
- package/template/scripts/enforce-triad-hot-surface.py +753 -0
- package/template/scripts/guard_installer_publish.py +88 -0
- package/template/scripts/intake_bug_resume_brief_refresh.py +303 -0
- package/template/scripts/intake_bug_routing_guard.py +67 -0
- package/template/scripts/intake_evidence_lib.py +802 -0
- package/template/scripts/intake_evidence_validate.py +73 -0
- package/template/scripts/materialize_codebase_map.py +184 -0
- package/template/scripts/pack_json_validate.py +130 -0
- package/template/scripts/project_readme_coverage_lib.py +417 -0
- package/template/scripts/readme_feature_coverage_lib.py +608 -0
- package/template/scripts/remote_config_summary.py +243 -0
- package/template/scripts/sync_push_gates.py +198 -0
- package/template/scripts/token_cost_compare.py +40 -0
- package/template/scripts/token_cost_lib.py +108 -0
- package/template/scripts/uat_probe_lib.py +868 -0
- package/template/scripts/validate-and-push.ps1 +280 -0
- package/template/scripts/validate-and-push.sh +243 -0
- package/template/scripts/validate_doc_profile.py +103 -0
- package/template/scripts/validate_project_readme_coverage.py +151 -0
- package/template/scripts/validate_readme_feature_coverage.py +140 -0
- package/template/sprints/S0001/progress.md +1 -0
- package/template/sprints/S0001/qa-findings.md +9 -0
- package/template/sprints/S0001/release-findings.md +24 -0
- package/template/sprints/S0001/sprint.md +9 -0
- package/template/sprints/S0001/summary.md +7 -0
- package/template/sprints/S0001/tasks.md +1 -0
- package/template/sprints/S0001/uat.json +6 -0
- package/template/sprints/S0001/uat.md +5 -0
- package/template/sprints/quick/Q0001/summary.md +1 -0
- package/{sprints → template/sprints}/quick/Q0001/task.json +0 -1
- package/.cursor/agents/curator.mdc +0 -21
- package/.cursor/agents/dev.mdc +0 -20
- package/.cursor/agents/po.mdc +0 -19
- package/.cursor/agents/qa.mdc +0 -19
- package/.cursor/agents/release.mdc +0 -19
- package/.cursor/agents/tech-lead.mdc +0 -21
- package/.cursor/commands/gsd-architecture.md +0 -29
- package/.cursor/commands/gsd-auto.md +0 -27
- package/.cursor/commands/gsd-discovery.md +0 -27
- package/.cursor/commands/gsd-execute.md +0 -32
- package/.cursor/commands/gsd-intake.md +0 -28
- package/.cursor/commands/gsd-map-codebase.md +0 -25
- package/.cursor/commands/gsd-milestone-complete.md +0 -24
- package/.cursor/commands/gsd-milestone-start.md +0 -26
- package/.cursor/commands/gsd-pause.md +0 -25
- package/.cursor/commands/gsd-plan-verify.md +0 -26
- package/.cursor/commands/gsd-qa.md +0 -28
- package/.cursor/commands/gsd-quick.md +0 -24
- package/.cursor/commands/gsd-refresh-context.md +0 -26
- package/.cursor/commands/gsd-release.md +0 -29
- package/.cursor/commands/gsd-research.md +0 -28
- package/.cursor/commands/gsd-resume.md +0 -26
- package/.cursor/commands/gsd-sprint-plan.md +0 -30
- package/.cursor/commands/gsd-verify-work.md +0 -25
- package/.cursor/hooks.json +0 -26
- package/.cursor/plans/cursor-gsd-team-kit_8cfee9b8.plan.md +0 -57
- package/.cursor/remote.json +0 -18
- package/.cursor/rules/gsd-core.mdc +0 -18
- package/.cursor/rules/gsd-handoffs.mdc +0 -10
- package/.cursor/rules/gsd-quality.mdc +0 -15
- package/.cursor/scratchpad.md +0 -34
- package/.github/workflows/ci.yml +0 -47
- package/decisions/DEC-0001.md +0 -21
- package/decisions/DEC-0002.md +0 -21
- package/docs/engineering/architecture.md +0 -354
- package/docs/engineering/decisions.md +0 -6
- package/docs/engineering/research.md +0 -11
- package/docs/engineering/runbook.md +0 -32
- package/docs/engineering/state.md +0 -33
- package/docs/product/acceptance.md +0 -6
- package/docs/product/backlog.md +0 -7
- package/docs/product/vision.md +0 -46
- package/gsd-installer.ps1 +0 -189
- package/gsd-installer.py +0 -195
- package/gsd-installer.sh +0 -201
- package/handoffs/release_notes.md +0 -14
- package/handoffs/resume_brief.md +0 -8
- package/milestones/M0001/milestone.json +0 -7
- package/milestones/M0001/phases.json +0 -9
- package/milestones/M0001/progress.md +0 -3
- package/milestones/M0001/summary.md +0 -3
- package/scripts/generate-release-notes.ps1 +0 -74
- package/scripts/generate-release-notes.sh +0 -63
- package/scripts/release-all.ps1 +0 -423
- package/scripts/release-all.sh +0 -226
- package/sprints/S0001/progress.md +0 -4
- package/sprints/S0001/qa-findings.md +0 -113
- package/sprints/S0001/sprint.md +0 -70
- package/sprints/S0001/summary.md +0 -46
- package/sprints/S0001/tasks.md +0 -35
- package/sprints/S0001/uat.json +0 -8
- package/sprints/S0001/uat.md +0 -8
- package/sprints/quick/Q0001/summary.md +0 -3
- /package/{.cursor/rules/gsd-escalation.mdc → template/.cursor/rules/escalation.mdc} +0 -0
- /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/acceptance.json +0 -0
- /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/acceptance.md +0 -0
- /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/architecture.json +0 -0
- /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/architecture.md +0 -0
- /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/decision.json +0 -0
- /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/decision.md +0 -0
- /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/handoff.json +0 -0
- /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/handoff.md +0 -0
- /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/milestone.json +0 -0
- /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/phase-context.json +0 -0
- /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/plan-verify.json +0 -0
- /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/sprint.json +0 -0
- /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/sprint.md +0 -0
- /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/story.json +0 -0
- /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/story.md +0 -0
- /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/uat.json +0 -0
- /package/{docs → template/docs}/engineering/context/phase-template.json +0 -0
- /package/{docs → template/docs}/engineering/dependencies.json +0 -0
- /package/{sprints → template/sprints}/S0001/plan-verify.json +0 -0
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "its-magic intake: clarify idea and capture story + acceptance."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /intake
|
|
6
|
+
|
|
7
|
+
## Subagents
|
|
8
|
+
- po
|
|
9
|
+
|
|
10
|
+
## Execution model
|
|
11
|
+
- Run `/intake` in a fresh PO subagent context.
|
|
12
|
+
- After writing outputs, stop and hand off to `/discovery` or `/architecture`
|
|
13
|
+
in a new subagent/chat.
|
|
14
|
+
|
|
15
|
+
## Inputs
|
|
16
|
+
|
|
17
|
+
- **Narrow-read (US-0053 / US-0096 Tranche A)**: Start at docs/engineering/phase-context.md
|
|
18
|
+
and the story section anchor in vision/architecture/decisions when a heading exists; forbid
|
|
19
|
+
full-file reads when a section heading exists.
|
|
20
|
+
- User idea (text or voice transcription)
|
|
21
|
+
- Constraints, audience, success criteria
|
|
22
|
+
|
|
23
|
+
## Outputs (artifacts)
|
|
24
|
+
- `docs/product/vision.md`
|
|
25
|
+
- `docs/product/backlog.md`
|
|
26
|
+
- `docs/product/acceptance.md`
|
|
27
|
+
- `handoffs/po_to_tl.md`
|
|
28
|
+
- `handoffs/resume_brief.md` (required on successful **`/intake bug`** persistence — **DEC-0069** / **BUG-0005**)
|
|
29
|
+
- Optional (when enabled): `docs/engineering/compatibility-report.md`
|
|
30
|
+
- Optional (when enabled): `docs/engineering/component-scope.md`
|
|
31
|
+
|
|
32
|
+
## Stop conditions
|
|
33
|
+
- Missing acceptance criteria or unclear scope
|
|
34
|
+
- Decision gate triggered (see escalation rule)
|
|
35
|
+
|
|
36
|
+
## Runtime capability and writer-safety guard (US-0059 / DEC-0041)
|
|
37
|
+
|
|
38
|
+
- `/intake` requires the role-specific `po` subagent capability by default.
|
|
39
|
+
- Before any artifact mutation, run capability preflight:
|
|
40
|
+
- if `po` capability is unavailable, fail fast with
|
|
41
|
+
`SUBAGENT_CAPABILITY_UNAVAILABLE`,
|
|
42
|
+
- emit deterministic remediation guidance (for example: enable role-capable
|
|
43
|
+
runtime or explicitly opt in to fallback policy).
|
|
44
|
+
- Silent in-band fallback is forbidden unless explicit policy opt-in is
|
|
45
|
+
configured (`INTAKE_SUBAGENT_FALLBACK=allow`).
|
|
46
|
+
- For artifact mutations, enforce deterministic single-writer scope:
|
|
47
|
+
- establish writer identity (`writer_id`) and run identity (`intake_run_id`),
|
|
48
|
+
- bind writes to target artifacts (`backlog`, `acceptance`, `vision`,
|
|
49
|
+
`po_to_tl`, and when persisting bugs: `resume_brief` per **DEC-0069**) for this run.
|
|
50
|
+
- Drift guard semantics:
|
|
51
|
+
- self-write changes from the same `(writer_id, intake_run_id)` are valid and
|
|
52
|
+
must not trigger concurrent-writer blockers,
|
|
53
|
+
- external conflicting mutation during active run must fail safe with
|
|
54
|
+
`INTAKE_CONCURRENT_WRITER_DETECTED` and no partial overwrite.
|
|
55
|
+
|
|
56
|
+
## Mandatory intake question packs and fail-closed persistence gate (US-0068 / DEC-0050)
|
|
57
|
+
|
|
58
|
+
- Intake must apply one deterministic questionnaire pack before any backlog or
|
|
59
|
+
acceptance persistence:
|
|
60
|
+
- `first-intake-pack` for first/new/broad requests,
|
|
61
|
+
- `small-intake-pack` for narrow follow-up requests.
|
|
62
|
+
- Pack selection must be deterministic and auditable:
|
|
63
|
+
- evaluate request breadth (`new capability` vs `bounded refinement`),
|
|
64
|
+
- use known stack/runtime cues when present,
|
|
65
|
+
- unresolved/unknown stack cues must fail closed to `first-intake-pack`
|
|
66
|
+
(never bypass to a smaller pack by default).
|
|
67
|
+
- Required topic coverage must be complete before persistence unless bounded
|
|
68
|
+
assumptions are explicitly confirmed:
|
|
69
|
+
- `first-intake-pack` required topics:
|
|
70
|
+
`users_problem`, `runtime_target_environment`, `language_framework_runtime`,
|
|
71
|
+
`architecture_preference`, `ui_design_expectations`,
|
|
72
|
+
`security_compliance`, `non_functional_priorities`, `scope_timeline`.
|
|
73
|
+
- `small-intake-pack` required topics:
|
|
74
|
+
`outcome_success_criteria`, `impacted_components`,
|
|
75
|
+
`constraints_compatibility_risks`, `required_tests_acceptance_checks`,
|
|
76
|
+
`done_definition`.
|
|
77
|
+
- Fail-closed deterministic reason codes:
|
|
78
|
+
- `INTAKE_REQUIRED_TOPIC_MISSING`
|
|
79
|
+
- `INTAKE_REQUIRED_PACK_INCOMPLETE`
|
|
80
|
+
- `INTAKE_ASSUMPTION_CONFIRMATION_REQUIRED`
|
|
81
|
+
- `INTAKE_ANSWER_REF_NOT_TOPIC_DISTINCT` (**BUG-0007** / **R-0066** — see **Truthfulness** below)
|
|
82
|
+
- `INTAKE_PERSISTENCE_BLOCKED`
|
|
83
|
+
- Remediation guidance surface (mandatory on block):
|
|
84
|
+
- list `missing_topics`,
|
|
85
|
+
- request targeted answers for missing required topics,
|
|
86
|
+
- if assumptions are used, require explicit confirmation before write.
|
|
87
|
+
- Persistence evidence contract (must be written in intake outputs):
|
|
88
|
+
- `asked_topics`
|
|
89
|
+
- `missing_topics`
|
|
90
|
+
- `assumptions_confirmed`
|
|
91
|
+
- For `first-intake-pack` (first/new/broad): `plan_area_inventory`,
|
|
92
|
+
`plan_area_coverage`, `coverage_complete=true` (derived), and candidate story
|
|
93
|
+
set refs used for map validation (**US-0081** / **DEC-0064**).
|
|
94
|
+
|
|
95
|
+
## Interactive intake evidence gate (US-0078 / DEC-0060 / R-0055)
|
|
96
|
+
|
|
97
|
+
Machine-verifiable **`intake_evidence`** extends **DEC-0050** literals with
|
|
98
|
+
**`topic_coverage`** (one row per required pack key), canonical **`ie:`** refs,
|
|
99
|
+
and assumption binding. **Do not** mutate `docs/product/backlog.md` or
|
|
100
|
+
`docs/product/acceptance.md` until validation **PASS**es.
|
|
101
|
+
|
|
102
|
+
- Bundle minimum (logical shape — serialize inline in handoff/backlog notes or JSON sidecar):
|
|
103
|
+
- `selected_pack`, `asked_topics`, `missing_topics`, `assumptions_confirmed`
|
|
104
|
+
- `topic_coverage[]`: `topic_key`, `satisfied_by` (`answer_ref` \| `assumption_confirmation_ref` \| `delegation_ref`),
|
|
105
|
+
`ref` (**`ie:`** per **DEC-0060**), `quoted_user_text`, per-row `intake_run_id` / `turn_index`
|
|
106
|
+
(or bundle-level `intake_run_id` shared by rows)
|
|
107
|
+
- Delegated required topic rows (`satisfied_by=delegation_ref`) must include:
|
|
108
|
+
`delegation_scope`, `delegation_rationale`, `delegation_confidence` (`low|medium|high`)
|
|
109
|
+
- Equivalent-evidence accounting (optional; suppress repetitive ask for already captured evidence):
|
|
110
|
+
`evidence_source=equivalent_evidence_ref` + `equivalent_evidence_ref` on the row
|
|
111
|
+
- Affirmative / non-placeholder `assumptions_confirmed`: `assumption_confirmation_ref`,
|
|
112
|
+
`assumption_confirmation_intake_run_id`, `assumption_confirmation_turn_index`,
|
|
113
|
+
`assumption_confirmation_quoted`
|
|
114
|
+
- Validator (fail-closed; preserves primary sub-codes under umbrella **`INTAKE_PERSISTENCE_BLOCKED`**):
|
|
115
|
+
- `python scripts/intake_evidence_validate.py --self-test`
|
|
116
|
+
- `python scripts/intake_evidence_validate.py --file <bundle.json>` or `--stdin`
|
|
117
|
+
- Deterministic diagnostics (**AC-7**): on block, list `missing_topics`, cite reason codes, and emit
|
|
118
|
+
remediation prompts for unresolved required keys only.
|
|
119
|
+
- Delegation-specific fail-closed diagnostics under umbrella `INTAKE_PERSISTENCE_BLOCKED`:
|
|
120
|
+
- `INTAKE_DELEGATION_EVIDENCE_MISSING`
|
|
121
|
+
- `INTAKE_DELEGATION_EVIDENCE_INVALID`
|
|
122
|
+
- **US-0081 complete-plan gate** (first/new/broad only): enforce
|
|
123
|
+
`plan_area_id -> story_ids[] | deferred_ref` coverage for every
|
|
124
|
+
`plan_area_inventory` row; emit deterministic subcodes under umbrella
|
|
125
|
+
`INTAKE_PERSISTENCE_BLOCKED`:
|
|
126
|
+
- `INTAKE_PLAN_COVERAGE_MISSING`
|
|
127
|
+
- `INTAKE_PLAN_AREA_ID_INVALID`
|
|
128
|
+
- `INTAKE_PLAN_COVERAGE_CONTRACT_INVALID`
|
|
129
|
+
- `INTAKE_PLAN_DEFERRED_REF_MISSING`
|
|
130
|
+
- **Guided vs low-touch parity**: **`INTAKE_GUIDED_MODE=1`** and **`INTAKE_GUIDED_MODE=0`** run the
|
|
131
|
+
**same pre-persistence validation pipeline**; low-touch may skip optional follow-ups but **must not**
|
|
132
|
+
bypass mandatory pack evidence or first-intake complete-plan mapping
|
|
133
|
+
(**AC-5**, **AC-6**).
|
|
134
|
+
- **Grandfathering**: legacy intake rows remain valid for read/display; the **next** intake-driven
|
|
135
|
+
mutation must supply full **US-0078** evidence or the write is blocked (**DEC-0060** §5).
|
|
136
|
+
- Truthfulness / anti-echo (**BUG-0007** / **R-0066**): `INTAKE_ANSWER_REF_NOT_TOPIC_DISTINCT` when
|
|
137
|
+
the same normalized `quoted_user_text` is reused across distinct required `topic_key` rows under
|
|
138
|
+
`satisfied_by=answer_ref` without an exempt path (`evidence_source=equivalent_evidence_ref` +
|
|
139
|
+
`equivalent_evidence_ref`, `delegation_ref` per **DEC-0067** / **US-0083**, or
|
|
140
|
+
`assumption_confirmation_ref` on the row). Canonical **`ie:`** integrity (**DEC-0060**) does not
|
|
141
|
+
prove a topic was actually elicited.
|
|
142
|
+
|
|
143
|
+
## Truthfulness: `asked_topics` and `topic_coverage` (BUG-0007 / US-0083 / DEC-0060 / DEC-0067)
|
|
144
|
+
|
|
145
|
+
- **`asked_topics`** may list a required `topic_key` only when a **user-visible question** was posed
|
|
146
|
+
**or** a **DEC-0060**-allowed alternate applies: **`delegation_ref`** (**DEC-0067**, **US-0083**),
|
|
147
|
+
**`evidence_source=equivalent_evidence_ref`** with **`equivalent_evidence_ref`**, or
|
|
148
|
+
**`assumption_confirmation_ref`** (row-level and/or bundle-level assumption binding per the gate
|
|
149
|
+
contract above).
|
|
150
|
+
- **Forbidden**: fabricating **`topic_coverage`** by echoing **one** user or bug-report blob into
|
|
151
|
+
**`quoted_user_text`** on **every** required key as **`answer_ref`** solely to satisfy structure.
|
|
152
|
+
The validator rejects that pattern under **`INTAKE_ANSWER_REF_NOT_TOPIC_DISTINCT`** (see
|
|
153
|
+
**`docs/engineering/architecture.md`** **`# BUG-0007`**).
|
|
154
|
+
|
|
155
|
+
## Bug issue routing (US-0079 / DEC-0061)
|
|
156
|
+
|
|
157
|
+
- **Work item kind** (merged scratchpad per **DEC-0055**): **`INTAKE_WORK_ITEM_KIND=story`** (default) or **`INTAKE_WORK_ITEM_KIND=bug`**.
|
|
158
|
+
- **Explicit argv**: when the operator invokes **`/intake bug`** (bug mode for this run), treat **`INTAKE_WORK_ITEM_KIND`** as **`bug`** for routing even if scratchpad defaults to story (command wins for the session).
|
|
159
|
+
- **No silent US allocation for defects**: before creating a **`US-xxxx`** for **defect-shaped** input while in **story** kind, run **`python scripts/intake_bug_routing_guard.py --kind story --file <condensed-prose.txt>`** (or **`--stdin`**). Exit **3** → **`INTAKE_BUG_ROUTING_REQUIRED`** — **abort** backlog/acceptance mutation; remediation: set **`INTAKE_WORK_ITEM_KIND=bug`** and/or re-run as **`/intake bug`**, collect minimum bug fields, then allocate **`BUG-####`**.
|
|
160
|
+
- **Bug persistence** (after **US-0078** evidence still passes for narrative packs when applicable):
|
|
161
|
+
- Next id: **`python scripts/bug_issue_validate.py --print-next-id`** (reads **`docs/product/backlog.md`**).
|
|
162
|
+
- Append **`### BUG-#### — Title`** under **`## Bug issues (canonical)`** with **Status**, **`environment`**, **`steps_to_reproduce`**, **`expected`**, **`actual`**, **`evidence_refs`**.
|
|
163
|
+
- Add matching **`- [ ]` / `- [x]`** row under **`## Bug acceptance (canonical)`**, sorted by id.
|
|
164
|
+
- Run **`python scripts/bug_issue_validate.py --backlog docs/product/backlog.md --check-acceptance`** before completing the handoff.
|
|
165
|
+
- **Resume brief refresh (DEC-0069 / BUG-0005)**: immediately after successful bug persistence and backlog/acceptance validation **PASS**, run the atomic writer (temp file + replace — idempotent latest-pointer upsert):
|
|
166
|
+
- `python scripts/intake_bug_resume_brief_refresh.py --bug-id BUG-#### --backlog docs/product/backlog.md --resume-brief handoffs/resume_brief.md --intake-boundary-utc <RFC3339Z>`
|
|
167
|
+
- Optional: `--orchestrator-run-id`, `--intake-evidence handoffs/intake_evidence/....json`, `--sprint-id` when known.
|
|
168
|
+
- Exit non-zero → **`INTAKE_RESUME_BRIEF_*`** family — do not claim intake complete; fix backlog/brief contradiction or supply valid boundary UTC.
|
|
169
|
+
- Post-condition: **`intended_resume_phase` / `resolved_start_phase` = `discovery`**, **`resolution_source=resume_brief`**, **`bug_id`** matches persisted row, so **`/auto`** without **`start-from`** does not false-trigger **`RESUME_BRIEF_STALE`** for a stale pre-intake **`intake`** target.
|
|
170
|
+
- Optional audit: `python scripts/intake_bug_resume_brief_refresh.py --bug-id BUG-#### --backlog docs/product/backlog.md --resume-brief handoffs/resume_brief.md --validate-file` (no write).
|
|
171
|
+
|
|
172
|
+
## Steps
|
|
173
|
+
1. Determine intake mode from `.cursor/scratchpad.md`:
|
|
174
|
+
- guided mode: `INTAKE_GUIDED_MODE=1` (default)
|
|
175
|
+
- low-touch mode: `INTAKE_GUIDED_MODE=0`
|
|
176
|
+
2. Baseline safety (always on in both modes):
|
|
177
|
+
- Check `docs/product/backlog.md` for duplicates/overlap before creating a new
|
|
178
|
+
story.
|
|
179
|
+
3. Guided mode behavior (`INTAKE_GUIDED_MODE=1`):
|
|
180
|
+
a. Run a deterministic decomposition evaluator before persistence. Score
|
|
181
|
+
breadth/risk using:
|
|
182
|
+
- feature/workflow-step count,
|
|
183
|
+
- cross-cutting impact surface (multiple components/contracts),
|
|
184
|
+
- expected acceptance set size,
|
|
185
|
+
- risk/unknown dependency surface.
|
|
186
|
+
b. Decomposition trigger:
|
|
187
|
+
- If evaluator indicates broad/high-risk scope, propose a bounded
|
|
188
|
+
multi-story decomposition (typically 2-5 stories).
|
|
189
|
+
- Otherwise default to a single story.
|
|
190
|
+
c. Split strategy requirements:
|
|
191
|
+
- Prefer vertical-slice or workflow-step stories with independent user value.
|
|
192
|
+
- Avoid technical-layer-only splits unless explicitly requested by the user.
|
|
193
|
+
d. Persist split rationale and boundaries:
|
|
194
|
+
- why split (or why not),
|
|
195
|
+
- split axes used (feature/workflow/risk boundary),
|
|
196
|
+
- boundaries between generated stories.
|
|
197
|
+
e. Preserve explicit user authority before final persistence:
|
|
198
|
+
- user can **accept**, **merge**, or **adjust** the proposed split.
|
|
199
|
+
f. Use adaptive questioning:
|
|
200
|
+
- ask when ambiguity blocks concrete acceptance (baseline),
|
|
201
|
+
- also ask additional targeted questions when breadth/risk is high even if
|
|
202
|
+
the request looks concrete.
|
|
203
|
+
g. Keep questioning bounded:
|
|
204
|
+
- use concise, targeted rounds,
|
|
205
|
+
- stop after bounded rounds or when acceptance confidence is sufficient,
|
|
206
|
+
- summarize assumptions for confirmation.
|
|
207
|
+
h. Present at least one viable option/alternative before recommending an
|
|
208
|
+
approach.
|
|
209
|
+
i. Perform intake-time web research and persist findings as an R-xxxx entry in
|
|
210
|
+
`docs/engineering/research.md` (auto-increment ID, per DEC-0011); cite
|
|
211
|
+
entry IDs in reasoning and handoff.
|
|
212
|
+
4. Low-touch behavior (`INTAKE_GUIDED_MODE=0`):
|
|
213
|
+
- Keep baseline duplicate safety from step 2 active.
|
|
214
|
+
- Do not add proactive follow-up/options/research overhead unless the user
|
|
215
|
+
explicitly requests depth.
|
|
216
|
+
- Keep single-story default (no forced decomposition), unless the user
|
|
217
|
+
explicitly requests decomposition.
|
|
218
|
+
5. Enforce mandatory question-pack coverage before persistence (US-0068) **and**
|
|
219
|
+
interactive evidence (**US-0078 / DEC-0060**):
|
|
220
|
+
- deterministically select one pack (`first-intake-pack` or
|
|
221
|
+
`small-intake-pack`) and record `selected_pack`.
|
|
222
|
+
- ask required questions for the selected pack; adaptive follow-ups remain
|
|
223
|
+
allowed but bounded.
|
|
224
|
+
- accumulate **`topic_coverage`** rows with valid **`ie:`** refs; keep
|
|
225
|
+
`asked_topics` aligned with covered required keys (asked-vs-covered rule).
|
|
226
|
+
- before writing backlog/acceptance artifacts, run **`python scripts/intake_evidence_validate.py`**
|
|
227
|
+
on the captured bundle (or equivalent in-process validation):
|
|
228
|
+
- if validation **PASS**es, proceed to persistence;
|
|
229
|
+
- on **FAIL**, emit `INTAKE_REQUIRED_TOPIC_MISSING` /
|
|
230
|
+
`INTAKE_REQUIRED_PACK_INCOMPLETE` / `INTAKE_ASSUMPTION_CONFIRMATION_REQUIRED` /
|
|
231
|
+
`INTAKE_DELEGATION_EVIDENCE_MISSING` / `INTAKE_DELEGATION_EVIDENCE_INVALID`
|
|
232
|
+
plus first-intake coverage subcodes (`INTAKE_PLAN_COVERAGE_MISSING`,
|
|
233
|
+
`INTAKE_PLAN_AREA_ID_INVALID`, `INTAKE_PLAN_COVERAGE_CONTRACT_INVALID`,
|
|
234
|
+
`INTAKE_PLAN_DEFERRED_REF_MISSING`) under umbrella
|
|
235
|
+
`INTAKE_PERSISTENCE_BLOCKED` with remediation guidance — **no write**.
|
|
236
|
+
- for `first-intake-pack` requests, derive a normalized
|
|
237
|
+
`plan_area_inventory`, require one coverage row per `plan_area_id`, enforce
|
|
238
|
+
xor mapping (`story_ids` xor `deferred_ref` + `deferred_reason`), and set
|
|
239
|
+
`coverage_complete=true` only when all areas are fully mapped.
|
|
240
|
+
- persist intake evidence fields (`asked_topics`, `missing_topics`,
|
|
241
|
+
`assumptions_confirmed`, `topic_coverage`, assumption ref fields per
|
|
242
|
+
**DEC-0060**, and first-intake coverage fields (`plan_area_inventory`,
|
|
243
|
+
`plan_area_coverage`, `coverage_complete`) in relevant intake artifacts.
|
|
244
|
+
6. Optional fresh-project ID namespace bootstrap (US-0052 / DEC-0034):
|
|
245
|
+
- Read `ID_NAMESPACE_BOOTSTRAP` from `.cursor/scratchpad.md` (`0|1`,
|
|
246
|
+
default `0`).
|
|
247
|
+
- Freshness eligibility is deterministic and auditable:
|
|
248
|
+
- no existing `US-` IDs in `docs/product/backlog.md`,
|
|
249
|
+
- no existing `DEC-` IDs in `docs/engineering/decisions.md` (or
|
|
250
|
+
`decisions/DEC-*.md`),
|
|
251
|
+
- no existing `R-` IDs in `docs/engineering/research.md`.
|
|
252
|
+
- If `ID_NAMESPACE_BOOTSTRAP=1` and freshness checks pass:
|
|
253
|
+
- first newly created story ID starts at `US-0001`.
|
|
254
|
+
- If `ID_NAMESPACE_BOOTSTRAP=0`, or freshness checks fail:
|
|
255
|
+
- continue from highest existing story ID (collision-safe default).
|
|
256
|
+
- Never rewrite or renumber historical IDs.
|
|
257
|
+
- If bootstrap was requested but checks fail, emit deterministic diagnostic:
|
|
258
|
+
`ID_BOOTSTRAP_NOT_FRESH` with brief remediation guidance.
|
|
259
|
+
7. Traceability persistence contract (US-0051):
|
|
260
|
+
- `docs/product/backlog.md`: include decomposition evidence (single-story vs
|
|
261
|
+
split decision, rationale, and boundaries).
|
|
262
|
+
- `docs/product/acceptance.md`: maintain acceptance traceability for resulting
|
|
263
|
+
story set (or single-story decision) with clear scope boundaries.
|
|
264
|
+
- `handoffs/po_to_tl.md`: include split decision summary and adaptive
|
|
265
|
+
questioning evidence (risk/unknown triggers and key assumptions).
|
|
266
|
+
8. Persist the story and acceptance in product docs.
|
|
267
|
+
9. Write a PO -> TL handoff with scope and risks.
|
|
268
|
+
10. Optional cross-repo observability declaration (US-0034):
|
|
269
|
+
- If `CROSS_REPO_OBSERVABILITY=0`, add zero required overhead.
|
|
270
|
+
- If `CROSS_REPO_OBSERVABILITY=1`, capture monitored source list from
|
|
271
|
+
`COMPATIBILITY_SOURCES` (`repo/module/contract/docs`) and include
|
|
272
|
+
compatibility observability intent in handoff context.
|
|
273
|
+
11. Optional component scope declaration (US-0035):
|
|
274
|
+
- If `COMPONENT_SCOPE_MODE=0`, add zero required scope overhead.
|
|
275
|
+
- If `COMPONENT_SCOPE_MODE=1`, declare in-scope and out-of-scope components
|
|
276
|
+
in `docs/engineering/component-scope.md` and include references in
|
|
277
|
+
`handoffs/po_to_tl.md`.
|
|
278
|
+
12. Optional spec-pack (US-0031):
|
|
279
|
+
- If `SPEC_PACK_MODE=0`, add no required spec-pack steps (zero overhead).
|
|
280
|
+
- If `SPEC_PACK_MODE=1`, ensure CRS artifact for the new story is created or
|
|
281
|
+
updated at canonical path per runbook spec-pack contract; link story ID in
|
|
282
|
+
handoff.
|
|
283
|
+
13. Optional user-guide (US-0032):
|
|
284
|
+
- If `USER_GUIDE_MODE=0`, add no required user-guide steps or blocking checks (zero overhead).
|
|
285
|
+
- If `USER_GUIDE_MODE=1`, ensure handoff references canonical user-guide path
|
|
286
|
+
`docs/user-guides/US-xxxx.md` for the new story when applicable; see runbook.
|
|
287
|
+
14. Triad hot-surface gate (DEC-0054) when `handoffs/po_to_tl.md` is mutated:
|
|
288
|
+
- run `python scripts/enforce-triad-hot-surface.py --rollover` then `--check`
|
|
289
|
+
from repository root,
|
|
290
|
+
- on failure stop with `STATE_ARCHIVE_REQUIRED` or
|
|
291
|
+
`ARTIFACT_HOT_SURFACE_OVERSIZE` (no successful intake completion with an
|
|
292
|
+
oversize handoff hot file),
|
|
293
|
+
- record the verification tuple (`boundary`, `moved`, `retained`,
|
|
294
|
+
`pack_ref`) in intake outputs when rollover occurred.
|
|
295
|
+
|
|
296
|
+
## Deterministic artifact ordering contract (US-0058 / DEC-0040)
|
|
297
|
+
|
|
298
|
+
- Writes to mutable artifacts must follow
|
|
299
|
+
`docs/engineering/artifact-ordering-policy.md`.
|
|
300
|
+
- For intake outputs:
|
|
301
|
+
- `docs/product/backlog.md` story blocks must remain sorted-canonical by
|
|
302
|
+
numeric `US-xxxx` ID.
|
|
303
|
+
- `docs/product/acceptance.md` rows must align to canonical backlog order.
|
|
304
|
+
- `handoffs/po_to_tl.md` may prepend the latest handoff section only.
|
|
305
|
+
- If the insertion anchor for any target section is missing/ambiguous, fail with
|
|
306
|
+
`ARTIFACT_ORDERING_ANCHOR_AMBIGUOUS` and avoid partial writes.
|
|
307
|
+
- If intake appends a `docs/engineering/state.md` checkpoint, enforce UTC
|
|
308
|
+
monotonic timestamp guard (`new >= last`); on violation fail with
|
|
309
|
+
`STATE_TIMESTAMP_NON_MONOTONIC` and avoid partial writes.
|
|
310
|
+
|
|
311
|
+
## Cross-phase ownership guard (US-0061 / DEC-0043)
|
|
312
|
+
|
|
313
|
+
- Intake mutations must also comply with
|
|
314
|
+
`docs/engineering/artifact-ownership-policy.md`.
|
|
315
|
+
- Intake may mutate only intake-owned scopes (`vision`, `backlog`, `acceptance`,
|
|
316
|
+
`po_to_tl`, and **`handoffs/resume_brief.md`** only via the **DEC-0069** bug-intake
|
|
317
|
+
completion path / `intake_bug_resume_brief_refresh.py`) for target story context.
|
|
318
|
+
- Any attempted delete/rewrite of non-intake-owned sections fails closed with
|
|
319
|
+
`PHASE_OWNERSHIP_VIOLATION`.
|
|
320
|
+
- If an override-authorized path is configured for an artifact but required
|
|
321
|
+
override evidence fields are missing, fail with
|
|
322
|
+
`PHASE_OVERRIDE_EVIDENCE_MISSING`.
|
|
323
|
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "its-magic map codebase: analyze existing project before changes."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /map-codebase
|
|
6
|
+
|
|
7
|
+
## Subagents
|
|
8
|
+
- tech-lead
|
|
9
|
+
- curator
|
|
10
|
+
|
|
11
|
+
## Inputs
|
|
12
|
+
|
|
13
|
+
- **Narrow-read (US-0053 / US-0096 Tranche A)**: Start at docs/engineering/phase-context.md
|
|
14
|
+
and the story section anchor in vision/architecture/decisions when a heading exists; forbid
|
|
15
|
+
full-file reads when a section heading exists.
|
|
16
|
+
- Existing repository code and docs
|
|
17
|
+
|
|
18
|
+
## Outputs (artifacts)
|
|
19
|
+
- `docs/engineering/codebase-map.md`
|
|
20
|
+
- `docs/engineering/dependencies.json`
|
|
21
|
+
- `docs/engineering/state.md` (append-only checkpoints only when the phase
|
|
22
|
+
contract already allows bounded map-related notes)
|
|
23
|
+
|
|
24
|
+
## Lifecycle vs manual (US-0082 / DEC-0065)
|
|
25
|
+
|
|
26
|
+
- **Auto/bootstrap (primary)**: `/architecture` completion (**tech-lead**) must
|
|
27
|
+
run `python scripts/materialize_codebase_map.py --trigger architecture` before
|
|
28
|
+
`/sprint-plan` so a bootstrap map exists or deterministic
|
|
29
|
+
`CODEBASE_MAP_BLOCKED:*` diagnostics are emitted.
|
|
30
|
+
- **Auto/bootstrap (optional)**: `/refresh-context` (**curator**) may run the
|
|
31
|
+
same script with `--trigger refresh-context` only when merged scratchpad sets
|
|
32
|
+
`CODEBASE_MAP_REFRESH_ON_ROLLOVER=1` (default off — limits churn).
|
|
33
|
+
- **Manual (this command)**: `/map-codebase` remains the explicit operator path
|
|
34
|
+
for a full analysis pass and for refreshing rich maps; it does not replace the
|
|
35
|
+
lifecycle gate above.
|
|
36
|
+
|
|
37
|
+
## Stop conditions
|
|
38
|
+
- Decision gate triggered
|
|
39
|
+
|
|
40
|
+
## Steps
|
|
41
|
+
1. Identify stack, structure, and key entry points.
|
|
42
|
+
2. Summarize architecture and conventions.
|
|
43
|
+
3. Capture dependencies and tooling.
|
|
44
|
+
4. Persist outputs to the artifact paths above. When a programmatic bootstrap is
|
|
45
|
+
needed in tooling or tests, prefer `scripts/materialize_codebase_map.py`
|
|
46
|
+
(idempotent; preserves non-bootstrap maps).
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "its-magic memory-audit: read-only check for memory drift between artifacts and repository signals."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /memory-audit
|
|
6
|
+
|
|
7
|
+
## Subagents
|
|
8
|
+
- tech-lead (audit analysis and signal comparison)
|
|
9
|
+
- curator (artifact freshness and cross-reference validation)
|
|
10
|
+
|
|
11
|
+
## Execution model
|
|
12
|
+
- Run `/memory-audit` in a fresh subagent context.
|
|
13
|
+
- This command is **read-only**: it does not create, modify, or delete source
|
|
14
|
+
code, workflow rules, or sprint artifacts.
|
|
15
|
+
- After writing the report artifact, stop. No handoff file is produced.
|
|
16
|
+
- Can be run at any phase: pre-handoff, pre-QA, pre-release, or ad-hoc.
|
|
17
|
+
|
|
18
|
+
## Inputs
|
|
19
|
+
|
|
20
|
+
- **Narrow-read (US-0053 / US-0096 Tranche A)**: Start at docs/engineering/phase-context.md
|
|
21
|
+
and the story section anchor in vision/architecture/decisions when a heading exists; forbid
|
|
22
|
+
full-file reads when a section heading exists.
|
|
23
|
+
Read these files to build the audit picture:
|
|
24
|
+
|
|
25
|
+
- `docs/engineering/state.md` — current project status and progress snapshot
|
|
26
|
+
- `docs/product/backlog.md` — story definitions and statuses
|
|
27
|
+
- `docs/product/acceptance.md` — acceptance criteria and completion status
|
|
28
|
+
- `docs/engineering/architecture.md` — technical design and decisions
|
|
29
|
+
- `docs/engineering/decisions.md` — decision index
|
|
30
|
+
- `decisions/DEC-*.md` — individual decision records (check for open TODOs/gates)
|
|
31
|
+
- `sprints/S*/progress.md` — sprint progress (all sprints, not just latest)
|
|
32
|
+
- `sprints/S*/tasks.md` — task definitions and status
|
|
33
|
+
- `sprints/S*/summary.md` — sprint completion summaries
|
|
34
|
+
- `handoffs/*.md` — handoff artifacts
|
|
35
|
+
- `.cursor/scratchpad.md` — automation flags and config
|
|
36
|
+
|
|
37
|
+
## Outputs (artifacts)
|
|
38
|
+
- `docs/engineering/memory-drift-report.md`
|
|
39
|
+
|
|
40
|
+
## Stop conditions
|
|
41
|
+
- Report artifact written — stop.
|
|
42
|
+
- If invocation itself fails (missing critical inputs), report the error and
|
|
43
|
+
stop.
|
|
44
|
+
|
|
45
|
+
## Phase usage guidance
|
|
46
|
+
Run `/memory-audit` at these checkpoints:
|
|
47
|
+
- **Pre-handoff**: before writing `handoffs/dev_to_qa.md` or any role handoff.
|
|
48
|
+
- **Pre-QA**: before running `/qa` or `/verify-work`.
|
|
49
|
+
- **Pre-release**: before running `/release`.
|
|
50
|
+
- **Ad-hoc**: any time the operator suspects artifacts are stale after external
|
|
51
|
+
code changes or long pauses.
|
|
52
|
+
|
|
53
|
+
## Report format
|
|
54
|
+
|
|
55
|
+
The output artifact `docs/engineering/memory-drift-report.md` must contain
|
|
56
|
+
these sections in order:
|
|
57
|
+
|
|
58
|
+
### 1. Header metadata
|
|
59
|
+
- Timestamp (UTC ISO-8601)
|
|
60
|
+
- Branch name and HEAD commit (short SHA)
|
|
61
|
+
- Audit scope: list of artifact categories checked
|
|
62
|
+
|
|
63
|
+
### 2. Severity summary
|
|
64
|
+
Counts by severity level:
|
|
65
|
+
|
|
66
|
+
| Severity | Meaning | Action expectation |
|
|
67
|
+
|----------|---------|-------------------|
|
|
68
|
+
| **high** | Artifact clearly contradicts repository state | Fix before next handoff or release |
|
|
69
|
+
| **medium** | Artifact is likely stale but not directly contradictory | Fix before release; acceptable during active sprint |
|
|
70
|
+
| **low** | Minor staleness or cosmetic inconsistency | Fix during `/refresh-context` or next sprint |
|
|
71
|
+
|
|
72
|
+
### 3. Memory drift findings table
|
|
73
|
+
|
|
74
|
+
| # | Artifact | Signal | Severity | Evidence | Recommended action |
|
|
75
|
+
|---|----------|--------|----------|----------|--------------------|
|
|
76
|
+
|
|
77
|
+
Each finding must include:
|
|
78
|
+
- **Artifact**: the file path of the stale or inconsistent artifact.
|
|
79
|
+
- **Signal**: what repository evidence contradicts it.
|
|
80
|
+
- **Severity**: `high`, `medium`, or `low` per the taxonomy above.
|
|
81
|
+
- **Evidence**: concrete file paths, line references, or status values that
|
|
82
|
+
demonstrate the inconsistency.
|
|
83
|
+
- **Recommended action**: a specific follow-up command or manual step
|
|
84
|
+
(e.g., "run `/refresh-context`", "update `state.md` progress snapshot",
|
|
85
|
+
"resolve DEC-xxxx TODO").
|
|
86
|
+
|
|
87
|
+
### 4. Template drift findings (reference-only — US-0017 scope)
|
|
88
|
+
|
|
89
|
+
This section lists differences between active files (`.cursor/commands/`,
|
|
90
|
+
`.cursor/rules/`, etc.) and their `template/` counterparts.
|
|
91
|
+
|
|
92
|
+
> **Scope note**: Template drift detection and remediation belong to US-0017.
|
|
93
|
+
> Findings listed here are for awareness only. Do not remediate template drift
|
|
94
|
+
> under `/memory-audit`. Use `/refresh-context` or the future US-0017
|
|
95
|
+
> template-sync mechanism instead.
|
|
96
|
+
|
|
97
|
+
Format: short list of differing file pairs, or "No template drift detected."
|
|
98
|
+
|
|
99
|
+
### 5. Suggested next steps
|
|
100
|
+
Based on findings, recommend one or more of:
|
|
101
|
+
- `/refresh-context` — to update stale artifacts
|
|
102
|
+
- `/sprint-plan` — if new work is discovered
|
|
103
|
+
- `/verify-work` — if acceptance status needs re-validation
|
|
104
|
+
- `/intake` — if findings reveal a new story or bug
|
|
105
|
+
|
|
106
|
+
## Detection coverage and evidence rules
|
|
107
|
+
|
|
108
|
+
The audit must check at least these three categories. For each finding, the
|
|
109
|
+
report must include concrete evidence (file paths, status values, or line
|
|
110
|
+
references) — not vague assertions.
|
|
111
|
+
|
|
112
|
+
### Check 1: Changed code without artifact updates
|
|
113
|
+
- **What to check**: identify files outside `docs/`, `sprints/`, `handoffs/`,
|
|
114
|
+
`decisions/`, and `.cursor/` that have been modified (per git status or recent
|
|
115
|
+
commit history) while related memory artifacts show no corresponding update.
|
|
116
|
+
- **Artifacts to cross-reference**: `docs/engineering/state.md` (progress
|
|
117
|
+
snapshot), `docs/engineering/architecture.md` (component descriptions),
|
|
118
|
+
`docs/product/acceptance.md` (completion markers).
|
|
119
|
+
- **Evidence required**: list the changed source file(s) and the artifact
|
|
120
|
+
section(s) that should reflect the change but do not.
|
|
121
|
+
- **Severity guidance**: `high` if the artifact claims a feature is complete but
|
|
122
|
+
code changes are uncommitted or untested; `medium` if the artifact is simply
|
|
123
|
+
behind; `low` if cosmetic or naming-only.
|
|
124
|
+
|
|
125
|
+
### Check 2: Unresolved decision TODOs and open gates
|
|
126
|
+
- **What to check**: scan `decisions/DEC-*.md` for status values other than
|
|
127
|
+
"Accepted" or "Rejected" (e.g., "Proposed", "Open", "TODO"). Check whether
|
|
128
|
+
any sprint task or story references a decision that is not yet resolved.
|
|
129
|
+
- **Artifacts to cross-reference**: `docs/engineering/decisions.md` (index),
|
|
130
|
+
`sprints/S*/tasks.md` (task references to decisions).
|
|
131
|
+
- **Evidence required**: the decision file path, its current status, and the
|
|
132
|
+
task(s) or story that depend on it.
|
|
133
|
+
- **Severity guidance**: `high` if a task marked "done" depends on an unresolved
|
|
134
|
+
decision; `medium` if the decision is referenced but the dependent work is
|
|
135
|
+
still pending; `low` if the decision is informational only.
|
|
136
|
+
|
|
137
|
+
### Check 3: Sprint/story status mismatch vs repository signals
|
|
138
|
+
- **What to check**: compare story statuses in `docs/product/backlog.md` and
|
|
139
|
+
sprint task statuses in `sprints/S*/tasks.md` against observable signals:
|
|
140
|
+
presence of summary.md, UAT results, QA findings, handoff artifacts.
|
|
141
|
+
- **Artifacts to cross-reference**: `sprints/S*/summary.md`,
|
|
142
|
+
`sprints/S*/qa-findings.md`, `sprints/S*/uat.json`, `handoffs/*.md`.
|
|
143
|
+
- **Evidence required**: the story/task ID, its claimed status, and the missing
|
|
144
|
+
or contradictory artifact.
|
|
145
|
+
- **Severity guidance**: `high` if a story is marked "done" but QA findings are
|
|
146
|
+
unresolved or UAT is missing; `medium` if status is ahead of actual progress;
|
|
147
|
+
`low` if status labels are inconsistent but work is substantively correct.
|
|
148
|
+
|
|
149
|
+
## Scope boundary: US-0024 vs US-0017
|
|
150
|
+
|
|
151
|
+
This command implements **US-0024** (memory drift detection). The report must
|
|
152
|
+
maintain a clear separation:
|
|
153
|
+
|
|
154
|
+
- **"Memory drift findings"** (sections 2–3): artifacts vs repository/code
|
|
155
|
+
reality. This is the actionable output of `/memory-audit`. Remediation uses
|
|
156
|
+
existing commands (`/refresh-context`, `/sprint-plan`, `/verify-work`,
|
|
157
|
+
`/intake`).
|
|
158
|
+
|
|
159
|
+
- **"Template drift findings"** (section 4): active files vs `template/`
|
|
160
|
+
alignment. This is **reference-only** output. Remediation belongs to US-0017
|
|
161
|
+
and must not be performed by `/memory-audit`.
|
|
162
|
+
|
|
163
|
+
The agent must not blur these categories. If a finding is about active-vs-template
|
|
164
|
+
divergence, it goes in section 4 with the US-0017 routing note. If it is about
|
|
165
|
+
artifact-vs-code/repo divergence, it goes in section 3.
|
|
166
|
+
|
|
167
|
+
## Steps
|
|
168
|
+
1. Read all input files listed above.
|
|
169
|
+
2. Run detection checks 1–3 against the repository state.
|
|
170
|
+
3. Identify any template drift (active vs `template/` file differences) for the
|
|
171
|
+
reference-only section.
|
|
172
|
+
4. Classify each finding by severity using the taxonomy.
|
|
173
|
+
5. Write `docs/engineering/memory-drift-report.md` with all required sections.
|
|
174
|
+
6. Print a one-line summary: counts of high/medium/low findings.
|
|
175
|
+
7. Stop. Do not modify any source, workflow, or sprint artifacts.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "its-magic milestone complete: finalize milestone summary."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /milestone-complete
|
|
6
|
+
|
|
7
|
+
## Subagents
|
|
8
|
+
- release
|
|
9
|
+
- curator
|
|
10
|
+
|
|
11
|
+
## Inputs
|
|
12
|
+
|
|
13
|
+
- **Narrow-read (US-0053 / US-0096 Tranche A)**: Start at docs/engineering/phase-context.md
|
|
14
|
+
and the story section anchor in vision/architecture/decisions when a heading exists; forbid
|
|
15
|
+
full-file reads when a section heading exists.
|
|
16
|
+
- `milestones/M0001/summary.md`
|
|
17
|
+
- `handoffs/release_notes.md`
|
|
18
|
+
|
|
19
|
+
## Outputs (artifacts)
|
|
20
|
+
- Updated `milestones/M0001/summary.md`
|
|
21
|
+
- Updated `docs/engineering/state.md`
|
|
22
|
+
|
|
23
|
+
## Stop conditions
|
|
24
|
+
- Decision gate triggered
|
|
25
|
+
|
|
26
|
+
## Exit criteria checklist (DEC-0009)
|
|
27
|
+
|
|
28
|
+
Before completing a milestone, all of the following must be true:
|
|
29
|
+
|
|
30
|
+
- [ ] **All sprints done**: every sprint under this milestone has status = done
|
|
31
|
+
in its `progress.md` and `summary.md`.
|
|
32
|
+
- [ ] **UAT passing**: all sprint UAT artifacts (`uat.json`, `uat.md`) are in
|
|
33
|
+
**populated** or **verified** state (not placeholder) with passing results.
|
|
34
|
+
- [ ] **progress.md complete**: `milestones/Mxxxx/progress.md` shows all sprints
|
|
35
|
+
as done with accurate status.
|
|
36
|
+
- [ ] **summary.md written**: `milestones/Mxxxx/summary.md` is finalized with
|
|
37
|
+
outcomes, lessons learned, and deliverable list.
|
|
38
|
+
- [ ] **Traceability verified**: all stories in the milestone have entries in the
|
|
39
|
+
traceability index (`docs/engineering/state.md`) with PASS status and evidence.
|
|
40
|
+
- [ ] **No open blockers**: no unresolved decision gates or blocking QA findings
|
|
41
|
+
remain for any sprint in this milestone.
|
|
42
|
+
|
|
43
|
+
If any check fails, do not complete — document what is missing and recommend
|
|
44
|
+
the appropriate corrective command (`/verify-work`, `/execute`, `/qa`).
|
|
45
|
+
|
|
46
|
+
## Steps
|
|
47
|
+
1. Run exit criteria checklist above. If any item fails, stop and report.
|
|
48
|
+
2. Finalize milestone summary in `milestones/Mxxxx/summary.md` with outcomes,
|
|
49
|
+
lessons learned, and list of delivered stories.
|
|
50
|
+
3. Update `milestone.json` status to "completed".
|
|
51
|
+
4. Confirm release notes and update `docs/engineering/state.md`.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "its-magic milestone start: create milestone tracking files."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /milestone-start
|
|
6
|
+
|
|
7
|
+
## Subagents
|
|
8
|
+
- tech-lead
|
|
9
|
+
- curator
|
|
10
|
+
|
|
11
|
+
## Inputs
|
|
12
|
+
|
|
13
|
+
- **Narrow-read (US-0053 / US-0096 Tranche A)**: Start at docs/engineering/phase-context.md
|
|
14
|
+
and the story section anchor in vision/architecture/decisions when a heading exists; forbid
|
|
15
|
+
full-file reads when a section heading exists.
|
|
16
|
+
- Milestone name, goals, scope
|
|
17
|
+
|
|
18
|
+
## Outputs (artifacts)
|
|
19
|
+
- `milestones/M0001/milestone.json`
|
|
20
|
+
- `milestones/M0001/phases.json`
|
|
21
|
+
- `milestones/M0001/progress.md`
|
|
22
|
+
- `milestones/M0001/summary.md`
|
|
23
|
+
|
|
24
|
+
## Stop conditions
|
|
25
|
+
- Decision gate triggered
|
|
26
|
+
|
|
27
|
+
## Milestone lifecycle states (DEC-0009)
|
|
28
|
+
|
|
29
|
+
Milestones follow a five-state lifecycle: **created → active → in-review →
|
|
30
|
+
completed | cancelled**. `/milestone-start` produces artifacts in the **created**
|
|
31
|
+
state.
|
|
32
|
+
|
|
33
|
+
| State | Entry | milestone.json | phases.json | progress.md | summary.md |
|
|
34
|
+
|-------|-------|---------------|-------------|-------------|------------|
|
|
35
|
+
| **created** | `/milestone-start` | id, status. Name/goal may be draft. | At least intake phase listed. | Initialized (header only). | Not required. |
|
|
36
|
+
| **active** | First sprint starts | name, goal, scope all populated (not draft/placeholder). | Phases reflect actual planned work. | Updated per sprint. | Not required. |
|
|
37
|
+
| **in-review** | All sprints done | No change. | All phases done/complete. | All sprints shown complete. | Not required. |
|
|
38
|
+
| **completed** | `/milestone-complete` | status = completed. | Final state. | Final state. | Finalized with outcomes and lessons. |
|
|
39
|
+
| **cancelled** | Milestone abandoned | status = cancelled. | — | — | Records cancellation reason. |
|
|
40
|
+
|
|
41
|
+
### Required fields at creation (placeholder state)
|
|
42
|
+
- `milestone.json`: `id` (auto-assigned), `status` = "created". `name` and
|
|
43
|
+
`goal` may be draft/placeholder but must exist. `scope` may be empty.
|
|
44
|
+
- `phases.json`: at least the intake phase must be listed.
|
|
45
|
+
- `progress.md`: initialized with header. Content is placeholder — will be
|
|
46
|
+
populated as sprints complete.
|
|
47
|
+
- `summary.md`: not created at this stage.
|
|
48
|
+
|
|
49
|
+
### Distinction: placeholder vs real content
|
|
50
|
+
At creation, draft values are acceptable for `name` and `goal`. Before the
|
|
51
|
+
milestone transitions to **active** (triggered by first sprint planning),
|
|
52
|
+
these fields must contain real, non-placeholder content. See `/sprint-plan`
|
|
53
|
+
for the activation check.
|
|
54
|
+
|
|
55
|
+
## Steps
|
|
56
|
+
1. Define milestone goals and scope. Create `milestone.json` with id and status = "created". Name and goal may be draft if details are still being refined.
|
|
57
|
+
2. List phases and intended outcomes in `phases.json`. At minimum, include the intake phase.
|
|
58
|
+
3. Initialize `progress.md` with header and placeholder structure.
|
|
59
|
+
4. Do NOT create `summary.md` at this stage — it is produced by `/milestone-complete`.
|