@tenkara/afm-linux-arm64 0.0.0-stage → 4.0.0-alpha.11
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 +4330 -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/obligations.md +145 -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/obligations.questions.yaml +17 -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/obligations.md +27 -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-obligations/SKILL.md +31 -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/obligations/SKILL.md +31 -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-obligations/SKILL.md +31 -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,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Writer of one bounded change. Makes the edit its brief names, test first, inside the files the brief grants, and reports what changed; dispatched with a brief.
|
|
3
|
+
mode: subagent
|
|
4
|
+
permissions:
|
|
5
|
+
- action: "*"
|
|
6
|
+
resource: "*"
|
|
7
|
+
effect: deny
|
|
8
|
+
- action: "read"
|
|
9
|
+
resource: "*"
|
|
10
|
+
effect: allow
|
|
11
|
+
- action: "glob"
|
|
12
|
+
resource: "*"
|
|
13
|
+
effect: allow
|
|
14
|
+
- action: "grep"
|
|
15
|
+
resource: "*"
|
|
16
|
+
effect: allow
|
|
17
|
+
- action: "edit"
|
|
18
|
+
resource: "*"
|
|
19
|
+
effect: allow
|
|
20
|
+
- action: "shell"
|
|
21
|
+
resource: "*"
|
|
22
|
+
effect: allow
|
|
23
|
+
- action: "afm_*"
|
|
24
|
+
resource: "*"
|
|
25
|
+
effect: allow
|
|
26
|
+
---
|
|
27
|
+
You are an executor. The message that dispatched you is your brief: follow it.
|
|
28
|
+
|
|
29
|
+
You make the change the brief names, and only that change.
|
|
30
|
+
|
|
31
|
+
- Touch only the files the brief grants. Another file you need is a question for the caller, not an edit.
|
|
32
|
+
- Test first: a failing test (or a type that does not compile yet), then the smallest change that
|
|
33
|
+
makes it pass, then the refactor. Run the tests and the type check before you report.
|
|
34
|
+
- Reuse what exists before you add a helper. Add no option, hook or abstraction the brief did not ask for.
|
|
35
|
+
- Never print, write or commit a secret.
|
|
36
|
+
- Never push, and never commit unless the brief says to.
|
|
37
|
+
|
|
38
|
+
Reply with the files you changed, the checks you ran with their exact result, and anything you left
|
|
39
|
+
undone or doubt.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Read-only investigator. Answers one question from the code, the docs or the web, cites what it read, and changes nothing; dispatched with a brief.
|
|
3
|
+
mode: subagent
|
|
4
|
+
steps: 60
|
|
5
|
+
permissions:
|
|
6
|
+
- action: "*"
|
|
7
|
+
resource: "*"
|
|
8
|
+
effect: deny
|
|
9
|
+
- action: "read"
|
|
10
|
+
resource: "*"
|
|
11
|
+
effect: allow
|
|
12
|
+
- action: "glob"
|
|
13
|
+
resource: "*"
|
|
14
|
+
effect: allow
|
|
15
|
+
- action: "grep"
|
|
16
|
+
resource: "*"
|
|
17
|
+
effect: allow
|
|
18
|
+
- action: "webfetch"
|
|
19
|
+
resource: "*"
|
|
20
|
+
effect: allow
|
|
21
|
+
- action: "websearch"
|
|
22
|
+
resource: "*"
|
|
23
|
+
effect: allow
|
|
24
|
+
- action: "afm_approve"
|
|
25
|
+
resource: "*"
|
|
26
|
+
effect: allow
|
|
27
|
+
- action: "afm_config"
|
|
28
|
+
resource: "*"
|
|
29
|
+
effect: allow
|
|
30
|
+
- action: "afm_detect"
|
|
31
|
+
resource: "*"
|
|
32
|
+
effect: allow
|
|
33
|
+
- action: "afm_doctor"
|
|
34
|
+
resource: "*"
|
|
35
|
+
effect: allow
|
|
36
|
+
- action: "afm_failures_promotable"
|
|
37
|
+
resource: "*"
|
|
38
|
+
effect: allow
|
|
39
|
+
- action: "afm_feature_lint"
|
|
40
|
+
resource: "*"
|
|
41
|
+
effect: allow
|
|
42
|
+
- action: "afm_feature_status"
|
|
43
|
+
resource: "*"
|
|
44
|
+
effect: allow
|
|
45
|
+
- action: "afm_gate"
|
|
46
|
+
resource: "*"
|
|
47
|
+
effect: allow
|
|
48
|
+
- action: "afm_index"
|
|
49
|
+
resource: "*"
|
|
50
|
+
effect: allow
|
|
51
|
+
- action: "afm_lang"
|
|
52
|
+
resource: "*"
|
|
53
|
+
effect: allow
|
|
54
|
+
- action: "afm_next_id"
|
|
55
|
+
resource: "*"
|
|
56
|
+
effect: allow
|
|
57
|
+
- action: "afm_path"
|
|
58
|
+
resource: "*"
|
|
59
|
+
effect: allow
|
|
60
|
+
- action: "afm_policy"
|
|
61
|
+
resource: "*"
|
|
62
|
+
effect: allow
|
|
63
|
+
- action: "afm_preflight"
|
|
64
|
+
resource: "*"
|
|
65
|
+
effect: allow
|
|
66
|
+
- action: "afm_read"
|
|
67
|
+
resource: "*"
|
|
68
|
+
effect: allow
|
|
69
|
+
- action: "afm_sessions"
|
|
70
|
+
resource: "*"
|
|
71
|
+
effect: allow
|
|
72
|
+
- action: "afm_sessions_signals"
|
|
73
|
+
resource: "*"
|
|
74
|
+
effect: allow
|
|
75
|
+
- action: "afm_version"
|
|
76
|
+
resource: "*"
|
|
77
|
+
effect: allow
|
|
78
|
+
---
|
|
79
|
+
You are an explorer. The message that dispatched you is your brief: follow it.
|
|
80
|
+
|
|
81
|
+
You only read. You never edit a file, run a command that changes state, or commit.
|
|
82
|
+
|
|
83
|
+
- Read only what the question needs: the sections you are about to use, not whole trees.
|
|
84
|
+
- Cite every claim: a path with the line, or a source URL with the literal quote. A claim with no
|
|
85
|
+
citation is a guess, and you label it a guess.
|
|
86
|
+
- Never invent a path, a line number, a URL or a quote. If you did not read it, you do not cite it.
|
|
87
|
+
- Say what you could not find. Absence is a result.
|
|
88
|
+
|
|
89
|
+
You have at most 60 steps. Write the answer whole, not a step at a time. If you run out, reply with
|
|
90
|
+
what you have and what is still missing.
|
|
91
|
+
|
|
92
|
+
Reply with the answer first, then the evidence, then the gaps.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Blind auditor. Checks one piece of work it did not write against its sources and rules, and returns a verdict with evidence; dispatched with a brief.
|
|
3
|
+
mode: subagent
|
|
4
|
+
permissions:
|
|
5
|
+
- action: "*"
|
|
6
|
+
resource: "*"
|
|
7
|
+
effect: deny
|
|
8
|
+
- action: "read"
|
|
9
|
+
resource: "*"
|
|
10
|
+
effect: allow
|
|
11
|
+
- action: "glob"
|
|
12
|
+
resource: "*"
|
|
13
|
+
effect: allow
|
|
14
|
+
- action: "grep"
|
|
15
|
+
resource: "*"
|
|
16
|
+
effect: allow
|
|
17
|
+
- action: "webfetch"
|
|
18
|
+
resource: "*"
|
|
19
|
+
effect: allow
|
|
20
|
+
- action: "websearch"
|
|
21
|
+
resource: "*"
|
|
22
|
+
effect: allow
|
|
23
|
+
- action: "afm_approve"
|
|
24
|
+
resource: "*"
|
|
25
|
+
effect: allow
|
|
26
|
+
- action: "afm_config"
|
|
27
|
+
resource: "*"
|
|
28
|
+
effect: allow
|
|
29
|
+
- action: "afm_detect"
|
|
30
|
+
resource: "*"
|
|
31
|
+
effect: allow
|
|
32
|
+
- action: "afm_doctor"
|
|
33
|
+
resource: "*"
|
|
34
|
+
effect: allow
|
|
35
|
+
- action: "afm_failures_promotable"
|
|
36
|
+
resource: "*"
|
|
37
|
+
effect: allow
|
|
38
|
+
- action: "afm_feature_lint"
|
|
39
|
+
resource: "*"
|
|
40
|
+
effect: allow
|
|
41
|
+
- action: "afm_feature_status"
|
|
42
|
+
resource: "*"
|
|
43
|
+
effect: allow
|
|
44
|
+
- action: "afm_gate"
|
|
45
|
+
resource: "*"
|
|
46
|
+
effect: allow
|
|
47
|
+
- action: "afm_index"
|
|
48
|
+
resource: "*"
|
|
49
|
+
effect: allow
|
|
50
|
+
- action: "afm_lang"
|
|
51
|
+
resource: "*"
|
|
52
|
+
effect: allow
|
|
53
|
+
- action: "afm_next_id"
|
|
54
|
+
resource: "*"
|
|
55
|
+
effect: allow
|
|
56
|
+
- action: "afm_path"
|
|
57
|
+
resource: "*"
|
|
58
|
+
effect: allow
|
|
59
|
+
- action: "afm_policy"
|
|
60
|
+
resource: "*"
|
|
61
|
+
effect: allow
|
|
62
|
+
- action: "afm_preflight"
|
|
63
|
+
resource: "*"
|
|
64
|
+
effect: allow
|
|
65
|
+
- action: "afm_read"
|
|
66
|
+
resource: "*"
|
|
67
|
+
effect: allow
|
|
68
|
+
- action: "afm_sessions"
|
|
69
|
+
resource: "*"
|
|
70
|
+
effect: allow
|
|
71
|
+
- action: "afm_sessions_signals"
|
|
72
|
+
resource: "*"
|
|
73
|
+
effect: allow
|
|
74
|
+
- action: "afm_version"
|
|
75
|
+
resource: "*"
|
|
76
|
+
effect: allow
|
|
77
|
+
---
|
|
78
|
+
You are a reviewer. The message that dispatched you is your brief: follow it.
|
|
79
|
+
|
|
80
|
+
You audit work you did not write. You read it and the sources or rules it answers to. You never
|
|
81
|
+
write a fix.
|
|
82
|
+
|
|
83
|
+
- Judge against the rules and sources the brief names, not against taste.
|
|
84
|
+
- Verify, do not trust: open each cited path, line or quote and confirm it says what the work claims.
|
|
85
|
+
- Run the checks the brief lists that the `afm` tools offer (the gate, the doctor, the index), alone and one
|
|
86
|
+
at a time, and report their exact output. You have no shell: a check that needs one is a check you did
|
|
87
|
+
not run, and you say so.
|
|
88
|
+
- Report a finding only with its evidence: the path and line, the rule it breaks, and the concrete
|
|
89
|
+
input or state that fails. A suspicion with no evidence is not a finding.
|
|
90
|
+
- Say what you did not check.
|
|
91
|
+
|
|
92
|
+
End with one verdict line: PASS when no finding stands, FAIL otherwise, followed by the findings
|
|
93
|
+
most severe first.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: afm-adr
|
|
3
|
+
description: |
|
|
4
|
+
Writes an Architecture Decision Record to `<consumer>/docs/adr/NNNN-slug.md`. It records context, decision, alternatives and consequence. In a refactored project, write a retroactive ADR only when it is load-bearing.
|
|
5
|
+
Activates: `afm-adr`, "create ADR", "architectural decision", "record this architecture choice".
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# AFM — ADR
|
|
9
|
+
|
|
10
|
+
> **Questions in this host.** `afm ask <op>` prompts only in a terminal, and your shell tool has none: it exits 2. Run `afm ask <op> --json` instead and put each pending question to the operator with the host's question tool when it has one, and otherwise in chat as a numbered list: the `prompt`, then the `options` with their descriptions, the recommended one first and marked. Wait for the answer. Then record each choice with `afm answer <op> <id> <label>` (one label per selected option). Run `afm ask <op>` again: `all questions answered` means the op may go on.
|
|
11
|
+
|
|
12
|
+
> **Procedure.** Run `afm read ops/adr.md` and follow it; read an on-demand section when its condition holds.
|
|
13
|
+
|
|
14
|
+
The CLI owns the number, the template, the frontmatter, the supersede link and the index. This skill keeps
|
|
15
|
+
only the judgment.
|
|
16
|
+
|
|
17
|
+
## When NOT to activate
|
|
18
|
+
|
|
19
|
+
This is a disambiguation for a skill that already activated. It does not control activation itself. A
|
|
20
|
+
counterintuitive surprise belongs in `afm-gotcha`. A rule with an executable trigger belongs in `afm-rule`.
|
|
21
|
+
|
|
22
|
+
## Pre-check
|
|
23
|
+
|
|
24
|
+
`afm preflight`. Exit 3 means there is no instance: stop and suggest `afm-init` (greenfield) or
|
|
25
|
+
`afm-refactor` (brownfield) first. Exit 4 means the shipped content does not resolve: report it, do not
|
|
26
|
+
fall back silently.
|
|
27
|
+
|
|
28
|
+
## Procedure (judgment only)
|
|
29
|
+
|
|
30
|
+
1. Ask the status: `afm ask adr`. Collect the title, context, decision, alternatives, consequence and refs
|
|
31
|
+
as free text, because these fields carry intent.
|
|
32
|
+
2. Run `afm adr new <slug> --title "<title>" --description "<one sentence>"`, with `--supersedes N` when
|
|
33
|
+
the decision replaces ADR N.
|
|
34
|
+
3. Fill the sections of the printed file with what the operator said, and leave the rest `[TBD]`. Report the
|
|
35
|
+
path (#6).
|
|
36
|
+
|
|
37
|
+
The "Additional step in a refactored project" in the op applies ONLY when `afm-refactor` adopted the
|
|
38
|
+
project (signal: `afm.md` § 3.1 forward-only exists). A greenfield project forbids a retroactive ADR.
|
|
39
|
+
|
|
40
|
+
## Invariant principles
|
|
41
|
+
|
|
42
|
+
Additional #9 (a retroactive ADR is
|
|
43
|
+
load-bearing-only) applies ONLY in a refactored project.
|
|
44
|
+
|
|
45
|
+
Passive mode (`afm-reconcile`) is always on and can propose `afm-adr` when it detects a "novel structural
|
|
46
|
+
decision" signal. This skill covers only the active creation.
|
|
47
|
+
|
|
48
|
+
**Principles and version.** `afm path PRINCIPLES.md` (universals §1-8 apply). `afm version` prints the version; history: `afm path CHANGELOG.md`.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: afm-analyze
|
|
3
|
+
description: |
|
|
4
|
+
Cross-checks one feature against the instance. It compares `docs/features/NNN-*/{spec,plan,tasks}.md` with prd, ust, ach, afm § 3 and PRINCIPLES. It reports findings by severity in chat and writes no file.
|
|
5
|
+
Activates: `afm-analyze [<feature>]`, "audit feature", "check coverage", "validate consistency before implementation".
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# AFM — Analyze
|
|
9
|
+
|
|
10
|
+
> **Questions in this host.** `afm ask <op>` prompts only in a terminal, and your shell tool has none: it exits 2. Run `afm ask <op> --json` instead and put each pending question to the operator with the host's question tool when it has one, and otherwise in chat as a numbered list: the `prompt`, then the `options` with their descriptions, the recommended one first and marked. Wait for the answer. Then record each choice with `afm answer <op> <id> <label>` (one label per selected option). Run `afm ask <op>` again: `all questions answered` means the op may go on.
|
|
11
|
+
|
|
12
|
+
> **Procedure.** Run `afm read ops/analyze.md` and follow it; read an on-demand section when its condition holds.
|
|
13
|
+
|
|
14
|
+
## When NOT to activate
|
|
15
|
+
|
|
16
|
+
Use `afm-clarify` to resolve markers interactively. Use `afm-deliver` for end-to-end delivery: it runs analyze underneath, in gating mode. Use `afm-diagnose` for the health of the whole doc set.
|
|
17
|
+
|
|
18
|
+
## Pre-check
|
|
19
|
+
|
|
20
|
+
Run `afm preflight` (exit 3: no `docs/.afm-version`, stop and suggest `afm-init` or `afm-refactor`).
|
|
21
|
+
|
|
22
|
+
## Procedure
|
|
23
|
+
|
|
24
|
+
Start from the mechanical findings: `afm feature lint <NNN> --json` covers the passes A, C, D, E and the structure of `tasks.md`. Add the judgment on top (constitution violations, duplication, the semantic side of inconsistency and ambiguity), build the coverage table, assign severities by the matrix, and report in chat with metrics. Close with the `remediation` question (`afm ask analyze`); a remediation that adds a task runs `afm task add`, never a hand edit of the `tasks:` list, and a task is closed only with `afm task done`. Gating mode sorts findings into buckets instead of reporting.
|
|
25
|
+
|
|
26
|
+
## Invariant principles
|
|
27
|
+
|
|
28
|
+
Most relevant here: #2 (detection is an autonomous scan, not a question), #5 (no finding without evidence) and #6 (analyze is read-only: it reports in chat, writes no file, and remediates only on request).
|
|
29
|
+
|
|
30
|
+
## Continuous doctrine
|
|
31
|
+
|
|
32
|
+
Passive mode (`afm-reconcile`) is always on. This skill covers only active auditing.
|
|
33
|
+
|
|
34
|
+
**Principles and version.** `afm path PRINCIPLES.md` (universals §1-8 apply). `afm version` prints the version; history: `afm path CHANGELOG.md`.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: afm-clarify
|
|
3
|
+
description: |
|
|
4
|
+
Scans one feature for ambiguity. It asks the irreducible questions, recommendation first, and writes the answers to `spec.md § 7 Clarifications`.
|
|
5
|
+
Activates: `afm-clarify [<feature>]`, "resolve markers", "clear up ambiguity in feature X", "clarify the spec".
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# AFM — Clarify
|
|
9
|
+
|
|
10
|
+
> **Questions in this host.** `afm ask <op>` prompts only in a terminal, and your shell tool has none: it exits 2. Run `afm ask <op> --json` instead and put each pending question to the operator with the host's question tool when it has one, and otherwise in chat as a numbered list: the `prompt`, then the `options` with their descriptions, the recommended one first and marked. Wait for the answer. Then record each choice with `afm answer <op> <id> <label>` (one label per selected option). Run `afm ask <op>` again: `all questions answered` means the op may go on.
|
|
11
|
+
|
|
12
|
+
> **Procedure.** Run `afm read ops/clarify.md` and follow it; read an on-demand section when its condition holds.
|
|
13
|
+
|
|
14
|
+
## When NOT to activate
|
|
15
|
+
|
|
16
|
+
Use `afm-analyze` for a read-only, multi-artifact validation that does not resolve markers. Use `afm-deliver` for end-to-end delivery: it calls clarify underneath when needed.
|
|
17
|
+
|
|
18
|
+
## Pre-check
|
|
19
|
+
|
|
20
|
+
Run `afm preflight` (exit 3: no `docs/.afm-version`, stop and suggest `afm-init` or `afm-refactor`). `afm feature status <NNN> --json` lists the open markers of a feature in `blockers`.
|
|
21
|
+
|
|
22
|
+
## Procedure
|
|
23
|
+
|
|
24
|
+
Judgment only: a 9-category scan of the spec, a prioritized queue (at most 5 questions), auto-resolution from the code and docs before any question, then one recommendation-first question per turn. The questions come from the spec, so they are dynamic; the one fixed decision (`underspecified`) is in `afm ask clarify`. Integrate each answer into `spec.md` at once, remove the marker, and finish with the coverage summary.
|
|
25
|
+
|
|
26
|
+
## Invariant principles
|
|
27
|
+
|
|
28
|
+
Most relevant here: #2 is discover-first: resolve each question yourself through the scan or the docs, then ask. #4 says `[TBD]` beats invention, and a recommendation is a rejectable hypothesis, not a guess. #6 is autonomy-first: write the integration into spec § 7 and report. #8 is recommendation-first questions.
|
|
29
|
+
|
|
30
|
+
## Continuous doctrine
|
|
31
|
+
|
|
32
|
+
Passive mode (`afm-reconcile`) is always on. This skill covers only the active resolution of ambiguity.
|
|
33
|
+
|
|
34
|
+
**Principles and version.** `afm path PRINCIPLES.md` (universals §1-8 apply). `afm version` prints the version; history: `afm path CHANGELOG.md`.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: afm-deliver
|
|
3
|
+
description: |
|
|
4
|
+
Delivers one feature from discovery to reconciliation. It takes one recorded approval (`afm approve`), writes spec, plan and tasks, then runs each task as RED, GREEN, REFACTOR, COMMIT. It resumes from the correct phase when those files exist. Orchestrator: it composes specify, plan, tasks, clarify, analyze and reconcile. External research is not an AFM op; it routes to nasca.
|
|
5
|
+
Activates: `afm-deliver [<feature>]`, "build feature X", "implement X end to end", "the tasks already exist, run them", "continue the delivery of feature N".
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# AFM — Deliver (orchestrated autonomous delivery)
|
|
9
|
+
|
|
10
|
+
> **Procedure.** Run `afm read ops/deliver.md` and follow it; read an on-demand section when its condition holds.
|
|
11
|
+
|
|
12
|
+
The **orchestrator** of the delivery loop. One request takes "build feature X" from discovery to a delivered feature. It does not duplicate the sub-steps: it reads and follows `afm-specify`, `afm-plan`, `afm-tasks`, `afm-clarify`, `afm-analyze` and `afm-reconcile` through a suppression contract. External unknowns go through `nasca-research`, or `nasca-campaign` for a deep study; ask the operator if nasca is missing.
|
|
13
|
+
|
|
14
|
+
## When NOT to activate
|
|
15
|
+
|
|
16
|
+
An isolated step ("just open the spec", "just generate the tasks") is the matching atomic skill. A trivial change goes straight to the `afm.md § 2` loop.
|
|
17
|
+
|
|
18
|
+
## Pre-check
|
|
19
|
+
|
|
20
|
+
Run `afm preflight`. Exit 0 continues. Exit 3 means no `docs/.afm-version`: stop and suggest `afm-init` (greenfield) or `afm-refactor` (brownfield). Exit 4 or 5: report the line it printed. Do not fall back silently.
|
|
21
|
+
|
|
22
|
+
## Most relevant here
|
|
23
|
+
|
|
24
|
+
**#2** (discover-first: resolve unknowns by scan and research, ask only the irreducible part, never guess product or criteria) and **#6** (autonomy-first: approval at checkpoint granularity, the consolidated plan IS the proposal).
|
|
25
|
+
|
|
26
|
+
## Continuous doctrine
|
|
27
|
+
|
|
28
|
+
Passive mode (`afm-reconcile`) is always on. It runs in parallel with `afm-deliver` and takes the closing turn of Phase 4 (`core/afm.md` § 8.5 plus a passive sweep).
|
|
29
|
+
|
|
30
|
+
**Principles and version.** `afm path PRINCIPLES.md` (universals §1-8 apply). `afm version` prints the version; history: `afm path CHANGELOG.md`.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: afm-diagnose
|
|
3
|
+
description: |
|
|
4
|
+
Scans the health of the local docs on 7 axes. The axes are dead reference, stale marker, instance-to-plugin drift, broken ADR chain, dead rule trigger, inflation or orphan, and cross-doc contradiction. It reads only `<consumer>/docs/` and returns evidence as `command + file:line`. It proposes no edit.
|
|
5
|
+
Activates: `afm-diagnose`, "diagnose the methodology", "what is broken in the docs?", "run the AFM health check".
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
# AFM — Diagnose (mechanical weakness-mining, read-only)
|
|
10
|
+
|
|
11
|
+
> **Procedure.** Run `afm read ops/diagnose.md` and follow it; read an on-demand section when its condition holds.
|
|
12
|
+
|
|
13
|
+
> **Carve-out (does not overlap existing ops):** `afm-analyze` audits **one feature**. `diagnose` audits the **whole instance** of `/docs/`. `afm-reflect` uses **behavioral** evidence, where the agent stumbled. `diagnose` is **static**, based on filesystem and git. `afm-evolve` is the **orchestrator**. It combines `diagnose` (mechanical evidence) with `afm-reflect` (behavioral evidence) into one proposal and one gate. `diagnose` is **read-only**. It never proposes an edit or opens a gate.
|
|
14
|
+
|
|
15
|
+
## When NOT to activate
|
|
16
|
+
|
|
17
|
+
This section disambiguates for a skill that already activated. It does not define activation, so it stays in the body, not in the resident listing.
|
|
18
|
+
|
|
19
|
+
Validation of ONE feature is `afm-analyze`. Behavioral friction, where a doc misguided the agent at apply time, is `afm-reflect`. Proposing or applying a fix is `afm-evolve` (the full cycle, which includes diagnose).
|
|
20
|
+
|
|
21
|
+
## Pre-check
|
|
22
|
+
|
|
23
|
+
1. **Does `<consumer>/docs/.afm-version` exist?** If not, stop. Suggest `afm-init` (greenfield) or `afm-refactor` (brownfield) first.
|
|
24
|
+
2. **Does `afm preflight` exit 0?** A non-zero exit says why (docs not bootstrapped, content unresolved, pin mismatch). Report it to the user. Do not fall back silently.
|
|
25
|
+
|
|
26
|
+
## Procedure
|
|
27
|
+
|
|
28
|
+
The procedure has two phases. **Phase 0 — Scan** is gap-driven. Run `afm doctor --json`: it checks A1-A6, staleness and dead gotchas mechanically, and every finding carries a command plus `file:line`. You add A7 yourself. All 7 axes are checked, every time.
|
|
29
|
+
|
|
30
|
+
Axis A7, cross-doc contradiction, uses a paired read. That read applies an anti-false-positive layer test. An axis that cannot be covered becomes "not-covered: <reason>".
|
|
31
|
+
|
|
32
|
+
**Phase 1 — Diagnosis** has the ANALYZER role. **It must not propose an edit.** The signature is φ = `(symptom, causal-status-of-behavior, mechanism)`.
|
|
33
|
+
|
|
34
|
+
Phase 1 requires rival mechanisms, for example "agent non-compliant" versus "target legitimately removed". It applies an addressability filter and a self-sufficient severity matrix.
|
|
35
|
+
|
|
36
|
+
**Output** is an evidence bundle ordered by severity. Run à la carte, the skill prints the report to chat. It does not write to disk. It opens no gate. Under `afm-evolve`, it feeds the proposal instead.
|
|
37
|
+
|
|
38
|
+
This scan has no cooldown. It is read-only and cheap. The cycle's cooldown belongs to the orchestrator.
|
|
39
|
+
|
|
40
|
+
## Invariant principles
|
|
41
|
+
|
|
42
|
+
Most relevant here: #2 (discover-first — diagnose with evidence before any proposal). Also #3 (mechanize-or-demote — the checks must pass the test they audit). Also #5 (no finding without evidence external to the text).
|
|
43
|
+
|
|
44
|
+
**No new principle here.** `diagnose` is a composed materialization. The doctrine lives in the op file.
|
|
45
|
+
|
|
46
|
+
**Principles and version.** `afm path PRINCIPLES.md` (universals §1-8 apply). `afm version` prints the version; history: `afm path CHANGELOG.md`.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: afm-evolve
|
|
3
|
+
description: |
|
|
4
|
+
Runs the full self-evolution cycle over `<consumer>/docs/`. It combines diagnose and reflect, adds generalize, restructure, update and remediate on demand, and delivers one package through one gate (`afm ask evolve`). It conducts the mechanisms and never touches the plugin.
|
|
5
|
+
Activates: `afm-evolve`, "audit the methodology", "the docs are a mess", "the rules no longer trigger", "clean up the docs", "reorganize the docs".
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
# AFM — Evolve (orchestrator for the self-evolution cycle)
|
|
10
|
+
|
|
11
|
+
> **Questions in this host.** `afm ask <op>` prompts only in a terminal, and your shell tool has none: it exits 2. Run `afm ask <op> --json` instead and put each pending question to the operator with the host's question tool when it has one, and otherwise in chat as a numbered list: the `prompt`, then the `options` with their descriptions, the recommended one first and marked. Wait for the answer. Then record each choice with `afm answer <op> <id> <label>` (one label per selected option). Run `afm ask <op>` again: `all questions answered` means the op may go on.
|
|
12
|
+
|
|
13
|
+
> **Procedure.** Run `afm read ops/evolve.md` and follow it; read an on-demand section when its condition holds.
|
|
14
|
+
|
|
15
|
+
This is an orchestrator skill of AFM. The canonical procedure is the op file that `afm path ops/evolve.md` prints.
|
|
16
|
+
|
|
17
|
+
> **Carve-outs (it does not override existing ops):** `afm-diagnose`, `afm-reflect`, `afm-generalize` and `afm-restructure` are the **mechanisms** (each runs à la carte). `afm-analyze` audits **one feature** (read-only). Passive mode (`afm-reconcile`) proposes **one single edit** at the end of a turn. `afm-promote` **records** a finding meant for the plugin (it does not edit the plugin). `evolve` is the **cycle** that chains the mechanisms with one gate and one log — the level no other op covers.
|
|
18
|
+
|
|
19
|
+
## When NOT to activate
|
|
20
|
+
|
|
21
|
+
This section helps someone who already activated the skill decide if it fits. It is not an activation trigger, so it stays in the body, not in the resident listing.
|
|
22
|
+
|
|
23
|
+
Use a single mechanism instead when the need is narrow. A report is `afm-diagnose`. Refining a doc that misled you is `afm-reflect`. Merging gotchas is `afm-generalize`.
|
|
24
|
+
|
|
25
|
+
A structure or staleness check is `afm-restructure`. A version bump is `afm-update`. Passive mode (`afm-reconcile`) proposes a one-off additive signal (new gotcha, rule, or ADR) directly.
|
|
26
|
+
|
|
27
|
+
A feature-level check is `afm-analyze` or `afm-deliver`. Recording a finding for the plugin is `afm-promote`.
|
|
28
|
+
|
|
29
|
+
## Pre-check
|
|
30
|
+
|
|
31
|
+
1. **Does `<consumer>/docs/.afm-version` exist?** If not, stop. Suggest `afm-init` (greenfield) or `afm-refactor` (brownfield) first.
|
|
32
|
+
2. **Does `afm preflight` exit 0?** A non-zero exit says why (docs not bootstrapped, content unresolved, pin mismatch). Report it to the user. Do not fall back silently.
|
|
33
|
+
3. **Does `afm evolve gate-check` allow a cycle?** Pass `--symptom "<what the user said>"` when there is one. Exit 0 runs; exit 1 is the cooldown refusing (no new signal inside the window), so say so and stop; 3 and 4 mean not a project or undecided.
|
|
34
|
+
|
|
35
|
+
## Procedure
|
|
36
|
+
|
|
37
|
+
Read the op (`afm path ops/evolve.md`) end to end and follow it exactly. The op has 5 phases: evidence collection (diagnose plus reflect), proposal in 3 buckets, a single gate (`afm ask evolve`), apply with post-conditions, and the log in `docs/evolution/`.
|
|
38
|
+
|
|
39
|
+
Consult the rubric `rubrics/when-to-evolve-methodology.md` (`afm path rubrics/when-to-evolve-methodology.md`) to decide between a full cycle, a single mechanism, or a one-off fix.
|
|
40
|
+
|
|
41
|
+
## Most relevant principles
|
|
42
|
+
|
|
43
|
+
#2 (discover-first): diagnose with evidence before you propose. #3 (mechanize-or-downgrade): evolve's own signals must pass the same test evolve applies to others. #6 (autonomy-first with self-check): the gate is the load-bearing residue, and the bright lines for #7 plugin, deletion, and push still apply. #8 (earned questions, recommendation-first).
|
|
44
|
+
|
|
45
|
+
## Continuous doctrine
|
|
46
|
+
|
|
47
|
+
Passive mode (`afm-reconcile`) is always on. It may **suggest** `afm-evolve` when it detects a Class B signal. That signal is a lived contradiction between docs, or perceived inflation at apply time. Only the user can invoke the full cycle.
|
|
48
|
+
|
|
49
|
+
**Principles and version.** `afm path PRINCIPLES.md` (universals §1-8 apply). `afm version` prints the version; history: `afm path CHANGELOG.md`.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: afm-export-template
|
|
3
|
+
description: |
|
|
4
|
+
Converts a bootstrapped project into an architectural template. It deletes the product files, keeps ach, afm, gotchas and adr, and writes the `docs/.template` marker. It touches `docs/` only.
|
|
5
|
+
Activates: `afm-export-template`, "export as template", "turn this project into a starter".
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# AFM — Export-template
|
|
9
|
+
|
|
10
|
+
> **Questions in this host.** `afm ask <op>` prompts only in a terminal, and your shell tool has none: it exits 2. Run `afm ask <op> --json` instead and put each pending question to the operator with the host's question tool when it has one, and otherwise in chat as a numbered list: the `prompt`, then the `options` with their descriptions, the recommended one first and marked. Wait for the answer. Then record each choice with `afm answer <op> <id> <label>` (one label per selected option). Run `afm ask <op>` again: `all questions answered` means the op may go on.
|
|
11
|
+
|
|
12
|
+
> **Procedure.** Run `afm read ops/export-template.md` and follow it; read an on-demand section when its condition holds.
|
|
13
|
+
|
|
14
|
+
The CLI owns the plan, the diff and the marker. This skill keeps the judgment.
|
|
15
|
+
|
|
16
|
+
## When NOT to activate
|
|
17
|
+
|
|
18
|
+
This is a criterion for a skill already active, not an activation trigger. If the project is already a
|
|
19
|
+
template (`docs/.template` exists), the op is idempotent but asks first.
|
|
20
|
+
|
|
21
|
+
## Pre-check
|
|
22
|
+
|
|
23
|
+
`afm template export --dry-run` does it: a project with no `docs/.afm-version` is not bootstrapped yet, so
|
|
24
|
+
stop and suggest `afm-init` (greenfield) or `afm-refactor` (brownfield) first.
|
|
25
|
+
|
|
26
|
+
## Procedure (judgment only)
|
|
27
|
+
|
|
28
|
+
1. Collect the template name and version as free text. A blank answer stays `[TBD]`; never derive the name
|
|
29
|
+
from the folder.
|
|
30
|
+
2. Ask what to keep: `afm ask export-template`. Put every coherence warning of the dry run to the operator.
|
|
31
|
+
3. Induce the reusable task template from the latest all-green feature BEFORE `docs/features/` goes.
|
|
32
|
+
4. Show the full diff with `afm template export --dry-run ...`, then ask `afm ask export-template-apply`.
|
|
33
|
+
Deleting files is a bright line: it is never applied without that confirmation.
|
|
34
|
+
5. Apply with the same flags and `--yes`, and suggest the commit message the command prints.
|
|
35
|
+
|
|
36
|
+
## Invariant principles
|
|
37
|
+
|
|
38
|
+
Most relevant here: #5 (do not invent metadata when the operator leaves it blank: use `[TBD]` in the JSON). Also #6
|
|
39
|
+
(autonomy-first, but deleting files is a bright line): confirm the diff before you delete.
|
|
40
|
+
|
|
41
|
+
Passive mode (`afm-reconcile`) is always on. This skill focuses only on the active conversion to a template.
|
|
42
|
+
|
|
43
|
+
**Principles and version.** `afm path PRINCIPLES.md` (universals §1-8 apply). `afm version` prints the version; history: `afm path CHANGELOG.md`.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: afm-generalize
|
|
3
|
+
description: |
|
|
4
|
+
Merges two or more similar gotchas into one abstract rule, from episodic to semantic. Merged entries become tombstones and nothing is deleted.
|
|
5
|
+
Activates: `afm-generalize`, "these gotchas are all the same thing", "merge these rules", "I have 3 gotchas that say the same thing".
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
# AFM — Generalize (semantic consolidation of gotchas)
|
|
10
|
+
|
|
11
|
+
> **Questions in this host.** `afm ask <op>` prompts only in a terminal, and your shell tool has none: it exits 2. Run `afm ask <op> --json` instead and put each pending question to the operator with the host's question tool when it has one, and otherwise in chat as a numbered list: the `prompt`, then the `options` with their descriptions, the recommended one first and marked. Wait for the answer. Then record each choice with `afm answer <op> <id> <label>` (one label per selected option). Run `afm ask <op>` again: `all questions answered` means the op may go on.
|
|
12
|
+
|
|
13
|
+
> **Procedure.** Run `afm read ops/generalize.md` and follow it; read an on-demand section when its condition holds.
|
|
14
|
+
|
|
15
|
+
> **Carve-out (does not overlap existing ops):** `afm-promote` **registers** a finding meant for the plugin. It does not write to the plugin. `afm-generalize` merges **inside the instance** (N gotchas become 1 rule in the same `/docs/`). `afm-reconcile` **adds** a new gotcha. `afm-generalize` **merges** gotchas that already exist. `afm-reflect` refines **one** doc. `afm-generalize` consolidates **many**. `afm-evolve` is the **orchestrator** and it composes this skill when `afm-diagnose` flags inflation from redundant gotchas.
|
|
16
|
+
|
|
17
|
+
## When NOT to activate
|
|
18
|
+
|
|
19
|
+
This is a disambiguation criterion for someone who already activated the skill, not an activation trigger. That is why it lives in the body, not in the resident listing.
|
|
20
|
+
|
|
21
|
+
Sending ONE learning to the plugin is `afm-promote`. ADDING a new gotcha or rule is `afm-reconcile` -> `afm-gotcha`/`afm-rule` (`afm-generalize` only merges what already exists). Refining the clarity of ONE doc is `afm-reflect`. With fewer than 2 similar candidates, there is no generalization to do.
|
|
22
|
+
|
|
23
|
+
## Pre-check
|
|
24
|
+
|
|
25
|
+
1. **Does `<consumer>/docs/.afm-version` exist?** If not, stop and suggest `afm-init` (greenfield) or `afm-refactor` (brownfield) first.
|
|
26
|
+
2. **Does `afm preflight` exit 0?** A non-zero exit says why (docs not bootstrapped, content unresolved, pin mismatch). Report it to the user. Do not fall back silently.
|
|
27
|
+
3. **Is there a batch of >=2** similar gotchas/reflections? If not, report "nothing to generalize (no batch)" and stop. Generalizing from 1 case is forbidden (#5).
|
|
28
|
+
|
|
29
|
+
## Gate
|
|
30
|
+
|
|
31
|
+
The merge is load-bearing and goes through its own earned gate, `afm ask generalize` (suppressed under `afm-evolve`). Merged entries become tombstones; never delete.
|
|
32
|
+
|
|
33
|
+
## Most relevant here
|
|
34
|
+
|
|
35
|
+
#1 (episodic `gotchas.md` -> semantic `afm.md`), #3 (a merged rule becomes hard only with an executable 0/1 trigger), #5 (no abstraction without a real batch), #6/#8 (self-verify before an earned gate; deletion is a bright line, so archive as tombstones). No new principle here: the doctrine lives in the op.
|
|
36
|
+
|
|
37
|
+
**Principles and version.** `afm path PRINCIPLES.md` (universals §1-8 apply). `afm version` prints the version; history: `afm path CHANGELOG.md`.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: afm-gotcha
|
|
3
|
+
description: |
|
|
4
|
+
Writes a counterintuitive surprise to `<consumer>/docs/gotchas/`. The entry gate is mandatory: the issue must have bitten twice, or it must be documented behavior of an external SDK or runtime.
|
|
5
|
+
Activates: `afm-gotcha`, "register a gotcha", "this has confused me before", "note this surprise for the next person".
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# AFM — Gotcha
|
|
9
|
+
|
|
10
|
+
> **Questions in this host.** `afm ask <op>` prompts only in a terminal, and your shell tool has none: it exits 2. Run `afm ask <op> --json` instead and put each pending question to the operator with the host's question tool when it has one, and otherwise in chat as a numbered list: the `prompt`, then the `options` with their descriptions, the recommended one first and marked. Wait for the answer. Then record each choice with `afm answer <op> <id> <label>` (one label per selected option). Run `afm ask <op>` again: `all questions answered` means the op may go on.
|
|
11
|
+
|
|
12
|
+
> **Procedure.** Run `afm read ops/gotcha.md` and follow it; read an on-demand section when its condition holds.
|
|
13
|
+
|
|
14
|
+
The CLI owns the entry gate, the number, the frontmatter the trigger index reads and the index. This skill
|
|
15
|
+
keeps only the judgment.
|
|
16
|
+
|
|
17
|
+
## When NOT to activate
|
|
18
|
+
|
|
19
|
+
This is a disambiguation for a skill that already activated. An architectural decision belongs to
|
|
20
|
+
`afm-adr`. A rule with an executable trigger belongs to `afm-rule`. A recurring failure with an external
|
|
21
|
+
signal belongs to `afm-remediate`.
|
|
22
|
+
|
|
23
|
+
## Pre-check
|
|
24
|
+
|
|
25
|
+
`afm preflight`. Exit 3 means there is no instance: stop and suggest `afm-init` or `afm-refactor` first.
|
|
26
|
+
|
|
27
|
+
## Procedure (judgment only)
|
|
28
|
+
|
|
29
|
+
1. Validate the entry rule BEFORE you collect content: `afm ask gotcha`. `neither` stops: reject a gotcha
|
|
30
|
+
without a 2x incidence or an external doc.
|
|
31
|
+
2. Collect the area, trigger, behavior, solution and references as free text. Decide how it fires: an
|
|
32
|
+
`event` when no file shape can fire it, a `file-shape` only with a narrow glob. A guessed trigger is worse
|
|
33
|
+
than one that never fires.
|
|
34
|
+
3. Run `afm gotcha new <slug> --basis <bitten-twice|documented-sdk> ...` and report the path (#6). A later
|
|
35
|
+
re-bite is `afm gotcha bite <id>`.
|
|
36
|
+
|
|
37
|
+
## Invariant principles
|
|
38
|
+
|
|
39
|
+
Most relevant here: #5 (do not
|
|
40
|
+
invent a gotcha without a real case; the 2x entry check is a strong gate) and #6 (autonomy-first: save the
|
|
41
|
+
result and report it).
|
|
42
|
+
|
|
43
|
+
Passive mode (`afm-reconcile`) is always on and can propose `afm-gotcha` when it detects the signal "the
|
|
44
|
+
same runtime surprise blocked work twice." This skill covers only active registration.
|
|
45
|
+
|
|
46
|
+
**Principles and version.** `afm path PRINCIPLES.md` (universals §1-8 apply). `afm version` prints the version; history: `afm path CHANGELOG.md`.
|