@friedbotstudio/create-baseline 0.1.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 (197) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +222 -0
  3. package/bin/cli.js +247 -0
  4. package/obj/template/.claude/agents/swarm-worker.md +52 -0
  5. package/obj/template/.claude/bin/LICENSE +201 -0
  6. package/obj/template/.claude/bin/NOTICE +48 -0
  7. package/obj/template/.claude/commands/approve-spec.md +29 -0
  8. package/obj/template/.claude/commands/approve-swarm.md +27 -0
  9. package/obj/template/.claude/commands/grant-commit.md +19 -0
  10. package/obj/template/.claude/commands/init-project.md +191 -0
  11. package/obj/template/.claude/hooks/artifact_template_guard.sh +141 -0
  12. package/obj/template/.claude/hooks/consent_gate_grant.sh +89 -0
  13. package/obj/template/.claude/hooks/destructive_cmd_guard.sh +42 -0
  14. package/obj/template/.claude/hooks/env_guard.sh +36 -0
  15. package/obj/template/.claude/hooks/git_commit_guard.sh +93 -0
  16. package/obj/template/.claude/hooks/harness_continuation.sh +121 -0
  17. package/obj/template/.claude/hooks/lib/__pycache__/resume_writer.cpython-314.pyc +0 -0
  18. package/obj/template/.claude/hooks/lib/common.sh +328 -0
  19. package/obj/template/.claude/hooks/lib/resume_writer.py +341 -0
  20. package/obj/template/.claude/hooks/lint_runner.sh +55 -0
  21. package/obj/template/.claude/hooks/memory_pre_compact.sh +36 -0
  22. package/obj/template/.claude/hooks/memory_session_start.sh +244 -0
  23. package/obj/template/.claude/hooks/memory_stop.sh +173 -0
  24. package/obj/template/.claude/hooks/plantuml_syntax_guard.sh +161 -0
  25. package/obj/template/.claude/hooks/process_lifecycle_guard.sh +89 -0
  26. package/obj/template/.claude/hooks/setup_guard.sh +50 -0
  27. package/obj/template/.claude/hooks/spec_approval_guard.sh +81 -0
  28. package/obj/template/.claude/hooks/spec_design_calls_guard.sh +183 -0
  29. package/obj/template/.claude/hooks/spec_diagram_presence_guard.sh +141 -0
  30. package/obj/template/.claude/hooks/swarm_approval_guard.sh +39 -0
  31. package/obj/template/.claude/hooks/swarm_boundary_guard.sh +136 -0
  32. package/obj/template/.claude/hooks/tdd_order_guard.sh +176 -0
  33. package/obj/template/.claude/hooks/test_runner.sh +75 -0
  34. package/obj/template/.claude/hooks/tests/fixtures/ac008_byte_equal_reference.txt +12 -0
  35. package/obj/template/.claude/hooks/tests/memory_session_start_test.sh +285 -0
  36. package/obj/template/.claude/hooks/track_guard.sh +127 -0
  37. package/obj/template/.claude/hooks/verify_pass_guard.sh +88 -0
  38. package/obj/template/.claude/memory/README.md +108 -0
  39. package/obj/template/.claude/memory/_pending.md +15 -0
  40. package/obj/template/.claude/memory/_resume.md +12 -0
  41. package/obj/template/.claude/memory/conventions.md +26 -0
  42. package/obj/template/.claude/memory/decisions.md +29 -0
  43. package/obj/template/.claude/memory/landmarks.md +26 -0
  44. package/obj/template/.claude/memory/landmines.md +27 -0
  45. package/obj/template/.claude/memory/libraries.md +27 -0
  46. package/obj/template/.claude/memory/pending-questions.md +28 -0
  47. package/obj/template/.claude/project.json +221 -0
  48. package/obj/template/.claude/settings.json +110 -0
  49. package/obj/template/.claude/skills/archive/SKILL.md +48 -0
  50. package/obj/template/.claude/skills/archive/archive.sh +145 -0
  51. package/obj/template/.claude/skills/audit-baseline/SKILL.md +80 -0
  52. package/obj/template/.claude/skills/audit-baseline/audit.sh +919 -0
  53. package/obj/template/.claude/skills/brd/SKILL.md +44 -0
  54. package/obj/template/.claude/skills/brd/template.md +83 -0
  55. package/obj/template/.claude/skills/chore/SKILL.md +99 -0
  56. package/obj/template/.claude/skills/claude-automation-recommender/LICENSE +202 -0
  57. package/obj/template/.claude/skills/claude-automation-recommender/NOTICE +69 -0
  58. package/obj/template/.claude/skills/claude-automation-recommender/SKILL.md +358 -0
  59. package/obj/template/.claude/skills/claude-automation-recommender/references/hooks-patterns.md +226 -0
  60. package/obj/template/.claude/skills/claude-automation-recommender/references/mcp-servers.md +263 -0
  61. package/obj/template/.claude/skills/claude-automation-recommender/references/plugins-reference.md +98 -0
  62. package/obj/template/.claude/skills/claude-automation-recommender/references/skills-reference.md +408 -0
  63. package/obj/template/.claude/skills/claude-automation-recommender/references/subagent-templates.md +181 -0
  64. package/obj/template/.claude/skills/code-structure/SKILL.md +204 -0
  65. package/obj/template/.claude/skills/commit/SKILL.md +21 -0
  66. package/obj/template/.claude/skills/copywriting/SKILL.md +252 -0
  67. package/obj/template/.claude/skills/copywriting/evals/evals.json +111 -0
  68. package/obj/template/.claude/skills/copywriting/references/ai-writing-detection.md +200 -0
  69. package/obj/template/.claude/skills/copywriting/references/copy-frameworks.md +344 -0
  70. package/obj/template/.claude/skills/copywriting/references/natural-transitions.md +272 -0
  71. package/obj/template/.claude/skills/design-ui/SKILL.md +175 -0
  72. package/obj/template/.claude/skills/design-ui/references/design-vs-development.md +89 -0
  73. package/obj/template/.claude/skills/design-ui/references/intent-table.md +64 -0
  74. package/obj/template/.claude/skills/design-ui/references/orchestration.md +121 -0
  75. package/obj/template/.claude/skills/design-ui/references/state-machine.md +125 -0
  76. package/obj/template/.claude/skills/document/SKILL.md +66 -0
  77. package/obj/template/.claude/skills/documentation/SKILL.md +50 -0
  78. package/obj/template/.claude/skills/harness/SKILL.md +169 -0
  79. package/obj/template/.claude/skills/humanizer/SKILL.md +489 -0
  80. package/obj/template/.claude/skills/humanizer/references/ai-writing-detection.md +208 -0
  81. package/obj/template/.claude/skills/impeccable/PROJECT_NOTES.md +22 -0
  82. package/obj/template/.claude/skills/impeccable/SKILL.md +153 -0
  83. package/obj/template/.claude/skills/impeccable/agents/openai.yaml +4 -0
  84. package/obj/template/.claude/skills/impeccable/reference/adapt.md +190 -0
  85. package/obj/template/.claude/skills/impeccable/reference/animate.md +173 -0
  86. package/obj/template/.claude/skills/impeccable/reference/audit.md +134 -0
  87. package/obj/template/.claude/skills/impeccable/reference/bolder.md +113 -0
  88. package/obj/template/.claude/skills/impeccable/reference/brand.md +104 -0
  89. package/obj/template/.claude/skills/impeccable/reference/clarify.md +174 -0
  90. package/obj/template/.claude/skills/impeccable/reference/cognitive-load.md +106 -0
  91. package/obj/template/.claude/skills/impeccable/reference/color-and-contrast.md +105 -0
  92. package/obj/template/.claude/skills/impeccable/reference/colorize.md +154 -0
  93. package/obj/template/.claude/skills/impeccable/reference/craft.md +138 -0
  94. package/obj/template/.claude/skills/impeccable/reference/critique.md +213 -0
  95. package/obj/template/.claude/skills/impeccable/reference/delight.md +302 -0
  96. package/obj/template/.claude/skills/impeccable/reference/distill.md +111 -0
  97. package/obj/template/.claude/skills/impeccable/reference/document.md +427 -0
  98. package/obj/template/.claude/skills/impeccable/reference/extract.md +70 -0
  99. package/obj/template/.claude/skills/impeccable/reference/harden.md +347 -0
  100. package/obj/template/.claude/skills/impeccable/reference/heuristics-scoring.md +234 -0
  101. package/obj/template/.claude/skills/impeccable/reference/interaction-design.md +195 -0
  102. package/obj/template/.claude/skills/impeccable/reference/layout.md +141 -0
  103. package/obj/template/.claude/skills/impeccable/reference/live.md +513 -0
  104. package/obj/template/.claude/skills/impeccable/reference/motion-design.md +99 -0
  105. package/obj/template/.claude/skills/impeccable/reference/onboard.md +234 -0
  106. package/obj/template/.claude/skills/impeccable/reference/optimize.md +258 -0
  107. package/obj/template/.claude/skills/impeccable/reference/overdrive.md +130 -0
  108. package/obj/template/.claude/skills/impeccable/reference/personas.md +178 -0
  109. package/obj/template/.claude/skills/impeccable/reference/polish.md +232 -0
  110. package/obj/template/.claude/skills/impeccable/reference/product.md +62 -0
  111. package/obj/template/.claude/skills/impeccable/reference/quieter.md +99 -0
  112. package/obj/template/.claude/skills/impeccable/reference/responsive-design.md +114 -0
  113. package/obj/template/.claude/skills/impeccable/reference/shape.md +136 -0
  114. package/obj/template/.claude/skills/impeccable/reference/spatial-design.md +100 -0
  115. package/obj/template/.claude/skills/impeccable/reference/teach.md +137 -0
  116. package/obj/template/.claude/skills/impeccable/reference/typeset.md +124 -0
  117. package/obj/template/.claude/skills/impeccable/reference/typography.md +159 -0
  118. package/obj/template/.claude/skills/impeccable/reference/ux-writing.md +107 -0
  119. package/obj/template/.claude/skills/impeccable/scripts/cleanup-deprecated.mjs +284 -0
  120. package/obj/template/.claude/skills/impeccable/scripts/command-metadata.json +94 -0
  121. package/obj/template/.claude/skills/impeccable/scripts/design-parser.mjs +820 -0
  122. package/obj/template/.claude/skills/impeccable/scripts/detect-csp.mjs +198 -0
  123. package/obj/template/.claude/skills/impeccable/scripts/is-generated.mjs +69 -0
  124. package/obj/template/.claude/skills/impeccable/scripts/live-accept.mjs +465 -0
  125. package/obj/template/.claude/skills/impeccable/scripts/live-browser.js +4684 -0
  126. package/obj/template/.claude/skills/impeccable/scripts/live-inject.mjs +436 -0
  127. package/obj/template/.claude/skills/impeccable/scripts/live-poll.mjs +187 -0
  128. package/obj/template/.claude/skills/impeccable/scripts/live-server.mjs +679 -0
  129. package/obj/template/.claude/skills/impeccable/scripts/live-wrap.mjs +395 -0
  130. package/obj/template/.claude/skills/impeccable/scripts/live.mjs +247 -0
  131. package/obj/template/.claude/skills/impeccable/scripts/load-context.mjs +93 -0
  132. package/obj/template/.claude/skills/impeccable/scripts/modern-screenshot.umd.js +14 -0
  133. package/obj/template/.claude/skills/impeccable/scripts/pin.mjs +214 -0
  134. package/obj/template/.claude/skills/implement/SKILL.md +83 -0
  135. package/obj/template/.claude/skills/intake/SKILL.md +46 -0
  136. package/obj/template/.claude/skills/intake/template.md +61 -0
  137. package/obj/template/.claude/skills/integrate/SKILL.md +62 -0
  138. package/obj/template/.claude/skills/memory-flush/SKILL.md +172 -0
  139. package/obj/template/.claude/skills/memory-flush/sweep.py +286 -0
  140. package/obj/template/.claude/skills/memory-flush/tests/run.sh +327 -0
  141. package/obj/template/.claude/skills/prose/SKILL.md +119 -0
  142. package/obj/template/.claude/skills/rca/SKILL.md +42 -0
  143. package/obj/template/.claude/skills/rca/template.md +83 -0
  144. package/obj/template/.claude/skills/research/SKILL.md +75 -0
  145. package/obj/template/.claude/skills/scenario/SKILL.md +64 -0
  146. package/obj/template/.claude/skills/scout/SKILL.md +72 -0
  147. package/obj/template/.claude/skills/security/SKILL.md +75 -0
  148. package/obj/template/.claude/skills/simplify/SKILL.md +67 -0
  149. package/obj/template/.claude/skills/spec/SKILL.md +69 -0
  150. package/obj/template/.claude/skills/spec/template.md +274 -0
  151. package/obj/template/.claude/skills/spec-diagram-review/SKILL.md +81 -0
  152. package/obj/template/.claude/skills/spec-lint/SKILL.md +55 -0
  153. package/obj/template/.claude/skills/spec-lint/lint.sh +218 -0
  154. package/obj/template/.claude/skills/spec-render/SKILL.md +45 -0
  155. package/obj/template/.claude/skills/spec-render/render.sh +109 -0
  156. package/obj/template/.claude/skills/spec-traceability-review/SKILL.md +72 -0
  157. package/obj/template/.claude/skills/swarm-dispatch/SKILL.md +212 -0
  158. package/obj/template/.claude/skills/swarm-dispatch/swarm_merge.sh +154 -0
  159. package/obj/template/.claude/skills/swarm-plan/SKILL.md +90 -0
  160. package/obj/template/.claude/skills/swarm-plan/validate.sh +181 -0
  161. package/obj/template/.claude/skills/tdd/SKILL.md +100 -0
  162. package/obj/template/.claude/skills/technical-tutorials/SKILL.md +569 -0
  163. package/obj/template/.claude/skills/technical-tutorials/references/audience-context-README.md +53 -0
  164. package/obj/template/.claude/skills/technical-tutorials/references/audience-context.md +246 -0
  165. package/obj/template/.claude/skills/technical-tutorials/references/audience-example.md +175 -0
  166. package/obj/template/.claude/skills/technical-tutorials/references/audience-template.md +152 -0
  167. package/obj/template/.claude/skills/triage/SKILL.md +55 -0
  168. package/obj/template/.claude/skills/verify/SKILL.md +74 -0
  169. package/obj/template/.mcp.json +24 -0
  170. package/obj/template/CLAUDE.md +327 -0
  171. package/obj/template/docs/init/seed.md +585 -0
  172. package/obj/template/manifest.json +214 -0
  173. package/package.json +48 -0
  174. package/src/.mcp.template.json +24 -0
  175. package/src/.npmrc.template +2 -0
  176. package/src/CLAUDE.template.md +327 -0
  177. package/src/agents/swarm-worker.template.md +51 -0
  178. package/src/cli/conflict.js +31 -0
  179. package/src/cli/doctor.js +152 -0
  180. package/src/cli/install.js +93 -0
  181. package/src/cli/io.js +27 -0
  182. package/src/cli/manifest.js +38 -0
  183. package/src/cli/mcp.js +54 -0
  184. package/src/cli/merge.js +107 -0
  185. package/src/cli/plantuml.js +121 -0
  186. package/src/cli/util.js +10 -0
  187. package/src/memory/_pending.template.md +15 -0
  188. package/src/memory/_resume.template.md +12 -0
  189. package/src/memory/conventions.template.md +26 -0
  190. package/src/memory/decisions.template.md +29 -0
  191. package/src/memory/landmarks.template.md +26 -0
  192. package/src/memory/landmines.template.md +27 -0
  193. package/src/memory/libraries.template.md +27 -0
  194. package/src/memory/pending-questions.template.md +28 -0
  195. package/src/project.template.json +221 -0
  196. package/src/seed.template.md +585 -0
  197. package/src/settings.template.json +110 -0
