@event4u/agent-config 1.21.0 → 1.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/.agent-src/commands/agents/cleanup.md +31 -17
  2. package/.agent-src/commands/bug-fix.md +1 -0
  3. package/.agent-src/commands/bug-investigate.md +1 -0
  4. package/.agent-src/commands/challenge-me/vision.md +348 -0
  5. package/.agent-src/commands/challenge-me/with-docs.md +333 -0
  6. package/.agent-src/commands/challenge-me.md +61 -0
  7. package/.agent-src/commands/commit/in-chunks.md +30 -10
  8. package/.agent-src/commands/commit.md +46 -6
  9. package/.agent-src/commands/compress.md +19 -13
  10. package/.agent-src/commands/cost-report.md +120 -0
  11. package/.agent-src/commands/council/default.md +64 -17
  12. package/.agent-src/commands/create-pr/description-only.md +8 -0
  13. package/.agent-src/commands/create-pr.md +99 -80
  14. package/.agent-src/commands/feature/plan.md +13 -7
  15. package/.agent-src/commands/grill-me.md +38 -0
  16. package/.agent-src/commands/judge/steps.md +1 -1
  17. package/.agent-src/commands/memory/add.md +16 -8
  18. package/.agent-src/commands/memory/promote.md +17 -9
  19. package/.agent-src/commands/optimize/rtk.md +16 -11
  20. package/.agent-src/commands/prepare-for-review.md +12 -6
  21. package/.agent-src/commands/project-analyze.md +31 -20
  22. package/.agent-src/commands/review-changes.md +24 -15
  23. package/.agent-src/commands/roadmap/ai-council.md +183 -0
  24. package/.agent-src/commands/roadmap/create.md +20 -10
  25. package/.agent-src/commands/roadmap/process-full.md +58 -0
  26. package/.agent-src/commands/roadmap/process-phase.md +69 -0
  27. package/.agent-src/commands/roadmap/process-step.md +57 -0
  28. package/.agent-src/commands/roadmap.md +44 -16
  29. package/.agent-src/commands/threat-model.md +1 -0
  30. package/.agent-src/contexts/augment-infrastructure.md +1 -1
  31. package/.agent-src/contexts/communication/rules-auto/slash-command-routing-policy-mechanics.md +53 -18
  32. package/.agent-src/contexts/contracts/frugality-charter.md +57 -0
  33. package/.agent-src/contexts/execution/roadmap-process-loop.md +125 -0
  34. package/.agent-src/contexts/skills-and-commands.md +1 -1
  35. package/.agent-src/rules/architecture.md +9 -0
  36. package/.agent-src/rules/ask-when-uncertain.md +3 -13
  37. package/.agent-src/rules/caveman-speak.md +78 -0
  38. package/.agent-src/rules/direct-answers.md +5 -14
  39. package/.agent-src/rules/improve-before-implement.md +1 -0
  40. package/.agent-src/rules/invite-challenge.md +71 -0
  41. package/.agent-src/rules/markdown-safe-codeblocks.md +6 -7
  42. package/.agent-src/rules/no-cheap-questions.md +4 -14
  43. package/.agent-src/rules/token-efficiency.md +5 -7
  44. package/.agent-src/skills/adr-create/SKILL.md +197 -0
  45. package/.agent-src/skills/adversarial-review/SKILL.md +1 -0
  46. package/.agent-src/skills/agent-docs-writing/SKILL.md +23 -1
  47. package/.agent-src/skills/ai-council/SKILL.md +132 -8
  48. package/.agent-src/skills/bug-analyzer/SKILL.md +1 -0
  49. package/.agent-src/skills/command-writing/SKILL.md +23 -0
  50. package/.agent-src/skills/context-authoring/SKILL.md +23 -0
  51. package/.agent-src/skills/conventional-commits-writing/SKILL.md +23 -0
  52. package/.agent-src/skills/guideline-writing/SKILL.md +22 -0
  53. package/.agent-src/skills/persona-writing/SKILL.md +153 -0
  54. package/.agent-src/skills/readme-writing/SKILL.md +20 -0
  55. package/.agent-src/skills/readme-writing-package/SKILL.md +19 -0
  56. package/.agent-src/skills/roadmap-management/SKILL.md +7 -7
  57. package/.agent-src/skills/roadmap-writing/SKILL.md +157 -0
  58. package/.agent-src/skills/rule-writing/SKILL.md +22 -0
  59. package/.agent-src/skills/script-writing/SKILL.md +226 -0
  60. package/.agent-src/skills/skill-writing/SKILL.md +23 -0
  61. package/.agent-src/skills/systematic-debugging/SKILL.md +22 -2
  62. package/.agent-src/skills/technical-specification/SKILL.md +58 -1
  63. package/.agent-src/skills/test-driven-development/SKILL.md +24 -0
  64. package/.agent-src/skills/threat-modeling/SKILL.md +1 -0
  65. package/.agent-src/templates/agent-settings.md +87 -3
  66. package/.agent-src/templates/command.md +30 -9
  67. package/.agent-src/templates/roadmaps.md +10 -2
  68. package/.agent-src/templates/rule.md +8 -0
  69. package/.agent-src/templates/skill.md +49 -0
  70. package/.claude-plugin/marketplace.json +14 -2
  71. package/AGENTS.md +3 -3
  72. package/CHANGELOG.md +73 -0
  73. package/README.md +5 -5
  74. package/config/agent-settings.template.yml +22 -0
  75. package/docs/architecture.md +4 -4
  76. package/docs/contracts/command-clusters.md +45 -1
  77. package/docs/customization.md +72 -0
  78. package/docs/decisions/ADR-003-flat-cluster-subs-and-colon-syntax.md +126 -0
  79. package/docs/decisions/INDEX.md +15 -0
  80. package/docs/getting-started.md +2 -2
  81. package/docs/guidelines/agent-infra/asking-and-brevity-examples.md +27 -19
  82. package/docs/guidelines/agent-infra/carve-out-predicates.md +17 -0
  83. package/docs/guidelines/agent-infra/mcp-request-signing.md +199 -0
  84. package/docs/guidelines/agent-infra/naming.md +1 -1
  85. package/docs/guidelines/agent-infra/roadmap-progress-mechanics.md +11 -4
  86. package/package.json +1 -1
  87. package/scripts/_lib/__init__.py +5 -0
  88. package/scripts/_lib/script_output.py +140 -0
  89. package/scripts/_phase2_shim_helper.py +1 -1
  90. package/scripts/adr/regenerate_index.py +79 -0
  91. package/scripts/ai_council/one_off_archive/2026-05/_one_off_add_quiet.py +149 -0
  92. package/scripts/ai_council/one_off_archive/2026-05/_one_off_inject_quiet_flag.py +33 -0
  93. package/scripts/ai_council/one_off_archive/2026-05/_one_off_measure_v2.sh +36 -0
  94. package/scripts/ai_council/one_off_archive/2026-05/_one_off_measure_verbosity.sh +26 -0
  95. package/scripts/ai_council/one_off_archive/2026-05/_one_off_per_task.sh +41 -0
  96. package/scripts/ai_council/one_off_archive/2026-05/_one_off_silent_taskfiles.py +98 -0
  97. package/scripts/check_augmentignore.py +4 -1
  98. package/scripts/check_command_count_messaging.py +4 -1
  99. package/scripts/check_compressed_paths.py +4 -1
  100. package/scripts/check_council_layout.py +4 -1
  101. package/scripts/check_council_references.py +4 -1
  102. package/scripts/check_iron_law_prominence.py +3 -1
  103. package/scripts/check_md_language.py +3 -1
  104. package/scripts/check_memory_proposal.py +3 -1
  105. package/scripts/check_public_catalog_links.py +4 -1
  106. package/scripts/check_reply_consistency.py +8 -2
  107. package/scripts/check_roadmap_trackable.py +4 -1
  108. package/scripts/compile_router.py +27 -0
  109. package/scripts/compress.py +33 -19
  110. package/scripts/cost/budget.mjs +152 -0
  111. package/scripts/cost/track.mjs +144 -0
  112. package/scripts/council_cli.py +127 -10
  113. package/scripts/first-run.sh +3 -9
  114. package/scripts/install-hooks.sh +19 -1
  115. package/scripts/install.py +17 -12
  116. package/scripts/install.sh +19 -8
  117. package/scripts/lint_examples.py +6 -2
  118. package/scripts/lint_handoffs.py +4 -1
  119. package/scripts/lint_load_context.py +4 -1
  120. package/scripts/lint_roadmap_complexity.py +6 -2
  121. package/scripts/lint_rule_interactions.py +4 -1
  122. package/scripts/lint_rule_tiers.py +4 -1
  123. package/scripts/measure_frugality_savings.py +164 -0
  124. package/scripts/migrate_command_suggestions.py +2 -2
  125. package/scripts/runtime_dispatcher.py +11 -0
  126. package/scripts/schemas/command.schema.json +5 -0
  127. package/scripts/schemas/rule.schema.json +5 -0
  128. package/scripts/schemas/skill.schema.json +5 -0
  129. package/scripts/skill_linter.py +208 -3
  130. package/.agent-src/commands/roadmap/execute.md +0 -109
