moflo 4.9.20 → 4.9.22

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 (240) hide show
  1. package/.claude/agents/analysis/analyze-code-quality.md +0 -121
  2. package/.claude/agents/analysis/code-analyzer.md +5 -26
  3. package/.claude/agents/architecture/system-design/arch-system-design.md +0 -119
  4. package/.claude/agents/base-template-generator.md +0 -1
  5. package/.claude/agents/core/coder.md +0 -22
  6. package/.claude/agents/core/planner.md +0 -16
  7. package/.claude/agents/core/researcher.md +0 -16
  8. package/.claude/agents/core/reviewer.md +0 -17
  9. package/.claude/agents/core/tester.md +0 -19
  10. package/.claude/agents/custom/test-long-runner.md +0 -2
  11. package/.claude/agents/development/dev-backend-api.md +0 -167
  12. package/.claude/agents/development/dev-database.md +43 -0
  13. package/.claude/agents/development/dev-frontend.md +42 -0
  14. package/.claude/agents/devops/ci-cd/ops-cicd-github.md +0 -112
  15. package/.claude/agents/documentation/api-docs/docs-api-openapi.md +0 -111
  16. package/.claude/agents/security/security-auditor.md +45 -0
  17. package/.claude/guidance/shipped/moflo-agent-rules.md +172 -0
  18. package/.claude/guidance/shipped/moflo-claude-swarm-cohesion.md +73 -265
  19. package/.claude/guidance/shipped/moflo-cli-reference.md +6 -6
  20. package/.claude/guidance/shipped/moflo-core-guidance.md +66 -184
  21. package/.claude/guidance/shipped/moflo-cross-platform.md +1 -1
  22. package/.claude/guidance/shipped/moflo-error-handling.md +3 -3
  23. package/.claude/guidance/shipped/moflo-guidance-rules.md +17 -7
  24. package/.claude/guidance/shipped/moflo-memory-strategy.md +76 -182
  25. package/.claude/guidance/shipped/moflo-memorydb-maintenance.md +6 -8
  26. package/.claude/guidance/shipped/moflo-settings-injection.md +7 -9
  27. package/.claude/guidance/shipped/moflo-source-hygiene.md +5 -5
  28. package/.claude/guidance/shipped/moflo-spell-connectors.md +3 -4
  29. package/.claude/guidance/shipped/moflo-spell-custom-steps.md +3 -4
  30. package/.claude/guidance/shipped/moflo-spell-engine.md +40 -162
  31. package/.claude/guidance/shipped/moflo-spell-runner.md +134 -0
  32. package/.claude/guidance/shipped/moflo-spell-sandboxing.md +10 -57
  33. package/.claude/guidance/shipped/moflo-spell-troubleshooting.md +149 -0
  34. package/.claude/guidance/shipped/moflo-subagents.md +43 -114
  35. package/.claude/guidance/shipped/moflo-task-icons.md +4 -4
  36. package/.claude/guidance/shipped/moflo-user-facing-language.md +3 -3
  37. package/.claude/guidance/shipped/moflo-verbose-command-filtering.md +3 -3
  38. package/.claude/guidance/shipped/moflo-yaml-reference.md +4 -5
  39. package/.claude/helpers/gate.cjs +192 -15
  40. package/.claude/helpers/prompt-hook.mjs +4 -38
  41. package/.claude/helpers/simplify-classify.cjs +32 -11
  42. package/.claude/helpers/subagent-bootstrap.json +1 -1
  43. package/.claude/helpers/subagent-start.cjs +1 -1
  44. package/.claude/skills/connector-builder/SKILL.md +42 -429
  45. package/.claude/skills/connector-builder/templates/connector.md +189 -0
  46. package/.claude/skills/connector-builder/templates/step-command.md +176 -0
  47. package/.claude/skills/eldar/SKILL.md +7 -7
  48. package/.claude/skills/fl/SKILL.md +3 -3
  49. package/.claude/skills/fl/execution-modes.md +39 -16
  50. package/.claude/skills/fl/phases.md +3 -3
  51. package/.claude/skills/{simplify → flo-simplify}/SKILL.md +11 -11
  52. package/.claude/skills/guidance/SKILL.md +17 -9
  53. package/.claude/skills/memory-patterns/SKILL.md +1 -1
  54. package/.claude/skills/publish/SKILL.md +121 -36
  55. package/.claude/skills/reset-epic/SKILL.md +2 -2
  56. package/.claude/skills/spell-builder/SKILL.md +39 -226
  57. package/.claude/skills/spell-builder/architecture.md +1 -1
  58. package/.claude/skills/spell-builder/permissions.md +107 -0
  59. package/.claude/skills/spell-builder/preflight.md +101 -0
  60. package/.claude/skills/spell-schedule/SKILL.md +2 -3
  61. package/bin/gate.cjs +192 -15
  62. package/bin/lib/retired-files.mjs +146 -0
  63. package/bin/prompt-hook.mjs +4 -38
  64. package/bin/session-start-launcher.mjs +120 -1
  65. package/bin/setup-project.mjs +63 -69
  66. package/bin/simplify-classify.cjs +32 -11
  67. package/dist/src/cli/appliance/rvfa-builder.js +1 -1
  68. package/dist/src/cli/commands/agent.js +3 -9
  69. package/dist/src/cli/commands/doctor-checks-deep.js +4 -0
  70. package/dist/src/cli/commands/hooks.js +1 -3
  71. package/dist/src/cli/commands/index.js +2 -0
  72. package/dist/src/cli/commands/retire.js +111 -0
  73. package/dist/src/cli/hooks/reasoningbank/index.js +7 -7
  74. package/dist/src/cli/init/claudemd-generator.js +30 -33
  75. package/dist/src/cli/init/executor.js +53 -69
  76. package/dist/src/cli/init/helpers-generator.js +165 -52
  77. package/dist/src/cli/init/moflo-init.js +41 -114
  78. package/dist/src/cli/init/settings-generator.js +44 -14
  79. package/dist/src/cli/mcp-tools/agent-tools.js +9 -27
  80. package/dist/src/cli/mcp-tools/hooks-tools.js +23 -21
  81. package/dist/src/cli/memory/controllers/semantic-router.js +18 -12
  82. package/dist/src/cli/memory/sona-optimizer.js +6 -6
  83. package/dist/src/cli/neural/domain/services/learning-service.js +3 -3
  84. package/dist/src/cli/services/agent-router.js +2 -5
  85. package/dist/src/cli/services/hook-block-hash.js +11 -2
  86. package/dist/src/cli/services/hook-wiring.js +86 -3
  87. package/dist/src/cli/services/subagent-bootstrap.js +1 -1
  88. package/dist/src/cli/shared/events/example-usage.js +6 -6
  89. package/dist/src/cli/shared/hooks/task-hooks.js +8 -8
  90. package/dist/src/cli/version.js +1 -1
  91. package/package.json +3 -2
  92. package/retired-files.json +1989 -0
  93. package/scripts/post-install-bootstrap.mjs +19 -0
  94. package/src/cli/data/model-registry.json +2 -2
  95. package/.claude/agents/consensus/byzantine-coordinator.md +0 -63
  96. package/.claude/agents/consensus/crdt-synchronizer.md +0 -997
  97. package/.claude/agents/consensus/gossip-coordinator.md +0 -63
  98. package/.claude/agents/consensus/performance-benchmarker.md +0 -851
  99. package/.claude/agents/consensus/quorum-manager.md +0 -823
  100. package/.claude/agents/consensus/raft-manager.md +0 -63
  101. package/.claude/agents/consensus/security-manager.md +0 -622
  102. package/.claude/agents/data/ml/data-ml-model.md +0 -193
  103. package/.claude/agents/github/code-review-swarm.md +0 -538
  104. package/.claude/agents/github/github-modes.md +0 -172
  105. package/.claude/agents/github/issue-tracker.md +0 -311
  106. package/.claude/agents/github/multi-repo-swarm.md +0 -551
  107. package/.claude/agents/github/pr-manager.md +0 -183
  108. package/.claude/agents/github/project-board-sync.md +0 -508
  109. package/.claude/agents/github/release-manager.md +0 -360
  110. package/.claude/agents/github/release-swarm.md +0 -580
  111. package/.claude/agents/github/repo-architect.md +0 -391
  112. package/.claude/agents/github/swarm-issue.md +0 -566
  113. package/.claude/agents/github/swarm-pr.md +0 -414
  114. package/.claude/agents/github/sync-coordinator.md +0 -426
  115. package/.claude/agents/github/workflow-automation.md +0 -606
  116. package/.claude/agents/goal/code-goal-planner.md +0 -440
  117. package/.claude/agents/goal/goal-planner.md +0 -168
  118. package/.claude/agents/hive-mind/collective-intelligence-coordinator.md +0 -127
  119. package/.claude/agents/hive-mind/queen-coordinator.md +0 -198
  120. package/.claude/agents/hive-mind/scout-explorer.md +0 -233
  121. package/.claude/agents/hive-mind/swarm-memory-manager.md +0 -184
  122. package/.claude/agents/hive-mind/worker-specialist.md +0 -208
  123. package/.claude/agents/neural/safla-neural.md +0 -73
  124. package/.claude/agents/optimization/benchmark-suite.md +0 -665
  125. package/.claude/agents/optimization/load-balancer.md +0 -431
  126. package/.claude/agents/optimization/performance-monitor.md +0 -672
  127. package/.claude/agents/optimization/resource-allocator.md +0 -674
  128. package/.claude/agents/optimization/topology-optimizer.md +0 -808
  129. package/.claude/agents/reasoning/goal-planner.md +0 -67
  130. package/.claude/agents/sona/sona-learning-optimizer.md +0 -74
  131. package/.claude/agents/sparc/architecture.md +0 -472
  132. package/.claude/agents/sparc/pseudocode.md +0 -318
  133. package/.claude/agents/sparc/refinement.md +0 -525
  134. package/.claude/agents/sparc/specification.md +0 -276
  135. package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +0 -225
  136. package/.claude/agents/swarm/adaptive-coordinator.md +0 -391
  137. package/.claude/agents/swarm/hierarchical-coordinator.md +0 -321
  138. package/.claude/agents/swarm/mesh-coordinator.md +0 -383
  139. package/.claude/agents/testing/production-validator.md +0 -395
  140. package/.claude/agents/testing/tdd-london-swarm.md +0 -244
  141. package/.claude/agents/v3/adr-architect.md +0 -184
  142. package/.claude/agents/v3/aidefence-guardian.md +0 -277
  143. package/.claude/agents/v3/claims-authorizer.md +0 -208
  144. package/.claude/agents/v3/collective-intelligence-coordinator.md +0 -988
  145. package/.claude/agents/v3/ddd-domain-expert.md +0 -220
  146. package/.claude/agents/v3/injection-analyst.md +0 -232
  147. package/.claude/agents/v3/memory-specialist.md +0 -987
  148. package/.claude/agents/v3/performance-engineer.md +0 -1225
  149. package/.claude/agents/v3/pii-detector.md +0 -146
  150. package/.claude/agents/v3/reasoningbank-learner.md +0 -213
  151. package/.claude/agents/v3/security-architect-aidefence.md +0 -405
  152. package/.claude/agents/v3/security-architect.md +0 -865
  153. package/.claude/agents/v3/security-auditor.md +0 -771
  154. package/.claude/agents/v3/sparc-orchestrator.md +0 -182
  155. package/.claude/agents/v3/swarm-memory-manager.md +0 -142
  156. package/.claude/agents/v3/v3-integration-architect.md +0 -205
  157. package/.claude/commands/claude-flow-help.md +0 -103
  158. package/.claude/commands/claude-flow-memory.md +0 -107
  159. package/.claude/commands/claude-flow-swarm.md +0 -205
  160. package/.claude/commands/github/README.md +0 -11
  161. package/.claude/commands/github/code-review-swarm.md +0 -514
  162. package/.claude/commands/github/code-review.md +0 -25
  163. package/.claude/commands/github/github-modes.md +0 -146
  164. package/.claude/commands/github/github-swarm.md +0 -113
  165. package/.claude/commands/github/issue-tracker.md +0 -284
  166. package/.claude/commands/github/issue-triage.md +0 -25
  167. package/.claude/commands/github/multi-repo-swarm.md +0 -519
  168. package/.claude/commands/github/pr-enhance.md +0 -26
  169. package/.claude/commands/github/pr-manager.md +0 -164
  170. package/.claude/commands/github/project-board-sync.md +0 -471
  171. package/.claude/commands/github/release-manager.md +0 -332
  172. package/.claude/commands/github/release-swarm.md +0 -544
  173. package/.claude/commands/github/repo-analyze.md +0 -25
  174. package/.claude/commands/github/repo-architect.md +0 -361
  175. package/.claude/commands/github/swarm-issue.md +0 -482
  176. package/.claude/commands/github/swarm-pr.md +0 -285
  177. package/.claude/commands/github/sync-coordinator.md +0 -294
  178. package/.claude/commands/github/workflow-automation.md +0 -442
  179. package/.claude/commands/hooks/README.md +0 -11
  180. package/.claude/commands/hooks/overview.md +0 -58
  181. package/.claude/commands/hooks/post-edit.md +0 -117
  182. package/.claude/commands/hooks/post-task.md +0 -112
  183. package/.claude/commands/hooks/pre-edit.md +0 -113
  184. package/.claude/commands/hooks/pre-task.md +0 -111
  185. package/.claude/commands/hooks/session-end.md +0 -118
  186. package/.claude/commands/hooks/setup.md +0 -103
  187. package/.claude/commands/simplify.md +0 -101
  188. package/.claude/commands/sparc/analyzer.md +0 -42
  189. package/.claude/commands/sparc/architect.md +0 -43
  190. package/.claude/commands/sparc/ask.md +0 -86
  191. package/.claude/commands/sparc/batch-executor.md +0 -44
  192. package/.claude/commands/sparc/code.md +0 -78
  193. package/.claude/commands/sparc/coder.md +0 -44
  194. package/.claude/commands/sparc/debug.md +0 -72
  195. package/.claude/commands/sparc/debugger.md +0 -44
  196. package/.claude/commands/sparc/designer.md +0 -43
  197. package/.claude/commands/sparc/devops.md +0 -98
  198. package/.claude/commands/sparc/docs-writer.md +0 -69
  199. package/.claude/commands/sparc/documenter.md +0 -44
  200. package/.claude/commands/sparc/innovator.md +0 -44
  201. package/.claude/commands/sparc/integration.md +0 -72
  202. package/.claude/commands/sparc/mcp.md +0 -106
  203. package/.claude/commands/sparc/memory-manager.md +0 -44
  204. package/.claude/commands/sparc/optimizer.md +0 -44
  205. package/.claude/commands/sparc/orchestrator.md +0 -116
  206. package/.claude/commands/sparc/post-deployment-monitoring-mode.md +0 -72
  207. package/.claude/commands/sparc/refinement-optimization-mode.md +0 -72
  208. package/.claude/commands/sparc/researcher.md +0 -44
  209. package/.claude/commands/sparc/reviewer.md +0 -44
  210. package/.claude/commands/sparc/security-review.md +0 -69
  211. package/.claude/commands/sparc/sparc-modes.md +0 -139
  212. package/.claude/commands/sparc/sparc.md +0 -99
  213. package/.claude/commands/sparc/spec-pseudocode.md +0 -69
  214. package/.claude/commands/sparc/spell-manager.md +0 -44
  215. package/.claude/commands/sparc/supabase-admin.md +0 -337
  216. package/.claude/commands/sparc/swarm-coordinator.md +0 -44
  217. package/.claude/commands/sparc/tdd.md +0 -44
  218. package/.claude/commands/sparc/tester.md +0 -44
  219. package/.claude/commands/sparc/tutorial.md +0 -68
  220. package/.claude/commands/sparc.md +0 -151
  221. package/.claude/guidance/shipped/moflo-session-start.md +0 -154
  222. package/.claude/guidance/shipped/moflo-spell-engine-architecture.md +0 -145
  223. package/.claude/skills/browser/SKILL.md +0 -204
  224. package/.claude/skills/github-code-review/SKILL.md +0 -1140
  225. package/.claude/skills/github-multi-repo/SKILL.md +0 -866
  226. package/.claude/skills/github-project-management/SKILL.md +0 -1272
  227. package/.claude/skills/github-release-management/SKILL.md +0 -1074
  228. package/.claude/skills/github-workflow-automation/SKILL.md +0 -1060
  229. package/.claude/skills/hive-mind-advanced/SKILL.md +0 -712
  230. package/.claude/skills/hooks-automation/SKILL.md +0 -1193
  231. package/.claude/skills/pair-programming/SKILL.md +0 -1202
  232. package/.claude/skills/performance-analysis/SKILL.md +0 -563
  233. package/.claude/skills/skill-builder/SKILL.md +0 -910
  234. package/.claude/skills/sparc-methodology/SKILL.md +0 -904
  235. package/.claude/skills/stream-chain/SKILL.md +0 -563
  236. package/.claude/skills/swarm-advanced/SKILL.md +0 -811
  237. package/.claude/skills/swarm-orchestration/SKILL.md +0 -179
  238. package/.claude/skills/verification-quality/SKILL.md +0 -649
  239. package/.claude/skills/worker-benchmarks/skill.md +0 -135
  240. package/.claude/skills/worker-integration/skill.md +0 -154
