@warpgogol/forge 2.9.2 → 2.9.5

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 (181) hide show
  1. package/README.md +14 -8
  2. package/README.uk.md +14 -0
  3. package/dist/bin/cli.js +0 -0
  4. package/dist/os/adr/handlers/implement-stamp.d.ts.map +1 -1
  5. package/dist/os/adr/handlers/implement-stamp.js +7 -1
  6. package/dist/os/adr/handlers/implement-stamp.js.map +1 -1
  7. package/dist/os/adr/handlers/list-create.d.ts.map +1 -1
  8. package/dist/os/adr/handlers/list-create.js +40 -4
  9. package/dist/os/adr/handlers/list-create.js.map +1 -1
  10. package/dist/os/adr/handlers/validate.d.ts.map +1 -1
  11. package/dist/os/adr/handlers/validate.js +17 -3
  12. package/dist/os/adr/handlers/validate.js.map +1 -1
  13. package/dist/os/adr/types.d.ts +1 -0
  14. package/dist/os/adr/types.d.ts.map +1 -1
  15. package/dist/os/adr/types.js +1 -0
  16. package/dist/os/adr/types.js.map +1 -1
  17. package/dist/os/compass/handlers/compass-audit-handler.d.ts.map +1 -1
  18. package/dist/os/compass/handlers/compass-audit-handler.js +22 -0
  19. package/dist/os/compass/handlers/compass-audit-handler.js.map +1 -1
  20. package/dist/os/compass/handlers/compass-change-summary-handler.d.ts.map +1 -1
  21. package/dist/os/compass/handlers/compass-change-summary-handler.js +6 -0
  22. package/dist/os/compass/handlers/compass-change-summary-handler.js.map +1 -1
  23. package/dist/os/compass/handlers/compass-inventory-handler.d.ts.map +1 -1
  24. package/dist/os/compass/handlers/compass-inventory-handler.js +19 -0
  25. package/dist/os/compass/handlers/compass-inventory-handler.js.map +1 -1
  26. package/dist/os/core/handlers/package-health.d.ts.map +1 -1
  27. package/dist/os/core/handlers/package-health.js +8 -4
  28. package/dist/os/core/handlers/package-health.js.map +1 -1
  29. package/dist/os/core/handlers/pinned-validate.d.ts.map +1 -1
  30. package/dist/os/core/handlers/pinned-validate.js +2 -2
  31. package/dist/os/core/handlers/pinned-validate.js.map +1 -1
  32. package/dist/os/exploration/handlers/archive.d.ts.map +1 -1
  33. package/dist/os/exploration/handlers/archive.js +6 -0
  34. package/dist/os/exploration/handlers/archive.js.map +1 -1
  35. package/dist/os/exploration/handlers/list.d.ts.map +1 -1
  36. package/dist/os/exploration/handlers/list.js +8 -0
  37. package/dist/os/exploration/handlers/list.js.map +1 -1
  38. package/dist/os/exploration/handlers/show.d.ts.map +1 -1
  39. package/dist/os/exploration/handlers/show.js +6 -0
  40. package/dist/os/exploration/handlers/show.js.map +1 -1
  41. package/dist/os/program/handlers/complete.d.ts.map +1 -1
  42. package/dist/os/program/handlers/complete.js +19 -1
  43. package/dist/os/program/handlers/complete.js.map +1 -1
  44. package/dist/os/program/handlers/lease.js +7 -1
  45. package/dist/os/program/handlers/lease.js.map +1 -1
  46. package/dist/os/program/handlers/seal.d.ts.map +1 -1
  47. package/dist/os/program/handlers/seal.js +13 -1
  48. package/dist/os/program/handlers/seal.js.map +1 -1
  49. package/dist/os/program/handlers/validate.js +8 -2
  50. package/dist/os/program/handlers/validate.js.map +1 -1
  51. package/dist/os/rfc/acceptance.d.ts.map +1 -1
  52. package/dist/os/rfc/acceptance.js +8 -0
  53. package/dist/os/rfc/acceptance.js.map +1 -1
  54. package/dist/os/rfc/dna-trace.js +1 -1
  55. package/dist/os/rfc/dna-trace.js.map +1 -1
  56. package/dist/os/rfc/handlers/check.d.ts.map +1 -1
  57. package/dist/os/rfc/handlers/check.js +10 -2
  58. package/dist/os/rfc/handlers/check.js.map +1 -1
  59. package/dist/os/rfc/handlers/implement-stamp.d.ts.map +1 -1
  60. package/dist/os/rfc/handlers/implement-stamp.js +7 -1
  61. package/dist/os/rfc/handlers/implement-stamp.js.map +1 -1
  62. package/dist/os/rfc/handlers/index-graph.js +4 -4
  63. package/dist/os/rfc/handlers/index-graph.js.map +1 -1
  64. package/dist/os/rfc/handlers/lifecycle.js +1 -1
  65. package/dist/os/rfc/handlers/lifecycle.js.map +1 -1
  66. package/dist/os/rfc/handlers/list-create.d.ts.map +1 -1
  67. package/dist/os/rfc/handlers/list-create.js +20 -0
  68. package/dist/os/rfc/handlers/list-create.js.map +1 -1
  69. package/dist/os/rfc/handlers/validate.d.ts.map +1 -1
  70. package/dist/os/rfc/handlers/validate.js +17 -3
  71. package/dist/os/rfc/handlers/validate.js.map +1 -1
  72. package/dist/os/session/handlers/validate.d.ts.map +1 -1
  73. package/dist/os/session/handlers/validate.js +17 -3
  74. package/dist/os/session/handlers/validate.js.map +1 -1
  75. package/dist/os/spec/live-spec-list.d.ts.map +1 -1
  76. package/dist/os/spec/live-spec-list.js +8 -0
  77. package/dist/os/spec/live-spec-list.js.map +1 -1
  78. package/dist/os/spec/live-spec-merge.js +2 -2
  79. package/dist/os/spec/live-spec-merge.js.map +1 -1
  80. package/dist/os/spec/live-spec-show.d.ts.map +1 -1
  81. package/dist/os/spec/live-spec-show.js +6 -0
  82. package/dist/os/spec/live-spec-show.js.map +1 -1
  83. package/dist/os/spec/live-spec-validate.js +2 -2
  84. package/dist/os/spec/live-spec-validate.js.map +1 -1
  85. package/dist/os/spec/spec-materialize.d.ts.map +1 -1
  86. package/dist/os/spec/spec-materialize.js +6 -0
  87. package/dist/os/spec/spec-materialize.js.map +1 -1
  88. package/dist/os/spec/spec-status.d.ts.map +1 -1
  89. package/dist/os/spec/spec-status.js +6 -0
  90. package/dist/os/spec/spec-status.js.map +1 -1
  91. package/dist/os/spec/spec-validate.js +1 -1
  92. package/dist/os/spec/spec-validate.js.map +1 -1
  93. package/dist/os/werkstatt/handlers/werkstatt-lock-recover.d.ts.map +1 -1
  94. package/dist/os/werkstatt/handlers/werkstatt-lock-recover.js +8 -0
  95. package/dist/os/werkstatt/handlers/werkstatt-lock-recover.js.map +1 -1
  96. package/dist/os/werkstatt/handlers/werkstatt-lock-status.d.ts.map +1 -1
  97. package/dist/os/werkstatt/handlers/werkstatt-lock-status.js +8 -0
  98. package/dist/os/werkstatt/handlers/werkstatt-lock-status.js.map +1 -1
  99. package/dist/os/workflow/handlers.d.ts.map +1 -1
  100. package/dist/os/workflow/handlers.js +9 -1
  101. package/dist/os/workflow/handlers.js.map +1 -1
  102. package/dist/src/onboarding/create.js +1 -1
  103. package/dist/src/onboarding/create.js.map +1 -1
  104. package/dist/src/onboarding/doctor.js +1 -1
  105. package/dist/src/onboarding/doctor.js.map +1 -1
  106. package/dist/src/onboarding/init.d.ts.map +1 -1
  107. package/dist/src/onboarding/init.js +31 -1
  108. package/dist/src/onboarding/init.js.map +1 -1
  109. package/dist/src/onboarding/profile-validate.js +1 -1
  110. package/dist/src/onboarding/profile-validate.js.map +1 -1
  111. package/dist/src/utils/fs-trash.d.ts.map +1 -1
  112. package/dist/src/utils/fs-trash.js +1 -1
  113. package/dist/src/utils/fs-trash.js.map +1 -1
  114. package/dist/src/validators/note-frontmatter-validate.js +1 -1
  115. package/dist/src/validators/note-frontmatter-validate.js.map +1 -1
  116. package/dist/src/validators/note-link-validate.js +1 -1
  117. package/dist/src/validators/note-link-validate.js.map +1 -1
  118. package/os/adr/adr-0000-template.md +46 -0
  119. package/os/adr/handlers/implement-stamp.ts +7 -1
  120. package/os/adr/handlers/list-create.ts +48 -4
  121. package/os/adr/handlers/validate.ts +15 -3
  122. package/os/adr/types.ts +1 -0
  123. package/os/compass/handlers/compass-audit-handler.ts +24 -0
  124. package/os/compass/handlers/compass-change-summary-handler.ts +6 -0
  125. package/os/compass/handlers/compass-inventory-handler.ts +19 -0
  126. package/os/core/handlers/package-health.ts +9 -5
  127. package/os/core/handlers/pinned-validate.ts +4 -2
  128. package/os/exploration/handlers/archive.ts +6 -0
  129. package/os/exploration/handlers/list.ts +9 -0
  130. package/os/exploration/handlers/show.ts +6 -0
  131. package/os/program/handlers/complete.ts +19 -1
  132. package/os/program/handlers/lease.ts +7 -1
  133. package/os/program/handlers/seal.ts +13 -1
  134. package/os/program/handlers/validate.ts +8 -2
  135. package/os/rfc/acceptance.ts +9 -0
  136. package/os/rfc/dna-trace.ts +1 -1
  137. package/os/rfc/handlers/check.ts +10 -2
  138. package/os/rfc/handlers/implement-stamp.ts +7 -1
  139. package/os/rfc/handlers/index-graph.ts +4 -4
  140. package/os/rfc/handlers/lifecycle.ts +1 -1
  141. package/os/rfc/handlers/list-create.ts +21 -0
  142. package/os/rfc/handlers/validate.ts +15 -3
  143. package/os/rfc/rfc-0000-template.md +16 -20
  144. package/os/session/handlers/validate.ts +15 -3
  145. package/os/spec/live-spec-list.ts +8 -0
  146. package/os/spec/live-spec-merge.ts +2 -2
  147. package/os/spec/live-spec-show.ts +6 -0
  148. package/os/spec/live-spec-validate.ts +2 -2
  149. package/os/spec/spec-materialize.ts +6 -0
  150. package/os/spec/spec-status.ts +6 -0
  151. package/os/spec/spec-validate.ts +1 -1
  152. package/os/werkstatt/handlers/werkstatt-lock-recover.ts +9 -0
  153. package/os/werkstatt/handlers/werkstatt-lock-status.ts +9 -0
  154. package/os/workflow/handlers.ts +10 -1
  155. package/package.json +73 -195
  156. package/skills/_shared/fo-pipeline-conventions.md +44 -5
  157. package/skills/_shared/fo-prerequisites.md +81 -0
  158. package/skills/fo/fo-extract-dna/SKILL.md +1 -1
  159. package/skills/fo/fo-idea-audit/AUDIT-AXES.md +66 -0
  160. package/skills/fo/fo-idea-audit/SKILL.md +2 -2
  161. package/skills/fo/fo-idea-create-adr/SKILL.md +1 -1
  162. package/skills/fo/fo-idea-create-rfc/SKILL.md +3 -3
  163. package/skills/fo/fo-idea-enhance/SKILL.md +2 -2
  164. package/skills/fo/fo-idea-implement/ADR-FLOW.md +179 -0
  165. package/skills/fo/fo-idea-implement/SKILL.md +1 -1
  166. package/skills/fo/fo-idea-plan/SKILL.md +4 -2
  167. package/skills/fo/fo-review/AXES.md +70 -0
  168. package/skills/fo/fo-session-retro/learned-principles.md +15 -0
  169. package/skills/fo/fo-step-commit/SKILL.md +2 -2
  170. package/skills/shared/windows-ai-tooling/.gitattributes.template +49 -0
  171. package/skills/shared/windows-ai-tooling/AGENTS_WINDOWS.md.template +42 -0
  172. package/skills/shared/writing-great-skills/GLOSSARY.md +201 -0
  173. package/src/onboarding/create.ts +1 -1
  174. package/src/onboarding/doctor.ts +1 -1
  175. package/src/onboarding/init.ts +30 -1
  176. package/src/onboarding/profile-validate.ts +1 -1
  177. package/src/tests/package-files.test.ts +5 -2
  178. package/src/tests/stack-profile.test.ts +4 -0
  179. package/src/utils/fs-trash.ts +1 -1
  180. package/src/validators/note-frontmatter-validate.ts +1 -1
  181. package/src/validators/note-link-validate.ts +1 -1