@@ -0,0 +1,153 @@
1
+ ---
2
+ name: persona-writing
3
+ description: "Use when creating or editing a persona in .agent-src.uncompressed/personas/ — voice / focus / unique questions / output expectations — even when the user just says 'add a reviewer voice for X'."
4
+ source: package
5
+ ---
6
+
7
+ <!-- cloud_safe: degrade -->
8
+
9
+ # persona-writing
10
+
11
+ ## When to use
12
+
13
+ * Creating a new persona file in
14
+ `.agent-src.uncompressed/personas/{id}.md`
15
+ * Rewriting an existing persona (focus shift, output-expectation
16
+ change — not a typo fix)
17
+ * Deciding whether a new reviewer voice should be a persona at all
18
+ (vs. a skill of its own)
19
+
20
+ Do NOT use this skill when:
21
+
22
+ * The content is a multi-step workflow → use
23
+ [`skill-writing`](../skill-writing/SKILL.md)
24
+ * The content is a hard obligation the agent must always honor → use
25
+ [`rule-writing`](../rule-writing/SKILL.md)
26
+ * The content describes the project's role-mode contract → that lives
27
+ in `docs/contracts/role-contracts.md`, not in personas
28
+
29
+ ## Persona vs skill vs role-mode — critical test
30
+
31
+ | Intent | Artifact |
32
+ |---|---|
33
+ | "Agent should review through a specific lens" | **Persona** |
34
+ | "Agent should run a multi-step workflow" | **Skill** |
35
+ | "Agent's closing contract differs by role" | **Role-mode** (contract file) |
36
+
37
+ A persona is **passive reference content** — it never triggers by
38
+ description, never appears in `<available_skills>`. Skills cite
39
+ personas via the `personas:` frontmatter key.
40
+
41
+ ## Procedure
42
+
43
+ ### 0. Drafting protocol
44
+
45
+ Creating or materially rewriting a persona must go through
46
+ Understand → Research → Draft per the
47
+ [`artifact-drafting-protocol`](../../rules/artifact-drafting-protocol.md)
48
+ rule. Inspect existing personas under
49
+ `.agent-src.uncompressed/personas/` for overlap before writing a new
50
+ one.
51
+
52
+ ### 1. Decide focus, not topic
53
+
54
+ A persona owns **one focus**: automation-readiness, adversarial
55
+ challenge, product-owner priorities, etc. If the focus needs three
56
+ sentences, it is two personas.
57
+
58
+ ### 2. Draft the persona file
59
+
60
+ Required sections:
61
+
62
+ * `## Focus` — one paragraph, what this lens *cares about* and what
63
+ it *ignores*.
64
+ * `## Unique questions` — 4–7 questions only this persona would ask.
65
+ Each question must be decidable against the artifact under review.
66
+ * `## Output expectations` — what the persona produces (verdict
67
+ format, severity vocabulary, citation discipline).
68
+
69
+ Optional: `## Anti-patterns this persona catches` — concrete examples
70
+ the persona is calibrated to flag.
71
+
72
+ ### 3. Cite from at least one skill
73
+
74
+ A persona that is not cited by any skill via the `personas:`
75
+ frontmatter key is dead code. Either wire it into an existing skill
76
+ or do not ship it.
77
+
78
+ ## Frontmatter shape
79
+
80
+ ```yaml
81
+ ---
82
+ id: <kebab-case-id>
83
+ role: <Human-Readable Role>
84
+ description: "One sentence: what this voice catches that others miss."
85
+ tier: core | specialty
86
+ mode: developer | product-owner | qa | stakeholder | none
87
+ version: "1.0"
88
+ source: package
89
+ ---
90
+ ```
91
+
92
+ The `mode:` field is advisory only — it suggests which role-mode the
93
+ persona pairs naturally with; it does not bind.
94
+
95
+ ## Output format
96
+
97
+ A single Markdown file at `.agent-src.uncompressed/personas/{id}.md`:
98
+
99
+ 1. Frontmatter (`id`, `role`, `description`, `tier`, `mode`,
100
+ `version`, `source`)
101
+ 2. `## Focus` — one paragraph, what the lens cares about and ignores
102
+ 3. `## Unique questions` — 4–7 decidable questions
103
+ 4. `## Output expectations` — verdict format, severity vocabulary
104
+
105
+ Length: ≤ 80 lines for a tier-core persona; longer signals the focus
106
+ is too broad.
107
+
108
+ ## Gotchas
109
+
110
+ - **Persona without a citing skill** — a persona that no skill
111
+ references via `personas:` never loads. Wire it in or do not ship.
112
+ - **Focus drift across rewrites** — adding "and also …" to `## Focus`
113
+ is the first symptom of a second persona hiding inside the first.
114
+ - **Vibe-based unique questions** — "Does this feel right?" cannot
115
+ be evaluated against the artifact. Replace with decidable triggers.
116
+ - **Restating role-mode contracts** — closing-contract obligations
117
+ belong in `docs/contracts/role-contracts.md`, not in the persona
118
+ body.
119
+
120
+ ## Frugality Standards
121
+
122
+ Apply the [Frugality Charter](../../contexts/contracts/frugality-charter.md)
123
+ to every persona you author.
124
+
125
+ **Examples in this artifact:**
126
+ - Per the charter's default-terse rule, `## Focus` opens with what
127
+ the persona cares about, not "This persona was created to…".
128
+ - Per the cite-don't-restate principle, link rules the persona
129
+ enforces; do not paste their text into the persona body.
130
+ - Per the cheap-question check, `## Unique questions` lists decidable
131
+ questions only — drop any that read like vibe checks.
132
+
133
+ **Pre-save self-check:**
134
+ 1. Does `## Focus` open with the lens, or with persona meta-narrative?
135
+ 2. Are unique questions decidable against the artifact alone?
136
+ 3. Are any questions duplicated from another persona?
137
+ 4. Is the persona cited by at least one skill via `personas:`?
138
+
139
+ ## Do NOT
140
+
141
+ * Author a persona that nobody cites.
142
+ * Restate Iron-Law text from rules inside `## Output expectations`.
143
+ * Use ALL-CAPS Iron-Law fenced blocks — those belong in rules on the
144
+ [`kernel-membership`](../../../docs/contracts/kernel-membership.md)
145
+ list.
146
+ * Ship a persona that overlaps an existing one's focus by more than
147
+ 50 % — merge instead.
148
+
149
+ ## Examples
150
+
151
+ See `.agent-src.uncompressed/personas/ai-agent.md` (automation
152
+ readiness) and `critical-challenger.md` (adversarial review) for
153
+ canonical structure.
@@ -156,6 +156,26 @@ After writing, verify:
156
156
  - READMEs for packages consumed by others need install/usage focus, not internal dev workflow
