@tenkara/afm-linux-arm64 0.0.0-stage → 4.0.0-alpha.10
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/bin/afm +4 -0
- package/content/.coupling-baseline.tsv +1 -0
- package/content/.pending-commands.txt +2 -0
- package/content/CHANGELOG-archive.md +806 -0
- package/content/CHANGELOG.md +4320 -0
- package/content/PRINCIPLES.md +119 -0
- package/content/README-light.md +158 -0
- package/content/README.md +150 -0
- package/content/code-style/_any/file-size.md +62 -0
- package/content/code-style/_any/imports.md +68 -0
- package/content/code-style/_any/naming.md +72 -0
- package/content/code-style/_any/test-placement.md +57 -0
- package/content/code-style/nextjs-app-router/imports.md +50 -0
- package/content/code-style/nextjs-app-router/naming.md +50 -0
- package/content/code-style/prisma-postgres/error-boundary.md +55 -0
- package/content/code-style/prisma-postgres/imports.md +61 -0
- package/content/code-style/shadcn-ui/naming.md +48 -0
- package/content/code-style/stripe-billing/naming.md +76 -0
- package/content/code-style/trigger-dev-v4/imports.md +58 -0
- package/content/code-style/trigger-dev-v4/naming.md +49 -0
- package/content/code-style/trigger-dev-v4/test-placement.md +61 -0
- package/content/code-style/trpc-v11/error-boundary.md +51 -0
- package/content/code-style/trpc-v11/file-size.md +44 -0
- package/content/code-style/trpc-v11/naming.md +60 -0
- package/content/code-style/trpc-v11/test-placement.md +52 -0
- package/content/core/ach.md +260 -0
- package/content/core/afm.md +514 -0
- package/content/core/gotchas.md +18 -0
- package/content/core/prd.md +141 -0
- package/content/core/protocol.md +158 -0
- package/content/core/ust.md +65 -0
- package/content/guardrails/README.md +55 -0
- package/content/guardrails/dsl-com-ordem-obrigatoria.md +47 -0
- package/content/guardrails/exaustividade-de-union.md +48 -0
- package/content/guardrails/fronteira-de-import.md +57 -0
- package/content/hooks/README.md +70 -0
- package/content/interview/bootstrap.md +417 -0
- package/content/interview/promotion.md +115 -0
- package/content/interview/refactor.md +379 -0
- package/content/interview/triggers.md +107 -0
- package/content/modules/nextjs-app-router/ach.patch.md +44 -0
- package/content/modules/nextjs-app-router/gotchas.seed.md +78 -0
- package/content/modules/nextjs-app-router/rules.patch.md +35 -0
- package/content/modules/prisma-postgres/ach.patch.md +65 -0
- package/content/modules/prisma-postgres/rules.patch.md +28 -0
- package/content/modules/shadcn-ui/ach.patch.md +42 -0
- package/content/modules/stripe-billing/ach.patch.md +46 -0
- package/content/modules/stripe-billing/gotchas.seed.md +73 -0
- package/content/modules/stripe-billing/rules.patch.md +30 -0
- package/content/modules/trigger-dev-v4/ach.patch.md +64 -0
- package/content/modules/trigger-dev-v4/gotchas.seed.md +53 -0
- package/content/modules/trigger-dev-v4/rules.patch.md +35 -0
- package/content/modules/trpc-v11/ach.patch.md +56 -0
- package/content/modules/trpc-v11/rules.patch.md +34 -0
- package/content/modules/vireya-ui/ach.patch.md +85 -0
- package/content/modules/vireya-ui/gotchas.seed.md +98 -0
- package/content/modules/vireya-ui/rules.patch.md +36 -0
- package/content/ops/adr.md +54 -0
- package/content/ops/analyze.md +130 -0
- package/content/ops/clarify.md +86 -0
- package/content/ops/deliver.md +209 -0
- package/content/ops/diagnose.md +143 -0
- package/content/ops/evolve.md +366 -0
- package/content/ops/export-template.md +97 -0
- package/content/ops/generalize.md +117 -0
- package/content/ops/gotcha.md +46 -0
- package/content/ops/plan.md +61 -0
- package/content/ops/policy.md +61 -0
- package/content/ops/promote.md +72 -0
- package/content/ops/protocol.md +51 -0
- package/content/ops/reconcile.md +44 -0
- package/content/ops/reflect.md +182 -0
- package/content/ops/remediate.md +143 -0
- package/content/ops/restructure.md +142 -0
- package/content/ops/rule.md +170 -0
- package/content/ops/specify.md +62 -0
- package/content/ops/tasks.md +67 -0
- package/content/ops/update.md +252 -0
- package/content/ops/verify.md +67 -0
- package/content/patterns/adapter.md +46 -0
- package/content/patterns/facade.md +47 -0
- package/content/patterns/factory.md +46 -0
- package/content/patterns/null-object.md +55 -0
- package/content/patterns/result-vs-exception.md +52 -0
- package/content/patterns/strategy.md +45 -0
- package/content/patterns/template-method-vs-composition.md +50 -0
- package/content/questions/adr.questions.yaml +14 -0
- package/content/questions/analyze.questions.yaml +12 -0
- package/content/questions/bootstrap-mapping.questions.yaml +14 -0
- package/content/questions/bootstrap-rules.questions.yaml +10 -0
- package/content/questions/bootstrap-stack.questions.yaml +23 -0
- package/content/questions/clarify.questions.yaml +10 -0
- package/content/questions/code-style.questions.yaml +12 -0
- package/content/questions/confirm.questions.yaml +12 -0
- package/content/questions/deliver.questions.yaml +23 -0
- package/content/questions/evolve.questions.yaml +15 -0
- package/content/questions/export-template-apply.questions.yaml +11 -0
- package/content/questions/export-template.questions.yaml +23 -0
- package/content/questions/gates.questions.yaml +27 -0
- package/content/questions/generalize.questions.yaml +13 -0
- package/content/questions/gotcha.questions.yaml +11 -0
- package/content/questions/init-template.questions.yaml +10 -0
- package/content/questions/init.questions.yaml +41 -0
- package/content/questions/plan.questions.yaml +14 -0
- package/content/questions/refactor.questions.yaml +23 -0
- package/content/questions/reflect.questions.yaml +13 -0
- package/content/questions/remediate.questions.yaml +27 -0
- package/content/questions/restructure.questions.yaml +15 -0
- package/content/questions/rf-mapping.questions.yaml +12 -0
- package/content/questions/rule-scope.questions.yaml +12 -0
- package/content/questions/rule.questions.yaml +12 -0
- package/content/questions/specify.questions.yaml +23 -0
- package/content/questions/update-artifacts.questions.yaml +10 -0
- package/content/questions/update-strings.questions.yaml +14 -0
- package/content/questions/update.questions.yaml +10 -0
- package/content/questions/verify.questions.yaml +9 -0
- package/content/roles/executor.md +18 -0
- package/content/roles/explorer.md +22 -0
- package/content/roles/reviewer.md +23 -0
- package/content/rubrics/enum-vs-union-vs-branded.md +40 -0
- package/content/rubrics/episodic-vs-semantic-boundary.md +37 -0
- package/content/rubrics/error-classification.md +98 -0
- package/content/rubrics/failure-classification.md +111 -0
- package/content/rubrics/negative-filters.md +38 -0
- package/content/rubrics/solid-triggers.md +119 -0
- package/content/rubrics/template-vs-streaming-precedence.md +34 -0
- package/content/rubrics/validation-boundary.md +94 -0
- package/content/rubrics/when-to-create-dsl.md +65 -0
- package/content/rubrics/when-to-create-lib.md +49 -0
- package/content/rubrics/when-to-create-module.md +39 -0
- package/content/rubrics/when-to-evolve-methodology.md +62 -0
- package/content/skills/adr.md +42 -0
- package/content/skills/analyze.md +28 -0
- package/content/skills/clarify.md +28 -0
- package/content/skills/deliver.md +26 -0
- package/content/skills/diagnose.md +42 -0
- package/content/skills/evolve.md +43 -0
- package/content/skills/export-template.md +37 -0
- package/content/skills/generalize.md +31 -0
- package/content/skills/gotcha.md +40 -0
- package/content/skills/init.md +77 -0
- package/content/skills/plan.md +28 -0
- package/content/skills/policy.md +25 -0
- package/content/skills/promote.md +39 -0
- package/content/skills/protocol.md +41 -0
- package/content/skills/reconcile.md +45 -0
- package/content/skills/refactor.md +79 -0
- package/content/skills/reflect.md +43 -0
- package/content/skills/remediate.md +33 -0
- package/content/skills/restructure.md +46 -0
- package/content/skills/rule.md +43 -0
- package/content/skills/specify.md +28 -0
- package/content/skills/tasks.md +24 -0
- package/content/skills/update.md +58 -0
- package/content/skills/verify.md +29 -0
- package/content/templates/adr.template.md +51 -0
- package/content/templates/evolution-report.template.md +132 -0
- package/content/templates/feature-plan.template.md +84 -0
- package/content/templates/feature-research.template.md +56 -0
- package/content/templates/feature-spec.template.md +86 -0
- package/content/templates/feature-tasks.induced.template.md +91 -0
- package/content/templates/feature-tasks.template.md +82 -0
- package/content/templates/focus.template.md +30 -0
- package/content/templates/gotcha.template.md +31 -0
- package/content/templates/guardrail-runner.template.md +97 -0
- package/content/templates/guardrail.template.md +63 -0
- package/content/templates/learning.template.md +40 -0
- package/content/templates/procedure.template.md +47 -0
- package/content/templates/protocols/p1.md +29 -0
- package/content/templates/protocols/p2.md +28 -0
- package/content/templates/protocols/p3.md +47 -0
- package/content/templates/research.template.md +50 -0
- package/content/templates/session-handoff.template.md +58 -0
- package/content/templates/us.template.md +39 -0
- package/content/tools/gate/core-rules/PLUGIN-13-secrets.sh +36 -0
- package/content/tools/gate/core-rules/PLUGIN-21-code-language.sh +27 -0
- package/content/tools/gate/core-rules/PLUGIN-35-gate-complete.sh +19 -0
- package/content/tools/gate/core-rules/PLUGIN-36-absolute-path.sh +38 -0
- package/content/tools/gate/core-rules/PLUGIN-37-prose-language.sh +56 -0
- package/content/tools/gate/core-rules/PLUGIN-38-parser-marker.sh +82 -0
- package/content/tools/gate/core-rules/PLUGIN-39-frontmatter-ops.sh +325 -0
- package/content/tools/gate/core-rules/PLUGIN-40-dead-reference.sh +74 -0
- package/content/tools/gate/core-rules/README.md +55 -0
- package/content/tools/gate/guardrails.sh +740 -0
- package/content/tools/gate/lib/ratchet.sh +119 -0
- package/content/tools/gate/lib/scope.sh +85 -0
- package/content/tools/gate/ratchet.seed.tsv +1 -0
- package/content/tools/gate/rules/README.md +50 -0
- package/package.json +19 -5
- package/plugin/agy/hooks.json +29 -0
- package/plugin/agy/mcp_config.json +7 -0
- package/plugin/agy/plugin.json +6 -0
- package/plugin/agy/skills/afm-adr/SKILL.md +48 -0
- package/plugin/agy/skills/afm-analyze/SKILL.md +34 -0
- package/plugin/agy/skills/afm-clarify/SKILL.md +34 -0
- package/plugin/agy/skills/afm-deliver/SKILL.md +30 -0
- package/plugin/agy/skills/afm-diagnose/SKILL.md +46 -0
- package/plugin/agy/skills/afm-evolve/SKILL.md +49 -0
- package/plugin/agy/skills/afm-export-template/SKILL.md +43 -0
- package/plugin/agy/skills/afm-generalize/SKILL.md +37 -0
- package/plugin/agy/skills/afm-gotcha/SKILL.md +46 -0
- package/plugin/agy/skills/afm-init/SKILL.md +81 -0
- package/plugin/agy/skills/afm-plan/SKILL.md +34 -0
- package/plugin/agy/skills/afm-policy/SKILL.md +29 -0
- package/plugin/agy/skills/afm-promote/SKILL.md +43 -0
- package/plugin/agy/skills/afm-protocol/SKILL.md +45 -0
- package/plugin/agy/skills/afm-reconcile/SKILL.md +49 -0
- package/plugin/agy/skills/afm-refactor/SKILL.md +83 -0
- package/plugin/agy/skills/afm-reflect/SKILL.md +49 -0
- package/plugin/agy/skills/afm-remediate/SKILL.md +39 -0
- package/plugin/agy/skills/afm-restructure/SKILL.md +52 -0
- package/plugin/agy/skills/afm-rule/SKILL.md +49 -0
- package/plugin/agy/skills/afm-specify/SKILL.md +34 -0
- package/plugin/agy/skills/afm-tasks/SKILL.md +28 -0
- package/plugin/agy/skills/afm-update/SKILL.md +64 -0
- package/plugin/agy/skills/afm-verify/SKILL.md +35 -0
- package/plugin/claude-code/.claude-plugin/marketplace.json +15 -0
- package/plugin/claude-code/.claude-plugin/plugin.json +9 -0
- package/plugin/claude-code/.mcp.json +7 -0
- package/plugin/claude-code/agents/afm-executor.md +18 -0
- package/plugin/claude-code/agents/afm-explorer.md +20 -0
- package/plugin/claude-code/agents/afm-reviewer.md +21 -0
- package/plugin/claude-code/hooks/hooks.json +85 -0
- package/plugin/claude-code/skills/adr/SKILL.md +48 -0
- package/plugin/claude-code/skills/analyze/SKILL.md +34 -0
- package/plugin/claude-code/skills/clarify/SKILL.md +34 -0
- package/plugin/claude-code/skills/deliver/SKILL.md +30 -0
- package/plugin/claude-code/skills/diagnose/SKILL.md +46 -0
- package/plugin/claude-code/skills/evolve/SKILL.md +49 -0
- package/plugin/claude-code/skills/export-template/SKILL.md +43 -0
- package/plugin/claude-code/skills/generalize/SKILL.md +37 -0
- package/plugin/claude-code/skills/gotcha/SKILL.md +46 -0
- package/plugin/claude-code/skills/init/SKILL.md +81 -0
- package/plugin/claude-code/skills/plan/SKILL.md +34 -0
- package/plugin/claude-code/skills/policy/SKILL.md +29 -0
- package/plugin/claude-code/skills/promote/SKILL.md +43 -0
- package/plugin/claude-code/skills/protocol/SKILL.md +45 -0
- package/plugin/claude-code/skills/reconcile/SKILL.md +49 -0
- package/plugin/claude-code/skills/refactor/SKILL.md +83 -0
- package/plugin/claude-code/skills/reflect/SKILL.md +49 -0
- package/plugin/claude-code/skills/remediate/SKILL.md +39 -0
- package/plugin/claude-code/skills/restructure/SKILL.md +52 -0
- package/plugin/claude-code/skills/rule/SKILL.md +49 -0
- package/plugin/claude-code/skills/specify/SKILL.md +34 -0
- package/plugin/claude-code/skills/tasks/SKILL.md +28 -0
- package/plugin/claude-code/skills/update/SKILL.md +64 -0
- package/plugin/claude-code/skills/verify/SKILL.md +35 -0
- package/plugin/opencode/afm/index.js +245 -0
- package/plugin/opencode/afm/tui.js +21 -0
- package/plugin/opencode/agents/afm-executor.md +39 -0
- package/plugin/opencode/agents/afm-explorer.md +92 -0
- package/plugin/opencode/agents/afm-reviewer.md +93 -0
- package/plugin/opencode/skills/afm-adr/SKILL.md +48 -0
- package/plugin/opencode/skills/afm-analyze/SKILL.md +34 -0
- package/plugin/opencode/skills/afm-clarify/SKILL.md +34 -0
- package/plugin/opencode/skills/afm-deliver/SKILL.md +30 -0
- package/plugin/opencode/skills/afm-diagnose/SKILL.md +46 -0
- package/plugin/opencode/skills/afm-evolve/SKILL.md +49 -0
- package/plugin/opencode/skills/afm-export-template/SKILL.md +43 -0
- package/plugin/opencode/skills/afm-generalize/SKILL.md +37 -0
- package/plugin/opencode/skills/afm-gotcha/SKILL.md +46 -0
- package/plugin/opencode/skills/afm-init/SKILL.md +81 -0
- package/plugin/opencode/skills/afm-plan/SKILL.md +34 -0
- package/plugin/opencode/skills/afm-policy/SKILL.md +29 -0
- package/plugin/opencode/skills/afm-promote/SKILL.md +43 -0
- package/plugin/opencode/skills/afm-protocol/SKILL.md +45 -0
- package/plugin/opencode/skills/afm-reconcile/SKILL.md +49 -0
- package/plugin/opencode/skills/afm-refactor/SKILL.md +83 -0
- package/plugin/opencode/skills/afm-reflect/SKILL.md +49 -0
- package/plugin/opencode/skills/afm-remediate/SKILL.md +39 -0
- package/plugin/opencode/skills/afm-restructure/SKILL.md +52 -0
- package/plugin/opencode/skills/afm-rule/SKILL.md +49 -0
- package/plugin/opencode/skills/afm-specify/SKILL.md +34 -0
- package/plugin/opencode/skills/afm-tasks/SKILL.md +28 -0
- package/plugin/opencode/skills/afm-update/SKILL.md +64 -0
- package/plugin/opencode/skills/afm-verify/SKILL.md +35 -0
- package/README.md +0 -3
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: template
|
|
3
|
+
description: 'Template rendered during materialization: Evolution cycle {{NNNN}} — {{data YYYY-MM-DD}}.'
|
|
4
|
+
load: cold
|
|
5
|
+
renders_to: 'docs/evolution/YYYY-MM-DD-NNN.md'
|
|
6
|
+
frontmatter_for_output: |
|
|
7
|
+
type: evolution-report
|
|
8
|
+
description: '<one sentence: what this cycle found and changed>'
|
|
9
|
+
load: cold
|
|
10
|
+
mechanism: evolve | reflect | restructure | generalize # WHICH mechanism wrote this report
|
|
11
|
+
date: 'YYYY-MM-DD'
|
|
12
|
+
cycle_trigger: '<explicit invocation or the symptom stated by the user: cite it>'
|
|
13
|
+
new_signal: '<which Class A delta or symptom released the cooldown>'
|
|
14
|
+
resolves: [] # optional: fingerprints (from `afm sessions signals`) of the friction this cycle fixed
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Evolution cycle {{NNN}} — {{date YYYY-MM-DD}}
|
|
18
|
+
|
|
19
|
+
<!-- guidance -->
|
|
20
|
+
> **File name: `YYYY-MM-DD-NNN.md`, date first.** The cadence counter picks the last report by
|
|
21
|
+
> sorting these names, and an ordinal-first name sorts by ordinal before date — a low ordinal on
|
|
22
|
+
> a recent date rewinds the window in silence. `NNN` is now only a same-day tiebreak.
|
|
23
|
+
>
|
|
24
|
+
> **`resolves:` (frontmatter, optional)** lists the signal fingerprints this cycle fixed. `afm sessions signals`
|
|
25
|
+
> marks a signal with one of them `resolved` when it happened before this report's date, and `regressed` when
|
|
26
|
+
> it happens again after it (the fix did not hold).
|
|
27
|
+
>
|
|
28
|
+
> **`mechanism:` (frontmatter) is mandatory and it is not decoration.** `reflect`, `evolve` and `restructure`
|
|
29
|
+
> all write into this one directory, and each one's cadence window is "since MY last report".
|
|
30
|
+
> Without the field the windows collapse into one, and the cheap mechanism starves the expensive
|
|
31
|
+
> one: measured on 2026-08-30, five reports, all five `reflect`, and `evolve` had never run.
|
|
32
|
+
|
|
33
|
+
> This is a report of one `afm evolve` cycle (auto-evolution of **this project's local documentation** — the materialized instance of the methodology in `docs/`, never the plugin). It is the **auditable lineage** and the **memory of past attempts** for future cycles. It is not the evolved artifact itself (the edits live in the touched local docs). It is the record of the diagnosis and the gate decisions.
|
|
34
|
+
<!-- /guidance -->
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Vital signs
|
|
39
|
+
|
|
40
|
+
| Signal | Before | After (measured in dry-run / post-apply) |
|
|
41
|
+
| --- | --- | --- |
|
|
42
|
+
| Dead refs (A1) | {{n}} | {{n}} |
|
|
43
|
+
| `[TBD]`/`[NEEDS CLARIFICATION:]` markers above threshold (A2) | {{n}} | {{n}} |
|
|
44
|
+
| Version drift (A3) | {{instance X vs plugin Y / ok}} | {{...}} |
|
|
45
|
+
| Broken ADR chain (A4) | {{n}} | {{n}} |
|
|
46
|
+
| Non-parseable § 3 triggers (A5) | {{n}} | {{n}} |
|
|
47
|
+
| Inflation — core docs above threshold (A6) | {{which / ok}} | {{...}} |
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Findings (φ signature)
|
|
52
|
+
|
|
53
|
+
<!-- guidance -->
|
|
54
|
+
> Each finding is `(symptom, behavior causal status, mechanism)` plus evidence (`command` + `file:line`) and severity. Non-addressable findings go in the observations section, with no proposal.
|
|
55
|
+
<!-- /guidance -->
|
|
56
|
+
|
|
57
|
+
| ID | Symptom (evidence) | Causal status | Mechanism | Severity | Addressable? |
|
|
58
|
+
| --- | --- | --- | --- | --- | --- |
|
|
59
|
+
| D01 | {{what the command flagged + file:line}} | {{does this imply a methodology behavior?}} | {{miswritten trigger / obsolete rule / orphan doc / agent non-conformance}} | {{CRITICAL/HIGH/MEDIUM/LOW}} | {{yes / no → observation}} |
|
|
60
|
+
|
|
61
|
+
### Observations (non-addressable findings — no proposal)
|
|
62
|
+
|
|
63
|
+
- {{example: "user did not answer the `[TBD]` items in §X for >180 days — human behavior, not a doc problem. No edit fixes this"}}.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Evolution package
|
|
68
|
+
|
|
69
|
+
### Bucket (a) — auto-applicable (restorative, non-semantic)
|
|
70
|
+
|
|
71
|
+
<!-- guidance -->
|
|
72
|
+
> Only fixes that **restore what the doc already states**, proven by git or the file system. Never touch a `*Verification:*` command in § 3, or a path the hooks parse.
|
|
73
|
+
<!-- /guidance -->
|
|
74
|
+
|
|
75
|
+
| ID | Surface | Edit | Mechanical proof | Gate decision |
|
|
76
|
+
| --- | --- | --- | --- | --- |
|
|
77
|
+
| A01 | {{file}} | {{corrected path ref / corrected ADR link}} | {{git log --follow / ADR-NNNN exists}} | {{approved / refused}} |
|
|
78
|
+
|
|
79
|
+
### Bucket (b) — load-bearing (earned gate questions)
|
|
80
|
+
|
|
81
|
+
<!-- guidance -->
|
|
82
|
+
> A 4-field audit record per item. Downgrading or removing a hard rule, and any deletion, need item-by-item approval. This is unavoidable, even without a "go" — evolve has no "go".
|
|
83
|
+
<!-- /guidance -->
|
|
84
|
+
|
|
85
|
+
| ID | Targeted pattern | Edited surface | Expected effect | Regression risk / what to preserve | What breaks if this is wrong | Flip-flop? | Decision |
|
|
86
|
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
|
87
|
+
| B01 | {{finding D0N}} | {{file:section}} | {{...}} | {{passing behaviors to preserve}} | {{load-bearing consequence}} | {{⚠ cycle NNNN / —}} | {{approved / refused}} |
|
|
88
|
+
|
|
89
|
+
### Bucket (c) — cosmetic/deferrable
|
|
90
|
+
|
|
91
|
+
- {{note — becomes `[TBD]` or waits for reconcile. Not edited in this cycle}}.
|
|
92
|
+
|
|
93
|
+
### Overflow staged (above the cap of 8 items/cycle)
|
|
94
|
+
|
|
95
|
+
- {{items that did not fit — carried to the next cycle}}.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## ADRs created in this cycle
|
|
100
|
+
|
|
101
|
+
<!-- guidance -->
|
|
102
|
+
> Itemized in the gate (Phase 3). Not materialized after the gate without approval.
|
|
103
|
+
<!-- /guidance -->
|
|
104
|
+
|
|
105
|
+
- {{ADR-NNNN — title — status proposed/approved}}.
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Attempt memory (anti-oscillation)
|
|
110
|
+
|
|
111
|
+
<!-- guidance -->
|
|
112
|
+
> Future cycles read this. Re-proposing a refused or reverted item needs **new evidence**. Touching a surface with an opposite history carries a flip-flop flag.
|
|
113
|
+
<!-- /guidance -->
|
|
114
|
+
|
|
115
|
+
### Refused in this cycle
|
|
116
|
+
- {{ID — proposal — reason the user refused it}}.
|
|
117
|
+
|
|
118
|
+
### Approved-then-reverted (by mechanical post-condition)
|
|
119
|
+
- {{ID — edit — why it was reverted (hook format broke / plugin got dirty) — flagged dependent items}}.
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Mechanical post-conditions
|
|
124
|
+
|
|
125
|
+
- [ ] `afm doctor --json`, `afm index --check` and `afm detect --for <file>` over the touched docs kept the format the hooks parse.
|
|
126
|
+
- [ ] The content root (`afm path`) is clean: `git -C <content-root> status --porcelain` is empty, or, with no git there, no file under it is newer than T0 (no edit leaked into the bundled content).
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Suggested promotion
|
|
131
|
+
|
|
132
|
+
- {{finding that generalizes to any instance → suggest `afm promote` (its own gate, evolve only suggests it). Or "none"}}.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: template
|
|
3
|
+
description: 'Template rendered during materialization: Feature {{NNN}} — Plan.'
|
|
4
|
+
load: cold
|
|
5
|
+
renders_to: 'docs/features/*/plan.md'
|
|
6
|
+
frontmatter_for_output: |
|
|
7
|
+
type: feature-plan
|
|
8
|
+
description: '<one sentence: the approach this plan commits to>'
|
|
9
|
+
load: cold
|
|
10
|
+
status: planned # draft | clarified | planned | in_progress | done | cancelled — the folder's
|
|
11
|
+
# ONE lifecycle value; `planned` once this plan exists, in step with spec.md
|
|
12
|
+
for_paths: # § 2's affected components, as globs — this is where the list
|
|
13
|
+
- '{{glob}}' # spec.md seeded empty gets its first real entries
|
|
14
|
+
us: US-{{NNN}} # carried from spec.md. Omit when spec.md omits it.
|
|
15
|
+
rf: RF-{{NN}} # carried from spec.md. Omit when spec.md omits it.
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Feature {{NNN}} — Plan
|
|
19
|
+
|
|
20
|
+
## 1. Approach in 3 sentences
|
|
21
|
+
|
|
22
|
+
{{What to build, in which layer, linked to which component-types from `ach.md` § 3.}}
|
|
23
|
+
|
|
24
|
+
## 2. Affected components
|
|
25
|
+
|
|
26
|
+
| Component-type | File / module | New or edit | Why |
|
|
27
|
+
| --- | --- | --- | --- |
|
|
28
|
+
| {{Procedure-like}} | `{{src-path}}/server/routers/{{x}}.ts` | edit | adds endpoint Y |
|
|
29
|
+
| {{Domain-like}} | `{{src-path}}/domain/{{x}}.ts` | new | business rule Z |
|
|
30
|
+
|
|
31
|
+
## 3. Data model (delta)
|
|
32
|
+
|
|
33
|
+
{{Mini ASCII ER diagram if there is a new entity. For new fields only, list field + type + reason. If nothing changes, write "no delta".}}
|
|
34
|
+
|
|
35
|
+
## 4. Architectural decisions
|
|
36
|
+
|
|
37
|
+
{{Each decision that would deserve an ADR goes here FIRST. If it becomes load-bearing later, materialize an ADR (see `ops/adr.md`). Bullet list:}}
|
|
38
|
+
|
|
39
|
+
- **Decision:** {{X}}. **Rejected alternative:** {{Y}}. **Why:** {{concrete reason — cost, risk, simplicity}}.
|
|
40
|
+
|
|
41
|
+
## 5. Contracts (external boundaries)
|
|
42
|
+
|
|
43
|
+
{{For each new boundary — request/response shape, error codes, status. Keep it inline. Promote to `./contracts/` only when there are more than 3 boundaries OR the schema comes from tooling.}}
|
|
44
|
+
|
|
45
|
+
### Boundary {{name}}
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
// input
|
|
49
|
+
{ field: type }
|
|
50
|
+
|
|
51
|
+
// output (success)
|
|
52
|
+
{ field: type }
|
|
53
|
+
|
|
54
|
+
// errors (codes)
|
|
55
|
+
"NOT_FOUND" | "INVALID_INPUT" | "..."
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## 6. Complexity tracking
|
|
59
|
+
|
|
60
|
+
{{Log each complexity that exceeds the "obviously simple" baseline, with a justification. An empty table is a valid answer — it means the baseline stayed simple.}}
|
|
61
|
+
|
|
62
|
+
| Accepted complexity | Rejected simple alternative | Why it was not simple |
|
|
63
|
+
| --- | --- | --- |
|
|
64
|
+
| {{ex: in-memory cache + TTL}} | {{no cache}} | {{p95 would be 800ms vs 80ms}} |
|
|
65
|
+
|
|
66
|
+
## 7. Validation against invariants
|
|
67
|
+
|
|
68
|
+
- [ ] Does not violate the hard rules in `afm.md` § 3 (list the ones that apply, by number, e.g. "rule 11 — structural change confirmed with the user at {{turn}}").
|
|
69
|
+
- [ ] Follows the universal principles in `PRINCIPLES.md`.
|
|
70
|
+
- [ ] `[NEEDS CLARIFICATION:]` is at zero OR listed in § 9 with a resolution plan.
|
|
71
|
+
|
|
72
|
+
## 8. Risks
|
|
73
|
+
|
|
74
|
+
- {{1-3 risks, each with a concrete mitigation}}.
|
|
75
|
+
|
|
76
|
+
## 9. Open questions
|
|
77
|
+
|
|
78
|
+
- [NEEDS CLARIFICATION: {{question}}]
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
<!-- guidance -->
|
|
83
|
+
*The plan does NOT contain a granular task list (that goes in `tasks.md`). The plan does NOT choose the stack — it reads the stack from `ach.md`. If the relevant `ach.md` layer is `[TBD]`, flag it here and block tasks until it is resolved.*
|
|
84
|
+
<!-- /guidance -->
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: template
|
|
3
|
+
description: 'Template rendered during materialization: Research — Feature {{NNN}} — {{title}}.'
|
|
4
|
+
load: cold
|
|
5
|
+
renders_to: 'docs/features/*/research.md'
|
|
6
|
+
frontmatter_for_output: |
|
|
7
|
+
type: feature-research
|
|
8
|
+
description: '<one sentence: what this research investigates>'
|
|
9
|
+
load: cold
|
|
10
|
+
status: open # open | closed — `closed` once the findings were applied to spec.md or plan.md
|
|
11
|
+
consumed_by: '<the artifact that cites this research; omit until one does>'
|
|
12
|
+
context: '<the marker from spec.md or plan.md this answers, or "free investigation: <topic>">'
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Research — Feature {{NNN}} — {{title}}
|
|
16
|
+
|
|
17
|
+
<!-- guidance -->
|
|
18
|
+
{{For each topic investigated, repeat the block below. Put multiple topics in the same file if they went to the subagent in the same round.}}
|
|
19
|
+
<!-- /guidance -->
|
|
20
|
+
|
|
21
|
+
## {{topic 1 — concrete question}}
|
|
22
|
+
|
|
23
|
+
**Decision (proposed):** {{X}}
|
|
24
|
+
|
|
25
|
+
**Rationale:**
|
|
26
|
+
- {{bullet 1 with concrete evidence — number, benchmark, documented case}}
|
|
27
|
+
- {{bullet 2}}
|
|
28
|
+
- {{bullet 3}}
|
|
29
|
+
|
|
30
|
+
**Alternatives considered:**
|
|
31
|
+
- **{{alt A}}** — rejected because {{concrete reason — cost, risk, simplicity, compat}}.
|
|
32
|
+
- **{{alt B}}** — rejected because {{reason}}.
|
|
33
|
+
|
|
34
|
+
**Sources:**
|
|
35
|
+
- {{real URL or ref}}
|
|
36
|
+
- {{real URL or ref}}
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## {{topic 2}}
|
|
41
|
+
|
|
42
|
+
<!-- guidance -->
|
|
43
|
+
(Same as the previous block if more topics exist.)
|
|
44
|
+
<!-- /guidance -->
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
<!-- guidance -->
|
|
49
|
+
*Research is input. It is not a decision. To add it to the project, follow these steps.*
|
|
50
|
+
|
|
51
|
+
*1. Edit the feature's `spec.md` or `plan.md`. Cite this research as the source.*
|
|
52
|
+
|
|
53
|
+
*2. If the decision is load-bearing (a change would break something visible), make it an ADR with `afm adr`.*
|
|
54
|
+
|
|
55
|
+
*3. After you add it, set this file's frontmatter `status` from `open` to `closed`.*
|
|
56
|
+
<!-- /guidance -->
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: template
|
|
3
|
+
description: 'Template rendered during materialization: Feature {{NNN}} — {{objective title}}.'
|
|
4
|
+
load: cold
|
|
5
|
+
renders_to: 'docs/features/*/spec.md'
|
|
6
|
+
frontmatter_for_output: |
|
|
7
|
+
type: feature-spec
|
|
8
|
+
description: '<one sentence: what this feature does and why>'
|
|
9
|
+
load: cold
|
|
10
|
+
status: draft # draft | clarified | planned | in_progress | done | cancelled — the ONE
|
|
11
|
+
# lifecycle signal of the folder; the body carries no Status line. The
|
|
12
|
+
# same value rides in plan.md and tasks.md once they exist.
|
|
13
|
+
for_paths: # the globs this feature touches — the whole trigger `afm-index.sh
|
|
14
|
+
# --for` matches through. Empty until plan.md § 2 names them; an
|
|
15
|
+
# absent key is honest, a list guessed ahead of the plan is not.
|
|
16
|
+
- '{{glob}}'
|
|
17
|
+
us: US-{{NNN}} # the linked US (step 5). Omit the key entirely when none is linked yet.
|
|
18
|
+
rf: RF-{{NN}} # only when the feature also answers a roadmap RF. Omit otherwise.
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
# Feature {{NNN}} — {{objective title}}
|
|
22
|
+
|
|
23
|
+
<!-- guidance -->
|
|
24
|
+
> A spec holds the what and the why. No technology decision.
|
|
25
|
+
> The linked US and the lifecycle `status` live in the frontmatter, never in the body.
|
|
26
|
+
<!-- /guidance -->
|
|
27
|
+
|
|
28
|
+
## 1. Problem (from PRD/UST)
|
|
29
|
+
|
|
30
|
+
{{Restate the user job and the pain this feature solves, in 2-3 sentences. Name the persona from PRD § 3.}}
|
|
31
|
+
|
|
32
|
+
## 2. Observable success criteria
|
|
33
|
+
|
|
34
|
+
- [ ] {{verifiable from outside — example: "user X can export a report to PDF in <3 clicks"}}
|
|
35
|
+
- [ ] {{metric, if any — example: "average time < 2s at p95"}}
|
|
36
|
+
|
|
37
|
+
## 3. Scenarios (Gherkin, inherited from the US)
|
|
38
|
+
|
|
39
|
+
```gherkin
|
|
40
|
+
Scenario: {{happy path name}}
|
|
41
|
+
Given {{precondition}}
|
|
42
|
+
When {{user action}}
|
|
43
|
+
Then {{observable result}}
|
|
44
|
+
And {{verifiable side effect}}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
```gherkin
|
|
48
|
+
Scenario: {{most likely error scenario}}
|
|
49
|
+
Given {{precondition}}
|
|
50
|
+
When {{action in invalid state}}
|
|
51
|
+
Then {{expected typed error}}
|
|
52
|
+
And {{no DB side effect}}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## 4. Out of scope
|
|
56
|
+
|
|
57
|
+
- {{things explicitly NOT included — this prevents scope creep and protects future decisions}}
|
|
58
|
+
|
|
59
|
+
## 5. Assumptions / Open questions
|
|
60
|
+
|
|
61
|
+
- [NEEDS CLARIFICATION: {{concrete unanswered question — someone must resolve this before plan}}]
|
|
62
|
+
- {{assumption that changes the design if it is wrong}}
|
|
63
|
+
|
|
64
|
+
## 6. Dependencies
|
|
65
|
+
|
|
66
|
+
- US-NNN (must be `done` first — or mark as a blocker)
|
|
67
|
+
- Feature {{MMM}} (shares entity X, contract Y)
|
|
68
|
+
|
|
69
|
+
## 7. Clarifications
|
|
70
|
+
|
|
71
|
+
<!-- guidance -->
|
|
72
|
+
{{Optional section, filled in by `afm clarify`. Each session gets a subheading `### Session YYYY-MM-DD`. Each Q/A becomes a bullet. The section stays empty until the first `clarify` run.}}
|
|
73
|
+
|
|
74
|
+
<!-- Example after the first session:
|
|
75
|
+
### Session 2026-05-10
|
|
76
|
+
- Q: Is the PDF generated server-side or client-side? → A: Server-side (cache + signed URL)
|
|
77
|
+
- Q: Delivery by direct download or pre-signed URL? → A: Pre-signed URL, TTL 1h
|
|
78
|
+
-->
|
|
79
|
+
<!-- /guidance -->
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
<!-- guidance -->
|
|
84
|
+
*The spec must NOT contain: stack decisions, function names, DB schema, task order. Those belong in `plan.md`.*
|
|
85
|
+
*The marker `[NEEDS CLARIFICATION:]` differs from `[TBD]`. Use the first for a gap that blocks execution (resolved through `afm clarify`). Use the second for a decision the user knowingly defers.*
|
|
86
|
+
<!-- /guidance -->
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: template
|
|
3
|
+
description: 'Template rendered during materialization: Induced tasks — parameterized template.'
|
|
4
|
+
load: cold
|
|
5
|
+
renders_to: 'docs/templates/feature-tasks.induced.md'
|
|
6
|
+
ancestors: 'Agent Workflow Memory (arXiv:2409.07429): induce a reusable workflow from a successful trajectory, and parameterize the concrete values. Voyager (arXiv:2305.16291): composing from the library beats regenerating from scratch.'
|
|
7
|
+
frontmatter_for_output: |
|
|
8
|
+
type: feature-tasks
|
|
9
|
+
description: '<one sentence: what this task list delivers>'
|
|
10
|
+
load: cold
|
|
11
|
+
status: planned # draft | clarified | planned | in_progress | done | cancelled
|
|
12
|
+
for_paths:
|
|
13
|
+
- '{{glob}}'
|
|
14
|
+
us: US-{{NNN}} # Omit when no US is linked.
|
|
15
|
+
rf: RF-{{NN}} # Omit when no RF is linked.
|
|
16
|
+
tasks: # replay each item with `afm task add`, the variables filled; never by hand
|
|
17
|
+
- id: T001
|
|
18
|
+
kind: setup
|
|
19
|
+
files: ['{{src-path}}/domain/{domain}.ts']
|
|
20
|
+
refs: ['US-{{NNN}}']
|
|
21
|
+
parallel: true
|
|
22
|
+
text: 'Create the file `{{src-path}}/domain/{domain}.ts` with exported signature `domain_{domain}`.'
|
|
23
|
+
done: false
|
|
24
|
+
- id: T002
|
|
25
|
+
kind: setup
|
|
26
|
+
files: ['{{src-path}}/domain/{domain}.fixtures.ts']
|
|
27
|
+
refs: ['US-{{NNN}}']
|
|
28
|
+
parallel: true
|
|
29
|
+
text: 'Create the test fixture in `{{src-path}}/domain/{domain}.fixtures.ts`.'
|
|
30
|
+
done: false
|
|
31
|
+
- id: T003
|
|
32
|
+
kind: red
|
|
33
|
+
scenario: 1
|
|
34
|
+
files: ['{{src-path}}/domain/{domain}.test.ts']
|
|
35
|
+
refs: ['US-{{NNN}}']
|
|
36
|
+
text: 'Write test `domain_{domain} returns <result> given <input>`.'
|
|
37
|
+
done: false
|
|
38
|
+
- id: T004
|
|
39
|
+
kind: green
|
|
40
|
+
closes: T003
|
|
41
|
+
files: ['{{src-path}}/domain/{domain}.ts']
|
|
42
|
+
refs: ['US-{{NNN}}']
|
|
43
|
+
text: 'Add the minimal implementation of `domain_{domain}`.'
|
|
44
|
+
done: false
|
|
45
|
+
- id: T005
|
|
46
|
+
kind: refactor
|
|
47
|
+
refs: ['US-{{NNN}}']
|
|
48
|
+
text: 'Extract a helper if DRY reaches 3 callers (rule 8).'
|
|
49
|
+
done: false
|
|
50
|
+
- id: T006
|
|
51
|
+
kind: red
|
|
52
|
+
scenario: 2
|
|
53
|
+
refs: ['US-{{NNN}}']
|
|
54
|
+
text: 'Write a test for the error path of an invalid `{entity}` at `{boundary-procedure}`.'
|
|
55
|
+
done: false
|
|
56
|
+
- id: T007
|
|
57
|
+
kind: green
|
|
58
|
+
closes: T006
|
|
59
|
+
validates: '{boundary-procedure}'
|
|
60
|
+
refs: ['US-{{NNN}}']
|
|
61
|
+
text: 'Add the procedure `{boundary-procedure}` with Zod validation at the boundary (rule 16).'
|
|
62
|
+
done: false
|
|
63
|
+
- id: T008
|
|
64
|
+
kind: reconcile
|
|
65
|
+
text: 'Update `ach.md § 3` if a new component (`{domain}`/`{entity}`) was added, add an ADR if an architectural decision was made, set the US status in `ust.md` to `done`, and move the `status` frontmatter key of `spec.md`, `plan.md` and `tasks.md` to `done`.'
|
|
66
|
+
done: false
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
# Induced tasks — parameterized template
|
|
70
|
+
|
|
71
|
+
<!-- guidance -->
|
|
72
|
+
> Induced by `afm export-template` from a feature that is **delivered and 100% green** (every task of its `tasks:` list `done: true` — gate `L_eval=1` of AWM). The concrete values of the original feature are parameterized as `{variables}`.
|
|
73
|
+
> The next consumer of this template starts here instead of generating tasks from scratch: fill in the variables and replay each item of the `tasks:` list above with `afm task add`, then close each one with `afm task done`. It keeps the TDD convention of `feature-tasks.template.md`: a red task, the green task that closes it, an optional refactor (`core/afm.md § 2`), and one reconcile task, last.
|
|
74
|
+
<!-- /guidance -->
|
|
75
|
+
|
|
76
|
+
## Variables
|
|
77
|
+
|
|
78
|
+
| Variable | What it is | Example (from the induced feature) |
|
|
79
|
+
| --- | --- | --- |
|
|
80
|
+
| `{product-name}` | product/project name | — |
|
|
81
|
+
| `{domain}` | module/domain of the feature | `billing`, `auth` |
|
|
82
|
+
| `{entity}` | central entity touched | `Subscription`, `Session` |
|
|
83
|
+
| `{boundary-procedure}` | boundary procedure/handler, named as its `### Boundary` of plan § 5 | `subscriptionCreate` |
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
<!-- guidance -->
|
|
88
|
+
*Fill in the variables for this feature. The rest of the TDD structure came from a validated delivery. Every task must reference US-NNN/RF-NN in its commit. Do not skip the red task (rule 1).*
|
|
89
|
+
|
|
90
|
+
> **Version bump.** In a delivery of more than one commit, the version bump is a **precondition of every commit that touches the installable surface**. It is not a task: a bump in the reconcile task leaves the earlier commits failing the gate.
|
|
91
|
+
<!-- /guidance -->
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: template
|
|
3
|
+
description: 'Template rendered during materialization: Feature {{NNN}} — Tasks.'
|
|
4
|
+
load: cold
|
|
5
|
+
renders_to: 'docs/features/*/tasks.md'
|
|
6
|
+
frontmatter_for_output: |
|
|
7
|
+
type: feature-tasks
|
|
8
|
+
description: '<one sentence: what this task list delivers>'
|
|
9
|
+
load: cold
|
|
10
|
+
status: planned # draft | clarified | planned | in_progress | done | cancelled — the folder's
|
|
11
|
+
# ONE lifecycle value: `in_progress` with the first task, `done` in the
|
|
12
|
+
# reconcile task that moves spec.md and plan.md
|
|
13
|
+
for_paths: # carried from plan.md § 2, unchanged
|
|
14
|
+
- '{{glob}}'
|
|
15
|
+
us: US-{{NNN}} # carried from spec.md. Omit when spec.md omits it.
|
|
16
|
+
rf: RF-{{NN}} # carried from spec.md. Omit when spec.md omits it.
|
|
17
|
+
tasks: # written by `afm task add`, corrected by `afm task set`, closed by `afm task done`; never by hand
|
|
18
|
+
- id: T001
|
|
19
|
+
kind: setup
|
|
20
|
+
files: ['{{src-path}}/domain/x.ts']
|
|
21
|
+
refs: ['US-{{NNN}}']
|
|
22
|
+
parallel: true
|
|
23
|
+
text: '{{ex: create the empty file with an exported signature}}'
|
|
24
|
+
done: false
|
|
25
|
+
- id: T002
|
|
26
|
+
kind: red
|
|
27
|
+
scenario: 1
|
|
28
|
+
files: ['{{src-path}}/domain/x.test.ts']
|
|
29
|
+
refs: ['US-{{NNN}}']
|
|
30
|
+
text: '{{ex: test domain_x returns Y given Z}}'
|
|
31
|
+
done: false
|
|
32
|
+
- id: T003
|
|
33
|
+
kind: green
|
|
34
|
+
closes: T002
|
|
35
|
+
files: ['{{src-path}}/domain/x.ts']
|
|
36
|
+
refs: ['US-{{NNN}}']
|
|
37
|
+
text: '{{ex: minimal implementation of domain_x}}'
|
|
38
|
+
done: false
|
|
39
|
+
- id: T004
|
|
40
|
+
kind: refactor
|
|
41
|
+
refs: ['US-{{NNN}}']
|
|
42
|
+
text: '{{ex: extract parseInput if DRY has 3+ callers (rule 8)}}'
|
|
43
|
+
done: false
|
|
44
|
+
- id: T005
|
|
45
|
+
kind: red
|
|
46
|
+
scenario: 2
|
|
47
|
+
files: ['{{src-path}}/procedures/x-create.test.ts']
|
|
48
|
+
refs: ['US-{{NNN}}']
|
|
49
|
+
text: '{{ex: test the INVALID_INPUT error path of the xCreate boundary}}'
|
|
50
|
+
done: false
|
|
51
|
+
- id: T006
|
|
52
|
+
kind: green
|
|
53
|
+
closes: T005
|
|
54
|
+
validates: '{{boundary name of plan § 5, ex: xCreate}}'
|
|
55
|
+
files: ['{{src-path}}/procedures/x-create.ts']
|
|
56
|
+
refs: ['US-{{NNN}}']
|
|
57
|
+
text: '{{ex: Zod validation at the boundary (rule 16)}}'
|
|
58
|
+
done: false
|
|
59
|
+
- id: T007
|
|
60
|
+
kind: reconcile
|
|
61
|
+
text: 'ach.md § 3 if a new component landed, an ADR if a decision materialized, the US status in ust.md, and the status key of spec.md, plan.md and tasks.md set to done'
|
|
62
|
+
done: false
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
# Feature {{NNN}} — Tasks
|
|
66
|
+
|
|
67
|
+
<!-- guidance -->
|
|
68
|
+
> The tasks live in the frontmatter `tasks:` list, never as a checklist in this body. Add each one with `afm task add {{NNN}} --kind <setup|red|green|refactor|reconcile> --text "..." [--scenario N] [--closes Txxx] [--validates <boundary>] [--files a,b] [--refs US-NNN,RF-NN] [--parallel]`: the CLI assigns the id, refuses an item that breaks a rule `afm feature lint` grades, and keeps the reconcile task last (reopening it when it was done). Correct a field with `afm task set {{NNN}} Txxx --<field> <value>`. Close each one with `afm task done {{NNN}} Txxx`: a green waits for its red, a refactor for the task before it. Never edit the list by hand.
|
|
69
|
+
> A TDD cycle of `core/afm.md` § 2 is a red task (`scenario: N` of spec § 3), then a green task that closes it (`closes:` the red), then an optional refactor. `parallel: true` marks a task with no dependency on the task right before it; a green or a refactor never is.
|
|
70
|
+
> Each new component of plan § 2 is in the `files:` of one task, with the exact path of the plan cell. Each boundary of plan § 5 needs a task whose `validates:` is its name (`### Boundary <name>`): the task that validates its input (rule 16).
|
|
71
|
+
> One reconcile task, the last: `afm task done` refuses it while another task is open. Run `afm feature lint {{NNN}}` until it exits 0.
|
|
72
|
+
> Before you start, `plan.md` has no open `[NEEDS CLARIFICATION:]` marker.
|
|
73
|
+
<!-- /guidance -->
|
|
74
|
+
|
|
75
|
+
## Notes
|
|
76
|
+
|
|
77
|
+
{{ex: what the list does not say: the order of the phases, a dependency between tasks, a risk}}
|
|
78
|
+
|
|
79
|
+
<!-- guidance -->
|
|
80
|
+
> **Version bump.** In a delivery of more than one commit, the version bump is a **precondition of every commit that touches the installable surface**. It is not a task: a bump in the reconcile task leaves the earlier commits failing the gate.
|
|
81
|
+
> Every task references US-NNN or RF-NN in the commit (rule in `core/afm.md` § 2, step 7 COMMIT). Never skip the red task (rule 1 — TDD).
|
|
82
|
+
<!-- /guidance -->
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: template
|
|
3
|
+
description: 'Template rendered during materialization: Current focus.'
|
|
4
|
+
load: cold
|
|
5
|
+
renders_to: 'docs/_focus.md'
|
|
6
|
+
frontmatter_for_output: |
|
|
7
|
+
type: state
|
|
8
|
+
description: 'Where the work is now: the focus, the last steps, the next step and the blockers.'
|
|
9
|
+
load: hot
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Current focus
|
|
13
|
+
|
|
14
|
+
<!-- guidance -->
|
|
15
|
+
> This is **MUTABLE** work state (slot-state, `type: state`). The agent **OVERWRITES** it when the focus changes (`reconcile` proposes it; no hook writes the body). It does not grow by append (hard rule 20). This exempts it from rule 17, the anti-context-collapse rule. It is NOT normative knowledge. It does not enter the A1-A7 axes of `diagnose`. It answers only "where am I now". The `afm.md § 2 LER` step reads it. The SessionStart hook injects it with its age ("last updated N days ago", from the last commit or the file's mtime) and flags it as possibly stale after 7 days. It is one page only (KISS). There is no `_slots/` folder and no consolidator.
|
|
16
|
+
<!-- /guidance -->
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
protocol: {{p1|p2|p3, or omit for the core/protocol.md § 2 defaults}}
|
|
20
|
+
cadence: reflect={{N}} evolve={{N}}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
<!-- guidance -->
|
|
24
|
+
> The two lines above are **declarations read by a hook**, not prose. `protocol:` sets the posture (`core/protocol.md § 7`). `cadence:` overrides `REFLECT_EVERY`/`EVOLVE_EVERY` (§ 2). `reflect=off` turns off the `Stop` block. Both lines are optional. When absent, the defaults apply.
|
|
25
|
+
<!-- /guidance -->
|
|
26
|
+
|
|
27
|
+
- **Now:** {{the task/feature in focus}}
|
|
28
|
+
- **Last steps:** {{what was just done}}
|
|
29
|
+
- **Next steps:** {{the next concrete step}}
|
|
30
|
+
- **Blockers:** {{what blocks progress, if anything}}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: template
|
|
3
|
+
description: One gotcha, as its own file under docs/gotchas/.
|
|
4
|
+
load: cold
|
|
5
|
+
renders_to: 'docs/gotchas/*.md'
|
|
6
|
+
frontmatter_for_output: |
|
|
7
|
+
type: gotcha
|
|
8
|
+
description: '<what the reader LEARNS, not what the file is>'
|
|
9
|
+
load: warm
|
|
10
|
+
fires_on: event # event | file-shape. Prefer event over a guessed path.
|
|
11
|
+
trigger_path: '{{glob}}' # ONLY when fires_on is file-shape, and a narrow glob.
|
|
12
|
+
fires_when: '<if you edit X, or touch Y, or investigate Z>'
|
|
13
|
+
bites: 2 # OPTIONAL. 2 when it bit twice, 1 when it is documented SDK behavior; omit it and `afm gotcha bite` starts it at 1.
|
|
14
|
+
last_bite: YYYY-MM # OPTIONAL, with bites. The month of the latest bite.
|
|
15
|
+
refs: # ADR ids, paths, links. Omit the key when there are none.
|
|
16
|
+
- ADR-NNNN
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# {{Área}} — {{título do gotcha}}
|
|
20
|
+
|
|
21
|
+
<!-- guidance -->
|
|
22
|
+
<!-- The counter lives in the frontmatter (`bites`, `last_bite`), ACE-style: `afm gotcha bite <id>` increments `bites` and sets `last_bite` on each new bite. A gotcha is confirmed 2 or more times on entry (qualification rule in `ops/gotcha.md`). 2 or more gotchas in the same area call for `afm generalize` (this consolidates them at the root, and prevents inflation). An old `last_bite` with `bites` stalled is a candidate for pruning in `afm restructure` (tombstone under rule 17: this measures incidence, not self-reported avoidance). -->
|
|
23
|
+
<!-- /guidance -->
|
|
24
|
+
|
|
25
|
+
## Behavior
|
|
26
|
+
|
|
27
|
+
{{what looks intuitive + why it breaks. Cite a real reproduction or documented behavior}}
|
|
28
|
+
|
|
29
|
+
## Solution
|
|
30
|
+
|
|
31
|
+
{{what to do instead. Make it concrete, not "be careful"}}
|