@@ -6,7 +6,7 @@ arguments: "[-a] <topic-or-path>"
6
6
 
7
7
  # /guidance — Author and audit project guidance
8
8
 
9
- Help the user write, edit, or audit guidance files in their `.claude/guidance/` directory so Claude actually follows the rules they wrote. The skill applies the universal rules from `.claude/guidance/shipped/moflo-guidance-rules.md` — that doc is the single source of truth, do not paraphrase or duplicate it here.
9
+ Help the user write, edit, or audit guidance files in their `.claude/guidance/` directory so Claude actually follows the rules they wrote. The skill applies the universal rules from `.claude/guidance/moflo-guidance-rules.md` — that doc is the single source of truth, do not paraphrase or duplicate it here.
10
10
 
11
11
  **Arguments:** $ARGUMENTS
12
12
 
@@ -43,7 +43,7 @@ If single-doc and the file already exists, briefly summarize what it contains (o
43
43
 
44
44
  ## Step 2 — Single-Doc Mode
45
45
 
46
- Apply the universal rules from `.claude/guidance/shipped/moflo-guidance-rules.md`. The rules cover (do not paraphrase — read the source):
46
+ Apply the universal rules from `.claude/guidance/moflo-guidance-rules.md`. The rules cover (do not paraphrase — read the source):
47
47
 
48
48
  1. Lead with `**Purpose:**` line after the H1
49
49
  2. Be imperative, not descriptive
@@ -107,7 +107,15 @@ Audit mode runs **two passes**, then merges them into one triage report. Both pa
107
107
 
108
108
  Scan the guidance directory and score each `.md` against the universal rules. Walk the directory yourself with `Glob` and `Read`; do not delegate to a subagent for the audit itself unless the user has 30+ files.
109
109
 
110
- For each `.md` file:
110
+ **Skip moflo-managed synced files first.** Read the first ~5 lines of every candidate file and check for an auto-generated marker matching `<!-- AUTO-GENERATED by (moflo|flo-setup)`. Files with that marker are mirrored from `node_modules/moflo/.claude/guidance/shipped/` on every session start — any audit-driven edit gets silently clobbered next session, so they MUST NOT enter the per-file scoring or appear in the fix triage.
111
+
112
+ Aggregate skipped files into a single rollup line in the report (count only, not actionable). Format:
113
+
114
+ ```
115
+ moflo-managed synced files: <N> skipped (auto-generated; rule violations belong upstream — file an issue against the moflo package)
116
+ ```
117
+
118
+ Then for each remaining (user-authored) `.md` file:
111
119
 
112
120
  1. Count lines (`wc -l` via Bash, or read + split)
113
121
  2. Check for `**Purpose:**` line right after H1
@@ -170,7 +178,7 @@ Once the user confirms the doc looks right:
170
178
 
171
179
  ## Cheatsheet — Universal Rules Recap
172
180
 
173
- The full rules live in `.claude/guidance/shipped/moflo-guidance-rules.md`. Quick recap:
181
+ The full rules live in `.claude/guidance/moflo-guidance-rules.md`. Quick recap:
174
182
 
175
183
  | # | Rule | One-line |
176
184
  |---|------|----------|
@@ -187,14 +195,14 @@ The full rules live in `.claude/guidance/shipped/moflo-guidance-rules.md`. Quick
187
195
  ## Important
188
196
 
189
197
  - **Memory-first is mandatory.** Always run `mcp__moflo__memory_search` in step 0 — the gate blocks reads otherwise.
190
- - **Never duplicate the rules in this skill.** Reference `.claude/guidance/shipped/moflo-guidance-rules.md` and ask the user to read it if they want depth.
198
+ - **Never duplicate the rules in this skill.** Reference `.claude/guidance/moflo-guidance-rules.md` and ask the user to read it if they want depth.
191
199
  - **Never auto-write opinionated content.** Guidance is the user's project policy; ask before injecting your own opinions.
192
200
  - **Confirm per file in audit mode.** Bulk edits to the user's guidance directory are high-blast-radius — confirm each one.
193
201
  - **The `moflo-` filename prefix is moflo-only.** Consumer projects writing their own guidance do not need it; it exists to avoid collisions when moflo's shipped guidance syncs into a consumer's directory.
194
202
 
195
203
  ## See Also
196
204
 
197
- - `.claude/guidance/shipped/moflo-guidance-rules.md` — Universal writing rules this skill enforces
198
- - `.claude/guidance/shipped/moflo-memory-strategy.md` — How well-written guidance feeds the RAG index
199
- - `.claude/guidance/shipped/moflo-task-icons.md` — UX rule the skill checks for any TaskCreate examples in the user's guidance
200
- - `.claude/guidance/shipped/moflo-user-facing-language.md` — Companion rule for any user-visible text the user's guidance discusses
205
+ - `.claude/guidance/moflo-guidance-rules.md` — Universal writing rules this skill enforces
206
+ - `.claude/guidance/moflo-memory-strategy.md` — How well-written guidance feeds the RAG index
207
+ - `.claude/guidance/moflo-task-icons.md` — UX rule the skill checks for any TaskCreate examples in the user's guidance
208
+ - `.claude/guidance/moflo-user-facing-language.md` — Companion rule for any user-visible text the user's guidance discusses
@@ -133,4 +133,4 @@ This is the same fan-out the `/flo` spell does — cheap (HNSW, parallel) and re
133
133
 
134
134
  - `vector-search` skill — RAG patterns over your own documents
135
135
  - `memory-optimization` skill — HNSW tuning, quantization, batch ops
136
- - `.claude/guidance/shipped/moflo-core-guidance.md` — CLI/MCP reference
136
+ - `.claude/guidance/moflo-core-guidance.md` — CLI/MCP reference
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: publish
3
3
  description: Bump version, build, test, publish to npm, and install locally
4
- arguments: "[patch|minor|major] [-rc]"
4
+ arguments: "<patch|minor|major> <-rc> <--check|-ch>"
5
5
  ---
6
6
 
7
7
  # /publish - Version Bump, Build, Test & Publish
@@ -13,30 +13,33 @@ Automated release pipeline for moflo. Bumps version, commits, builds, tests, run
13
13
  ## Usage
14
14
 
15
15
  ```
16
- /publish # patch bump (4.8.56 4.8.57)
16
+ /publish # patch bump, default mode (skips CI-covered gates)
17
17
  /publish minor # minor bump (4.8.56 → 4.9.0)
18
18
  /publish major # major bump (4.8.56 → 5.0.0)
19
- /publish -rc # patch RC bump (4.8.56 → 4.8.57-rc.1, or 4.8.57-rc.1 → 4.8.57-rc.2)
19
+ /publish -rc # patch RC bump (4.8.56 → 4.8.57-rc.1)
20
20
  /publish minor -rc # minor RC bump (4.8.56 → 4.9.0-rc.1)
21
- /publish patch # explicit patch bump
21
+ /publish --check # full pre-flight (lint + test + smoke + everything)
22
+ /publish -ch # short form of --check
23
+ /publish minor -ch # combine: full pre-flight on a minor bump
22
24
  ```
23
25
 
24
- ## Pre-Publish Gate — REQUIRED
26
+ ## --check / -ch flag (presence-only)
25
27
 
26
- **Before Step 1, walk the full pre-flight checklist in `.claude/guidance/internal/pre-publish-rules.md`.** That document is the authoritative ruleset for every publish — the seven layered gates (lint, build, tests, doctor, smoke, populated smoke, manifest sanity) plus the cross-platform and consumer-install posture checks. Do not paraphrase or shortcut the rules here; read them and confirm every item.
28
+ **Default (flag absent):** runs build + doctor + trigger-based manual checks only. Skips lint/test/smoke because those gates are covered by CI on every PR + push to main (`ci.yml`, `consumer-install-smoke.yml`).
27
29
 
28
- If you cannot confirm all ten checklist items at the bottom of `pre-publish-rules.md`, STOP. Fix the failing gate first and only then resume from Step 1 below. Skipping the gate to "just get this small change out" is the antipattern that produced the historical incidents named in the rules doc.
30
+ **With `--check` or `-ch` (any presence):** runs the full pre-flight from `pre-publish-rules.md` lint, build, test, doctor (strict), clean smoke, populated smoke, and a forced full walk of every manual gate. Use this for publishes that didn't go through a green PR, risky releases, or when you want belt-and-suspenders.
31
+
32
+ The flag is presence-only. `--check` and `-ch` both set it to true. There is no `--check=true` / `--check=false` syntax — absence means false.
29
33
 
30
34
  ---
31
35
 
32
36
  ## Step-by-Step Procedure
33
37
 
34
- Follow docs/BUILD.md exactly. Every step must succeed before proceeding to the next.
35
-
36
- ### Step 1: Parse Arguments
38
+ ### Step 0: Parse Arguments
37
39
 
38
40
  - Default bump type is `patch` if not specified
39
- - If `-rc` flag is present, produce a release candidate version
41
+ - `-rc` flag: produce a release candidate
42
+ - `--check` or `-ch` (presence): set `CHECK_MODE=true`. Otherwise `CHECK_MODE=false`.
40
43
  - Determine the new version string:
41
44
  - **Without `-rc`:** Use `npm version <patch|minor|major> --no-git-tag-version`
42
45
  - **With `-rc`:** Calculate manually:
@@ -44,33 +47,96 @@ Follow docs/BUILD.md exactly. Every step must succeed before proceeding to the n
44
47
  - Otherwise, bump the base version and append `-rc.1` (e.g., `4.8.56` → `4.8.57-rc.1`)
45
48
  - Write with: `npm version <new-version> --no-git-tag-version`
46
49
 
47
- ### Step 2: Rebuild After Version Bump
50
+ ### Step 1: Compute Manual-Check Fingerprint (always)
51
+
52
+ ```bash
53
+ bash .claude/skills/publish/fingerprint.sh
54
+ ```
55
+
56
+ The script diffs `HEAD` against the most recent `chore: install moflo@*` commit and pattern-matches the file list against the manual-gate triggers from `pre-publish-rules.md`. Output is one block:
57
+
58
+ ```
59
+ Triggered manual checks: bin-scriptfiles-sync info-loss-audit
60
+ Diff range: <last-publish-sha>..HEAD
61
+ Changed files: 7
62
+ ```
63
+
64
+ `Triggered manual checks: none` means gates 1/2/6 don't apply to this diff — skip them entirely.
65
+
66
+ This step costs ~50 tokens and is the cornerstone of token-efficient default mode.
67
+
68
+ ### Step 2: Build (always)
48
69
 
49
70
  ```bash
50
71
  npm run build
51
72
  ```
52
73
 
53
- This syncs the version to `src/cli/version.ts` via the `version` lifecycle script, then compiles all TypeScript.
74
+ Always runs regardless of `CHECK_MODE`. Syncs the version to `src/cli/version.ts` via the `version` lifecycle script, then compiles all TypeScript. Confirms the deliverables on disk are correct.
54
75
 
55
76
  **Must exit 0.** If it fails, stop and fix the build error.
56
77
 
57
- ### Step 3: Run Tests
78
+ ### Step 3: Lint (only if `CHECK_MODE=true`)
79
+
80
+ ```bash
81
+ npm run lint
82
+ ```
83
+
84
+ Skipped by default — `ci.yml` runs lint on every PR with `max-warnings 0`. Run when `--check` is set.
85
+
86
+ ### Step 4: Tests (only if `CHECK_MODE=true`)
58
87
 
59
88
  ```bash
60
89
  npm test
61
90
  ```
62
91
 
92
+ Skipped by default — `ci.yml` runs the full test suite on every PR. Run when `--check` is set.
93
+
63
94
  **Must have 0 test file failures.** If any test files fail, retest them individually to distinguish real failures from flaky ones (per broken window theory). Fix all real failures before proceeding.
64
95
 
65
- ### Step 4: Run Doctor
96
+ ### Step 5: Doctor (always)
66
97
 
98
+ Default mode:
67
99
  ```bash
68
100
  npx moflo doctor --fix
69
101
  ```
70
102
 
71
- All checks must pass (warnings are acceptable on Windows for sandbox tier). If doctor finds fixable issues, it will auto-fix them. If manual fixes are needed, stop and address them.
103
+ Check mode (`CHECK_MODE=true`):
104
+ ```bash
105
+ npx moflo doctor --strict
106
+ ```
107
+
108
+ Doctor is the only check with no CI equivalent — it inspects local state (daemon lock, embeddings hygiene, sandbox tier, vector-stats freshness) that CI cannot validate for you. Always runs.
109
+
110
+ ### Step 6: Smoke Tests (only if `CHECK_MODE=true`)
111
+
112
+ ```bash
113
+ npm run test:smoke
114
+ npm run test:smoke:populated
115
+ ```
116
+
117
+ Skipped by default — `consumer-install-smoke.yml` runs both profiles on Ubuntu/macOS/Windows on every PR + push to main. Run when `--check` is set.
118
+
119
+ ### Step 7: Manual Gate Walk (trigger-based, even in default mode)
120
+
121
+ Read the fingerprint output from Step 1.
72
122
 
73
- ### Step 5: Commit & Push
123
+ | Trigger | Manual check (gate) | What to walk |
124
+ |---------|---------------------|--------------|
125
+ | `split-newlines` | Gate 7 | Diff the changed file-reading code; verify any newline split uses `/\r?\n/` not `'\n'` |
126
+ | `homedir-tmpdir` | Gate 7 | Verify env-var literals use `os.homedir()` / `os.tmpdir()`, not raw `process.env.HOME` / `/tmp` |
127
+ | `bwrap-permissions` | Gate 7 | Spell bash steps that need network declare `permissionLevel: elevated` |
128
+ | `posix-only-spell-bash` | Gate 7 | Spell bash steps avoid `mkdir`/`rm`/`cp`; use `node -e` with `fs`/`os` for cross-platform file ops |
129
+ | `bin-scriptfiles-sync` | Gate 8 | New `bin/` script appears in all three `scriptFiles` arrays (`session-start-launcher.mjs`, `init/moflo-init.ts`, third sync site) |
130
+ | `helper-static-files` | Gate 8 | New helpers ship as static `bin/` files, not generated at runtime |
131
+ | `shipped-guidance-prefix` | Gate 8 | New shipped guidance has `moflo-` prefix and lives in `.claude/guidance/shipped/` |
132
+ | `files-glob-coverage` | Gate 9 | Run `npm pack --dry-run` and confirm new shipped files appear in the tarball listing |
133
+ | `info-loss-audit` | Gate 10 | For each deleted/renamed file, audit destinations bullet-by-bullet — every piece of removed content has a home |
134
+
135
+ If `CHECK_MODE=true`, walk **all** manual gates regardless of triggers (full audit). If `CHECK_MODE=false`, walk **only triggered** ones.
136
+
137
+ If the trigger set is `none` AND `CHECK_MODE=false`: skip Step 7 entirely.
138
+
139
+ ### Step 8: Commit & Push
74
140
 
75
141
  Commit the version bump files:
76
142
 
@@ -82,15 +148,13 @@ git push origin main
82
148
 
83
149
  Only commit version-related files. Do not stage unrelated changes.
84
150
 
85
- ### Step 6: Verify npm Authentication
86
-
87
- Before publishing, verify npm auth is valid:
151
+ ### Step 9: Verify npm Authentication
88
152
 
89
153
  ```bash
90
154
  npm whoami
91
155
  ```
92
156
 
93
- If this returns a 401 or "not logged in" error, the auth token in `~/.npmrc` is missing or expired. Ask the user to provide a valid npm publish token.
157
+ If 401 or "not logged in": auth token in `~/.npmrc` is missing or expired. Ask the user for a valid npm publish token.
94
158
 
95
159
  **How to create a token** (provide these instructions to the user if needed):
96
160
  1. Go to https://www.npmjs.com/settings/~/tokens
@@ -104,9 +168,9 @@ Once the user provides the token, write it to `~/.npmrc`:
104
168
  echo "//registry.npmjs.org/:_authToken=<token>" > ~/.npmrc
105
169
  ```
106
170
 
107
- Then verify with `npm whoami` before proceeding.
171
+ Verify with `npm whoami` before proceeding.
108
172
 
109
- ### Step 7: Publish to npm
173
+ ### Step 10: Publish to npm
110
174
 
111
175
  ```bash
112
176
  npm publish --tag <tag>
@@ -120,7 +184,7 @@ npm publish --tag <tag>
120
184
  - Then retry with: `npm publish --otp=<code> --tag <tag>`
121
185
  - Tip: Granular access tokens created on npmjs.com do NOT require OTP — prefer those over legacy tokens
122
186
 
123
- ### Step 8: Verify Publication
187
+ ### Step 11: Verify Publication
124
188
 
125
189
  ```bash
126
190
  npm view moflo version
@@ -129,7 +193,7 @@ npm view moflo dist-tags
129
193
 
130
194
  Confirm the published version matches what we just built.
131
195
 
132
- ### Step 9: Install Locally
196
+ ### Step 12: Install Locally
133
197
 
134
198
  ```bash
135
199
  npm install moflo@<new-version> --save-dev
@@ -137,7 +201,7 @@ npm install moflo@<new-version> --save-dev
137
201
 
138
202
  This updates `package.json` and `package-lock.json` to use the newly published version as a devDependency.
139
203
 
140
- ### Step 10: Final Commit
204
+ ### Step 13: Final Commit
141
205
 
142
206
  If `package.json` or `package-lock.json` changed from the install:
143
207
 
@@ -147,6 +211,8 @@ git commit -m "chore: install moflo@<new-version>"
147
211
  git push origin main
148
212
  ```
149
213
 
214
+ The `chore: install moflo@<version>` commit message is the anchor the fingerprint uses to bound future diffs — keep the prefix exact.
215
+
150
216
  ## Output
151
217
 
152
218
  Print a summary at the end:
@@ -154,13 +220,18 @@ Print a summary at the end:
154
220
  ```
155
221
  Publish Summary
156
222
  ───────────────
157
- Version: <old> <new>
158
- Tag: latest | rc
159
- Build: passed
160
- Tests: <N> files passed, <N> tests passed
161
- Doctor: <N> passed, <N> warnings
162
- Published: moflo@<new-version>
163
- Installed: moflo@<new-version> (devDependency)
223
+ Mode: default | --check
224
+ Version: <old> <new>
225
+ Tag: latest | rc
226
+ Build: passed
227
+ Tests: skipped (CI-covered) | <N> files passed, <N> tests passed
228
+ Lint: skipped (CI-covered) | passed
229
+ Doctor: <N> passed, <N> warnings
230
+ Smoke (clean): skipped (CI-covered) | passed
231
+ Smoke (popl): skipped (CI-covered) | passed
232
+ Triggered gates: <list> | none
233
+ Published: moflo@<new-version>
234
+ Installed: moflo@<new-version> (devDependency)
164
235
  ```
165
236
 
166
237
  ## Important
@@ -168,13 +239,27 @@ Installed: moflo@<new-version> (devDependency)
168
239
  - All commands run from the project root — never cd into subdirectories
169
240
  - Never use `--force` on npm publish
170
241
  - Never install moflo globally — it is always a local devDependency
171
- - If any step fails, stop and fix the issue before proceeding — do not skip steps
172
- - The `prepublishOnly` script in package.json runs `npm run build` automatically, so npm publish will fail-fast on any TypeScript or asset-bundling error
242
+ - If any step that DID run fails, stop and fix the issue before proceeding — do not skip steps
243
+ - The `prepublishOnly` script in package.json runs `npm run build` automatically, so npm publish will fail-fast on any TypeScript or asset-bundling error even if Step 2 had been skipped (it isn't — Step 2 always runs)
173
244
  - Pre-publish rules live in `.claude/guidance/internal/pre-publish-rules.md` — never duplicate or paraphrase them in this skill; reference and follow
174
245
 
246
+ ## When to use `--check`
247
+
248
+ Use `--check` / `-ch` when:
249
+
250
+ - The PR didn't go through CI (e.g., publishing from a local-only branch)
251
+ - You're publishing a risky change (broad refactor, infrastructure surface, packaging changes)
252
+ - CI was red on something orthogonal you waived, and you want belt-and-suspenders locally
253
+ - You explicitly want to re-walk gates 7/8/10 manually regardless of trigger output
254
+
255
+ For the common case — publishing right after a merged green PR — the default mode is correct and meaningfully cheaper in tokens and time.
256
+
175
257
  ## See Also
176
258
 
177
- - `.claude/guidance/internal/pre-publish-rules.md` — Mandatory cross-platform + consumer-install gates that gate every publish
259
+ - `.claude/skills/publish/fingerprint.sh` — Trigger-fingerprint script invoked by Step 1
260
+ - `.claude/guidance/internal/pre-publish-rules.md` — Authoritative gate ruleset (gates 1–10) and trigger map
178
261
  - `docs/BUILD.md` — Step-by-step build/publish process this skill mirrors
179
262
  - `.claude/guidance/internal/dogfooding.md` — Why we catch consumer-facing regressions first as our own dependency
180
263
  - `harness/consumer-smoke/README.md` — Smoke harness profiles (clean + populated) that prove a consumer install works
264
+ - `.github/workflows/ci.yml` — Lint/build/test gates this skill skips by default
265
+ - `.github/workflows/consumer-install-smoke.yml` — Smoke gates this skill skips by default
@@ -13,14 +13,14 @@ Fully resets an epic so it can be re-tested from scratch.
13
13
  ## Usage
14
14
 
15
15
  ```
16
- /reset-epic 287 # Reset epic #287 for retesting
16
+ /reset-epic <epic-number> # e.g. /reset-epic 287, to reset that epic for retesting
17
17
  ```
18
18
 
19
19
  ## What It Does
20
20
 
21
21
  Given an epic issue number, perform ALL of the following:
22
22
 
23
- 1. **Identify stories**: Parse the epic body for linked issue numbers (e.g., `#284`, `#285`, `#286`)
23
+ 1. **Identify stories**: Parse the epic body for linked issue numbers
24
24
  2. **Close open PRs**: Find all open PRs referencing any story number or the epic number. Close them.
25
25
  3. **Delete remote branches**: Find and delete any remote branches related to the epic (e.g., `epic/<number>-*`, `feat/<story>-*`, `revert/epic-<number>-*`)
26
26
  4. **Delete local branches**: Delete any local branches matching the same patterns (skip the current branch)