157
157
  - The model forgets to validate commands against `Taskfile.yml` / `Makefile` / `package.json scripts`
158
158
 
159
+ ## Frugality Standards
160
+
161
+ Apply the [Frugality Charter](../../contexts/contracts/frugality-charter.md)
162
+ to every README you author.
163
+
164
+ **Examples in this artifact:**
165
+ - Per the charter's default-terse rule, the README opens with one
166
+ sentence stating what the project is.
167
+ - Per the cite-don't-restate principle, "Installation" links to the
168
+ canonical install script, not its full contents.
169
+ - Per the cheap-question check, "Quick start vs. full guide" is
170
+ offered only when the two paths produce different artifacts.
171
+
172
+ **Pre-save self-check:**
173
+ 1. Does the opening paragraph carry marketing adjectives ("modern",
174
+ "comprehensive", "powerful")?
175
+ 2. Are setup steps narrated instead of bulleted commands?
176
+ 3. Are screenshots / GIFs present without explicit user request?
177
+ 4. Is content duplicated from `AGENTS.md` rather than linked?
178
+
159
179
  ## Do NOT
160
180
 
161
181
  - Do NOT invent features, setup steps, or commands not found in the repo
@@ -177,6 +177,25 @@ README = enough to adopt. Docs = enough to master.
177
177
  - Existing README may be outdated — verify against actual `composer.json` / source, not old text
