@slamb2k/mad-skills 2.0.19 → 2.0.20

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mad-skills",
3
3
  "description": "AI-assisted planning, development and governance tools",
4
- "version": "2.0.19",
4
+ "version": "2.0.20",
5
5
  "author": {
6
6
  "name": "slamb2k",
7
7
  "url": "https://github.com/slamb2k"
package/README.md CHANGED
@@ -9,7 +9,7 @@ A skill framework for Claude Code. Ships 10 skills covering the full development
9
9
  | Skill | Command | Description |
10
10
  |-------|---------|-------------|
11
11
  | **build** | `/build` | Context-isolated feature development pipeline. Takes a design/plan and executes explore, question, architect, implement, review, ship inside subagents. |
12
- | **brace** | `/brace` | Initialize projects with the GOTCHA/BRACE framework. Creates 6-layer structure, BRACE build methodology, and project CLAUDE.md. |
12
+ | **brace** | `/brace` | Initialize projects with a standard scaffold. Creates specs/, tools/, context/ directories, project CLAUDE.md, and branch protection. |
13
13
  | **distil** | `/distil` | Generate multiple unique web design variations. Creates a Vite + React + TypeScript + Tailwind project with N designs at /1, /2, /3. |
14
14
  | **dock** | `/dock` | Generate container release pipelines. Builds once, promotes immutable images through dev → staging → prod. Supports Azure Container Apps, AWS Fargate, Cloud Run, Kubernetes, Dokku, Coolify, CapRover. |
15
15
  | **keel** | `/keel` | Generate IaC pipelines (Terraform, Bicep, Pulumi, CDK) to provision cloud infrastructure. Plans on PR, applies on merge. Provisions what /dock deploys to. |
@@ -80,7 +80,7 @@ The session guard checks: git status, CLAUDE.md presence and freshness, task lis
80
80
 
81
81
  ### Step 1: `/brace` — Initialize the Project
82
82
 
83
- Start in an empty folder. `/brace` creates the project skeleton using the GOTCHA/BRACE framework.
83
+ Start in an empty folder. `/brace` creates the project scaffold.
84
84
 
85
85
  ```
86
86
  > /brace my-webapp
@@ -91,12 +91,10 @@ Start in an empty folder. `/brace` creates the project skeleton using the GOTCHA
91
91
  ```
92
92
  my-webapp/
93
93
  ├── CLAUDE.md # AI-readable project instructions
94
- ├── goals/ # Project goals and success criteria
95
- ├── orchestration/ # Workflow definitions
96
- ├── tools/ # Tool configurations
97
- ├── context/ # Domain knowledge
98
- ├── hard_prompts/ # Reusable prompt templates
99
- └── args/ # Runtime parameters
94
+ ├── .gitignore # Ignores credentials, data, temp files
95
+ ├── specs/ # Specifications (/speccy → /build)
96
+ ├── context/ # Domain knowledge and references
97
+ └── .tmp/ # Scratch work (gitignored)
100
98
  ```
101
99
 
102
100
  The CLAUDE.md it creates becomes the foundation — every subsequent skill reads it for project context.
@@ -57,7 +57,7 @@ function check() {
57
57
  'No CLAUDE.md found. Want me to set up this project for Claude Code?',
58
58
  'single_select',
59
59
  [
60
- '"Set up with BRACE" \u2014 run `/brace` to scaffold CLAUDE.md + GOTCHA framework (goals, tools, context)',
60
+ '"Set up with /brace" \u2014 scaffold CLAUDE.md + project structure (specs, tools, context)',
61
61
  '"Basic init" \u2014 run `/init` to scaffold CLAUDE.md only',
62
62
  '"Skip" \u2014 continue without one',
63
63
  ],
@@ -68,7 +68,7 @@ function check() {
68
68
 
69
69
  output.add(`[SESSION GUARD] \u2705 CLAUDE.md found in: ${PROJECT_DIR}`);
70
70
 
71
- // 1b) BRACE framework check
71
+ // 1b) Project scaffold check
72
72
  checkBrace(PROJECT_DIR, output);
73
73
 
74
74
  // 1c) Rig (dev tooling) check
@@ -165,19 +165,19 @@ function remind() {
165
165
  // ─── brace check ──────────────────────────────────────────────────
166
166
 
167
167
  function checkBrace(projectDir, output) {
168
- const manifest = join(projectDir, 'goals', 'manifest.md');
169
- if (existsSync(manifest)) return; // BRACE already set up
168
+ const specsDir = join(projectDir, 'specs');
169
+ if (existsSync(specsDir)) return; // scaffold already set up
170
170
 
171
171
  const prefs = state.loadPrefs(projectDir);
172
172
  if (prefs.braceDismissed) return; // User said don't ask again
173
173
 
174
- output.add('[SESSION GUARD] \u2139\uFE0F CLAUDE.md exists but no GOTCHA/BRACE framework detected.');
174
+ output.add('[SESSION GUARD] \u2139\uFE0F CLAUDE.md exists but no project scaffold detected.');
175
175
  output.add('[SESSION GUARD] BRACE_DISMISS: If the user selects "Don\'t ask again", run: node <path-to-session-guard.cjs> dismiss-brace');
176
176
  output.addQuestion(
177
- 'This project has a CLAUDE.md but no GOTCHA/BRACE framework (goals/, tools/, context/). Want to set it up?',
177
+ 'This project has a CLAUDE.md but no project scaffold (specs/, tools/, context/). Want to set it up?',
178
178
  'single_select',
179
179
  [
180
- '"Set up BRACE" \u2014 run `/brace` to add the GOTCHA framework structure',
180
+ '"Set up with /brace" \u2014 add project scaffold structure',
181
181
  '"Not now" \u2014 skip for this session',
182
182
  '"Don\'t ask again" \u2014 dismiss permanently for this project',
183
183
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slamb2k/mad-skills",
3
- "version": "2.0.19",
3
+ "version": "2.0.20",
4
4
  "description": "Claude Code skills collection — planning, development and governance tools",
5
5
  "type": "module",
6
6
  "repository": {
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: brace
3
- description: 'Initialize any project directory with the GOTCHA/BRACE framework for agentic AI systems. Creates the 6-layer structure (Goals, Orchestration, Tools, Context, Hard prompts, Args), BRACE build methodology, and a project CLAUDE.md. Recommends claude-mem for persistent memory. Idempotent — safe to run on existing projects. Triggers: "init gotcha", "setup brace", "brace", "initialize framework", "bootstrap gotcha".'
4
- argument-hint: "[--no-brace] [--force]"
3
+ description: 'Initialize any project directory with a standard scaffold for AI-assisted development. Creates specs/ and context/ directories, a project CLAUDE.md with development workflow and guardrails, .gitignore, and branch protection. Recommends claude-mem for persistent memory. Idempotent — safe to run on existing projects. Triggers: "init project", "setup brace", "brace", "initialize", "bootstrap", "scaffold".'
4
+ argument-hint: "[--force]"
5
5
  allowed-tools: Bash, Read, Write, Edit, Glob, Grep, Agent, AskUserQuestion
6
6
  ---
7
7
 
8
- # Brace - GOTCHA/BRACE Framework Bootstrap
8
+ # Brace - Project Scaffold
9
9
 
10
10
  When this skill is invoked, IMMEDIATELY output the banner below before doing anything else.
11
11
  Pick ONE tagline at random — vary your choice each time.
@@ -59,9 +59,9 @@ Status icons: ✅ done · ❌ failed · ⚠️ degraded · ⏳ working · ⏭️
59
59
 
60
60
  ---
61
61
 
62
- Initialize any project directory with the GOTCHA/BRACE framework. Idempotent
63
- safe to re-run on existing projects. Content templates and subagent prompts
64
- are in `references/`.
62
+ Initialize any project directory with a standard scaffold for AI-assisted
63
+ development. Idempotent — safe to re-run on existing projects. Content
64
+ templates and subagent prompts are in `references/`.
65
65
 
66
66
  **Key principle:** Scan first, present plan, get approval, then act.
67
67
 
@@ -74,7 +74,6 @@ Report format: `references/report-template.md`
74
74
  ## Flags
75
75
 
76
76
  Parse optional flags from the request:
77
- - `--no-brace` — Skip BRACE build methodology (goals/build_app.md)
78
77
  - `--force` — Overwrite existing files without prompting
79
78
 
80
79
  ---
@@ -99,7 +98,6 @@ For each row, in order:
99
98
  4. After all checks: summarize what's available and what's degraded
100
99
 
101
100
  1. Capture **FLAGS** from the user's request
102
- 2. Create a task list tracking all 5 phases
103
101
 
104
102
  ---
105
103
 
@@ -111,7 +109,7 @@ Launch **Bash** subagent (**haiku**):
111
109
  Task(
112
110
  subagent_type: "Bash",
113
111
  model: "haiku",
114
- description: "Scan directory for existing GOTCHA structure",
112
+ description: "Scan directory for existing scaffold structure",
115
113
  prompt: <read from references/phase-prompts.md#phase-1>
116
114
  )
117
115
  ```
@@ -123,24 +121,26 @@ Parse SCAN_REPORT. Extract:
123
121
  - `has_claude_md` / `has_gitignore`
124
122
  - `has_atlas` (legacy ATLAS naming detected)
125
123
  - `has_forge` (legacy FORGE naming detected)
124
+ - `has_legacy_gotcha` (legacy GOTCHA/goals structure detected)
126
125
  - `has_legacy_memory` (old tools/memory system detected)
127
126
 
128
127
  ---
129
128
 
130
129
  ## Phase 1b: Legacy Upgrade Detection
131
130
 
132
- **Skip if none of `has_atlas`, `has_forge`, or `has_legacy_memory` is true.**
131
+ **Skip if none of `has_atlas`, `has_forge`, `has_legacy_gotcha`, or `has_legacy_memory` is true.**
133
132
 
134
133
  Build a description of what was found:
135
134
  - If `has_atlas` or `has_forge`: "Legacy ATLAS/FORGE naming detected"
135
+ - If `has_legacy_gotcha`: "Legacy GOTCHA/BRACE framework detected (goals/ directory)"
136
136
  - If `has_legacy_memory`: "Legacy memory system (tools/memory/, memory/) detected"
137
137
 
138
138
  Ask the user via AskUserQuestion:
139
139
 
140
140
  Question: "Legacy components detected: {description}. Upgrade and clean up?"
141
141
  Options:
142
- - "Yes, upgrade all" — Replace legacy naming with BRACE and remove old memory system
143
- - "No, leave as-is" — Keep existing naming and memory system
142
+ - "Yes, upgrade all" — Replace legacy structure and remove old systems
143
+ - "No, leave as-is" — Keep existing structure
144
144
 
145
145
  Store result as `upgrade_legacy: true|false` in USER_CONFIG.
146
146
 
@@ -153,10 +153,9 @@ Store result as `upgrade_legacy: true|false` in USER_CONFIG.
153
153
  1. Derive default project name from SCAN_REPORT `directory_name`
154
154
  2. Present via AskUserQuestion:
155
155
 
156
- Question: "What to include in GOTCHA setup?"
156
+ Question: "Set up project scaffold?"
157
157
  Options:
158
- - "Full GOTCHA + BRACE (Recommended)"
159
- - "GOTCHA structure only (no BRACE methodology)"
158
+ - "Full scaffold (Recommended)" — CLAUDE.md, directories, guardrails
160
159
  - "Cancel"
161
160
 
162
161
  3. If not cancelled, ask for project description (one sentence) via
@@ -173,7 +172,6 @@ Store result as `upgrade_legacy: true|false` in USER_CONFIG.
173
172
  5. Store as USER_CONFIG:
174
173
  - project_name: from directory name or user override
175
174
  - description: from user input
176
- - include_brace: true/false (based on selection and `--no-brace`)
177
175
  - install_level: "both" | "global" | "project"
178
176
 
179
177
  **If cancelled, stop here.**
@@ -188,34 +186,33 @@ For each item in `references/scaffold-manifest.md`:
188
186
  - If component not selected in USER_CONFIG → status: "not selected"
189
187
  - If item already exists (from SCAN_REPORT) and no `--force` → status: "skip"
190
188
  - If item exists and `--force` → status: "overwrite"
191
- - If CLAUDE.md exists → status: "merge" (append GOTCHA section)
189
+ - If CLAUDE.md exists → status: "merge" (append scaffold sections)
192
190
  - If .gitignore exists → status: "merge" (append missing entries)
193
191
  - Otherwise → status: "create"
194
192
 
195
193
  If `upgrade_legacy` is true in USER_CONFIG, set status "upgrade" for:
196
194
  - CLAUDE.md (replaces "merge" or "skip" — upgrade takes priority)
197
- - goals/build_app.md (replaces "skip")
198
- - goals/manifest.md (replaces "skip")
195
+
196
+ If `upgrade_legacy` is true AND `has_legacy_gotcha` is true, additionally:
197
+ - `goals/` → status: "remove" (only if contains only manifest.md and build_app.md)
199
198
 
200
199
  If `upgrade_legacy` is true AND `has_legacy_memory` is true, additionally:
201
200
  - `tools/memory/` → status: "remove"
202
201
  - `memory/` → status: "remove"
203
- - CLAUDE.md also gets memory section replacement (handled alongside upgrade)
204
202
  - `tools/manifest.md` → status: "cleanup" (remove memory tool rows)
205
203
  - `.gitignore` → status: "cleanup" (remove memory/*.npy entry)
206
204
 
207
205
  Present plan summary to user via AskUserQuestion:
208
206
 
209
207
  ```
210
- GOTCHA Framework Setup for: {project_name}
208
+ Project Scaffold for: {project_name}
211
209
 
212
210
  Will create: {list of items with status "create"}
213
211
  Will merge: {list of items with status "merge"}
214
- Will upgrade: {list of items with status "upgrade" — legacy → BRACE}
215
- Will remove: {list of items with status "remove" — legacy memory system}
212
+ Will upgrade: {list of items with status "upgrade"}
213
+ Will remove: {list of items with status "remove" — legacy cleanup}
216
214
  Will clean: {list of items with status "cleanup" — remove legacy references}
217
215
  Will skip: {count} existing items
218
- Not selected: {count} items
219
216
  Global config: {install_level description}
220
217
 
221
218
  Proceed?
@@ -234,7 +231,7 @@ Launch **general-purpose** subagent:
234
231
  ```
235
232
  Task(
236
233
  subagent_type: "general-purpose",
237
- description: "Create GOTCHA framework structure",
234
+ description: "Create project scaffold structure",
238
235
  prompt: <read from references/phase-prompts.md#phase-4>
239
236
  )
240
237
  ```
@@ -247,12 +244,6 @@ Before sending the prompt, substitute these variables:
247
244
  - `{CLAUDE_MD_TEMPLATE}` — read from `references/claude-md-template.md`
248
245
  (the section between BEGIN TEMPLATE and END TEMPLATE)
249
246
  - `{GITIGNORE_CONTENT}` — read from `assets/gitignore-template`
250
- - `{GOALS_MANIFEST}` — read from `references/scaffold-manifest.md`
251
- (the goals/manifest.md content block)
252
- - `{TOOLS_MANIFEST}` — read from `references/scaffold-manifest.md`
253
- (the tools/manifest.md content block)
254
- - `{BRACE_WORKFLOW}` — read from `references/brace-workflow.md`
255
- (the section after the header, used for goals/build_app.md)
256
247
  - `{GLOBAL_PREFERENCES_CONTENT}` — read from `assets/global-preferences-template.md`
257
248
  (the section between BEGIN TEMPLATE and END TEMPLATE)
258
249
 
@@ -268,7 +259,7 @@ Launch **Bash** subagent (**haiku**):
268
259
  Task(
269
260
  subagent_type: "Bash",
270
261
  model: "haiku",
271
- description: "Verify GOTCHA structure",
262
+ description: "Verify project scaffold",
272
263
  prompt: <read from references/phase-prompts.md#phase-5>
273
264
  )
274
265
  ```
@@ -278,10 +269,44 @@ Parse VERIFY_REPORT. Present the final summary using the format in
278
269
 
279
270
  ---
280
271
 
272
+ ## Phase 6: Branch Protection
273
+
274
+ **Only if the project is a git repo** (from SCAN_REPORT `git_initialized`).
275
+
276
+ Check if the default branch (main or master) has branch protection:
277
+
278
+ ```bash
279
+ default_branch=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' || echo "main")
280
+ ```
281
+
282
+ If a GitHub remote is detected (`git remote get-url origin` matches github.com):
283
+ 1. Check for existing branch protection via `gh api repos/{owner}/{repo}/branches/{default_branch}/protection` (404 = unprotected)
284
+ 2. If unprotected, ask via AskUserQuestion:
285
+
286
+ Question: "Default branch `{default_branch}` has no branch protection. Add it?"
287
+ Options:
288
+ - "Yes, require PR reviews (Recommended)" — require 1 approval, block force push
289
+ - "Skip" — leave unprotected
290
+
291
+ 3. If user accepts, apply via:
292
+ ```bash
293
+ gh api repos/{owner}/{repo}/branches/{default_branch}/protection \
294
+ -X PUT -f required_pull_request_reviews='{"required_approving_review_count":1}' \
295
+ -f enforce_admins=false \
296
+ -f restrictions=null \
297
+ -f required_status_checks=null \
298
+ -F allow_force_pushes=false \
299
+ -F allow_deletions=false
300
+ ```
301
+
302
+ Include result in the final report under a "🔒 Branch protection" section.
303
+
304
+ ---
305
+
281
306
  ## Idempotency Rules
282
307
 
283
308
  - **Skip** directories and files that already exist (unless `--force`)
284
- - **Merge** CLAUDE.md: append GOTCHA section if file exists but lacks it
309
+ - **Merge** CLAUDE.md: append scaffold sections if file exists but lacks them
285
310
  - **Merge** .gitignore: append missing entries only
286
311
  - **Never delete** user content
287
312
  - **Never overwrite** without `--force` or explicit user approval
@@ -1,90 +1,22 @@
1
- # BRACE Build Methodology
1
+ # Development Workflow
2
2
 
3
- Content for `goals/build_app.md`. Copied during brace Phase 4.
3
+ Reference material for the skills-driven development pipeline.
4
4
 
5
5
  ---
6
6
 
7
- ## Goal
7
+ ## Workflow
8
8
 
9
- Build full-stack applications using AI assistance within the GOTCHA framework.
10
- BRACE is a 5-step process that ensures apps are production-ready.
9
+ ```
10
+ /speccy specs/{name}.md /build specs/{name}.md /ship
11
+ ```
11
12
 
12
- | Step | Phase | What You Do |
13
- |------|-------|-------------|
14
- | **B** | Brief | Define problem, users, success metrics |
15
- | **R** | Research | Data schema, integrations map, stack proposal |
16
- | **A** | Architect | Design structure, validate all connections |
17
- | **C** | Construct | Build with layered architecture |
18
- | **E** | Evaluate | Test functionality, error handling |
13
+ 1. **`/speccy`** interviews the user and writes a structured spec to `specs/{name}.md`
14
+ 2. **`/build specs/{name}.md`** reads the spec, explores the codebase, designs
15
+ architecture, implements, reviews, tests, and ships
16
+ 3. **`/ship`** commits, creates PR, waits for CI, and merges
19
17
 
20
- ---
21
-
22
- ## B — Brief
23
-
24
- **Purpose:** Know exactly what you are building before touching code.
25
-
26
- 1. **What problem does this solve?** — One sentence.
27
- 2. **Who is this for?** — Specific user, not "everyone".
28
- 3. **What does success look like?** — Measurable outcome.
29
- 4. **What are the constraints?** — Budget, time, technical limits.
30
-
31
- **Output:** App Brief (problem, user, success criteria, constraints)
32
-
33
- ---
34
-
35
- ## R — Research
36
-
37
- **Purpose:** Design before building. Define the source of truth.
38
-
39
- 1. **Data schema** — Tables, fields, relationships
40
- 2. **Integrations map** — External services, auth types, API availability
41
- 3. **Technology stack proposal** — Database, backend, frontend (user approves)
42
- 4. **Edge cases** — Rate limits, auth expiry, timeouts, invalid input
43
-
44
- **Output:** Schema, approved stack, integrations checklist, edge cases
45
-
46
- ---
47
-
48
- ## A — Architect
49
-
50
- **Purpose:** Design structure and validate all connections BEFORE building.
51
-
52
- Checklist:
53
- - [ ] Database connection tested
54
- - [ ] All API keys verified
55
- - [ ] OAuth flows working
56
- - [ ] Environment variables set
57
- - [ ] Rate limits understood
58
-
59
- **Output:** All green. Fix anything that fails before proceeding.
60
-
61
- ---
62
-
63
- ## C — Construct
64
-
65
- **Purpose:** Build with proper architecture.
66
-
67
- Build order:
68
- 1. Database schema first
69
- 2. Backend API routes second
70
- 3. Frontend UI last
71
-
72
- Follow GOTCHA separation: frontend (display), backend (logic), database (truth).
73
-
74
- **Output:** Working application with functional DB, API, and UI.
75
-
76
- ---
77
-
78
- ## E — Evaluate
79
-
80
- **Purpose:** Test before shipping.
81
-
82
- - **Functional:** All buttons work, data saves/retrieves, navigation works
83
- - **Integration:** API calls succeed, auth persists, rate limits respected
84
- - **Edge cases:** Invalid input handled, empty states display, errors show feedback
85
- - **User acceptance:** Solves the original problem, no major friction
86
-
87
- **Output:** Test report (passed, failed, needs fixing)
18
+ The `specs/` directory is the handoff point — `/prime` and `/build` both scan
19
+ it automatically.
88
20
 
89
21
  ---
90
22
 
@@ -92,18 +24,6 @@ Follow GOTCHA separation: frontend (display), backend (logic), database (truth).
92
24
 
93
25
  1. Building before designing — rewrites everything
94
26
  2. Skipping connection validation — hours wasted on broken integrations
95
- 3. No data modeling — schema changes cascade into UI rewrites
27
+ 3. No data modelling — schema changes cascade into UI rewrites
96
28
  4. No testing — ship broken code, lose trust
97
29
  5. Hardcoding everything — no flexibility for changes
98
-
99
- ---
100
-
101
- ## GOTCHA Layer Mapping
102
-
103
- | BRACE Step | GOTCHA Layer |
104
- |------------|--------------|
105
- | Brief | Goals (define the process) |
106
- | Research | Context (reference patterns) |
107
- | Architect | Args (environment setup) |
108
- | Construct | Tools (execution) |
109
- | Evaluate | Orchestration (AI validates) |
@@ -16,46 +16,27 @@ BEGIN TEMPLATE
16
16
 
17
17
  {PROJECT_DESCRIPTION}
18
18
 
19
- ## Operating Framework: GOTCHA
20
-
21
- This project uses the **GOTCHA Framework** — a 6-layer architecture for
22
- agentic AI systems. LLMs handle reasoning; deterministic tools handle execution.
23
-
24
- **GOT** (The Engine):
25
- - **Goals** (`goals/`) — Process definitions. Check `goals/manifest.md` first.
26
- - **Orchestration** — You (the AI). Read goals, delegate to tools, handle errors.
27
- - **Tools** (`tools/`) — Python scripts. Check `tools/manifest.md` first.
28
-
29
- **CHA** (The Context):
30
- - **Context** (`context/`) — Domain knowledge, reference material
31
- - **Hard Prompts** (`hardprompts/`) — Reusable instruction templates
32
- - **Args** (`args/`) — Behaviour settings (YAML/JSON)
33
-
34
- ### Operating Rules
35
-
36
- 1. **Check goals first** — Before any task, read `goals/manifest.md`
37
- 2. **Check tools first** — Before writing code, read `tools/manifest.md`
38
- 3. **Fix and document** — When tools fail, fix them and update the goal
39
- 4. **Never modify goals without permission** — Goals are living documentation
40
- 5. **Communicate when stuck** — Explain what is missing, do not guess
41
-
42
- ## Directory Structure
19
+ ## Project Structure
43
20
 
44
21
  ```
45
22
  {PROJECT_NAME}/
46
23
  ├── CLAUDE.md This file
47
24
  ├── .gitignore Ignores credentials, data, temp files
48
- ├── goals/ Process definitions
49
- │ ├── manifest.md Index of all goals
50
- │ └── build_app.md BRACE build methodology
51
- ├── tools/ Deterministic scripts
52
- │ └── manifest.md Index of all tools
25
+ ├── specs/ Specifications (/speccy output, /build input)
53
26
  ├── context/ Domain knowledge and references
54
- ├── hardprompts/ Reusable LLM instruction templates
55
- ├── args/ Behaviour settings (YAML/JSON)
56
27
  └── .tmp/ Scratch work (gitignored)
57
28
  ```
58
29
 
30
+ ## Development Workflow
31
+
32
+ ```
33
+ /speccy → specs/{name}.md → /build specs/{name}.md → /ship
34
+ ```
35
+
36
+ - `/speccy` interviews and writes a structured spec to `specs/`
37
+ - `/build` reads the spec, explores, designs, implements, reviews, tests
38
+ - `/ship` commits, creates PR, waits for CI, merges
39
+
59
40
  ## Memory
60
41
 
61
42
  For persistent memory across sessions, install the **claude-mem** plugin:
@@ -68,24 +49,17 @@ MCP tools for search, timeline, and observation management. Claude Code's
68
49
  built-in auto memory (`~/.claude/projects/<project>/memory/MEMORY.md`)
69
50
  handles curated facts.
70
51
 
71
- ## Build Methodology: BRACE
72
-
73
- See `goals/build_app.md` for the full workflow:
74
- - **B**rief — Define problem, users, success metrics
75
- - **R**esearch — Data schema, integrations, stack proposal
76
- - **A**rchitect — Design structure, validate all connections
77
- - **C**onstruct — Build DB first, then API, then UI
78
- - **E**valuate — Functional, integration, edge case, acceptance testing
79
-
80
52
  {UNIVERSAL_PRINCIPLES}
81
53
 
82
54
  ## Guardrails
83
55
 
84
- - Always check manifests before creating new goals or tools
85
56
  - Verify tool output format before chaining into another tool
86
57
  - Do not assume APIs support batch operations — check first
87
58
  - Preserve intermediate outputs when workflows fail mid-execution
88
- - Read the full goal before starting — do not skim
59
+ - Use persistent tasks (`TaskCreate`/`TaskUpdate`) for cross-session tracking
89
60
  - Temporary files go in `.tmp/` — never store important data there
61
+ - Don't build before designing — rewrites everything
62
+ - Don't skip connection validation — hours wasted on broken integrations
63
+ - Don't skip data modelling — schema changes cascade into UI rewrites
90
64
 
91
65
  END TEMPLATE
@@ -10,18 +10,17 @@ and substitutes `{VARIABLE}` placeholders before sending to the subagent.
10
10
  **Agent:** Bash | **Model:** haiku
11
11
 
12
12
  ```
13
- Scan the current working directory for existing GOTCHA/BRACE framework structure.
13
+ Scan the current working directory for existing project scaffold structure.
14
14
 
15
15
  Limit your SCAN_REPORT to 20 lines maximum.
16
16
 
17
17
  ## Checks
18
18
 
19
- 1. Check for each GOTCHA directory:
20
- goals/ tools/ context/ hardprompts/ args/ .tmp/
19
+ 1. Check for each scaffold directory:
20
+ specs/ context/ .tmp/
21
21
 
22
22
  2. Check for each key file:
23
- CLAUDE.md .gitignore goals/manifest.md goals/build_app.md
24
- tools/manifest.md
23
+ CLAUDE.md .gitignore
25
24
 
26
25
  3. Check if directory is a git repo:
27
26
  [ -d .git ] && echo "git: true" || echo "git: false"
@@ -31,7 +30,7 @@ Limit your SCAN_REPORT to 20 lines maximum.
31
30
 
32
31
  5. Check for legacy ATLAS references:
33
32
  atlas_found=false
34
- for f in CLAUDE.md goals/build_app.md goals/manifest.md; do
33
+ for f in CLAUDE.md; do
35
34
  if [ -f "$f" ] && grep -qi "ATLAS" "$f"; then
36
35
  atlas_found=true
37
36
  break
@@ -40,14 +39,20 @@ Limit your SCAN_REPORT to 20 lines maximum.
40
39
 
41
40
  6. Check for legacy FORGE references:
42
41
  forge_found=false
43
- for f in CLAUDE.md goals/build_app.md goals/manifest.md; do
42
+ for f in CLAUDE.md; do
44
43
  if [ -f "$f" ] && grep -qi "FORGE" "$f"; then
45
44
  forge_found=true
46
45
  break
47
46
  fi
48
47
  done
49
48
 
50
- 7. Check for legacy memory system:
49
+ 7. Check for legacy GOTCHA/goals structure:
50
+ legacy_gotcha=false
51
+ if [ -d "goals" ] || ([ -f "CLAUDE.md" ] && grep -q "GOTCHA" CLAUDE.md); then
52
+ legacy_gotcha=true
53
+ fi
54
+
55
+ 8. Check for legacy memory system:
51
56
  legacy_memory=false
52
57
  if [ -d "tools/memory" ] || [ -f "memory/MEMORY.md" ]; then
53
58
  legacy_memory=true
@@ -66,6 +71,7 @@ SCAN_REPORT:
66
71
  has_gitignore: true|false
67
72
  has_atlas: true|false
68
73
  has_forge: true|false
74
+ has_legacy_gotcha: true|false
69
75
  has_legacy_memory: true|false
70
76
  ```
71
77
 
@@ -76,7 +82,7 @@ SCAN_REPORT:
76
82
  **Agent:** general-purpose | **Model:** default
77
83
 
78
84
  ```
79
- Create the GOTCHA/BRACE framework structure in the current directory.
85
+ Create the project scaffold structure in the current directory.
80
86
 
81
87
  Limit your SCAFFOLD_REPORT to 15 lines maximum.
82
88
 
@@ -95,50 +101,50 @@ Skip items with status "skip" or "not selected".
95
101
  ### For "create" items:
96
102
 
97
103
  1. Create directories with mkdir -p
98
- 2. Create .gitkeep in empty directories (context/, hardprompts/, args/, .tmp/)
104
+ 2. Create .gitkeep in empty directories (specs/, context/, .tmp/)
99
105
  3. Write CLAUDE.md using the template below, substituting {PROJECT_NAME},
100
106
  {PROJECT_DESCRIPTION}, and {UNIVERSAL_PRINCIPLES}
101
107
  4. Write .gitignore from the content below
102
- 5. Write goals/manifest.md and tools/manifest.md from content below
103
- 6. Write goals/build_app.md from the BRACE workflow content below
104
108
 
105
109
  ### For "merge" items:
106
110
 
107
- - CLAUDE.md: Read existing file. If it does not contain "GOTCHA", append
108
- the GOTCHA section from the template. If it does, skip.
111
+ - CLAUDE.md: Read existing file. If it does not contain "## Project Structure"
112
+ or "## Development Workflow", append those sections from the template. If it
113
+ does, skip.
109
114
  - .gitignore: Read existing file. Append any missing entries from the
110
115
  template. Do not duplicate existing entries.
111
116
 
112
- ### For "upgrade" items (legacy → BRACE migration):
117
+ ### For "upgrade" items (legacy migration):
113
118
 
114
- These files already exist but contain legacy ATLAS or FORGE naming. Replace the
115
- legacy methodology references with BRACE equivalents while preserving all other content.
119
+ These files already exist but contain legacy naming (ATLAS, FORGE, or
120
+ GOTCHA/BRACE). Replace legacy methodology references with the current
121
+ skills-based workflow while preserving all other content.
116
122
 
117
- - **CLAUDE.md:** Replace the "Build Methodology: ATLAS" or "Build Methodology: FORGE"
118
- section (from that heading through the bullet list) with the BRACE section from
119
- the template. Also replace "ATLAS build methodology" or "FORGE build methodology"
120
- with "BRACE build methodology" in the directory tree comment. Preserve all other sections.
121
- - **goals/build_app.md:** Replace the entire file with the BRACE workflow content below.
122
- - **goals/manifest.md:** Replace "ATLAS" or "FORGE" with "BRACE" in the description column.
123
+ - **CLAUDE.md:** Replace any "Operating Framework: GOTCHA", "Build Methodology:
124
+ BRACE/ATLAS/FORGE" sections with the "Project Structure" and "Development
125
+ Workflow" sections from the template. Remove references to goals/manifest.md
126
+ and goals/build_app.md. Preserve all other sections.
123
127
 
124
- ### For "remove" items (legacy memory cleanup):
128
+ ### For "remove" items (legacy cleanup):
125
129
 
126
130
  1. Before deleting `memory/MEMORY.md`, check if it contains a "## Key Decisions"
127
131
  section. If so, extract that section content into `preserved_content` for the
128
132
  SCAFFOLD_REPORT so the user can relocate it.
129
133
  2. Remove `tools/memory/` — use `git rm -r tools/memory` if tracked, otherwise `rm -rf tools/memory`
130
134
  3. Remove `memory/` — use `git rm -r memory` if tracked, otherwise `rm -rf memory`
135
+ 4. Remove `goals/` — use `git rm -r goals` if tracked, otherwise `rm -rf goals`
136
+ (only if empty or contains only manifest.md and build_app.md)
131
137
 
132
- ### For "cleanup" items (legacy memory references):
138
+ ### For "cleanup" items (legacy references):
133
139
 
134
- - **tools/manifest.md:** Remove any rows referencing `memory/` tools (e.g. search, embed, store scripts)
135
- - **.gitignore:** Remove the `memory/*.npy` line and its `# Memory embeddings cache` comment if present
136
- - **CLAUDE.md:** If a `## Memory System` section exists, replace it with:
140
+ - **tools/manifest.md:** Remove any rows referencing `memory/` tools
141
+ - **.gitignore:** Remove the `memory/*.npy` line and its comment if present
142
+ - **CLAUDE.md:** Remove references to goals/, GOTCHA, BRACE. Replace any
143
+ `## Memory System` section with:
137
144
  ```
138
145
  ## Memory
139
146
  This project uses claude-mem for persistent cross-session memory.
140
147
  ```
141
- Also remove `tools/memory/` and `memory/` from any directory tree listings in CLAUDE.md.
142
148
 
143
149
  ### Global preferences (conditional)
144
150
 
@@ -164,18 +170,6 @@ empty string (principles are in the global config instead).
164
170
 
165
171
  {GITIGNORE_CONTENT}
166
172
 
167
- ### goals/manifest.md Content
168
-
169
- {GOALS_MANIFEST}
170
-
171
- ### tools/manifest.md Content
172
-
173
- {TOOLS_MANIFEST}
174
-
175
- ### goals/build_app.md Content
176
-
177
- {BRACE_WORKFLOW}
178
-
179
173
  ### Global Preferences Content
180
174
 
181
175
  {GLOBAL_PREFERENCES_CONTENT}
@@ -192,8 +186,8 @@ decision must be explicitly recorded and revisited.
192
186
  - When you defer a fix or skip an edge case, document why and what triggers it
193
187
  - At the end of each task, review all assumptions and open questions
194
188
  - Present unresolved items to the user with context and suggested actions
195
- - Unresolved items go to `goals/` as follow-ups, to CLAUDE.md as "Known Issues",
196
- or to memory for future session awareness
189
+ - Track unresolved items via persistent tasks (`TaskCreate`) or CLAUDE.md
190
+ "Known Issues" for future session awareness
197
191
  - At the start of new work, check for outstanding items from previous sessions
198
192
  - Never close a task with unacknowledged open questions
199
193
 
@@ -203,7 +197,7 @@ SCAFFOLD_REPORT:
203
197
  status: success|partial|failed
204
198
  created: [list of files/dirs created]
205
199
  merged: [list of files merged]
206
- upgraded: [list of files upgraded to BRACE]
200
+ upgraded: [list of files upgraded]
207
201
  removed: [list of legacy items removed]
208
202
  cleaned: [list of files cleaned of legacy references]
209
203
  preserved_content: [any key decisions extracted from memory/MEMORY.md, or empty]
@@ -219,24 +213,24 @@ SCAFFOLD_REPORT:
219
213
  **Agent:** Bash | **Model:** haiku
220
214
 
221
215
  ```
222
- Verify the GOTCHA framework was initialised correctly.
216
+ Verify the project scaffold was initialised correctly.
223
217
 
224
218
  Limit your VERIFY_REPORT to 15 lines maximum.
225
219
 
226
220
  ## Checks
227
221
 
228
222
  1. Verify expected directories exist:
229
- for d in goals tools context hardprompts args .tmp; do
223
+ for d in specs context .tmp; do
230
224
  [ -d "$d" ] && echo "dir ok: $d" || echo "dir MISSING: $d"
231
225
  done
232
226
 
233
227
  2. Verify key files exist and are non-empty:
234
- for f in CLAUDE.md .gitignore goals/manifest.md tools/manifest.md; do
228
+ for f in CLAUDE.md .gitignore; do
235
229
  [ -s "$f" ] && echo "file ok: $f" || echo "file MISSING: $f"
236
230
  done
237
231
 
238
- 3. Check CLAUDE.md contains GOTCHA reference:
239
- grep -q "GOTCHA" CLAUDE.md && echo "claude_md: has GOTCHA" || echo "claude_md: no GOTCHA"
232
+ 3. Check CLAUDE.md contains project structure:
233
+ grep -q "Project Structure" CLAUDE.md && echo "claude_md: has structure" || echo "claude_md: no structure"
240
234
 
241
235
  4. Check .gitignore has key entries:
242
236
  entries=0
@@ -245,12 +239,9 @@ Limit your VERIFY_REPORT to 15 lines maximum.
245
239
  done
246
240
  echo "gitignore entries: $entries/2"
247
241
 
248
- 5. If legacy memory cleanup was performed, verify removal:
242
+ 5. If legacy cleanup was performed, verify removal:
249
243
  if [ -d "tools/memory" ]; then echo "legacy: tools/memory still exists"; fi
250
244
  if [ -d "memory" ]; then echo "legacy: memory/ still exists"; fi
251
- if [ -f "CLAUDE.md" ] && grep -q "tools/memory" CLAUDE.md; then
252
- echo "legacy: CLAUDE.md still references tools/memory"
253
- fi
254
245
 
255
246
  ## Output Format
256
247
 
@@ -258,8 +249,8 @@ VERIFY_REPORT:
258
249
  status: complete|partial|failed
259
250
  dirs_verified: {count}/{expected}
260
251
  files_verified: {count}/{expected}
261
- claude_md_has_gotcha: true|false
252
+ claude_md_valid: true|false
262
253
  gitignore_entries: {count}/{expected}
263
- legacy_memory_cleaned: true|false|not_applicable
254
+ legacy_cleaned: true|false|not_applicable
264
255
  issues: [any problems found]
265
256
  ```
@@ -13,21 +13,16 @@ Present this summary after verification completes.
13
13
  │ 📍 Directory: {cwd}
14
14
 
15
15
  │ 📝 Structure
16
- │ {✅|⏭️} goals/ Goals layer
17
- │ {✅|⏭️} tools/ Tools layer
18
- │ {✅|⏭️} context/ Context layer
19
- │ {✅|⏭️} hardprompts/ Hard prompts layer
20
- │ {✅|⏭️} args/ Args layer
16
+ │ {✅|⏭️} specs/ Specifications
17
+ │ {✅|⏭️} context/ Domain knowledge
21
18
  │ {✅|⏭️} .tmp/ Temp directory
22
19
 
23
20
  │ 📄 Files
24
21
  │ {✅|⏭️} CLAUDE.md
25
22
  │ {✅|⏭️} .gitignore
26
- │ {✅|⏭️} goals/manifest.md
27
- │ {✅|⏭️} goals/build_app.md
28
- │ {✅|⏭️} tools/manifest.md
29
23
 
30
- │ 🗑️ Removed (only if legacy memory was cleaned up)
24
+ │ 🗑️ Removed (only if legacy items were cleaned up)
25
+ │ {✅} goals/ Legacy goals directory
31
26
  │ {✅} tools/memory/ Legacy memory scripts
32
27
  │ {✅} memory/ Legacy memory directory
33
28
 
@@ -37,8 +32,7 @@ Present this summary after verification completes.
37
32
  │ ⚡ Next steps
38
33
  │ 1. Review CLAUDE.md and customise for your project
39
34
  │ 2. Add domain knowledge to context/
40
- │ 3. Define your first goal in goals/
41
- │ 4. Start building with the BRACE methodology
35
+ │ 3. Run /speccy to design your first feature
42
36
 
43
37
  └─────────────────────────────────────────────────
44
38
  ```
@@ -11,58 +11,10 @@ creation checklist. Phase 1 uses it to detect existing structure.
11
11
  | `.gitignore` | assets/gitignore-template | Standard ignores |
12
12
  | `~/.claude/CLAUDE.md` | assets/global-preferences-template.md | Global preferences (conditional on install_level) |
13
13
 
14
- ## Goals Layer
15
-
16
- | Path | Source | Description |
17
- |------|--------|-------------|
18
- | `goals/` | mkdir | Process definitions directory |
19
- | `goals/manifest.md` | generated | Index of all goal workflows |
20
- | `goals/build_app.md` | references/brace-workflow.md | BRACE build methodology |
21
-
22
- ## Tools Layer
23
-
24
- | Path | Source | Description |
25
- |------|--------|-------------|
26
- | `tools/` | mkdir | Deterministic scripts directory |
27
- | `tools/manifest.md` | generated | Index of all tools |
28
-
29
- ## Context, Hard Prompts, Args Layers
14
+ ## Project Directories
30
15
 
31
16
  | Path | Description |
32
17
  |------|-------------|
18
+ | `specs/` | Specifications produced by `/speccy`, consumed by `/build` |
33
19
  | `context/` | Reference material and domain knowledge |
34
- | `hardprompts/` | Reusable instruction templates |
35
- | `args/` | Behaviour settings (YAML/JSON) |
36
-
37
- ## Temp
38
-
39
- | Path | Description |
40
- |------|-------------|
41
20
  | `.tmp/` | Scratch work (gitignored) |
42
-
43
- ## Generated Manifest Content
44
-
45
- ### goals/manifest.md
46
- ```
47
- # Goals Manifest
48
-
49
- Index of all goal workflows in this project.
50
-
51
- | Goal | File | Description |
52
- |------|------|-------------|
53
- | Build App | build_app.md | BRACE 5-step build methodology |
54
-
55
- Add new goals here as they are created.
56
- ```
57
-
58
- ### tools/manifest.md
59
- ```
60
- # Tools Manifest
61
-
62
- Index of all tools in this project.
63
-
64
- | Tool | Path | Description |
65
- |------|------|-------------|
66
-
67
- Add new tools here as they are created.
68
- ```
@@ -1,7 +1,7 @@
1
1
  [
2
2
  {
3
3
  "name": "banner-and-tagline",
4
- "prompt": "Initialize GOTCHA framework for this project",
4
+ "prompt": "Initialize this project with brace",
5
5
  "assertions": [
6
6
  { "type": "contains", "value": "██" },
7
7
  { "type": "regex", "value": "(Bracing the|Reinforcing before|Locking in the|Preparing for heavy|Cross-bracing|Tightening the load|Structural integrity|Brace for impact)" },
@@ -9,21 +9,20 @@
9
9
  ]
10
10
  },
11
11
  {
12
- "name": "gotcha-framework",
13
- "prompt": "Set up the GOTCHA structure in my project",
12
+ "name": "project-scaffold",
13
+ "prompt": "Set up the project scaffold with specs and context directories",
14
14
  "assertions": [
15
15
  { "type": "contains", "value": "██" },
16
- { "type": "regex", "value": "GOTCHA", "flags": "i" },
17
- { "type": "regex", "value": "(Goals|Orchestration|Tools|Context)", "flags": "i" },
18
- { "type": "semantic", "value": "Describes the GOTCHA framework with its 6-layer structure: Goals, Orchestration, Tools, Context, Hard prompts, and Args" }
16
+ { "type": "regex", "value": "(specs|context|CLAUDE\\.md)", "flags": "i" },
17
+ { "type": "semantic", "value": "Describes creating a project scaffold with specs/, context/, and .tmp/ directories plus CLAUDE.md and .gitignore" }
19
18
  ]
20
19
  },
21
20
  {
22
21
  "name": "flag-handling",
23
- "prompt": "Brace --no-brace this project directory",
22
+ "prompt": "Brace --force this project directory",
24
23
  "assertions": [
25
24
  { "type": "contains", "value": "██" },
26
- { "type": "semantic", "value": "Acknowledges the --no-brace flag, indicating it will skip the BRACE build methodology while still creating the GOTCHA directory structure" }
25
+ { "type": "semantic", "value": "Acknowledges the --force flag, indicating it will overwrite existing files without prompting" }
27
26
  ]
28
27
  }
29
28
  ]
@@ -303,13 +303,13 @@ Invoke the `/ship` skill:
303
303
  Options:
304
304
  - **"Fix now"** → create a task list of resolution activities for
305
305
  each item; present for user confirmation, then work through them
306
- - **"Create goals for future sessions"** → write goal files to `goals/`
307
- (if GOTCHA structure exists) or append to CLAUDE.md as Known Issues
306
+ - **"Create tasks for future sessions"** → create persistent tasks via
307
+ `TaskCreate` for each item, or append to CLAUDE.md as Known Issues
308
308
  - **"Note and continue"** → acknowledge items without formal tracking;
309
309
  log to memory (if exists) or as source file comments. No further action.
310
310
  - **"Let me choose per item"** → present each individually with full
311
311
  description, evidence, and impact. Options per item:
312
- "Fix now" / "Add to goals" / "Explain more" / "Note and continue".
312
+ "Fix now" / "Create task" / "Explain more" / "Note and continue".
313
313
  "Explain more" reads source files cited in evidence, provides
314
314
  expanded context, then re-presents the item for decision.
315
315
 
@@ -384,10 +384,10 @@ Options:
384
384
  a concrete task with the suggested_action. Present the task list
385
385
  for user confirmation, then work through them.
386
386
 
387
- - "Create goals for future sessions"
388
- → For each item, write a goal file to goals/ (if GOTCHA structure
389
- exists) or append to CLAUDE.md as a "Known Issues" section.
390
- Format: one goal per category grouping, not one per item.
387
+ - "Create tasks for future sessions"
388
+ → For each item, create a persistent task via TaskCreate with the
389
+ suggested_action as the task description, or append to CLAUDE.md
390
+ as a "Known Issues" section. Group by category, not one per item.
391
391
 
392
392
  - "Note and continue"
393
393
  → Acknowledge items without formal tracking. Log to memory (if memory
@@ -1,12 +1,12 @@
1
1
  {
2
- "generated": "2026-03-09T17:55:20.156Z",
2
+ "generated": "2026-03-10T03:11:12.089Z",
3
3
  "count": 10,
4
4
  "skills": [
5
5
  {
6
6
  "name": "brace",
7
7
  "directory": "brace",
8
- "description": "'Initialize any project directory with the GOTCHA/BRACE framework for agentic AI systems. Creates the 6-layer structure (Goals, Orchestration, Tools, Context, Hard prompts, Args), BRACE build methodology, and a project CLAUDE.md. Recommends claude-mem for persistent memory. Idempotent — safe to run on existing projects. Triggers: \"init gotcha\", \"setup brace\", \"brace\", \"initialize framework\", \"bootstrap gotcha\".'",
9
- "lines": 303,
8
+ "description": "'Initialize any project directory with a standard scaffold for AI-assisted development. Creates specs/ and context/ directories, a project CLAUDE.md with development workflow and guardrails, .gitignore, and branch protection. Recommends claude-mem for persistent memory. Idempotent — safe to run on existing projects. Triggers: \"init project\", \"setup brace\", \"brace\", \"initialize\", \"bootstrap\", \"scaffold\".'",
9
+ "lines": 328,
10
10
  "hasScripts": false,
11
11
  "hasReferences": true,
12
12
  "hasAssets": true,
@@ -94,7 +94,7 @@ Before asking any questions, build a thorough understanding of the project:
94
94
  the manual scan below.
95
95
  3. **Scan the project** (skip items already loaded by /prime):
96
96
  - Read `CLAUDE.md` if present (project conventions, structure, domain)
97
- - Read goal/spec manifests: `goals/manifest.md`, `spec/` directory
97
+ - Read spec directory: `specs/` for existing specifications
98
98
  - Scan existing specs and design docs for context
99
99
  - Read relevant source code that relates to the GOAL
100
100
  - Check memory for prior decisions or open questions related to the GOAL
@@ -1,113 +0,0 @@
1
- # GOTCHA Framework Principles
2
-
3
- Embedded into the project CLAUDE.md during brace.
4
-
5
- ---
6
-
7
- ## The GOTCHA Framework
8
-
9
- A 6-layer architecture for agentic systems that separates concerns between
10
- probabilistic reasoning (LLM) and deterministic execution (tools).
11
-
12
- **GOT** (The Engine):
13
- - **Goals** (`goals/`) — Task-specific instructions. Each goal defines:
14
- objective, inputs, which tools to use, expected outputs, edge cases.
15
- Only modified with explicit permission.
16
- - **Orchestration** — The AI manager (you). Reads goals, decides which tools
17
- to use, applies args, references context, handles errors, delegates work.
18
- Never executes work directly — delegates intelligently.
19
- - **Tools** (`tools/`) — Python scripts organised by workflow. Each has one
20
- job: API calls, data processing, file operations, database work. Fast,
21
- documented, testable, deterministic. All tools listed in `tools/manifest.md`.
22
-
23
- **CHA** (The Context):
24
- - **Context** (`context/`) — Static reference material: tone rules, writing
25
- samples, ICP descriptions, case studies. Shapes quality/style, not process.
26
- - **Hard Prompts** (`hardprompts/`) — Reusable text templates for LLM
27
- sub-tasks: outline-to-post, rewrite-in-voice, summarize-transcript.
28
- - **Args** (`args/`) — YAML/JSON files controlling behaviour: themes,
29
- frameworks, modes, lengths, schedules, model choices. Changing args changes
30
- behaviour without editing goals or tools.
31
-
32
- ## How to Operate
33
-
34
- ### 1. Check for existing goals first
35
- Before starting a task, check `goals/manifest.md`. If a goal exists, follow
36
- it — goals define the full process for common tasks.
37
-
38
- ### 2. Check for existing tools
39
- Before writing new code, read `tools/manifest.md`. If a tool exists, use it.
40
- If you create a new tool, you **must** add it to the manifest.
41
-
42
- ### 3. When tools fail, fix and document
43
- - Read the error and stack trace carefully
44
- - Update the tool to handle the issue
45
- - Add what you learned to the goal
46
- - If a goal gets too long, split into primary goal + technical reference
47
-
48
- ### 4. Treat goals as living documentation
49
- - Update only when better approaches or API constraints emerge
50
- - Never modify/create goals without explicit permission
51
-
52
- ### 5. Communicate clearly when stuck
53
- If you cannot complete a task with existing tools and goals:
54
- - Explain what is missing
55
- - Explain what you need
56
- - Do not guess or invent capabilities
57
-
58
- ### 6. Guardrails
59
- - Always check `tools/manifest.md` before writing a new script
60
- - Verify tool output format before chaining into another tool
61
- - Do not assume APIs support batch operations — check first
62
- - When a workflow fails mid-execution, preserve intermediate outputs
63
- - Read the full goal before starting a task — do not skim
64
-
65
- ## Memory
66
-
67
- For persistent memory across sessions, use the **claude-mem** plugin
68
- (`claude plugin install claude-mem`). It automatically captures context
69
- via lifecycle hooks and provides MCP tools for search, timeline, and
70
- observation management. Claude Code's built-in auto memory handles
71
- curated facts (`~/.claude/projects/<project>/memory/MEMORY.md`).
72
-
73
- ## Question & Assumption Accountability
74
-
75
- Nothing gets silently dropped. Every open question, assumption, and deferred
76
- decision must be explicitly recorded and revisited.
77
-
78
- ### During work:
79
- - When you make an assumption, **state it explicitly** and record it
80
- - When a question cannot be answered immediately, log it as an open item
81
- - When you defer a fix or skip an edge case, document why and what triggers it
82
-
83
- ### At the end of each task:
84
- - Review all assumptions made — were they validated?
85
- - Review all open questions — were they answered?
86
- - Review all deferred items — are they tracked for follow-up?
87
- - Present unresolved items to the user with context and suggested actions
88
-
89
- ### Persistence:
90
- - Unresolved items go to `goals/` as documented follow-ups, to CLAUDE.md
91
- as "Known Issues", or to memory for future session awareness
92
- - Never close a task with unacknowledged open questions
93
- - At the start of new work, check for outstanding items from previous sessions
94
-
95
- ### Why this matters:
96
- 90% accuracy per step means ~59% accuracy over 5 steps. Silent assumptions
97
- compound. Explicit tracking breaks the chain — each assumption is either
98
- validated or flagged before it can propagate.
99
-
100
- ## The Continuous Improvement Loop
101
-
102
- Every failure strengthens the system:
103
- 1. Identify what broke and why
104
- 2. Fix the tool script
105
- 3. Test until it works reliably
106
- 4. Update the goal with new knowledge
107
- 5. Next time — automatic success
108
-
109
- ## Deliverables vs Scratch
110
-
111
- - **Deliverables**: outputs needed by the user (processed data, reports, etc.)
112
- - **Scratch work**: temp files (raw scrapes, CSVs, research). Always disposable.
113
- - Never store important data in `.tmp/`