@warpgogol/forge 0.3.1 → 0.5.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 (180) hide show
  1. package/AGENTS.md +152 -5
  2. package/dist/bin/cli.js +4 -5
  3. package/dist/bin/cli.js.map +1 -1
  4. package/dist/os/adr/adr.module.d.ts.map +1 -1
  5. package/dist/os/adr/adr.module.js +4 -2
  6. package/dist/os/adr/adr.module.js.map +1 -1
  7. package/dist/os/adr/handlers/validate.d.ts.map +1 -1
  8. package/dist/os/adr/handlers/validate.js +32 -4
  9. package/dist/os/adr/handlers/validate.js.map +1 -1
  10. package/dist/os/compass/compass.module.d.ts.map +1 -1
  11. package/dist/os/compass/compass.module.js +4 -0
  12. package/dist/os/compass/compass.module.js.map +1 -1
  13. package/dist/os/compass/handlers/resolve-scan-root.d.ts.map +1 -1
  14. package/dist/os/compass/handlers/resolve-scan-root.js +16 -0
  15. package/dist/os/compass/handlers/resolve-scan-root.js.map +1 -1
  16. package/dist/os/core/core.module.d.ts.map +1 -1
  17. package/dist/os/core/core.module.js +82 -3
  18. package/dist/os/core/core.module.js.map +1 -1
  19. package/dist/os/core/handlers/knowledge-compact.d.ts +4 -0
  20. package/dist/os/core/handlers/knowledge-compact.d.ts.map +1 -0
  21. package/dist/os/core/handlers/knowledge-compact.js +198 -0
  22. package/dist/os/core/handlers/knowledge-compact.js.map +1 -0
  23. package/dist/os/rfc/handlers/implement-stamp.d.ts.map +1 -1
  24. package/dist/os/rfc/handlers/implement-stamp.js +10 -6
  25. package/dist/os/rfc/handlers/implement-stamp.js.map +1 -1
  26. package/dist/os/rfc/handlers/index-graph.js +2 -2
  27. package/dist/os/rfc/handlers/index-graph.js.map +1 -1
  28. package/dist/os/rfc/handlers/lifecycle.d.ts.map +1 -1
  29. package/dist/os/rfc/handlers/lifecycle.js +4 -5
  30. package/dist/os/rfc/handlers/lifecycle.js.map +1 -1
  31. package/dist/os/rfc/handlers/pipeline-status.js +1 -1
  32. package/dist/os/rfc/handlers/pipeline-status.js.map +1 -1
  33. package/dist/os/rfc/handlers/validate-rules.d.ts.map +1 -1
  34. package/dist/os/rfc/handlers/validate-rules.js +41 -3
  35. package/dist/os/rfc/handlers/validate-rules.js.map +1 -1
  36. package/dist/os/rfc/handlers/validate.js +1 -1
  37. package/dist/os/rfc/handlers/validate.js.map +1 -1
  38. package/dist/os/rfc/rfc.module.d.ts.map +1 -1
  39. package/dist/os/rfc/rfc.module.js +15 -10
  40. package/dist/os/rfc/rfc.module.js.map +1 -1
  41. package/dist/os/session/handlers/validate.js +1 -1
  42. package/dist/os/session/handlers/validate.js.map +1 -1
  43. package/dist/os/session/session.module.d.ts.map +1 -1
  44. package/dist/os/session/session.module.js +4 -2
  45. package/dist/os/session/session.module.js.map +1 -1
  46. package/dist/os/spec/spec-schema.d.ts +1 -1
  47. package/dist/os/werkstatt/handlers/lock.d.ts.map +1 -1
  48. package/dist/os/werkstatt/handlers/lock.js +27 -1
  49. package/dist/os/werkstatt/handlers/lock.js.map +1 -1
  50. package/dist/os/werkstatt/handlers/schema.d.ts +1 -0
  51. package/dist/os/werkstatt/handlers/schema.d.ts.map +1 -1
  52. package/dist/os/werkstatt/handlers/schema.js +1 -0
  53. package/dist/os/werkstatt/handlers/schema.js.map +1 -1
  54. package/dist/src/config/forge-config.d.ts +70 -3
  55. package/dist/src/config/forge-config.d.ts.map +1 -1
  56. package/dist/src/config/forge-config.js +91 -4
  57. package/dist/src/config/forge-config.js.map +1 -1
  58. package/dist/src/index.d.ts +3 -1
  59. package/dist/src/index.d.ts.map +1 -1
  60. package/dist/src/index.js +6 -2
  61. package/dist/src/index.js.map +1 -1
  62. package/dist/src/knowledge/budgets.d.ts +38 -0
  63. package/dist/src/knowledge/budgets.d.ts.map +1 -0
  64. package/dist/src/knowledge/budgets.js +157 -0
  65. package/dist/src/knowledge/budgets.js.map +1 -0
  66. package/dist/src/knowledge/compact.d.ts +47 -0
  67. package/dist/src/knowledge/compact.d.ts.map +1 -0
  68. package/dist/src/knowledge/compact.js +322 -0
  69. package/dist/src/knowledge/compact.js.map +1 -0
  70. package/dist/src/knowledge/index.d.ts +7 -0
  71. package/dist/src/knowledge/index.d.ts.map +1 -0
  72. package/dist/src/knowledge/index.js +19 -0
  73. package/dist/src/knowledge/index.js.map +1 -0
  74. package/dist/src/knowledge/parse.d.ts +3 -0
  75. package/dist/src/knowledge/parse.d.ts.map +1 -0
  76. package/dist/src/knowledge/parse.js +205 -0
  77. package/dist/src/knowledge/parse.js.map +1 -0
  78. package/dist/src/knowledge/promote.d.ts +37 -0
  79. package/dist/src/knowledge/promote.d.ts.map +1 -0
  80. package/dist/src/knowledge/promote.js +120 -0
  81. package/dist/src/knowledge/promote.js.map +1 -0
  82. package/dist/src/knowledge/schema.d.ts +61 -0
  83. package/dist/src/knowledge/schema.d.ts.map +1 -0
  84. package/dist/src/knowledge/schema.js +64 -0
  85. package/dist/src/knowledge/schema.js.map +1 -0
  86. package/dist/src/knowledge/serialize.d.ts +3 -0
  87. package/dist/src/knowledge/serialize.d.ts.map +1 -0
  88. package/dist/src/knowledge/serialize.js +67 -0
  89. package/dist/src/knowledge/serialize.js.map +1 -0
  90. package/dist/src/onboarding/agents-generate.d.ts +19 -0
  91. package/dist/src/onboarding/agents-generate.d.ts.map +1 -1
  92. package/dist/src/onboarding/agents-generate.js +156 -66
  93. package/dist/src/onboarding/agents-generate.js.map +1 -1
  94. package/dist/src/onboarding/create.d.ts.map +1 -1
  95. package/dist/src/onboarding/create.js +66 -10
  96. package/dist/src/onboarding/create.js.map +1 -1
  97. package/dist/src/onboarding/doctor.d.ts +13 -1
  98. package/dist/src/onboarding/doctor.d.ts.map +1 -1
  99. package/dist/src/onboarding/doctor.js +613 -7
  100. package/dist/src/onboarding/doctor.js.map +1 -1
  101. package/dist/src/onboarding/init.d.ts +8 -1
  102. package/dist/src/onboarding/init.d.ts.map +1 -1
  103. package/dist/src/onboarding/init.js +33 -2
  104. package/dist/src/onboarding/init.js.map +1 -1
  105. package/dist/src/onboarding/memory-scaffold.d.ts +18 -0
  106. package/dist/src/onboarding/memory-scaffold.d.ts.map +1 -0
  107. package/dist/src/onboarding/memory-scaffold.js +151 -0
  108. package/dist/src/onboarding/memory-scaffold.js.map +1 -0
  109. package/dist/src/onboarding/nested-agents-generate.d.ts +16 -0
  110. package/dist/src/onboarding/nested-agents-generate.d.ts.map +1 -0
  111. package/dist/src/onboarding/nested-agents-generate.js +69 -0
  112. package/dist/src/onboarding/nested-agents-generate.js.map +1 -0
  113. package/dist/src/onboarding/nested-agents-templates.d.ts +26 -0
  114. package/dist/src/onboarding/nested-agents-templates.d.ts.map +1 -0
  115. package/dist/src/onboarding/nested-agents-templates.js +178 -0
  116. package/dist/src/onboarding/nested-agents-templates.js.map +1 -0
  117. package/dist/src/onboarding/profile-validate.d.ts +13 -0
  118. package/dist/src/onboarding/profile-validate.d.ts.map +1 -0
  119. package/dist/src/onboarding/profile-validate.js +109 -0
  120. package/dist/src/onboarding/profile-validate.js.map +1 -0
  121. package/dist/src/onboarding/upgrade.d.ts +6 -0
  122. package/dist/src/onboarding/upgrade.d.ts.map +1 -1
  123. package/dist/src/onboarding/upgrade.js +45 -1
  124. package/dist/src/onboarding/upgrade.js.map +1 -1
  125. package/dist/src/onboarding/workspace-discovery.d.ts +11 -0
  126. package/dist/src/onboarding/workspace-discovery.d.ts.map +1 -0
  127. package/dist/src/onboarding/workspace-discovery.js +138 -0
  128. package/dist/src/onboarding/workspace-discovery.js.map +1 -0
  129. package/dist/src/profiles/profile-schema.d.ts +116 -0
  130. package/dist/src/profiles/profile-schema.d.ts.map +1 -0
  131. package/dist/src/profiles/profile-schema.js +94 -0
  132. package/dist/src/profiles/profile-schema.js.map +1 -0
  133. package/dist/src/profiles/stack-profile.d.ts +41 -1
  134. package/dist/src/profiles/stack-profile.d.ts.map +1 -1
  135. package/dist/src/profiles/stack-profile.js +9 -0
  136. package/dist/src/profiles/stack-profile.js.map +1 -1
  137. package/dist/src/profiles/terminology-utils.d.ts +8 -0
  138. package/dist/src/profiles/terminology-utils.d.ts.map +1 -0
  139. package/dist/src/profiles/terminology-utils.js +31 -0
  140. package/dist/src/profiles/terminology-utils.js.map +1 -0
  141. package/dist/src/types.d.ts +0 -1
  142. package/dist/src/types.d.ts.map +1 -1
  143. package/dist/src/utils/fs-idempotent.d.ts +1 -1
  144. package/dist/src/utils/fs-idempotent.d.ts.map +1 -1
  145. package/dist/src/utils/fs-idempotent.js +12 -3
  146. package/dist/src/utils/fs-idempotent.js.map +1 -1
  147. package/dist/src/validators/skill-validate.d.ts +15 -0
  148. package/dist/src/validators/skill-validate.d.ts.map +1 -1
  149. package/dist/src/validators/skill-validate.js +204 -2
  150. package/dist/src/validators/skill-validate.js.map +1 -1
  151. package/package.json +2 -2
  152. package/profiles/astro-typescript-turborepo.yaml +87 -0
  153. package/profiles/editframe-html-templates/composition-agents.md +34 -0
  154. package/profiles/editframe-html-templates/composition.html +32 -0
  155. package/profiles/editframe-html.yaml +283 -0
  156. package/profiles/forge-shell.yaml +77 -0
  157. package/profiles/phaser-turborepo.yaml +87 -0
  158. package/skills/fo/fo-doc-audit/SKILL.md +6 -6
  159. package/skills/fo/fo-fix/SKILL.md +11 -0
  160. package/skills/fo/fo-handoff/SKILL.md +2 -1
  161. package/skills/fo/fo-idea-implement/SKILL.md +44 -2
  162. package/skills/fo/fo-idea-plan/SKILL.md +1 -0
  163. package/skills/fo/fo-knowledge-distill/SKILL.md +170 -0
  164. package/skills/fo/fo-memory-sync/SKILL.md +6 -3
  165. package/skills/fo/fo-memory-sync/fix-patterns.md +38 -4
  166. package/skills/fo/fo-review/SKILL.md +2 -2
  167. package/skills/fo/fo-session-retro/SKILL.md +21 -11
  168. package/skills/fo/fo-session-save/SKILL.md +3 -4
  169. package/skills/fo/fo-session-save/fix-patterns.md +53 -29
  170. package/skills/fo/fo-session-save/learned-principles.md +59 -8
  171. package/skills/fo/fo-step-commit/SKILL.md +55 -0
  172. package/skills/meta/forge-bootstrap/SKILL.md +28 -4
  173. package/skills/meta/forge-bootstrap/operator-profile-template.md +1 -0
  174. package/skills/meta/skill-create/SKILL.md +1 -1
  175. package/skills/shared/grilling/SKILL.md +1 -1
  176. package/skills/shared/grilling/learned-principles.md +14 -0
  177. package/skills/shared/grilling/qa-log.md +105 -6
  178. package/skills/shared/knowledge/learned-principles.md +5 -0
  179. package/skills/shared/windows-ai-tooling/SKILL.md +154 -1
  180. package/skills/shared/writing-great-skills/SKILL.md +74 -1