@@ -0,0 +1,221 @@
1
+ {
2
+ "$schema_version": 1,
3
+ "configured": false,
4
+ "test": {
5
+ "cmd": "bash .claude/skills/audit-baseline/audit.sh",
6
+ "affected_resolver": null,
7
+ "file_globs": [
8
+ "**/*"
9
+ ],
10
+ "timeout_seconds": 120
11
+ },
12
+ "lint": {
13
+ "cmd": null,
14
+ "file_globs": [
15
+ "**/*"
16
+ ],
17
+ "timeout_seconds": 60
18
+ },
19
+ "tdd": {
20
+ "enabled": true,
21
+ "source_globs": [
22
+ "src/**",
23
+ "bin/**",
24
+ "scripts/**",
25
+ "site/assets/src/**",
26
+ ".claude/skills/**",
27
+ ".claude/hooks/**"
28
+ ],
29
+ "test_globs": [
30
+ "tests/**",
31
+ "test/**",
32
+ "spec/**",
33
+ "__tests__/**",
34
+ "**/*_test.*",
35
+ "**/*.test.*",
36
+ "**/*.spec.*"
37
+ ],
38
+ "mapping": "conventional",
39
+ "exempt_globs": [
40
+ "**/*.md",
41
+ "**/*.json",
42
+ "**/*.yaml",
43
+ "**/*.yml",
44
+ "**/*.toml",
45
+ "docs/**",
46
+ ".claude/**",
47
+ ".config/**",
48
+ "src/**.template.*",
49
+ "site/assets/brandmark*",
50
+ "site/assets/favicon/**"
51
+ ],
52
+ "ui_globs": [
53
+ "site-src/**",
54
+ "app/**/*.{tsx,jsx}",
55
+ "components/**/*.{tsx,jsx,vue,svelte}",
56
+ "pages/**/*.{tsx,jsx,vue,svelte}",
57
+ "src/**/*.{tsx,jsx,vue,svelte}",
58
+ "**/*.html",
59
+ "**/*.css",
60
+ "**/*.scss",
61
+ "**/*.njk"
62
+ ]
63
+ },
64
+ "destructive": {
65
+ "mode": "ask",
66
+ "hard_block_patterns": [
67
+ "^\\s*rm\\s+.*-[a-zA-Z]*r[a-zA-Z]*f[a-zA-Z]*\\s+/(\\s|$)",
68
+ "^\\s*rm\\s+.*-[a-zA-Z]*f[a-zA-Z]*r[a-zA-Z]*\\s+/(\\s|$)",
69
+ ":\\(\\)\\s*\\{\\s*:\\|:&\\s*\\};:",
70
+ "\\bdd\\b.*of=/dev/(sd|nvme|hd|disk)",
71
+ "\\bmkfs(\\.[a-z0-9]+)?\\b",
72
+ "\\b(shutdown|halt|poweroff|reboot)\\b",
73
+ ">\\s*/dev/sda",
74
+ "\\bchmod\\s+-R\\s+000\\s+/"
75
+ ],
76
+ "ask_patterns": [
77
+ "\\brm\\s+-[a-zA-Z]*r[a-zA-Z]*f[a-zA-Z]*\\b",
78
+ "\\bgit\\s+reset\\s+--hard\\b",
79
+ "\\bgit\\s+clean\\s+-[a-zA-Z]*f[a-zA-Z]*\\b",
80
+ "\\bgit\\s+checkout\\s+--\\b",
81
+ "\\bgit\\s+branch\\s+-D\\b",
82
+ "\\bgit\\s+push\\s+.*(--force|--force-with-lease|-f\\b)",
83
+ "\\bdrop\\s+(table|database|schema)\\b",
84
+ "\\btruncate\\s+table\\b",
85
+ "\\bkill\\s+-9\\b",
86
+ "\\bchown\\s+-R\\b.*\\s/",
87
+ "\\bnpm\\s+publish\\b",
88
+ "\\bnpm\\s+version\\b",
89
+ "\\bgit\\s+init\\b"
90
+ ]
91
+ },
92
+ "workflow": {
93
+ "phases": [
94
+ "intake",
95
+ "scout",
96
+ "research",
97
+ "spec",
98
+ "review",
99
+ "tdd",
100
+ "simplify",
101
+ "security",
102
+ "integrate",
103
+ "document",
104
+ "commit"
105
+ ],
106
+ "optional_phases": [
107
+ "security"
108
+ ],
109
+ "artifacts": {
110
+ "intake": "docs/intake/*.md",
111
+ "scout": "docs/scout/*.md",
112
+ "research": "docs/research/*.md",
113
+ "spec": "docs/specs/*.md",
114
+ "review": ".claude/state/spec_approvals/*.approval",
115
+ "tdd": null,
116
+ "simplify": null,
117
+ "security": "docs/security/*.md",
118
+ "integrate": null,
119
+ "document": "site/dist/**",
120
+ "commit": null
121
+ }
122
+ },
123
+ "artifacts": {
124
+ "required_sections": {
125
+ "intake": [
126
+ "Problem",
127
+ "Goal",
128
+ "Acceptance criteria"
129
+ ],
130
+ "brd": [
131
+ "Business objective",
132
+ "Scope",
133
+ "Business requirements"
134
+ ],
135
+ "spec": [
136
+ "Goal",
137
+ "Design",
138
+ "Design calls",
139
+ "Acceptance criteria",
140
+ "Test plan"
141
+ ],
142
+ "rca": [
143
+ "Summary",
144
+ "Timeline",
145
+ "Impact",
146
+ "Root cause",
147
+ "Action items"
148
+ ]
149
+ },
150
+ "required_diagrams": {
151
+ "spec": {
152
+ "c4_context": {
153
+ "min": 1,
154
+ "marker": "!include <C4/C4_Context>"
155
+ },
156
+ "c4_container": {
157
+ "min": 1,
158
+ "marker": "!include <C4/C4_Container>"
159
+ },
160
+ "c4_component": {
161
+ "min": 1,
162
+ "marker": "!include <C4/C4_Component>"
163
+ },
164
+ "sequence": {
165
+ "min": 1,
166
+ "any_of": [
167
+ "^\\s*participant\\b",
168
+ "^\\s*actor\\b"
169
+ ]
170
+ },
171
+ "class": {
172
+ "min": 1,
173
+ "any_of": [
174
+ "^\\s*class\\s+\\w"
175
+ ]
176
+ },
177
+ "dependency_graph": {
178
+ "min": 1,
179
+ "any_of": [
180
+ "'\\s*@kind\\s+dependency-graph"
181
+ ]
182
+ }
183
+ }
184
+ }
185
+ },
186
+ "consent": {
187
+ "commit_ttl_seconds": 300,
188
+ "gate_marker_ttl_seconds": 120
189
+ },
190
+ "swarm": {
191
+ "max_parallel": 4,
192
+ "granularity": "component",
193
+ "min_tasks_worth_swarming": 3,
194
+ "isolation": "shared",
195
+ "refuse_dirty_tree": true,
196
+ "exempt_path_prefixes": [
197
+ ".claude/",
198
+ ".git/",
199
+ ".venv/",
200
+ "node_modules/"
201
+ ],
202
+ "enforced_path_prefixes": [
203
+ "src/",
204
+ "lib/",
205
+ "app/",
206
+ "pkg/",
207
+ "internal/",
208
+ "tests/",
209
+ "test/",
210
+ "spec/",
211
+ "docs/"
212
+ ]
213
+ },
214
+ "additions": {
215
+ "agents": [],
216
+ "skills": [],
217
+ "hooks": [],
218
+ "mcp_servers": [],
219
+ "swarm_worker_skills": []
220
+ }
221
+ }
@@ -0,0 +1,110 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/claude-code-settings.json",
3
+ "skillListingBudgetFraction": 0.05,
4
+ "hooks": {
5
+ "PreToolUse": [
6
+ {
7
+ "matcher": "Bash",
8
+ "hooks": [
9
+ { "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/destructive_cmd_guard.sh" },
10
+ { "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/git_commit_guard.sh" },
11
+ { "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/process_lifecycle_guard.sh" }
12
+ ]
13
+ },
14
+ {
15
+ "matcher": "Write|Edit|MultiEdit|NotebookEdit",
16
+ "hooks": [
17
+ { "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/setup_guard.sh" },
18
+ { "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/env_guard.sh" },
19
+ { "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/spec_approval_guard.sh" },
20
+ { "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/swarm_approval_guard.sh" },
21
+ { "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/git_commit_guard.sh" },
22
+ { "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/verify_pass_guard.sh" },
23
+ { "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/track_guard.sh" },
24
+ { "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/artifact_template_guard.sh" },
25
+ { "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/plantuml_syntax_guard.sh" },
26
+ { "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/spec_diagram_presence_guard.sh" },
27
+ { "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/swarm_boundary_guard.sh" },
28
+ { "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/spec_design_calls_guard.sh" }
29
+ ]
30
+ },
31
+ {
32
+ "matcher": "Write",
33
+ "hooks": [
34
+ { "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/tdd_order_guard.sh" }
35
+ ]
36
+ }
37
+ ],
38
+ "UserPromptSubmit": [
39
+ {
40
+ "hooks": [
41
+ { "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/consent_gate_grant.sh" }
42
+ ]
43
+ }
44
+ ],
45
+ "PostToolUse": [
46
+ {
47
+ "matcher": "Write|Edit|MultiEdit",
48
+ "hooks": [
49
+ { "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/lint_runner.sh" },
50
+ { "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/test_runner.sh" }
51
+ ]
52
+ }
53
+ ],
54
+ "SessionStart": [
55
+ {
56
+ "hooks": [
57
+ { "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/memory_session_start.sh" }
58
+ ]
59
+ }
60
+ ],
61
+ "Stop": [
62
+ {
63
+ "hooks": [
64
+ { "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/memory_stop.sh" },
65
+ { "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/harness_continuation.sh" }
66
+ ]
67
+ }
68
+ ],
69
+ "PreCompact": [
70
+ {
71
+ "matcher": "manual|auto",
72
+ "hooks": [
73
+ { "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/memory_pre_compact.sh" }
74
+ ]
75
+ }
76
+ ]
77
+ },
78
+ "permissions": {
79
+ "allow": [
80
+ "Read",
81
+ "Bash(ls:*)",
82
+ "Bash(cat:*)",
83
+ "Bash(rg:*)",
84
+ "Bash(grep:*)",
85
+ "Bash(git status:*)",
86
+ "Bash(git diff:*)",
87
+ "Bash(git log:*)",
88
+ "Bash(git show:*)",
89
+ "Bash(git branch:*)",
90
+ "Bash(git blame:*)"
91
+ ],
92
+ "deny": [
93
+ "Bash(git push:*)",
94
+ "Bash(git commit --amend:*)",
95
+ "Bash(git reset --hard:*)",
96
+ "Bash(git clean -f:*)",
97
+ "Bash(git clean -fd:*)",
98
+ "Bash(git branch -D:*)",
99
+ "Bash(git checkout --:*)",
100
+ "Bash(git config:*)",
101
+ "Bash(git rebase -i:*)",
102
+ "Bash(git add -A:*)",
103
+ "Bash(git add .:*)",
104
+ "Edit(.env)",
105
+ "Edit(.env.*)",
106
+ "Write(.env)",
107
+ "Write(.env.*)"
108
+ ]
109
+ }
110
+ }
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: archive
3
+ owner: baseline
4
+ description: Phase 10.5 — move the slug's workflow artifacts (intake, scout, research, spec, approvals, swarm state, security reports, rendered diagrams) to docs/archive/<YYYY-MM-DD>/<slug>/. Runs before /commit so the committed tree is clean of work-in-flight files. workflow.json stays live and gets archived as the first step of /commit.
5
+ ---
6
+
7
+ # archive — Phase 10.5
8
+
9
+ Invoked after `/document` and before `/commit`. Pillar 4 of seed.md ("no historical data — moved to archive") happens here.
10
+
11
+ The archival *bundle* is planned at spec time — the spec's slug determines which files travel together. This skill is the executor.
12
+
13
+ ## Prereq
14
+
15
+ `workflow.json` must have `document` in `completed` OR in `exceptions`. Otherwise stop and say which phase is missing.
16
+
17
+ ## Steps
18
+
19
+ 1. Read `.claude/state/workflow.json` to get the slug (derive from `request`, or from any `docs/specs/*.md` that was produced — whichever is present).
20
+ 2. Run the archive script:
21
+ ```
22
+ .claude/skills/archive/archive.sh <slug>
23
+ ```
24
+ The script moves (`git mv` if repo is git, else `mv`) these artifacts — whichever exist — to `docs/archive/<YYYY-MM-DD>/<slug>/`:
25
+
26
+ | Source | Target in bundle |
27
+ |---|---|
28
+ | `docs/intake/<slug>.md` | `intake.md` |
29
+ | `docs/brd/<slug>.md` | `brd.md` |
30
+ | `docs/scout/<slug>.md` | `scout.md` |
31
+ | `docs/research/<slug>.md` | `research.md` |
32
+ | `docs/specs/<slug>.md` | `spec.md` |
33
+ | `docs/specs/_rendered/<slug>/` | `spec-rendered/` |
34
+ | `docs/security/<slug>-*.md` | `security.md` (concatenated if multiple) |
35
+ | `.claude/state/spec_approvals/<slug>.approval` | `spec.approved` |
36
+ | `.claude/state/swarm/<slug>.json` | `swarm.json` |
37
+ | `.claude/state/swarm_approvals/<slug>.approval` | `swarm.approved` |
38
+
39
+ 3. **Do NOT move `workflow.json`.** `/commit` archives it as its first step so the phase ordering is preserved until the end.
40
+
41
+ 4. Append `"archive"` to `workflow.json → completed`.
42
+ 5. Tell the user: "Archived to `docs/archive/<date>/<slug>/`. Ready for `/grant-commit` → `/commit`."
43
+
44
+ ## Constraints
45
+
46
+ - **Never archive a workflow in-flight.** If the user runs `/archive` before the workflow is done (integrate/document not complete), refuse and tell them which phase is missing.
47
+ - **Never delete artifacts.** Move-only. If a target file already exists in the bundle (re-run), refuse and tell the user to pick a new archive date or remove the conflict.
48
+ - **Idempotent on partial failure**: if the script moves 3 of 5 files and then fails, re-running continues from where it stopped (the moved files are gone from source, the un-moved are still at source).
@@ -0,0 +1,145 @@
1
+ #!/usr/bin/env bash
2
+ # archive.sh — Phase 10.5 archival.
3
+ # Moves all slug-matched workflow artifacts into docs/archive/<YYYY-MM-DD>/<slug>/.
4
+ # Never moves workflow.json (that's /commit's job).
5
+ #
6
+ # Usage: archive.sh <slug>
7
+ #
8
+ # Exit codes:
9
+ # 0 archive complete (including "nothing to archive" — idempotent)
10
+ # 1 archive target already exists with conflicting files (re-run hazard)
11
+ # 2 bad invocation / missing slug
12
+
13
+ set -u
14
+
15
+ if [ "${1:-}" = "" ]; then
16
+ echo "usage: archive.sh <slug>" >&2
17
+ exit 2
18
+ fi
19
+ SLUG="$1"
20
+ ROOT="${CLAUDE_PROJECT_DIR:-$(pwd)}"
21
+ DATE="$(date -u +%Y-%m-%d)"
22
+ BUNDLE="$ROOT/docs/archive/$DATE/$SLUG"
23
+
24
+ # Use `git mv` when in a git repo (preserves history); else plain mv.
25
+ USE_GIT=0
26
+ if git -C "$ROOT" rev-parse --is-inside-work-tree >/dev/null 2>&1; then
27
+ USE_GIT=1
28
+ fi
29
+
30
+ mkdir -p "$BUNDLE"
31
+
32
+ move() {
33
+ # $1 = source abs path, $2 = target abs path (must not exist)
34
+ local src="$1" dst="$2"
35
+ if [ ! -e "$src" ]; then
36
+ return 0
37
+ fi
38
+ if [ -e "$dst" ]; then
39
+ echo "archive: refusing to overwrite existing $dst" >&2
40
+ return 1
41
+ fi
42
+ mkdir -p "$(dirname "$dst")"
43
+ if [ "$USE_GIT" = "1" ] && git -C "$ROOT" ls-files --error-unmatch "${src#$ROOT/}" >/dev/null 2>&1; then
44
+ git -C "$ROOT" mv "${src#$ROOT/}" "${dst#$ROOT/}"
45
+ else
46
+ mv "$src" "$dst"
47
+ fi
48
+ echo " moved: ${src#$ROOT/} -> ${dst#$ROOT/}"
49
+ }
50
+
51
+ count_moved=0
52
+ failed=0
53
+
54
+ declare -a PAIRS=(
55
+ "docs/intake/$SLUG.md intake.md"
56
+ "docs/brd/$SLUG.md brd.md"
57
+ "docs/scout/$SLUG.md scout.md"
58
+ "docs/research/$SLUG.md research.md"
59
+ "docs/specs/$SLUG.md spec.md"
60
+ ".claude/state/spec_approvals/$SLUG.approval spec.approved"
61
+ ".claude/state/swarm/$SLUG.json swarm.json"
62
+ ".claude/state/swarm_approvals/$SLUG.approval swarm.approved"
63
+ )
64
+
65
+ for pair in "${PAIRS[@]}"; do
66
+ # shellcheck disable=SC2086
67
+ set -- $pair
68
+ src_rel="$1"
69
+ dst_name="$2"
70
+ src="$ROOT/$src_rel"
71
+ dst="$BUNDLE/$dst_name"
72
+ if [ -e "$src" ]; then
73
+ if move "$src" "$dst"; then
74
+ count_moved=$((count_moved + 1))
75
+ else
76
+ failed=$((failed + 1))
77
+ fi
78
+ fi
79
+ done
80
+
81
+ # Rendered diagrams directory (whole subtree).
82
+ RENDERED_SRC="$ROOT/docs/specs/_rendered/$SLUG"
83
+ RENDERED_DST="$BUNDLE/spec-rendered"
84
+ if [ -d "$RENDERED_SRC" ]; then
85
+ if [ -e "$RENDERED_DST" ]; then
86
+ echo "archive: refusing to overwrite existing $RENDERED_DST" >&2
87
+ failed=$((failed + 1))
88
+ else
89
+ if [ "$USE_GIT" = "1" ] && git -C "$ROOT" ls-files --error-unmatch "docs/specs/_rendered/$SLUG" >/dev/null 2>&1; then
90
+ git -C "$ROOT" mv "docs/specs/_rendered/$SLUG" "docs/archive/$DATE/$SLUG/spec-rendered"
91
+ else
92
+ mv "$RENDERED_SRC" "$RENDERED_DST"
93
+ fi
94
+ echo " moved: docs/specs/_rendered/$SLUG -> docs/archive/$DATE/$SLUG/spec-rendered"
95
+ count_moved=$((count_moved + 1))
96
+ fi
97
+ fi
98
+
99
+ # Security reports (multiple files possible).
100
+ shopt -s nullglob
101
+ for sec in "$ROOT"/docs/security/$SLUG-*.md; do
102
+ if [ -e "$sec" ]; then
103
+ # Concatenate into one security.md in the bundle.
104
+ {
105
+ echo "# Security reports — $SLUG"
106
+ echo
107
+ for f in "$ROOT"/docs/security/$SLUG-*.md; do
108
+ [ -e "$f" ] || continue
109
+ echo "## $(basename "$f")"
110
+ echo
111
+ cat "$f"
112
+ echo
113
+ done
114
+ } > "$BUNDLE/security.md"
115
+ # Remove originals.
116
+ for f in "$ROOT"/docs/security/$SLUG-*.md; do
117
+ [ -e "$f" ] || continue
118
+ if [ "$USE_GIT" = "1" ] && git -C "$ROOT" ls-files --error-unmatch "${f#$ROOT/}" >/dev/null 2>&1; then
119
+ git -C "$ROOT" rm -q "${f#$ROOT/}"
120
+ else
121
+ rm "$f"
122
+ fi
123
+ count_moved=$((count_moved + 1))
124
+ done
125
+ echo " moved: docs/security/$SLUG-*.md -> docs/archive/$DATE/$SLUG/security.md"
126
+ break
127
+ fi
128
+ done
129
+ shopt -u nullglob
130
+
131
+ if [ "$failed" -gt 0 ]; then
132
+ echo "archive: $failed conflict(s). Bundle at $BUNDLE is partially populated; resolve conflicts and re-run." >&2
133
+ exit 1
134
+ fi
135
+
136
+ if [ "$count_moved" = "0" ]; then
137
+ # Nothing to archive — remove the empty bundle dir we created.
138
+ rmdir "$BUNDLE" 2>/dev/null || true
139
+ rmdir "$ROOT/docs/archive/$DATE" 2>/dev/null || true
140
+ rmdir "$ROOT/docs/archive" 2>/dev/null || true
141
+ echo "archive: nothing to archive for slug '$SLUG'"
142
+ exit 0
143
+ fi
144
+
145
+ echo "archive: OK — $count_moved artifact(s) moved to ${BUNDLE#$ROOT/}"
@@ -0,0 +1,80 @@
1
+ ---
2
+ name: audit-baseline
3
+ owner: baseline
4
+ description: Drift check between the baseline implementation on disk and the claims in `docs/init/seed.md` + cross-references in CLAUDE.md, README.md, and the rendered docs site. Verifies hook/agent/skill/command names + counts, settings.json wiring, project.json key presence, .mcp.json servers, vendored license files, and helper script presence. Exit 0 PASS / 1 FAIL — suitable for CI. Read-only; safe to invoke any time.
5
+ ---
6
+
7
+ # audit-baseline — drift defender
8
+
9
+ Mechanical check that the baseline implementation matches its specification. Deterministic, not LLM judgment — pattern matches and file presence only. Run on demand, by `/init-project` Step 8, or in CI.
10
+
11
+ ## What it checks
12
+
13
+ | Category | Check |
14
+ |---|---|
15
+ | **Counts** | Hooks, agents, skills, commands on disk match the count claimed in `seed.md` |
16
+ | **Names** | Each component's name matches the canonical list in `seed.md` §4 |
17
+ | **Helper scripts** | `validate.sh`, `swarm_merge.sh`, `render.sh`, `lint.sh`, `archive.sh` present + executable |
18
+ | **settings.json** | Every baseline hook is wired in the correct event/matcher block |
19
+ | **project.json** | Every key listed in `seed.md` §13 Step 8 exists (values may be null pre-init) |
20
+ | **.mcp.json** | `context7` and `plantuml` servers declared |
21
+ | **Vendored licenses** | `claude-automation-recommender/{LICENSE,NOTICE}` present (Apache 2.0 attribution) |
22
+ | **Cross-doc counts** | Numeric claims in `CLAUDE.md`, `README.md`, and `docs/init/seed.md` match disk |
23
+
24
+ ## Invocation
25
+
26
+ `/audit-baseline` — model-invocable and user-invocable.
27
+
28
+ Calls `audit.sh`. Output is a compact pass/fail table with a final verdict. Exits `0` on a clean audit, `1` on any failure. WARN-level findings (advisory; e.g., a doc with no relevant claims) don't fail the audit.
29
+
30
+ ## When to run
31
+
32
+ - **End of `/init-project`** — Step 8. A fresh baseline should pass.
33
+ - **Before `/approve-spec`** — confirm the baseline hasn't drifted.
34
+ - **In CI** — fail the build on drift.
35
+ - **On demand** — when something feels off, when adding a component, or after a long gap in baseline maintenance.
36
+
37
+ ## When the audit reports drift
38
+
39
+ - **Counts mismatch** → add the missing component or update `seed.md` to match the new count. Don't update one without the other.
40
+ - **Name mismatch** → a component was renamed, added, or removed. Update the canonical lists in `seed.md` §4 and the expected sets in `audit.sh`.
41
+ - **Helper missing or non-executable** → `chmod +x` or restore from history.
42
+ - **Hook unwired** → add the entry to `.claude/settings.json`.
43
+ - **project.json key missing** → re-run `/init-project`, or add the key manually.
44
+ - **License missing** (vendored skills) → restore from upstream; this is a license-compliance gap.
45
+ - **Cross-doc stale numbers** → update the docs. `seed.md` is the source of truth.
46
+
47
+ ## Maintenance
48
+
49
+ Expected name sets live in `audit.sh` (see the `expected_*` blocks). Adding a new hook, agent, skill, or command means updating both `audit.sh` and `seed.md`. The audit catches the drift; fix the implementation, not the audit.
50
+
51
+ ## Output format
52
+
53
+ ```
54
+ check status detail
55
+ ------------------------------------------ ------ ---------------------------
56
+ hooks count (seed vs baseline) PASS 17
57
+ agents count (seed vs baseline) PASS 1
58
+ skills count (seed vs baseline) PASS 36
59
+ commands count (seed vs disk) PASS 4
60
+ hooks names match seed §4.1 PASS
61
+ agents names match seed §4.2 PASS
62
+ skills names match seed §4.3 PASS
63
+ commands names match seed §4.4 PASS
64
+ helper swarm-plan/validate.sh PASS
65
+
66
+ hook wired: setup_guard PASS
67
+
68
+ project.json: test.cmd PASS
69
+
70
+ mcp server: context7 PASS
71
+ mcp server: plantuml PASS
72
+ mcp server: playwright PASS
73
+ recommender LICENSE PASS
74
+ recommender NOTICE PASS
75
+ CLAUDE.md count claims PASS
76
+ README.md count claims PASS
77
+ docs/init/seed.md count claims PASS
78
+ ------------------------------------------ ------
79
+ overall PASS fails=0 warns=0
80
+ ```