178
178
  - Model forgets post-install steps (config publish, service provider, env vars)
179
179
 
180
+ ## Frugality Standards
181
+
182
+ Apply the [Frugality Charter](../../contexts/contracts/frugality-charter.md)
183
+ to every package README you author.
184
+
185
+ **Examples in this artifact:**
186
+ - Per the charter's default-terse rule, the package README opens
187
+ with one sentence: what installs, what it does.
188
+ - Per the cite-don't-restate principle, link upstream docs for
189
+ advanced topics; ship the minimal usage example only.
190
+ - Per the post-action summary suppression, no "What's new" block —
191
+ that belongs in `CHANGELOG.md`.
192
+
193
+ **Pre-save self-check:**
194
+ 1. Does the opening pitch include marketing adjectives?
195
+ 2. Is the minimal usage example over 10 lines when 5 would suffice?
196
+ 3. Are CI badges shipped without verifying that they resolve?
197
+ 4. Does the doc duplicate CHANGELOG content?
198
+
180
199
  ## Do NOT
181
200
 
182
201
  - Do NOT invent package capabilities or compatibility
@@ -9,8 +9,8 @@ source: package
9
9
  ## When to use
10
10
 
11
11
  Use this skill when:
12
- - Creating a new roadmap (`roadmap-create` command)
13
- - Executing a roadmap (`roadmap-execute` command)
12
+ - Creating a new roadmap (`/roadmap:create` command)
13
+ - Executing a roadmap (`/roadmap:process-step|phase|full` commands)
14
14
  - Checking roadmap progress
15
15
  - Updating roadmap status after completing work
16
16
 
@@ -119,8 +119,8 @@ Every roadmap follows this structure:
119
119
 
120
120
  Every roadmap implicitly includes the project's quality pipeline
121
121
  (static analysis, autofixes, tests). What's configurable is **when**
122
- the pipeline runs during `/roadmap execute`, controlled by
123
- `roadmap.quality_cadence` in `.agent-settings.yml`:
122
+ the pipeline runs during `/roadmap:process-step|phase|full`,
123
+ controlled by `roadmap.quality_cadence` in `.agent-settings.yml`:
124
124
 
125
125
  | Cadence | Pipeline runs | Trade-off |
126
126
  |---|---|---|
@@ -164,7 +164,7 @@ unfamiliar codebases.
164
164
  evidence-based reason (e.g. risky migration benefits from a spike).
165
165
  Never include release versions, deprecation dates, or git tags in
166
166
  the roadmap text. If the user declines, do **not** re-propose during