@@ -0,0 +1,170 @@
1
+ ---
2
+ name: fo-knowledge-distill
3
+ description: Distill raw knowledge logs (L0) into durable fix patterns (L1) and learned principles (L2), maintain confirmation counters, and migrate legacy sections — with operator approval on every mutation.
4
+ invocation: user
5
+ category: fo
6
+ concerns: document-only
7
+ dependsOn: ['my-preferences', 'grilling']
8
+ languagePolicy: ref(PREFERENCES.md)
9
+ bindings:
10
+ requires: []
11
+ optional: []
12
+ triggers: ["distill knowledge", "compact skill knowledge", "knowledge lifecycle", "promote fix patterns"]
13
+ ---
14
+
15
+ # Knowledge Distillation
16
+
17
+ Before starting, read `PREFERENCES.md` at the repository root. If the file is missing or `aiLanguage` is unset, ask the operator once and create the file using the `my-preferences` skill semantics.
18
+
19
+ This skill assists the operator in the knowledge distillation lifecycle: reading raw material (L0), proposing durable patterns (L1) and principles (L2), re-confirming existing entries, migrating legacy sections, and recommending compaction. Every mutation requires explicit operator approval.
20
+
21
+ ## When to invoke
22
+
23
+ - **After a productive session** — when the session generated raw Q&A pairs or debugging insights that could benefit future agents.
24
+ - **When `forge.skill.knowledge.compact --all-skills --dry-run` reports legacy sections** — this skill performs the actual migration with operator approval.
25
+ - **When a SKILL-21 budget warning appears** — distill to reduce active knowledge volume.
26
+ - **When the operator asks to "distill", "compact", or "maintain" skill knowledge.**
27
+
28
+ ## What this skill is NOT
29
+
30
+ - It is NOT `forge.skill.knowledge.compact` — that command handles mechanical archival (expiry, supersession, L0 retention, L2 staleness). This skill handles semantic work: grouping, promoting, and migrating.
31
+ - It is NOT `fo-session-retro` — that skill triages session discoveries and routes them. This skill works within a single skill's knowledge files.
32
+ - It is NOT `fo-extract-dna` — that skill extracts architectural invariants. This skill distills operational knowledge (fix patterns, learned principles).
33
+
34
+ ## Process
35
+
36
+ ### Step 1: Scope selection
37
+
38
+ Ask the operator which skill(s) to distill:
39
+
40
+ - Use `ask_user_question` to offer: (a) a specific skill by name, or (b) all skills with knowledge files.
41
+ - Parse the selected skill's knowledge files via the structured knowledge parser (in-process import of the forge `src/knowledge/` module or the `forge` package).
42
+ - Report what was found: file names, entry counts, legacy section counts, parse issues.
43
+
44
+ **Completion criteria:** operator has selected a scope and the skill has parsed all relevant knowledge files without errors.
45
+
46
+ ### Step 2: Read cold material
47
+
48
+ Read L0 (`qa-log.md`) and, if present, `qa-log.archive.md`. This is the sanctioned wholesale read of the cold layer (hot/warm/cold discipline).
49
+
50
+ - Also read L1 (`fix-patterns.md`) and L2 (`learned-principles.md`) to understand existing distilled knowledge.
51
+ - Report a summary: how many raw entries, how many existing patterns/principles, what themes recur.
52
+
53
+ **Completion criteria:** all knowledge files for the selected skill have been read and summarized.
54
+
55
+ ### Step 3: Propose distillations
56
+
57
+ Group recurring Q&A themes from L0. For each theme, propose either:
58
+
59
+ - An **L2 principle** (with `confirmations` seeded from observed recurrences) — for cross-cutting insights that apply broadly.
60
+ - An **L1 fix pattern** — for specific, reusable solutions to specific problems.
61
+
62
+ Present proposals as a table:
63
+
64
+ | # | Proposed entry | Layer | Source entries | Rationale |
65
+ | --- | -------------- | ----- | -------------- | --------- |
66
+
67
+ For each proposal, use `ask_user_question` to let the operator:
68
+
69
+ - **Confirm** — the entry is written as proposed.
70
+ - **Edit** — the operator provides corrections; the entry is written with edits.
71
+ - **Drop** — the proposal is discarded.
72
+
73
+ **Completion criteria:** every proposal has been confirmed, edited, or dropped by the operator.
74
+
75
+ ### Step 4: Re-confirmation pass
76
+
77
+ For existing L2 entries whose themes appear in the new material:
78
+
79
+ - Propose `confirmations + 1` and `lastConfirmedAt: today`.
80
+ - If the entry is `status: stale`, propose restoring to `status: active`.
81
+ - Present each re-confirmation individually via `ask_user_question`.
82
+
83
+ **Completion criteria:** every re-confirmation has been approved or declined by the operator.
84
+
85
+ ### Step 5: Legacy migration
86
+
87
+ For each legacy section (freeform prose that predates structured entries):
88
+
89
+ - Propose a structured entry: assign an ID, set metadata (layer, created, status), preserve the body verbatim.
90
+ - Use `ask_user_question` for each legacy section — the operator approves the proposed structured entry.
91
+
92
+ **Completion criteria:** every legacy section has been migrated or explicitly skipped by the operator.
93
+
94
+ ### Step 6: Write
95
+
96
+ Apply approved mutations via the knowledge serializer (`serializeKnowledgeFile`). Never string-splice markdown. Never touch entries that were not explicitly approved.
97
+
98
+ - Write files atomically (staging + rename) to prevent corruption on mid-run failure.
99
+ - Commit only the mutated knowledge files (fo-pipeline commit discipline).
100
+
101
+ **Completion criteria:** all approved mutations are written and committed.
102
+
103
+ ### Step 7: Recommend compact
104
+
105
+ If retention/expiry candidates remain after distillation:
106
+
107
+ - Recommend `forge.skill.knowledge.compact --skill <name>` to the operator.
108
+ - Offer to run it via `ask_user_question`.
109
+ - If the operator declines, note it in the session summary.
110
+
111
+ **Completion criteria:** the operator has been informed of compaction opportunities and has made a decision.
112
+
113
+ ### Step 8: Commit
114
+
115
+ Commit only the mutated knowledge files. Reference this skill and the knowledge lifecycle in the commit message. Do not stage unrelated changes.
116
+
117
+ **Completion criteria:** changes are committed with a descriptive message.
118
+
119
+ ## Knowledge file format
120
+
121
+ All knowledge files use the structured knowledge entry format:
122
+
123
+ ````markdown
124
+ <!-- knowledge-layer: L2 -->
125
+ # learned-principles.md
126
+
127
+ ### K-0001: Short title
128
+
129
+ ```knowledge-entry
130
+ id: K-0001
131
+ layer: L2
132
+ created: 2026-08-03
133
+ lastConfirmedAt: 2026-08-03
134
+ confirmations: 1
135
+ status: active
136
+ ````
137
+
138
+ Body text describing the principle.
139
+
140
+ ```
141
+
142
+ See `writing-great-skills` § Cumulative knowledge pattern for the three-layer reference pattern (L0 raw logs, L1 fix patterns, L2 learned principles), entry format, and mutation contract.
143
+
144
+ ## Constraints
145
+
146
+ - **Operator approval on every mutation.** Never write to a knowledge file without explicit approval for each entry.
147
+ - **Serializer only.** Always use `serializeKnowledgeFile` from the forge knowledge module. Never string-splice markdown.
148
+ - **No semantic logic in command handlers.** The `forge.skill.knowledge.compact` command handles mechanical archival only. Semantic grouping and promotion live in this skill.
149
+ - **No LLM logic in `src/knowledge/`.** Deterministic planning only; meaning work lives here.
150
+ - **Read archives too.** When distilling, read both live and archive files — archived material may still contain themes worth re-distilling.
151
+
152
+ ## Cross-skill promotion
153
+
154
+ When `forge.doctor` reports `knowledge-duplicate` warnings (cross-skill L2 entries with matching normalized titles), or when the operator identifies a promotion candidate, execute the promotion protocol:
155
+
156
+ ### Promotion protocol
157
+
158
+ 1. **Present the pair** — show both titles, bodies, confirmations, and the proposed merged shared entry (merged body, summed confirmations, `promotedFrom` provenance). The operator approves, edits, or rejects via grilling.
159
+ 2. **Write the shared entry** — append to `packages/forge/skills/shared/knowledge/learned-principles.md` with the next `K-NNNN` id, `status: active`, `created: today`, `lastConfirmedAt: today`, `confirmations` (sum of sources), and `promotedFrom: ["<skill>/K-NNNN", ...]`.
160
+ 3. **Rewrite local copies** — each skill-local entry keeps its heading and id but its metadata is rewritten: `promotedTo: shared/K-NNNN`, `status: superseded`; body replaced with one line: "Promoted to shared layer as shared/K-NNNN." The next compact run archives these pointer entries out of the hot file.
161
+ 4. **Cite, don't copy** — future distill runs in any skill reference the shared id (`shared/K-NNNN`) instead of re-creating the principle locally.
162
+ 5. **Commit** — shared file + all touched skill files in one commit.
163
+
164
+ ### Promotion constraints
165
+
166
+ - **Promotion requires operator approval inside grilling** — detection is deterministic, promotion is human. Never promote without explicit operator approval for each pair.
167
+ - **Never copy shared-layer content into skill-local files** — cite via `shared/K-NNNN`, do not duplicate.
168
+ - **Never promote project-specific knowledge from pack skills into the forge shared layer** — domain-neutrality is checked during grilling. If the principle is project-specific, it stays pack-local.
169
+ - **Portability gate** — grilling must include the question: "Is this principle genuinely cross-skill, or is it specific to one skill's domain?" Only genuinely cross-skill principles promote.
170
+ ```
@@ -64,7 +64,7 @@ Build the full path table for both Codex and Claude Code. Check which paths exis
64
64
 
65
65
  ### 2. Read knowledge files
66
66
 
67
- Read `fix-patterns.md` and `learned-principles.md` for accumulated filtering and import patterns from previous runs across all projects.
67
+ Read `fix-patterns.md` and `learned-principles.md` for accumulated filtering and import patterns from previous runs across all projects. Apply only entries with `status: active`; skip entries with `status: stale`, `superseded`, or `archived`.
68
68
 
69
69
  ### 3. Discover external memory and sessions
70
70
 
@@ -142,12 +142,15 @@ For each confirmed item, route the knowledge to the appropriate destination:
142
142
  | Project convention or rule | Nearest applicable `AGENTS.md` | Direct edit |
143
143
  | Architectural decision | `docs/adrs/` | Delegate to `fo-idea-create-adr` |
144
144
  | Cross-workspace invariant | `ref(forge.yaml bindings.paths.invariantsFile)` | Delegate to `fo-extract-dna` |
145
- | Session context | `docs/sessions/` | Create session file |
145
+ | Session context (structured record) | `docs/sessions/` | Create session file |
146
146
  | Operator preference | `.agents/operator-profile.md` | Direct edit |
147
- | Ephemeral context | Memory DB | `create_memory` tool |
147
+ | Ephemeral context (import-only) | `.agents/memory/daily/<today>.md` | Append to daily log |
148
+ | Ephemeral context (mirror) | Memory DB | `create_memory` tool (optional mirror) |
148
149
 
149
150
  Do not duplicate knowledge already present in the target. Read the target file before editing. Add knowledge in the most concise actionable form.
150
151
 
152
+ **Boundary between `docs/sessions/` and `.agents/memory/daily/`:** `docs/sessions/` holds structured imported session records (from external tools). `.agents/memory/daily/` holds agent-written Context bullets (append-only, git-ignored). Use `docs/sessions/` for imported external sessions; use `.agents/memory/daily/` for ephemeral context bullets that the agent writes during this session.
153
+
151
154
  ### 7. Update knowledge files
152
155
 
153
156
  After the run:
@@ -1,24 +1,58 @@
1
1
  <!-- L1: Baseline fix patterns for filtering, deduplication, and import decisions.
2
2
  Grown by AI per operator direction. Each pattern describes a recurring situation
3
3
  and the action to take. -->
4
+ <!-- knowledge-layer: L1 -->
5
+
4
6
  # Fix Patterns
5
7
 
6
- ## Pattern A: Skip non-project sessions
8
+ ### K-0001: Skip non-project sessions
9
+
10
+ ```knowledge-entry
11
+ id: K-0001
12
+ layer: L1
13
+ created: 2026-08-03
14
+ status: active
15
+ ```
7
16
 
8
17
  **Situation:** Codex session references a project path that does not match the current project root or git remote.
18
+
9
19
  **Action:** Skip. List in the "Filtered out" section of the report with reason "irrelevant — references different project".
10
20
 
11
- ## Pattern B: Skip duplicate knowledge
21
+ ### K-0002: Skip duplicate knowledge
22
+
23
+ ```knowledge-entry
24
+ id: K-0002
25
+ layer: L1
26
+ created: 2026-08-03
27
+ status: active
28
+ ```
12
29
 
13
30
  **Situation:** Memory or session content is already present in `AGENTS.md`, `docs/architecture-dna.md`, or existing `docs/sessions/` files.
31
+
14
32
  **Action:** Skip import. List in the "Filtered out" section with reason "duplicate — knowledge already in <location>".
15
33
 
16
- ## Pattern C: Import project convention
34
+ ### K-0003: Import project convention
35
+
36
+ ```knowledge-entry
37
+ id: K-0003
38
+ layer: L1
39
+ created: 2026-08-03
40
+ status: active
41
+ ```
17
42
 
18
43
  **Situation:** Memory or instruction contains a convention or rule directly applicable to the current project.
44
+
19
45
  **Action:** Route to the nearest applicable `AGENTS.md`. Read the file before editing. Add in concise actionable form.
20
46
 
21
- ## Pattern D: Redact sensitive information
47
+ ### K-0004: Redact sensitive information
48
+
49
+ ```knowledge-entry
50
+ id: K-0004
51
+ layer: L1
52
+ created: 2026-08-03
53
+ status: active
54
+ ```
22
55
 
23
56
  **Situation:** Memory or session content contains API keys, passwords, or PII.
57
+
24
58
  **Action:** Redact before importing. Replace with `<redacted>` placeholder. Never import raw secrets.
@@ -230,10 +230,10 @@ Derive the `<module-folder>` from the reviewed files: take the package path with
230
230
  Write the report to:
231
231
 
232
232
  ```txt