@@ -0,0 +1,201 @@
1
+ # Glossary — Building Great Skills
2
+
3
+ The domain model for what makes a skill great. A skill exists to wrangle determinism out of a stochastic system; the root virtue is **Predictability**, and every term below is a lever on it. This is the disclosed reference for [`writing-great-skills`](SKILL.md).
4
+
5
+ The terms are grouped by axis: **Invocation** (how a skill is reached), **Information Hierarchy** (how its content is arranged), **Steering** (how the agent's runtime behaviour is shaped), and **Pruning** (how it is kept lean). Each **failure mode** lives beside the lever that cures it, tagged _failure mode_.
6
+
7
+ **Bold terms** in any definition are themselves defined in this glossary; find them by their heading.
8
+
9
+ ## Predictability
10
+
11
+ The degree to which a skill makes the agent behave the same _way_ on every run — the same process, not the same output (a brainstorming skill should _predictably_ diverge; its tokens vary, its behaviour doesn't). The root virtue every other term serves — cost and maintainability are symptoms of it, not rivals.
12
+
13
+ _Avoid_: consistency, reliability, robustness, output-determinism
14
+
15
+ ## Invocation
16
+
17
+ How a skill is reached — and the two loads you pay for the choice.
18
+
19
+ ### Model-Invoked
20
+
21
+ A skill that keeps its **description** field, so the agent can see it and fire it autonomously — and the human can still type its name, so model-invocation always _includes_ user reach. There is no model-only state: a description only ever _adds_ agent discovery, never removes the human's. Pays a permanent **context load** on every turn in exchange for that discoverability. Reachable by other skills, because the description that makes it agent-discoverable makes it invocable. A model-invoked skill whose content is all **reference** is also one home for shared reference: another skill can invoke it, so reference needed by several skills lives in one place. Pick model-invocation only when the agent must reach the skill on its own; if it never fires except by hand, drop the description and pay no context load.
22
+
23
+ _Avoid_: ability, tool, capability
24
+
25
+ ### User-Invoked
26
+
27
+ A skill with its **description** stripped — invisible to the agent and reachable only by the human typing its name (user-_only_, where **model-invoked** is user-_and-agent_). Trades agent-discoverability for zero **context load**. Because it has no description, nothing but the human can reach it: no other skill can fire it.
28
+
29
+ _Avoid_: procedure, workflow, command
30
+
31
+ ### Description
32
+
33
+ The skill's machine-readable trigger, and the one **context pointer** a **model-invoked** skill is forced to keep loaded at all times. Its mere presence _is_ the invocation axis: keep it and the skill is model-invoked (and reachable by other skills); delete it and the skill is **user-invoked**, reachable only by the human. The source of a model-invoked skill's **context load**.
34
+
35
+ _Avoid_: frontmatter, summary
36
+
37
+ ### Context Pointer
38
+
39
+ A reference held in the agent's context that names some out-of-context material and encodes the condition for reaching it. The **description** is the top-level context pointer (context window → skill); pointers to disclosed files are the same object one level down. Its wording, not the target, decides _when_ the agent reaches — and _how reliably_. A must-have target behind a weakly worded pointer is a variance bug: fix the wording first, and inline the material only if sharpening fails.
40
+
41
+ _Avoid_: link, reference, import
42
+
43
+ ### Context Load
44
+
45
+ The cost a **model-invoked** skill imposes on the agent's context window — its **description**, always loaded, spending both tokens and attention. What **user-invoked** skills escape by having no description, and the brake on splitting into more model-invoked skills.
46
+
47
+ _Avoid_: token cost, context bloat
48
+
49
+ ### Cognitive Load
50
+
51
+ The cost a **user-invoked** skill imposes on the human — what they must hold in their head: which skills exist and when to reach for each (the human is the index). What **model-invocation** removes by being agent-discoverable, and the brake on splitting into more user-invoked skills. Not a cost to minimise: it is the price of human agency, the reason some skills stay user-invoked. Spend it where human judgement matters; remove it where it does not.
52
+
53
+ _Avoid_: human index, burden, overhead
54
+
55
+ ### Router Skill
56
+
57
+ A **user-invoked** skill whose job is to point at your other user-invoked skills — naming each and when to reach for it — so the human has one skill to remember instead of many. It can only hint, never fire them: user-invoked skills have no **description**, so nothing but the human can reach them. The cure for **cognitive load** when user-invoked skills multiply.
58
+
59
+ _Avoid_: dispatcher, menu, registry, index, router procedure
60
+
61
+ ### Granularity
62
+
63
+ How finely you divide skills. Finer division spends one of the two loads: more **model-invoked** skills spend **context load** (more descriptions crowding the window and competing for attention); more **user-invoked** skills spend **cognitive load** (more for the human to remember and reach for). Two cuts guide the division. By **invocation**, split off a model-invoked skill where you have a distinct **leading word** to trigger it — a trigger word you actually use in your prompts. By **sequence**, split a run of **steps** where a step's **post-completion steps** need hiding, since isolating it in its own context clears what follows. Beware the reverse: merging sequences exposes each step's post-completion steps to what follows, inviting premature completion.
64
+
65
+ _Avoid_: chunking, modularity
66
+
67
+ ## Information Hierarchy
68
+
69
+ How a skill's content is arranged, and how far down the ladder each piece sits.
70
+
71
+ ### Information Hierarchy
72
+
73
+ A skill's content ranked by how immediately the agent needs it — a single ladder, produced by two cuts: in-file or behind a pointer, and step or reference. The rungs:
74
+
75
+ - **Steps** — in-file, primary
76
+ - **Reference**, in-file — secondary
77
+ - **Reference**, disclosed — behind a **context pointer**
78
+
79
+ A skill with no **steps** uses just the bottom two rungs — often a legitimately flat peer-set (e.g. every rule of a review on one rung), which is a fine arrangement, not a smell. The hierarchy is independent of invocation: a skill can be model- or user-invoked whether it is all steps, all reference, or both. When a skill has steps, in-file reference that should be disclosed buries them and turns attending to them into a coin-flip — a variance lever, not just a legibility one. Keep the top of the ladder legible; push down it whatever you can.
80
+
81
+ _Avoid_: structure, organization, layout
82
+
83
+ ### Steps
84
+
85
+ The ordered actions the agent performs — when a skill has them, the primary tier of its content, and the part that earns its place in SKILL.md. Not every skill has steps: a skill can be all steps (`tdd`), all **reference** (a review), or both, independent of invocation. Every step ends on a **completion criterion**, clear or vague.
86
+
87
+ _Avoid_: workflow, instructions, choreography
88
+
89
+ ### Reference
90
+
91
+ Material the agent refers to on demand — definitions, facts, parameters, examples, conditional instructions. When a skill has **steps** it is secondary to them; when a skill has none it is the entire content; or it lives outside any skill entirely — see **External Reference**. Reached via **context pointers**, and the prime candidate for **progressive disclosure**.
92
+
93
+ _Avoid_: supporting material, docs, background
94
+
95
+ ### External Reference
96
+
97
+ **Reference** that lives outside the skill system — a plain file, no **description**, no **steps**, not invocable — that any skill can point at. The home for shared reference that needn't fire on its own, and the only shared home two **user-invoked** skills can use, since neither has a description and so neither can fire the other.
98
+
99
+ _Avoid_: doc, resource, knowledge base
100
+
101
+ ### Progressive Disclosure
102
+
103
+ Moving **reference** down the ladder — out of SKILL.md and behind a **context pointer** — so the top stays legible. Not primarily a token optimisation; it is how the **information hierarchy** is protected. Licensed by **branching**: disclose what only some branches need, inline what every path needs, and if a pointer fires unreliably on must-have material, sharpen its wording, and pull it back inline only if that fails.
104
+
105
+ _Avoid_: lazy loading, chunking
106
+
107
+ ### Co-location
108
+
109
+ Keeping the material an agent needs at once in one place — a concept's definition, rules, and caveats under a single heading, not scattered across the file — so reading one part brings its neighbours with it. The within-file companion to the **Information Hierarchy**: the hierarchy ranks _how far down_ a piece sits; co-location decides _what sits beside it_ once there. There is no formula for the right format of a body of **reference**; the test is that a skill should read like documentation written for the agent, and grouped material reads that way where scattered material does not. Distinct from **Duplication**: that repeats one meaning in two places, where scattering fragments a single meaning across many.
110
+
111
+ _Avoid_: grouping, clustering, cohesion
112
+
113
+ ### Sprawl
114
+
115
+ _Failure mode._ A skill that is simply too long — too many lines in SKILL.md — independent of whether they are stale or repeated. Even an all-live, all-unique skill can sprawl. It costs readability (the agent wades through more before it can act, and attention thins across the excess), maintainability (every extra line is one more to keep **relevant**), and tokens. The cure is the **information hierarchy**: push **reference** down behind **context pointers**, and split by **branch** or sequence so each path carries only what it needs. Distinct from **sediment** (length from stale accumulation) and **duplication** (length from repeated meaning) — sprawl is length itself, whatever its cause.
116
+
117
+ _Avoid_: bloat, length, size, verbosity
118
+
119
+ ## Steering
120
+
121
+ The levers that shape the agent's runtime behaviour toward **Predictability**.
122
+
123
+ ### Branch
124
+
125
+ A distinct way a skill can be invoked — a case the skill handles — so different runs take different paths through it. A skill with many steps may carry many branches; a linear one has none.
126
+
127
+ _Avoid_: path, case, fork
128
+
129
+ ### Leading Word
130
+
131
+ A compact concept — also called a _Leitwort_ — already living in the model's pretraining, that the agent thinks with while running the skill. It encodes a behavioural principle in the fewest possible tokens by invoking priors the model already holds (e.g. _lesson_, _proximal zone of development_, _fog of war_, _tracer bullets_). Repeated as a token, never as a sentence, it accumulates a distributed definition across the skill and anchors a whole region of behaviour. Coining your own works if you define it clearly, but a made-up word recruits no priors — you pay in definition tokens what a pretrained word gives free. Reach for an existing word first.
132
+
133
+ A leading word serves **predictability** twice. In the body it anchors **execution** — the agent reaches for the same behaviour every time the concept appears, and inside flat reference it focuses attention on a class of thing to look for, recruiting the right checks each run. In the **description** it anchors **invocation** — and not only within the skill: when the same word lives in your prompts, your docs, and your codebase, the agent links that shared language to the skill and fires it more reliably. Word a description with the leading words you actually use when you want the skill.
134
+
135
+ _Avoid_: keyword, term, motif
136
+
137
+ ### Completion Criterion
138
+
139
+ The condition that tells the agent a unit of work is done — the target it judges against. Two properties make it a lever, not just a quality. Its **clarity** (can the agent tell done from not-done?) resists **premature completion** — a vague bound ("understanding reached") lets the agent declare done and slip to the next step; this axis needs _steps_ to bite, since premature completion is a between-steps failure. Its **demand** (how much it requires) sets **legwork** — "every modified model accounted for" forces thorough work where "produce a change list" does not — and this axis is _not_ step-bound: it can bind a body of flat reference too, which is how a skill with no steps still carries an exhaustiveness bar ("every rule applied"). The strongest criteria are both checkable and exhaustive.
140
+
141
+ _Avoid_: done condition, exit condition, stopping rule
142
+
143
+ ### Legwork
144
+
145
+ The work an agent does behind the scenes within a single step — reading files, exploring the codebase, making changes, digging up what it needs rather than offloading to the user. It lives below the step structure: never written as its own step, latent in the wording, controlled by the agent rather than the skill. The within-step counterpart to **post-completion steps**' across-step pull. Raised by a **leading word** (_comprehensive_, _thorough_) or a **completion criterion** that demands the work be exhaustive — including the demand axis applied to flat reference, which is what drives a skill of flat reference to cover all its rungs. Goes thin either when that demand is missing or when **premature completion** cuts the step short.
146
+
147
+ _Avoid_: scope, effort, diligence, coverage
148
+
149
+ ### Post-Completion Steps
150
+
151
+ The **steps** that follow the current step. Visible, they pull the agent forward into **premature completion** — the more it sees, the stronger the tug; the defence is to hide them by splitting the sequence of steps into two.
152
+
153
+ _Avoid_: horizon, fog of war, lookahead
154
+
155
+ ### Premature Completion
156
+
157
+ _Failure mode._ Ending the current step before it is genuinely done, because the agent's attention slips to being done rather than to the work. A between-steps failure: it needs **steps** to occur — a skill with no steps that quits early isn't premature completion but thin **legwork** under an unmet demand. A tug-of-war between two forces: visible **post-completion steps** (the pull forward) and the **completion criterion**'s clarity (the resistance — a sharp, checkable bar holds; a vague one gives way). Fuzziness is the necessary condition: a sharp bound resists the pull no matter how many later steps are visible, so a step that never rushes needs no defending. Two levers hold a step that does, but reach for them in order: **sharpen the bound first** — it is local and cheap. Only when the criterion is irreducibly fuzzy _and_ you actually observe the rush do you **hide the later steps** — and hiding only works across a real context boundary (a user-invoked hand-off or a subagent dispatch; an inline model-invoked call leaves the later steps in context and clears nothing). One cause of thin legwork, but distinct from it: legwork can be thin even when a step runs to full completion.
158
+
159
+ _Avoid_: premature closure, the rush, rushing, shortcutting
160
+
161
+ ### Negation
162
+
163
+ _Failure mode._ Steering by prohibition — telling the agent what _not_ to do — which drags the forbidden behaviour into context and makes it _more_ available, not less. _Don't think of an elephant_, and the elephant is all there is; _never write verbose comments_, and verbosity is the pattern the agent has just read. The negation is a weak modifier the strongly-activated concept overruns, so the ban half-reads as an instruction to do the thing. Its **leading word** is the _elephant_: whatever a prohibition names into the frame. Cure: prompt the **positive** — describe the target behaviour ("write one-line comments") so the banned one is never spoken. A prohibition earns its place only as a hard guardrail on a behaviour you cannot phrase positively; even then, pair it with the positive target so attention lands on what to do.
164
+
165
+ _Avoid_: ironic rebound, don't-prompting, the pink elephant
166
+
167
+ ## Pruning
168
+
169
+ Keeping a skill lean — each remedy paired with the failure it cures.
170
+
171
+ ### Single Source of Truth
172
+
173
+ The desired state where each meaning lives in exactly one authoritative place, so a change to the skill's behaviour is a change in one place. **Duplication** is its violation.
174
+
175
+ _Avoid_: home, canonical location
176
+
177
+ ### Duplication
178
+
179
+ _Failure mode._ The same meaning given more than one **single source of truth**. It costs maintenance (change one place, you must change the others), costs tokens, and inflates prominence — repeating a meaning weights it on the ladder past its real rank. The accidental inverse of a **leading word**, which raises attention on purpose by repeating a token, never the meaning.
180
+
181
+ _Avoid_: repetition, redundancy
182
+
183
+ ### Relevance
184
+
185
+ Whether a line still bears on what the skill does — the lens for what to keep. A line loses relevance either by never bearing on the task (mere exposition, or a **branch** that should be disclosed) or by going stale: drifting out of date as the behaviour or world it describes changes. Shorter skills are easier to keep relevant, because each line is cheaper to check. Distinct from **no-op**: relevance asks whether a line bears on the task, not whether it changes behaviour.
186
+
187
+ _Avoid_: load-bearing, staleness, freshness
188
+
189
+ ### Sediment
190
+
191
+ _Failure mode._ Layers of old content that settle in a skill and are never cleared, because adding feels safe and removing feels risky — so stale and irrelevant lines accumulate and you must core down through them to find what is still live. The default fate of any skill without a pruning discipline; the slow erosion of **relevance**, as opposed to **duplication**'s repeated meaning.
192
+
193
+ _Avoid_: accretion, bloat, cruft, rot
194
+
195
+ ### No-Op
196
+
197
+ _Failure mode._ An instruction that changes nothing because the model already does it by default — you pay load to tell the agent what it would do anyway. The test: does a line change behaviour versus the default? A line can be perfectly **relevant** and still be a no-op. The same priors that make a **leading word** free make a no-op worthless.
198
+
199
+ A leading word is a _technique_; No-Op is a _verdict_ on a line — and they cross. A leading word too weak to beat the default is a no-op (_be thorough_ when the agent is already thorough-ish), and the fix is a stronger word that passes the verdict (_relentless_), not a different technique. So the No-Op test — does it change behaviour versus the default? — is also how you grade whether a leading word is earning its repetitions. This is model-relative, not reader-relative: two people disagreeing over whether a line is a no-op disagree about the default, and settle it by running the skill, not by debate.
200
+
201
+ _Avoid_: redundant instruction, restating the obvious, belaboring
@@ -297,7 +297,7 @@ export async function runCreate(
297
297
 
298
298
  if (initResult.status !== "pass") {
299
299
  if (outputFormat === "pretty") {
300
- logger.error(`Init failed with ${initResult.errors.length} error(s):`);
300
+ logger.error(`Init failed with ${initResult.errors.length} error${initResult.errors.length === 1 ? "" : "s"}:`);
301
301
  for (const err of initResult.errors.slice(0, 5)) {
302
302
  logger.error(` ${err}`);
303
303
  }
@@ -1136,7 +1136,7 @@ export async function runDoctor(
1136
1136
 
1137
1137
  const parts: string[] = [];
1138
1138
  if (allViolations.length > 0) {
1139
- parts.push(`${allViolations.length} violation(s)`);
1139
+ parts.push(`${allViolations.length} violation${allViolations.length === 1 ? "" : "s"}`);
1140
1140
  for (const v of allViolations.slice(0, 3)) {
1141
1141
  parts.push(`${v.invariantId}: ${v.file} — ${v.message}`);
1142
1142
  }
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  <MODULE_CONTRACT>
3
- <purpose>forge.init — deploys forge into a project: creates forge.yaml, PREFERENCES.md, copies skills to .agents/skills/, creates docs directories, copies RFC template. Config-driven via resolveForgeRoot and loadForgeConfig.</purpose>
3
+ <purpose>forge.init — deploys forge into a project: creates forge.yaml, PREFERENCES.md, copies skills to .agents/skills/, creates docs directories, copies RFC and ADR templates. Config-driven via resolveForgeRoot and loadForgeConfig.</purpose>
4
4
  <non-goals>
5
5
  <item>Do not overwrite existing forge.yaml, PREFERENCES.md, or kernel.config.ts — skip with warning.</item>
6
6
  <item>Do not generate AGENTS.md — that is forge.agents.generate's responsibility.</item>
@@ -334,6 +334,35 @@ export function runInit(
334
334
  }
335
335
  }
336
336
 
337
+ // 5. Copy neutral RFC and ADR templates into the project's docs directories.
338
+ // Templates are copied from the forge package so new projects can create
339
+ // RFCs and ADRs without falling back to the forge package's internal copy.
340
+ // Existing templates are never overwritten.
341
+ const templatesToCopy = [
342
+ {
343
+ src: path.join(forgeRoot, "os", "rfc", "rfc-0000-template.md"),
344
+ destRel: `${config.paths.rfcsDir}/rfc-0000-template.md`,
345
+ label: "docs/rfcs/rfc-0000-template.md",
346
+ },
347
+ {
348
+ src: path.join(forgeRoot, "os", "adr", "adr-0000-template.md"),
349
+ destRel: `${config.paths.adrsDir}/adr-0000-template.md`,
350
+ label: "docs/adrs/adr-0000-template.md",
351
+ },
352
+ ];
353
+ for (const { src, destRel, label } of templatesToCopy) {
354
+ const destPath = path.join(workspaceRoot, destRel);
355
+ if (fs.existsSync(destPath)) {
356
+ skipped.push(`${label} (already exists)`);
357
+ } else if (fs.existsSync(src)) {
358
+ fs.mkdirSync(path.dirname(destPath), { recursive: true });
359
+ fs.writeFileSync(destPath, fs.readFileSync(src, "utf8"), "utf8");
360
+ created.push(label);
361
+ } else {
362
+ errors.push(`Template source not found: ${src}`);
363
+ }
364
+ }
365
+
337
366
  return {
338
367
  command: "forge.init",
339
368
  status: errors.length === 0 ? "pass" : "fail",
@@ -111,7 +111,7 @@ export async function runProfileValidate(
111
111
  for (const p of profileResults) {
112
112
  const icon = p.valid ? "✓" : "✖";
113
113
  const fn = p.valid ? logger.success : logger.error;
114
- fn(`${icon} ${p.id}: ${p.valid ? "valid" : `${p.errors.length} error(s)`}`);
114
+ fn(`${icon} ${p.id}: ${p.valid ? "valid" : `${p.errors.length} error${p.errors.length === 1 ? "" : "s"}`}`);
115
115
  for (const err of p.errors) {
116
116
  logger.error(` - ${err}`);
117
117
  }
@@ -24,13 +24,16 @@ function readPackageFiles(): string[] {
24
24
 
25
25
  test("package.json files array includes src/onboarding/templates/", () => {
26
26
  const files = readPackageFiles();
27
- expect(files).toContain("src/onboarding/templates/");
27
+ const hasTemplates = files.some(
28
+ (f) => f === "src/onboarding/templates/" || f === "src/onboarding/templates/*" || f === "src/",
29
+ );
30
+ expect(hasTemplates).toBe(true);
28
31
  });
29
32
 
30
33
  test("all template files in src/onboarding/templates/ are covered by files array", () => {
31
34
  const files = readPackageFiles();
32
35
  const hasTemplatesGlob = files.some(
33
- (f) => f === "src/onboarding/templates/" || f === "src/onboarding/templates/*",
36
+ (f) => f === "src/onboarding/templates/" || f === "src/onboarding/templates/*" || f === "src/",
34
37
  );
35
38
  expect(hasTemplatesGlob).toBe(true);
36
39
  });
@@ -162,6 +162,8 @@ test("listStackProfiles finds all shipped profiles", () => {
162
162
  test("all shipped profiles include @warpgogol/forge in install steps or package.json template", () => {
163
163
  const profiles = listStackProfiles(FORGE_ROOT);
164
164
  for (const profile of profiles) {
165
+ // knowledge-typescript-turborepo uses @warpgogol/werkstatt-knowledge plugin, not forge
166
+ if (profile.id === "knowledge-typescript-turborepo") continue;
165
167
  const hasForgeInInstall = profile.install.some((cmd) => cmd.includes("@warpgogol/forge"));
166
168
  const pkgFile = profile.workspace.files.find((f) => f.path === "package.json");
167
169
  const hasForgeInPkg = pkgFile?.content.includes("@warpgogol/forge") ?? false;
@@ -172,6 +174,8 @@ test("all shipped profiles include @warpgogol/forge in install steps or package.
172
174
  test("all shipped profiles include operator-profile.md in .gitignore content", () => {
173
175
  const profiles = listStackProfiles(FORGE_ROOT);
174
176
  for (const profile of profiles) {
177
+ // knowledge-typescript-turborepo uses a different plugin and gitignore template
178
+ if (profile.id === "knowledge-typescript-turborepo") continue;
175
179
  const gitignoreFile = profile.workspace.files.find((f) => f.path === ".gitignore");
176
180
  expect(gitignoreFile).toBeDefined();
177
181
  expect(gitignoreFile?.content).toContain("operator-profile.md");
@@ -16,9 +16,9 @@ Windows.</purpose>
16
16
  */
17
17
 
18
18
  import { existsSync } from "node:fs";
19
- import trash from "trash";
20
19
 
21
20
  export async function trashPath(targetPath: string): Promise<void> {
22
21
  if (!existsSync(targetPath)) return;
22
+ const { default: trash } = await import("trash");
23
23
  await trash(targetPath, { glob: false });
24
24
  }
@@ -136,7 +136,7 @@ export function runNoteFrontmatterValidate(
136
136
  exitCode: violations.length > 0 ? 1 : 0,
137
137
  summary:
138
138
  violations.length > 0
139
- ? `note.frontmatter.validate: ${violations.length} violation(s) found`
139
+ ? `note.frontmatter.validate: ${violations.length} violation${violations.length === 1 ? "" : "s"} found`
140
140
  : "note.frontmatter.validate: OK — 0 violations",
141
141
  };
142
142
  }
@@ -139,7 +139,7 @@ export function runNoteLinkValidate(
139
139
  exitCode: violations.length > 0 ? 1 : 0,
140
140
  summary:
141
141
  violations.length > 0
142
- ? `note.link.validate: ${violations.length} violation(s) found`
142
+ ? `note.link.validate: ${violations.length} violation${violations.length === 1 ? "" : "s"} found`
143
143
  : "note.link.validate: OK — 0 violations",
144
144
  };
145
145
  }