167
- `roadmap-execute`. Decline = silence. See [`scope-control`](../../rules/scope-control.md#decline--silence--no-re-asking-on-the-same-task).
167
+ `/roadmap:process-*`. Decline = silence. See [`scope-control`](../../rules/scope-control.md#decline--silence--no-re-asking-on-the-same-task).
168
168
  5. Save with a kebab-case filename (e.g. `optimize-webhook-jobs.md`).
169
169
  **Before writing**, scan the entire roadmap namespace for a
170
170
  collision — active, `archive/`, `skipped/`, and nested subdirs —
@@ -289,8 +289,8 @@ is rewritten by `.augment/scripts/update_roadmap_progress.py`.
289
289
  **Always regenerate in the SAME response** after any of the following
290
290
  (enforced by [`roadmap-progress-sync`](../../rules/roadmap-progress-sync.md)):
291
291
 
292
- - Creating a new roadmap (`roadmap-create`)
293
- - Marking a step `[x]`, `[~]`, or `[-]` during `roadmap-execute`
292
+ - Creating a new roadmap (`/roadmap:create`)
293
+ - Marking a step `[x]`, `[~]`, or `[-]` during `/roadmap:process-*`
294
294
  - Archiving or moving a roadmap to `skipped/`
295
295
  - Adding, renaming, or removing a phase
296
296
 
@@ -0,0 +1,157 @@
1
+ ---
2
+ name: roadmap-writing
3
+ description: "Use when authoring or rewriting a roadmap in agents/roadmaps/ — phase prose, goal sentence, acceptance criteria, council notes — even when the user just says 'write a plan for X' or 'draft a roadmap'."
4
+ source: package
5
+ ---
6
+
7
+ <!-- cloud_safe: degrade -->
8
+
9
+ # roadmap-writing
10
+
11
+ ## When to use
12
+
13
+ * Authoring a new roadmap file in `agents/roadmaps/{name}.md` (or
14
+ module-scoped under `app/Modules/{Module}/agents/roadmaps/`)
15
+ * Rewriting an existing roadmap (phase restructure, goal pivot,
16
+ council-pass integration — not a checkbox flip)
17
+ * Drafting a phase block, exit criteria, or rollback section that
18
+ will land inside an existing roadmap
19
+
20
+ Do NOT use this skill when:
21
+
22
+ * Flipping checkboxes, regenerating the dashboard, archiving on
23
+ completion → use [`roadmap-management`](../roadmap-management/SKILL.md)
24
+ * Updating AGENTS.md / module docs / contexts → use
25
+ [`agent-docs-writing`](../agent-docs-writing/SKILL.md)
26
+ * Capturing an architectural decision → use
27
+ [`adr-create`](../adr-create/SKILL.md)
28
+
29
+ ## Roadmap-writing vs roadmap-management — critical test
30
+
31
+ | Intent | Artifact |
32
+ |---|---|
33
+ | "I need to write the plan body" | **roadmap-writing** (this skill) |
34
+ | "I need to track progress / regenerate dashboard / archive" | **roadmap-management** |
35
+
36
+ This skill owns the **prose authoring** axis: structure, goal
37
+ sentence, phase blocks, acceptance criteria. The execution and
38
+ dashboard-sync axis stays in `roadmap-management`.
39
+
40
+ ## Procedure
41
+
42
+ ### 0. Drafting protocol
43
+
44
+ Authoring or materially rewriting a roadmap must go through
45
+ Understand → Research → Draft per the
46
+ [`artifact-drafting-protocol`](../../rules/artifact-drafting-protocol.md)
47
+ rule. Inspect existing roadmaps under `agents/roadmaps/` for overlap
48
+ or supersession before opening a new one.
49
+
50
+ ### 1. Read the canonical template first
51
+
52
+ The structure, frontmatter, lifecycle, and complexity-tier rules live
53
+ in [`.agent-src.uncompressed/templates/roadmaps.md`](../../templates/roadmaps.md).
54
+ Read it before authoring. Do not restate its rules in the roadmap
55
+ body — link the template if a phase needs to override one.
56
+
57
+ ### 2. Pick complexity tier honestly
58
+
59
+ Default `lightweight` (≤ 6 phases, ≤ 600 lines). Only use
60
+ `structural` when the change touches a contract, kernel rule, or
61
+ budget invariant — the complexity linter enforces it. Standard:
62
+ [`roadmap-complexity-standard`](../../../docs/contracts/roadmap-complexity-standard.md).
63
+
64
+ ### 3. Write the goal first
65
+
66
+ One sentence, top of file, decidable: "Reduce X by Y on flow Z."
67
+ Vague goals ("improve roadmaps") force every reader to re-derive
68
+ intent. If the goal needs three sentences, the roadmap is two
69
+ roadmaps.
70
+
71
+ ### 4. Phase blocks carry checkboxes
72
+
73
+ Every non-intro phase contains at least one `- [ ]`. Decision tables
74
+ and council-pass notes capture the *why*; checkboxes capture the
75
+ *what to do next*. Without checkboxes the phase is invisible to
76
+ `agents/roadmaps-progress.md` — enforced by
77
+ [`roadmap-progress-sync`](../../rules/roadmap-progress-sync.md)
78
+ Iron Law #2.
79
+
80
+ ### 5. Exit & rollback per phase
81
+
82
+ Each phase declares **exit criteria** (decidable signals that the
83
+ phase is done) and **rollback** (what to revert if the phase fails).
84
+ A phase without exit criteria is open-ended; a phase without
85
+ rollback assumes success.
86
+
87
+ ## Output format
88
+
89
+ A single Markdown file at `agents/roadmaps/{name}.md`:
90
+
91
+ 1. Frontmatter (`status`, `complexity`)
92
+ 2. `# Road to {short title}`
93
+ 3. One-sentence outcome blockquote
94
+ 4. `## Goal` — decidable target
95
+ 5. `## Prerequisites` — checkboxes
96
+ 6. `## Context` — why now, links to tickets
97
+ 7. Numbered `## Phase N — {name}` sections with checkboxes,
98
+ exit criteria, rollback
99
+ 8. `## Acceptance criteria` — final gates
100
+
101
+ ## Frugality Standards
102
+
103
+ Apply the [Frugality Charter](../../contexts/contracts/frugality-charter.md)
104
+ to every roadmap you author.
105
+
106
+ **Examples in this artifact:**
107
+ - Per the charter's default-terse rule, the goal sentence states the
108
+ outcome — no "This roadmap exists because…" ramp-up.
109
+ - Per the cite-don't-restate principle, link the canonical template
110
+ for structural rules; do not paste them into the roadmap.
111
+ - Per the post-action summary suppression, council-pass integration
112
+ notes append to the existing phase block — no new "Summary of
113
+ council passes" section.
114
+ - Per the cheap-question check, never propose a "lightweight vs.
115
+ structural" numbered choice when the diff makes the answer
116
+ decidable.
117
+
118
+ **Pre-save self-check:**
119
+ 1. Does the goal sentence open with the outcome, or with backstory?
120
+ 2. Does any phase block restate template rules instead of linking
121
+ them?
122
+ 3. Are checkboxes present in every non-intro phase?
123
+ 4. Are exit criteria decidable, or vibe-based ("looks good")?
124
+ 5. Is content duplicated from another roadmap (supersession instead)?
125
+
126
+ ## Do NOT
127
+
128
+ * Author a roadmap without a goal sentence.
129
+ * Restate `templates/roadmaps.md` rules inside the roadmap body.
130
+ * Include version numbers, target releases, or git tags — banned by
131
+ template rule 13 + [`scope-control`](../../rules/scope-control.md#git-operations--permission-gated).
132
+ * Plan automatic branch switches mid-roadmap (template rule 14).
133
+ * Ship a phase without checkboxes (`roadmap-progress-sync` Iron Law #2).
134
+ * Use ALL-CAPS Iron-Law fenced blocks — those belong in
135
+ [`kernel-membership`](../../../docs/contracts/kernel-membership.md)-listed
136
+ rules, not roadmaps.
137
+
138
+ ## Gotchas
139
+
140
+ - **No checkboxes in a phase** — `agents/roadmaps-progress.md` cannot
141
+ count the phase; the dashboard reports zero open work even though
142
+ the phase has prose. Enforced by `roadmap-progress-sync` Iron Law #2.
143
+ - **Vague goal sentence** — "Improve roadmap quality" forces every
144
+ reader to re-derive intent and blocks decidable acceptance.
145
+ - **Restating template rules** — pasting structural rules into the
146
+ roadmap body creates two sources of truth that drift over months.
147
+ - **Version numbers in phase names** — `Phase 1 — v1.8.0` violates
148
+ template rule 13 and `scope-control § git-operations`.
149
+ - **Author-during-execution branch switches** — the agent should not
150
+ propose a new branch mid-roadmap; that decision is fenced to
151
+ authoring time.
152
+
153
+ ## Examples
154
+
155
+ See `agents/roadmaps/archive/road-to-token-frugality.md`
156
+ (structural, multi-phase, council-integrated) and any
157
+ `agents/roadmaps/road-to-*.md` for canonical structure.
@@ -165,6 +165,28 @@ and body links (relative `../../docs/...`, rewriter handles depth).
165
165
  * Forgetting to run `python3 scripts/compress.py --generate-tools` — downstream tools stay stale.
166
166
  * Editing `.agent-src/rules/` or `.augment/rules/` directly — those are generated.
167
167
 
168
+ ## Frugality Standards
169
+
170
+ Apply the [Frugality Charter](../../contexts/contracts/frugality-charter.md)
171
+ to every rule you author.
172
+
173
+ **Examples in this artifact:**
174
+ - Per the charter's default-terse rule, no intent prose in the rule
175
+ body — start with the obligation, not a setup paragraph.
176
+ - Per the Iron-Law literal predicate, ALL-CAPS fenced obligations
177
+ belong only when the rule sits on the
178
+ [`kernel-membership`](../../../docs/contracts/kernel-membership.md)
179
+ list.
180
+ - Per the cheap-question check, the rule's "When to ask" guidance
181
+ must list decidable triggers, not vibe-based judgment.
182
+
183
+ **Pre-save self-check:**
184
+ 1. Does the rule body open with the obligation, or with a setup
185
+ paragraph?
186
+ 2. Are any examples mere narration (no decidable test)?
187
+ 3. Are ALL-CAPS Iron-Law blocks used outside a kernel-listed rule?
188
+ 4. Are interactions duplicated from another rule rather than linked?
189
+
168
190
  ## Do NOT
169
191
 
170
192
  * Do NOT inline long procedures
@@ -0,0 +1,226 @@
1
+ ---
2
+ name: script-writing
3
+ description: "Use when adding or editing any script under `scripts/` — `--quiet` flag, `_lib/script_output` helpers, silent Taskfile wiring, Iron-Law carve-outs — even when you just say 'add a check script for X'."
4
+ source: package
5
+ ---
6
+
7
+ <!-- cloud_safe: degrade -->
8
+
9
+ # script-writing
10
+
11
+ ## When to use
12
+
13
+ * Creating a new Python script in `scripts/{name}.py` (linters, checks, generators, measure tools)
14
+ * Editing an existing script that prints progress or success lines
15
+ * Wiring a script into `Taskfile.yml` or `taskfiles/*.yml`
16
+ * Reviewing a PR that adds scripts and asking "why does this still print on minimal?"
17
+
18
+ Do NOT use this skill when:
19
+
20
+ * The content is a one-off / archival under `scripts/ai_council/one_off_archive/` — those carry an `_one_off_` prefix and are exempt from the verbosity convention
21
+ * The content is a shell entrypoint with secret prompts (install-keys, release confirms) → see § 3 Iron-Law carve-outs
22
+ * The content is a `.mjs` / Node script under `scripts/cost/` — different runtime; convention covered in `agents/contexts/cost-tracking.md`
23
+
24
+ ## Script vs other writers — critical test
25
+
26
+ | Intent | Artifact |
27
+ |---|---|
28
+ | "Maintenance script the agent or CI runs" | **This skill** |
29
+ | "User types `/foo` to invoke" | `command-writing` |
30
+ | "Constraint the agent must always honor" | `rule-writing` |
31
+ | "Reference knowledge agents cite" | `guideline-writing` |
32
+
33
+ Scripts orchestrate file checks, generators, and validators. They are
34
+ neither user-invoked nor agent-routed — `task` and CI call them.
35
+
36
+ ## Procedure
37
+
38
+ ### 0. Run the Drafting Protocol
39
+
40
+ Creating or materially rewriting a script that joins the linter / check
41
+ family **must** go through Understand → Research → Draft from the
42
+ [`artifact-drafting-protocol`](../../rules/artifact-drafting-protocol.md) rule.
43
+
44
+ * **Understand** — what failure does this script catch that no existing
45
+ check catches? Is it a one-off (then archive it) or evergreen?
46
+ * **Research** — `ls scripts/check_*.py scripts/lint_*.py`, grep for
47
+ overlap, skim 1–2 peer scripts (e.g. `lint_handoffs.py`,
48
+ `check_md_language.py`).
49
+ * **Draft** — propose name + one-line purpose first. Only fill the body
50
+ after the shape is confirmed.
51
+
52
+ ### 1. `--quiet` flag — argparse + sys.argv fallback
53
+
54
+ Every `check_*.py` / `lint_*.py` script MUST accept `--quiet` so the
55
+ silent Taskfile layer (§ 4) can suppress success-only output.
56
+
57
+ **With argparse (preferred):**
58
+
59
+ ```python
60
+ parser = argparse.ArgumentParser(...)
61
+ parser.add_argument("--quiet", action="store_true",
62
+ help="Only print on failure")
63
+ args = parser.parse_args()
64
+ ...
65
+ if not args.quiet:
66
+ print("✅ All clean")
67
+ ```
68
+
69
+ **Plain script (no argparse) fallback:**
70
+
71
+ ```python
72
+ import sys
73
+
74
+ QUIET = "--quiet" in sys.argv
75
+ ...
76
+ if not QUIET:
77
+ print("✅ All clean")
78
+ ```
79
+
80
+ Failure output (`❌`, non-zero exit) is **never** gated — failures must
81
+ always print regardless of `--quiet`.
82
+
83
+ ### 2. `_lib/script_output` helpers — preferred for new scripts
84
+
85
+ For anything richer than a single `✅`/`❌`, import the verbosity-aware
86
+ router instead of raw `print()`:
87
+
88
+ ```python
89
+ from _lib.script_output import info, success, warn, error, flush_summary
90
+
91
+ info("Loading manifest") # drops on silent + minimal
92
+ success("Wrote 3 files") # collected at minimal, printed at verbose
93
+ warn("Skipping stale entry") # stderr unless silent
94
+ error("Manifest missing") # stderr always
95
+
96
+ flush_summary("Done — 3 entries") # one-line summary at minimal
97
+ ```
98
+
99
+ Resolution order (first wins, cached for the process):
100
+
101
+ 1. `AGENT_SCRIPT_VERBOSITY` env (`silent` / `minimal` / `verbose`)
102
+ 2. `SCRIPT_OUTPUT_VERBOSE=1` alias (== `verbose`)
103
+ 3. `.agent-settings.yml` → `verbosity.script_output`
104
+ 4. Default `minimal`
105
+
106
+ The resolved level is exported back into `AGENT_SCRIPT_VERBOSITY` so
107
+ child processes inherit it. Tests reset via `reset_level()` from the
108
+ same module — see `tests/test_script_output.py`.
109
+
110
+ ### 3. Iron-Law carve-outs — never silenced
111
+
112
+ The following surfaces **MUST** use plain `print()` and never the
113
+ helpers, so verbosity settings cannot suppress them:
114
+
115
+ * Release confirms — every task in `taskfiles/release.yml`
116
+ * Secret prompts — `install-anthropic-key`, `install-openai-key`,
117
+ `setup-evals`, `install-hooks` interactive sections
118
+ * `runtime-e2e` and `test-triggers-live`
119
+ * CI orchestration sentinels — `_ci-start`, `_ci-end`, root `ci`
120
+ * Any prompt that asks the user for confirmation per
121
+ [`non-destructive-by-default`](../../rules/non-destructive-by-default.md) — Hard Floor cannot be silenced
122
+
123
+ If unsure, check `scripts/ai_council/one_off_archive/2026-05/_one_off_silent_taskfiles.py`
124
+ `CARVE_OUTS` for the canonical list.
125
+
126
+ ### 4. Taskfile wiring — `silent: true` + `{{.QUIET_FLAG}}`
127
+
128
+ Every Taskfile task that wraps a `--quiet`-aware script MUST set
129
+ `silent: true` and pass `{{.QUIET_FLAG}}` to the script:
130
+
131
+ ```yaml
132
+ # Per-task in taskfiles/*.yml:
133
+ tasks:
134
+ lint-handoffs:
135
+ silent: true
136
+ cmd: python3 scripts/lint_handoffs.py {{.QUIET_FLAG}}
137
+ ```
138
+
139
+ The `QUIET_FLAG` var is defined once at the root of `Taskfile.yml`
140
+ and resolves to `""` only when `AGENT_SCRIPT_VERBOSITY=verbose`:
141
+
142
+ ```yaml
143
+ # Root Taskfile.yml — already in place, do not duplicate:
144
+ vars:
145
+ QUIET_FLAG:
146
+ sh: '[ "$AGENT_SCRIPT_VERBOSITY" = "verbose" ] && echo "" || echo "--quiet"'
147
+ ```
148
+
149
+ Carve-out tasks (release, install secrets, CI orchestration — see § 3)
150
+ do **not** add `silent: true` and do **not** use `{{.QUIET_FLAG}}`.
151
+
152
+ ### 5. Validate
153
+
154
+ * Run `python3 scripts/skill_linter.py .agent-src.uncompressed/skills/script-writing/SKILL.md` → 0 FAIL
155
+ * Run `python3 scripts/{your-script}.py --quiet` and the verbose path — exit code 0 on clean, non-zero on failure regardless of flag
156
+ * If the script uses `_lib/script_output`, add a test under `tests/` patterned on `tests/test_script_output.py` — assert `silent` / `minimal` / `verbose` behave per § 2
157
+ * Run the full CI pipeline locally (see `Taskfile.yml` in this repo for the script list) — must exit 0 except for tolerated warnings
158
+
159
+ ## Output format
160
+
161
+ 1. Script file at `scripts/{name}.py` with `--quiet` accepted
162
+ 2. Taskfile wiring with `silent: true` + `{{.QUIET_FLAG}}` (unless carve-out)
163
+ 3. Test under `tests/` if `_lib/script_output` is used
164
+ 4. Linter output showing 0 FAIL
165
+
166
+ ## Gotchas
167
+
168
+ * Forgetting `--quiet` — the silent Taskfile layer wraps the script and the call fails with `unrecognized arguments: --quiet`
169
+ * Gating `❌` failures behind `--quiet` — failures must always print
170
+ * Using raw `print()` for progress lines — drops on `minimal`, no inheritance
171
+ * Adding `silent: true` to a release / install-keys task — bypasses the Hard Floor confirmation
172
+ * Editing `Taskfile.yml`'s `QUIET_FLAG` var — single source of truth, do not duplicate
173
+ * Forgetting that `from _lib.script_output import …` requires the script's resolution to walk up to `scripts/` — copy the `Path(__file__).resolve().parent` pattern from a peer
174
+
175
+ ## Frugality Standards
176
+
177
+ Apply the [Frugality Charter](../../contexts/contracts/frugality-charter.md)
178
+ to every script you author. Phase 10 of the charter (settings hooks
179
+ row — `verbosity.script_output` / `verbosity.taskfile_command_echo`)
180
+ is what this skill exists to teach.
181
+
182
+ **Examples in this artifact:**
183
+ - Per the charter's default-terse rule, success lines are gated behind
184
+ `--quiet` so the only thing visible at `minimal` is the end-of-run
185
+ summary or a failure.
186
+ - Per the post-action summary suppression, scripts with multi-step
187
+ output collect via `success()` and emit one `flush_summary()` line.
188
+ - Per the cheap-question check, scripts never prompt unless they hit
189
+ a Hard Floor surface (§ 3 carve-outs).
190
+
191
+ **Pre-save self-check:**
192
+ 1. Does every `print("✅ ...")` line sit behind `--quiet` / the helper?
193
+ 2. Does the script add `silent: true` + `{{.QUIET_FLAG}}` to its
194
+ Taskfile entry (unless a carve-out)?
195
+ 3. Are failure lines (`❌`, exit non-zero) **never** gated by quiet?
196
+ 4. Are Iron-Law surfaces using plain `print()` and not the helper?
197
+
198
+ ## Do NOT
199
+
200
+ * Do NOT gate `❌` / failure output behind `--quiet`
201
+ * Do NOT use `_lib/script_output` for release confirms or secret prompts
202
+ * Do NOT add `silent: true` to carve-out tasks
203
+ * Do NOT hardcode `print()` for progress in new scripts — use `info()`
204
+ * Do NOT skip the Taskfile wiring — without it the verbosity gates leak
205
+ * Do NOT edit `.agent-src/`, `.augment/`, or `.claude/` projections
206
+
207
+ ## Cloud Behavior
208
+
209
+ On cloud surfaces (Claude.ai Web, Skills API) the package's `task`
210
+ runner and `_lib/script_output` are not reachable. The skill still
211
+ applies — with prose-only validation:
212
+
213
+ * Emit the full script + Taskfile snippet as copyable Markdown blocks. Do not attempt to write to disk.
214
+ * Self-check: `--quiet` accepted, failures never gated, success lines gated, helper imports look syntactically right.
215
+ * Tell the user to save under `scripts/{name}.py`, wire the Taskfile entry, and run `task lint-skills && task ci` locally before committing.
216
+ * Skip every reference to running the linter or `task` commands yourself — they only run on the user's machine.
217
+
218
+ ## Examples
219
+
220
+ Good description (trigger-shaped, names domain + symptoms):
221
+
222
+ > "Use when adding or editing any script under `scripts/` — `--quiet` flag, `_lib/script_output` helpers, silent Taskfile wiring, Iron-Law carve-outs — even when you just say 'add a check script for X'."
223
+
224
+ Bad description (vague, no trigger):
225
+
226
+ > "Script conventions"