233
- docs/reviews/code/<module-folder>/review-<YYYY-MM-DD>-<HH>-<module-folder>.md
233
+ docs/reviews/code/<module-folder>/review-<YYYY-MM-DD>-<HH-mm>-<module-folder>.md
234
234
  ```
235
235
 
236
- For example: `docs/reviews/code/packages-growth/review-2026-07-10-19-packages-growth.md`.
236
+ For example: `docs/reviews/code/packages-growth/review-2026-07-10-19-30-packages-growth.md`.
237
237
 
238
238
  Create any missing parent directories. The file must begin with a YAML frontmatter block:
239
239
 
@@ -43,7 +43,7 @@ Each discovered insight is categorized into exactly one of six types. The catego
43
43
  | **Invariant** | A cross-workspace architectural rule that warrants DNA status | `ref(forge.yaml bindings.paths.invariantsFile)` | Delegate to `fo-extract-dna` |
44
44
  | **Pattern** | A reusable code pattern or abstraction worth porting to forge | `packages/forge/` | Delegate to `fo-harvest` |
45
45
  | **Operator** | A preference, communication style, or behavioral insight about the operator | `.agents/operator-profile.md` | Direct edit by this skill |
46
- | **Context** | Session-local knowledge with no durable home | Memory DB | `create_memory` tool |
46
+ | **Context** | Session-local knowledge with no durable home | `.agents/memory/daily/<today>.md` (default) or `MEMORY.md` (when durable); Memory DB optional mirror | Direct edit (daily log append) or curated edit (MEMORY.md); Memory DB via `create_memory` tool (optional mirror) |
47
47
 
48
48
  ### Category criteria
49
49
 
@@ -106,22 +106,26 @@ For each candidate, ask: "Would another agent working in this area benefit from
106
106
 
107
107
  ### 3. Categorize and present
108
108
 
109
+ **Language requirement (NON-NEGOTIABLE):** The triage table, the `ask_user_question` confirmation prompt, and all inline commentary MUST be written in `PREFERENCES.md` `aiLanguage`. The English template below is structural only — translate ALL headings, column names, labels, and prose to `aiLanguage` before presenting. Only identifiers (file paths, skill names, RFC/ADR ids) stay untranslated. Example: if `aiLanguage` is `ru`, the heading is «Сортировка инсайтов сессии», column headers are «№ | Инсайт | Категория | Назначение | Действие».
110
+
109
111
  Present each insight with a proposed category and routing:
110
112
 
111
113
  ```
112
- ## Session Insight Triage
114
+ ## <Triage heading in aiLanguage>
113
115
 
114
- | # | Insight | Category | Destination | Action |
116
+ | # | <Insight> | <Category> | <Destination> | <Action> |
115
117
  | --- | --- | --- | --- | --- |
116
118
  | 1 | hydrateFromArtifacts is mandatory when steps write state | Rule | packages/AGENTS.md | Direct edit |
117
119
  | 2 | Model registry chosen over hardcoded clients | Decision | docs/adrs/ | Delegate to fo-idea-create-adr |
118
120
  | 3 | Gogol ID must not equal phase ID | Invariant | ref(forge.yaml bindings.paths.invariantsFile) | Delegate to fo-extract-dna |
119
121
  | 4 | Batch AI calls for large-context models | Pattern | packages/forge/ | Delegate to fo-harvest |
120
122
  | 5 | Operator prefers concise responses without code blocks | Operator | .agents/operator-profile.md | Direct edit |
121
- | 6 | Current pipeline state for mission X | Context | memory DB | create_memory |
123
+ | 6 | Current pipeline state for mission X | Context | `.agents/memory/daily/` or `MEMORY.md` | Direct edit |
122
124
  ```
123
125
 
124
- Ask the operator to confirm, adjust categories, or drop items using `ask_user_question`. Do not proceed without explicit confirmation.
126
+ Ask the operator to confirm, adjust categories, or drop items using `ask_user_question` — the question text MUST be in `aiLanguage`. Do not proceed without explicit confirmation.
127
+
128
+ **Confirmation format (NON-NEGOTIABLE):** Use `allowMultiple: true` and present each insight as a separate option, with the option label matching the insight number from the triage table (e.g. option 1 = "1: <insight summary>"). This ensures the operator's response ("1, 2", "3", etc.) unambiguously refers to insight numbers, not to abstract option ordinals. Never use abstract options like "confirm all", "only rules", "only context" — these create a numbering mismatch between the table and the confirmation prompt.
125
129
 
126
130
  ### 4. Route each confirmed insight
127
131
 
@@ -133,7 +137,7 @@ For each rule insight:
133
137
  2. **Read** the target file before editing.
134
138
  3. **Add the rule** in a minimal, actionable form: "Always implement `hydrateFromArtifacts` when a step writes state fields. The engine skips `validateBeforeStart` and `run()` when artifacts are valid, so downstream steps receive empty state." Include a code reference if applicable.
135
139
  4. **Do not duplicate** rules already present in the target file. If the rule extends an existing section, append to it.
136
- 5. **Do not create `.agents/rules/*.md`** — `.agents/**` is reference/historical only per root AGENTS.md. Rules live in `AGENTS.md` files.
140
+ 5. **Do not create `.agents/rules/*.md`** — `.agents/**` is reference/historical only per root AGENTS.md, except `.agents/memory/` (active context store), `.agents/skills/` (synced by forge), and `.agents/operator-profile.md` (written by this skill). Rules live in `AGENTS.md` files.
137
141
 
138
142
  #### 4b. Decision → ADR
139
143
 
@@ -203,9 +207,15 @@ Cumulative knowledge about the operator. This file is gitignored by default to p
203
207
  - [YYYY-MM-DD] <insight>
204
208
  ```
205
209
 
206
- #### 4f. Context → memory
210
+ #### 4f. Context → memory layer
211
+
212
+ For each context insight, choose the destination with the operator:
213
+
214
+ 1. **Daily log (default)** — append to `.agents/memory/daily/<today>.md` (create if absent). This is the ephemeral warm store — git-ignored, append-only. Format: `- [HH:MM] <insight>`. Redact API keys, passwords, and PII before appending.
215
+ 2. **MEMORY.md (when durable)** — if the insight is useful across sessions (not just today), append to `.agents/memory/MEMORY.md` under the most relevant section (`## Current focus`, `## Decisions in flight`, or `## Environment notes`). This is the curated hot store — versioned, so keep it concise.
216
+ 3. **Memory DB (optional mirror)** — use the `create_memory` tool to save the insight with appropriate tags. This is an optional mirror of the file-based layer, not the primary store.
207
217
 
208
- Use the `create_memory` tool to save the insight with appropriate tags. Use a descriptive title and include enough context for the next agent to understand why it matters.
218
+ Both daily-log and MEMORY.md edits require operator confirmation. Files are the source of truth; Memory DB is a mirror.
209
219
 
210
220
  ### 5. Commit
211
221
 
@@ -232,7 +242,7 @@ If any operator insights were routed to `.agents/operator-profile.md`, offer the
232
242
 
233
243
  ### 7. Report
234
244
 
235
- Present a concise summary in `aiLanguage`. **Translate all labels, headings, and column names to `aiLanguage`** — the template below is structural only. Only identifiers (file paths, skill names, RFC/ADR ids) stay untranslated.
245
+ Present a concise summary in `aiLanguage`. **ALL labels, headings, column names, and prose MUST be translated to `aiLanguage`** — the template below is structural only. Only identifiers (file paths, skill names, RFC/ADR ids, commit hashes) stay untranslated. This is non-negotiable: an English summary when `aiLanguage` is `ru` is a violation of this skill's language contract.
236
246
 
237
247
  ```
238
248
  ## <Session Retro Summary in aiLanguage>
@@ -247,7 +257,7 @@ Present a concise summary in `aiLanguage`. **Translate all labels, headings, and
247
257
  | 3 | ... | Invariant | fo-extract-dna | RFC-XXXX drafted |
248
258
  | 4 | ... | Pattern | fo-harvest | ported to forge |
249
259
  | 5 | ... | Operator | .agents/operator-profile.md | committed |
250
- | 6 | ... | Context | memory DB | saved |
260
+ | 6 | ... | Context | `.agents/memory/` | saved |
251
261
 
252
262
  ### <Delegated skills invoked>: <count>
253
263
  ### <Direct edits>: <count>
@@ -266,7 +276,7 @@ Recommended session-end sequence: `fo-doc-audit` → `fo-session-retro` → `fo-
266
276
  ## Constraints
267
277
 
268
278
  - **Document-only.** This skill must not modify, create, or delete source code files. The only files it may directly edit are `AGENTS.md` files (for rule insights) and `.agents/operator-profile.md` (for operator insights, RFC-XXXX). All other routing is via delegation to skills that own their output.
269
- - **No `.agents/rules/` files.** Rules live in `AGENTS.md` files, which are loaded into every agent's system prompt. `.agents/**` is reference/historical only per root AGENTS.md.
279
+ - **No `.agents/rules/` files.** Rules live in `AGENTS.md` files, which are loaded into every agent's system prompt. `.agents/**` is reference/historical only per root AGENTS.md, except `.agents/memory/` (active context store), `.agents/skills/` (synced by forge), and `.agents/operator-profile.md` (written by this skill).
270
280
  - **Delegation, not duplication.** For ADR, DNA, and pattern insights, delegate to the appropriate skill. Do not create ADRs, RFCs, or forge packages directly.
271
281
  - **Operator confirmation is mandatory.** Do not route any insight without explicit confirmation of category and destination.
272
282
  - **Minimal edits.** Add rules in the most concise actionable form. Do not rewrite existing sections.
@@ -8,7 +8,7 @@ dependsOn: ['my-preferences']
8
8
  languagePolicy: ref(PREFERENCES.md)
9
9
  knowledge: [qa-log.md, learned-principles.md, fix-patterns.md]
10
10
  bindings:
11
- requires: [paths.sessionsDir]
11
+ requires: [paths.sessionsDir, commands.sessionSave]
12
12
  optional: []
13
13
  triggers: ["save this session", "enhance session transcript with annotations", "save session with quality checks"]
14
14
  ---
@@ -28,15 +28,14 @@ Enhance saved session transcripts with semantic annotations, summaries, and qual
28
28
  1. **Read `PREFERENCES.md`** at the repository root. If `saveSessions: false`, exit immediately with "Session saving disabled by operator preference."
29
29
 
30
30
  2. **Check for raw files** in `docs/sessions/.raw/`. If raw files exist, run `session.save` first to convert them to structured markdown:
31
- <!-- skill-lint-disable SKILL-11 -->
32
31
 
33
32
  ```
34
- pnpm exec site-kernel run session.save --json
33
+ ref(forge.yaml bindings.commands.sessionSave)
35
34
  ```
36
35
 
37
36
  3. **Read the most recently saved session file** from `docs/sessions/`. If no session files exist, exit with "No session files to annotate."
38
37
 
39
- 4. **Read knowledge files** (`qa-log.md`, `learned-principles.md`, `fix-patterns.md`) for accumulated knowledge from previous sessions.
38
+ 4. **Read knowledge files** (`qa-log.md`, `learned-principles.md`, `fix-patterns.md`) for accumulated knowledge from previous sessions. Apply only entries with `status: active`; skip entries with `status: stale`, `superseded`, or `archived`.
40
39
 
41
40
  5. **Analyze the transcript semantically:**
42
41
  - Generate a 1-3 sentence `summary` of the session's purpose and outcome.
@@ -1,33 +1,57 @@
1
+ <!-- knowledge-layer: L1 -->
2
+
1
3
  # Fix Patterns
2
4
 
3
5
  Patterns of errors in auto-extracted metadata (by `session.save`) and their fixes (applied by `fo-session-save` skill). Each pattern helps the skill recognize and correct common extraction mistakes.
4
6
 
5
- ## Format
6
-
7
- Each entry: pattern name, symptom, root cause, fix.
8
-
9
- ---
10
-
11
- 1. **False-positive RFC-id in comments**
12
-
13
- - **Symptom:** `relatedRfcs` contains an RFC-id that doesn't exist.
14
- - **Root cause:** Regex `RFC-\d{4}` matches references in code comments, URLs, or quoted text that aren't actual related RFCs.
15
- - **Fix:** Verify each RFC-id exists in `docs/rfcs/` before keeping it in `relatedRfcs`. Remove non-existent ones.
16
-
17
- 2. **Commit hash matching version numbers**
18
-
19
- - **Symptom:** `commits` array contains strings like `1.0.0` or `12345678`.
20
- - **Root cause:** Regex `\b[0-9a-f]{7,40}\b` matches version strings and short numeric sequences.
21
- - **Fix:** Filter out strings that look like version numbers (contain dots) or are pure decimal numbers. Verify remaining hashes correspond to actual git commits.
22
-
23
- 3. **File paths from error messages**
24
-
25
- - **Symptom:** `files` array contains paths from error messages or stack traces that weren't actually edited.
26
- - **Root cause:** Regex matches any path starting with `packages/`, `docs/`, etc., including paths in error output.
27
- - **Fix:** Cross-reference with `commits` and actual git diff to identify files that were genuinely modified during the session.
28
-
29
- 4. **Missing session type**
30
-
31
- - **Symptom:** Auto-detected `types` is `["freeform"]` but the session clearly involved implementation or review.
32
- - **Root cause:** The type detection patterns didn't match the specific phrasing used in the session.
33
- - **Fix:** Semantically analyze the transcript and override `types` with the correct classification.
7
+ ### K-0001: False-positive RFC-id in comments
8
+
9
+ ```knowledge-entry
10
+ id: K-0001
11
+ layer: L1
12
+ created: 2026-08-03
13
+ status: active
14
+ ```
15
+
16
+ - **Symptom:** `relatedRfcs` contains an RFC-id that doesn't exist.
17
+ - **Root cause:** Regex `RFC-\d{4}` matches references in code comments, URLs, or quoted text that aren't actual related RFCs.
18
+ - **Fix:** Verify each RFC-id exists in `docs/rfcs/` before keeping it in `relatedRfcs`. Remove non-existent ones.
19
+
20
+ ### K-0002: Commit hash matching version numbers
21
+
22
+ ```knowledge-entry
23
+ id: K-0002
24
+ layer: L1
25
+ created: 2026-08-03
26
+ status: active
27
+ ```
28
+
29
+ - **Symptom:** `commits` array contains strings like `1.0.0` or `12345678`.
30
+ - **Root cause:** Regex `\b[0-9a-f]{7,40}\b` matches version strings and short numeric sequences.
31
+ - **Fix:** Filter out strings that look like version numbers (contain dots) or are pure decimal numbers. Verify remaining hashes correspond to actual git commits.
32
+
33
+ ### K-0003: File paths from error messages
34
+
35
+ ```knowledge-entry
36
+ id: K-0003
37
+ layer: L1
38
+ created: 2026-08-03
39
+ status: active
40
+ ```
41
+
42
+ - **Symptom:** `files` array contains paths from error messages or stack traces that weren't actually edited.
43
+ - **Root cause:** Regex matches any path starting with `packages/`, `docs/`, etc., including paths in error output.
44
+ - **Fix:** Cross-reference with `commits` and actual git diff to identify files that were genuinely modified during the session.
45
+
46
+ ### K-0004: Missing session type
47
+
48
+ ```knowledge-entry
49
+ id: K-0004
50
+ layer: L1
51
+ created: 2026-08-03
52
+ status: active
53
+ ```
54
+
55
+ - **Symptom:** Auto-detected `types` is `["freeform"]` but the session clearly involved implementation or review.
56
+ - **Root cause:** The type detection patterns didn't match the specific phrasing used in the session.
57
+ - **Fix:** Semantically analyze the transcript and override `types` with the correct classification.
@@ -1,19 +1,70 @@
1
+ <!-- knowledge-layer: L2 -->
2
+
1
3
  # Learned Principles
2
4
 
3
5
  Principles learned across sessions by the `fo-session-save` skill. These are accumulated observations about session transcript quality, metadata extraction accuracy, and annotation patterns.
4
6
 
5
- ## Format
7
+ ### K-0001: Always verify RFC-id exists before listing as related
8
+
9
+ ```knowledge-entry
10
+ id: K-0001
11
+ layer: L2
12
+ created: 2026-08-03
13
+ lastConfirmedAt: 2026-08-03
14
+ confirmations: 1
15
+ status: active
16
+ ```
17
+
18
+ The `session.save` command extracts RFC-ids via regex (`RFC-\d{4}`), which can match references in comments, URLs, or quoted text. Before confirming a `relatedRfcs` entry, check that the RFC file exists in `docs/rfcs/`.
19
+
20
+ ### K-0002: Commit hash regex matches version numbers — filter by context
21
+
22
+ ```knowledge-entry
23
+ id: K-0002
24
+ layer: L2
25
+ created: 2026-08-03
26
+ lastConfirmedAt: 2026-08-03
27
+ confirmations: 1
28
+ status: active
29
+ ```
30
+
31
+ The regex `\b[0-9a-f]{7,40}\b` can match version strings like `1.0.0`. The `session.save` handler filters pure numeric strings ≤ 8 chars, but the skill should also verify that extracted hashes correspond to actual git commits in the session's work.
32
+
33
+ ### K-0003: Session types are not mutually exclusive
34
+
35
+ ```knowledge-entry
36
+ id: K-0003
37
+ layer: L2
38
+ created: 2026-08-03
39
+ lastConfirmedAt: 2026-08-03
40
+ confirmations: 1
41
+ status: active
42
+ ```
6
43
 
7
- Each principle: a concise statement, optionally with a rationale.
44
+ A single session can involve grilling followed by implementation. The `types` array should reflect all major activities, not just the dominant one.
8
45
 
9
- ---
46
+ ### K-0004: The `## Transcript` section is deterministic output
10
47
 
11
- 1. **Always verify RFC-id exists before listing as related.** The `session.save` command extracts RFC-ids via regex (`RFC-\d{4}`), which can match references in comments, URLs, or quoted text. Before confirming a `relatedRfcs` entry, check that the RFC file exists in `docs/rfcs/`.
48
+ ```knowledge-entry
49
+ id: K-0004
50
+ layer: L2
51
+ created: 2026-08-03
52
+ lastConfirmedAt: 2026-08-03
53
+ confirmations: 1
54
+ status: active
55
+ ```
12
56
 
13
- 2. **Commit hash regex matches version numbers — filter by context.** The regex `\b[0-9a-f]{7,40}\b` can match version strings like `1.0.0`. The `session.save` handler filters pure numeric strings ≤ 8 chars, but the skill should also verify that extracted hashes correspond to actual git commits in the session's work.
57
+ Never modify it. Only add `## Session notes` and update frontmatter.
14
58
 
15
- 3. **Session types are not mutually exclusive.** A single session can involve grilling followed by implementation. The `types` array should reflect all major activities, not just the dominant one.
59
+ ### K-0005: Redact sensitive information before saving
16
60
 
17
- 4. **The `## Transcript` section is deterministic output.** Never modify it. Only add `## Session notes` and update frontmatter.
61
+ ```knowledge-entry
62
+ id: K-0005
63
+ layer: L2
64
+ created: 2026-08-03
65
+ lastConfirmedAt: 2026-08-03
66
+ confirmations: 1
67
+ status: active
68
+ ```
18
69
 
19
- 5. **Redact sensitive information before saving.** API keys, passwords, PII must be removed from the transcript. Same redaction pattern as `fo-handoff`.
70
+ API keys, passwords, PII must be removed from the transcript. Same redaction pattern as `fo-handoff`.
@@ -0,0 +1,55 @@
1
+ ---
2
+ name: fo-step-commit
3
+ description: >-
4
+ Commit agent file changes after each operator request. Stages only files the
5
+ agent changed, in both monorepo and mission workpiece. Callable by other skills
6
+ for intermediate commits.
7
+ invocation: model
8
+ category: fo
9
+ concerns: code-mutation
10
+ dependsOn: ['my-preferences']
11
+ languagePolicy: ref(PREFERENCES.md)
12
+ triggers:
13
+ - "commit after request"
14
+ - "auto-commit changes"
15
+ - "step commit"
16
+ ---
17
+
18
+ # Step Commit
19
+
20
+ Before starting, read `PREFERENCES.md` at the repository root. If the file is missing or `aiLanguage` is unset, ask the operator once and create the file using the `my-preferences` skill semantics.
21
+
22
+ Commit file changes after every standalone operator request that produces file changes. This skill runs autonomously — the agent invokes it before sending its response to the operator, without explicit instruction.
23
+
24
+ ## When this skill runs
25
+
26
+ - **After every standalone operator request** (default behavior): the agent runs this skill before sending its response to the operator, if any files were changed during the request. "Standalone" means the operator's message is not part of a skill pipeline (e.g. not inside another multi-step skill).
27
+ - **Called by other skills**: other skills MAY invoke this skill for intermediate commits during multi-step pipelines. During pipeline execution, only the parent skill's explicit invocations fire — the default "after every request" behavior is suppressed to avoid conflicting with the pipeline's own commit discipline.
28
+
29
+ ## Behavior
30
+
31
+ After every standalone operator request that produces file changes, perform the following:
32
+
33
+ 1. **Detect changed files.** Run `git status --short` in the monorepo root. If the working tree is clean (no modifications), skip — no commit.
34
+ 2. **Verify diff before staging.** Run `git diff` (not just `git diff --cached`) on every file the agent touched in this request. Confirm the changes are the agent's own work and not foreign changes from another session. If foreign changes are found, exclude them from staging.
35
+ 3. **Stage only agent-changed files.** Stage only the files the agent modified in this request. Never use `git add -A` or `git add .` — another agent or session may have unrelated changes in the working tree. Stage files by explicit path: `git add <path1> <path2> ...`.
36
+ 4. **Form commit message.** Write a conventional commit message (`fix:`, `feat:`, `refactor:`, `docs:`, `chore:`) based on the work performed in this request. The agent determines the type and description from the context of the request.
37
+ 5. **Commit in monorepo.** `git commit -m "<message>"` with the staged files.
38
+ 6. **Commit in mission workpiece (if applicable).** If the agent changed files in the active mission workpiece, commit there via the kernel's mission git commit command with the same message.
39
+
40
+ ## What this skill does NOT do
41
+
42
+ - Does not push to remotes (commits are local).
43
+ - Does not run `git status` after commit or report to the operator.
44
+ - Does not create empty commits (no changes = no commit).
45
+ - Does not stage files the agent did not change in this request.
46
+
47
+ ## Opt-out
48
+
49
+ The operator can skip the auto-commit for a specific request by saying "не коммить", "don't commit", or similar. The skill MUST respect explicit operator instructions to skip committing.
50
+
51
+ ## Failure modes
52
+
53
+ - **No changes**: skill detects clean working tree and skips — no error, no commit.
54
+ - **Workpiece not found**: if no active mission workpiece exists, skip workpiece commit. Monorepo commit still proceeds.
55
+ - **Workpiece commit fails**: if the workpiece commit fails (e.g. dirty tree from another agent), the skill does not block the monorepo commit. The agent reports the failure to the operator.