catalyst-os 1.0.0 → 1.1.1

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.
@@ -57,9 +57,18 @@ Before reporting task completion to the orchestrator, review your own work:
57
57
  - Did I follow existing naming conventions?
58
58
  - Are foreign keys properly cascaded?
59
59
 
60
+ **Existing Schema Reality Check (BEFORE designing):**
61
+ - Did I query the actual database schema for all tables this feature touches?
62
+ - Did I document real column names, types, and constraints (not code aliases)?
63
+ - Did I verify foreign key relationships and join paths?
64
+ - Did I check what SQL functions/stored procedures already exist that this feature will call?
65
+ - Did I verify that API endpoints actually persist all fields the spec assumes they do?
66
+
60
67
  **Verification:**
61
68
  - Did I run the migration? Does it ACTUALLY succeed? (See: `.claude/skills/verification-before-completion/SKILL.md`)
62
69
  - Did I run the tests? Do they ACTUALLY pass?
70
+ - Did I verify the actual database state matches what I intended? (Query `information_schema.columns` or equivalent)
71
+ - Did I test the end-to-end data path? (API call → database write → database read → API response)
63
72
 
64
73
  If you find issues during self-review, fix them before reporting.
65
74
 
@@ -42,6 +42,7 @@ Before any action, load `.claude/skills/using-skills/SKILL.md` and check which s
42
42
 
43
43
  1. **Understand**: Ask clarifying questions to understand the feature request
44
44
  2. **Research**: Gather context from codebase, documentation, and external sources
45
+ - **If the feature touches database operations**: Instruct Seer to run the "Database Schema Reality Check" (see seer.md). Seer must query the actual database — not just read code files — and document real column names, types, join paths, and API endpoint schemas. Past spec failures all traced to trusting code abstractions over the real schema.
45
46
  3. **Synthesize**: Combine findings into coherent requirements
46
47
  4. **Document**: Create a structured specification with acceptance criteria
47
48
  5. **Validate**: Confirm understanding with the user
@@ -114,11 +114,23 @@ Spawn: Forger
114
114
  Wait: tasks.md with Build DAG created
115
115
  ```
116
116
 
117
- ### 2. Test Writing (Sequential)
117
+ ### 2. Test Writing (Sequential) — RED PHASE
118
118
  ```
119
119
  Spawn: Enforcer
120
120
  Input: All tasks from DAG
121
- Wait: All tests written and FAILING (Red Phase)
121
+ Wait: All tests written and FAILING
122
+ ```
123
+
124
+ ### HARD GATE: Red Phase Commit
125
+ ```
126
+ BLOCKING — DO NOT PROCEED WITHOUT THIS:
127
+
128
+ 1. Run ALL tests → every test must FAIL
129
+ 2. If any test passes → STOP, fix the test
130
+ 3. COMMIT: "test({scope}): write failing tests for {spec}"
131
+
132
+ This commit is PROOF that red phase happened.
133
+ No commit = no implementation. No exceptions.
122
134
  ```
123
135
 
124
136
  ### 3. Foundation Phase (Sequential)
@@ -151,7 +163,18 @@ for task in parallel_tasks:
151
163
  # Spawn ALL ready tasks in ONE message
152
164
  Spawn: smith-1, smith-2, shaper-1, shaper-2, shaper-3 (parallel)
153
165
  Wait: ALL parallel tasks complete
154
- Gate: All parallel tests PASS
166
+ ```
167
+
168
+ ### HARD GATE: Green Phase Commit
169
+ ```
170
+ BLOCKING — DO NOT PROCEED WITHOUT THIS:
171
+
172
+ 1. Run ALL tests → every test must PASS
173
+ 2. If any test fails → fix before continuing
174
+ 3. COMMIT: "feat({scope}): implement {spec}"
175
+
176
+ This commit is PROOF that green phase happened.
177
+ No commit = no integration. No exceptions.
155
178
  ```
156
179
 
157
180
  ### 6. Integration Phase (Sequential)
@@ -90,6 +90,40 @@ Scribe will compile this into `research.md`.
90
90
  | Known issues | `concerns.md` |
91
91
  | Fragile areas | `concerns.md` → Fragile Areas |
92
92
 
93
+ ## Database Schema Reality Check
94
+
95
+ **CRITICAL**: When the feature touches database operations (CRUD, queries, joins, migrations), do NOT trust column names found in application code. Code uses aliases, joins, computed fields, and abstractions that obscure the real schema.
96
+
97
+ ### Mandatory Steps for Data-Touching Features:
98
+
99
+ 1. **Query the actual schema** — use the project's database tool (Supabase MCP, `prisma db pull`, `information_schema`, etc.) to get real table definitions
100
+ 2. **Document actual column names, types, and constraints** — not what the code *calls* them, but what the database *has*
101
+ 3. **Trace joins and relationships** — if code references `contact.company_name`, find whether that's a direct column or a join through a foreign key
102
+ 4. **Map code abstractions to real schema** — document the mapping between application-level field names and actual database columns
103
+ 5. **Verify API request/response schemas** — check what fields endpoints actually accept and persist vs. what the spec assumes
104
+
105
+ ### Output Format (add to your analysis):
106
+
107
+ ```
108
+ ### Database Schema (Verified)
109
+ Tables touched: [list]
110
+
111
+ | Table | Column | Type | Nullable | Notes |
112
+ |-------|--------|------|----------|-------|
113
+ | contacts | primary_email | varchar | no | Code refers to this as "email" |
114
+ | companies | company_name | varchar | no | Accessed via contacts.company_id join |
115
+
116
+ ### Code-to-Schema Mapping
117
+ - `contact.company_name` → JOIN companies ON contacts.company_id = companies.id → companies.company_name
118
+ - `contact.email` → contacts.primary_email
119
+
120
+ ### API Endpoint Gaps
121
+ - POST /campaigns/update-basic-info accepts: [actual fields from request schema]
122
+ - Fields NOT persisted by endpoint: [list any that are accepted but ignored]
123
+ ```
124
+
125
+ **Why this matters**: Every spec gap in past projects came from trusting code abstractions over the actual database. Wrong column names, missing endpoint fields, and broken integration paths all stem from skipping this step.
126
+
93
127
  ## Analysis Areas
94
128
 
95
129
  1. **Structure**: Project organization, module boundaries
@@ -97,6 +131,7 @@ Scribe will compile this into `research.md`.
97
131
  3. **Conventions**: Naming, formatting, code style
98
132
  4. **Dependencies**: Libraries, frameworks, integrations
99
133
  5. **Data Flow**: How data moves through the system
134
+ 6. **Data Schema**: Actual database structure for data-touching features (see Database Schema Reality Check above)
100
135
 
101
136
  ## Output
102
137
 
@@ -1,6 +1,12 @@
1
1
  # /approve-spec
2
2
 
3
- Accept the implementation and archive the spec.
3
+ Accept a **fully built and validated** implementation — commit, archive, and propagate learnings.
4
+
5
+ > **Lifecycle position:** This is the FINAL step. Only use after `/build-spec` and `/validate-spec` have completed successfully.
6
+ >
7
+ > **Flow:** `/catalyze-spec` → `/build-spec` → `/validate-spec` → **`/approve-spec`**
8
+ >
9
+ > **This is NOT for approving a spec/plan before building.** There is no "approve plan" step — after catalyzing, you go straight to `/build-spec`.
4
10
 
5
11
  ## Usage
6
12
 
@@ -117,19 +117,25 @@ Spawn Forger → creates `tasks.md` with Build DAG including phases, scope bound
117
117
 
118
118
  Spawn Enforcer → writes failing tests for ALL tasks. Run tests to confirm all FAIL.
119
119
 
120
- ### GATE 1: Red Phase Verification
120
+ ### GATE 1: Red Phase Verification — BLOCKING
121
121
 
122
- ```bash
123
- # Run all tests they MUST fail
124
- # Expected: Tests: 0 passed, N failed
122
+ ```
123
+ THIS IS A HARD GATE. DO NOT PROCEED UNTIL ALL 3 STEPS COMPLETE:
124
+
125
+ 1. RUN all tests → confirm every test FAILS
126
+ 2. If ANY test passes → STOP and fix before continuing
127
+ 3. COMMIT the failing tests → this is the checkpoint
128
+
129
+ COMMIT: "test({scope}): write failing tests for {spec}"
130
+
131
+ Only AFTER this commit exists may implementation begin.
132
+ No commit = no implementation. No exceptions.
125
133
  ```
126
134
 
127
135
  - Every task has at least one test
128
136
  - All tests executed
129
- - All tests FAIL
130
- - If ANY test passes STOP and investigate
131
-
132
- **Commit:** `test({scope}): write failing tests for {spec}`
137
+ - All tests FAIL (for the right reasons — missing feature, not import errors)
138
+ - Commit is the proof that red phase happened
133
139
 
134
140
  ### Phase 3-4: Foundation & Contracts
135
141
 
@@ -146,14 +152,19 @@ Each agent prompt includes:
146
152
  - Test references
147
153
  ```
148
154
 
149
- ### GATE 2: Green Phase Verification
155
+ ### GATE 2: Green Phase Verification — BLOCKING
150
156
 
151
- ```bash
152
- # Run all tests — they MUST pass
153
- # Expected: Tests: N passed, 0 failed
154
157
  ```
158
+ THIS IS A HARD GATE. DO NOT PROCEED UNTIL ALL 3 STEPS COMPLETE:
159
+
160
+ 1. RUN all tests → confirm every test PASSES
161
+ 2. If ANY test fails → fix before continuing
162
+ 3. COMMIT the implementation → this is the checkpoint
155
163
 
156
- **Commit:** `feat({scope}): implement {spec}`
164
+ COMMIT: "feat({scope}): implement {spec}"
165
+
166
+ Only AFTER this commit exists may integration begin.
167
+ ```
157
168
 
158
169
  ### Phase 6: Integration
159
170
 
@@ -12,10 +12,16 @@ Final verification, git commit, spec archival, self-documentation (propagate lea
12
12
  - `verification-before-completion` — Final TDD compliance check
13
13
  - `agent-delegation` — Scribe delegation for library extraction
14
14
 
15
- ## Prerequisites
15
+ ## Prerequisites — HARD GATES
16
16
 
17
- - Validation must be complete
18
- - `validation.md` must show all checks passed
17
+ > **This skill is the FINAL step in the spec lifecycle.** It runs ONLY after build and validation are complete.
18
+ > **Flow:** `/catalyze-spec` → `/build-spec` → `/validate-spec` **`/approve-spec`** (you are here)
19
+ >
20
+ > If the spec has not been built yet, STOP and tell the user to run `/build-spec` first.
21
+ > If the spec has not been validated yet, STOP and tell the user to run `/validate-spec` first.
22
+
23
+ - `/build-spec` must have been completed (tasks.md exists with completed tasks)
24
+ - Validation must be complete (`validation.md` must show all checks passed)
19
25
  - `handoff.md` must exist
20
26
  - TDD compliance verified
21
27
 
@@ -173,5 +173,9 @@ REMINDER: /build-spec follows strict TDD
173
173
  3. Then implement (Builders)
174
174
  4. Tests must PASS (green phase)
175
175
 
176
- Next: Run /build-spec @YYYY-MM-DD-{slug} to implement.
176
+ Next steps:
177
+ - /build-spec @YYYY-MM-DD-{slug} to start TDD build
178
+ - Or /iterate-spec if you want changes first
177
179
  ```
180
+
181
+ **IMPORTANT: Do NOT suggest `/approve-spec` after spec shaping.** `/approve-spec` is only for accepting a fully built and validated implementation — it is the FINAL step, not a plan-approval step. The correct flow is: `/catalyze-spec` → `/build-spec` → `/validate-spec` → `/approve-spec`.
@@ -86,6 +86,14 @@ Spawn all Guardians in parallel:
86
86
  - Secret scanning
87
87
  - Input validation checks
88
88
 
89
+ **Alchemist** (Schema Integrity — only for specs touching database):
90
+ - Query actual database schema for all tables the spec touches
91
+ - Verify column names in spec/code match real database columns
92
+ - Verify all foreign keys and constraints exist in the actual DB
93
+ - Verify API endpoints persist all fields the spec expects (end-to-end trace)
94
+ - Verify any SQL functions/stored procedures the feature depends on actually exist
95
+ - Check for missing sequences, triggers, or DB-level defaults the feature assumes
96
+
89
97
  ### Phase 5: Compile Results (Arbiter)
90
98
 
91
99
  Create `validation.md` with results from all Guardians.
@@ -126,6 +134,12 @@ If all validation passes, create handoff.md with:
126
134
  - Secrets: status
127
135
  - Inputs: status
128
136
 
137
+ ### Schema Integrity (Alchemist) — if spec touches database
138
+ - Column names match: status
139
+ - Constraints verified: status
140
+ - API end-to-end trace: status
141
+ - DB functions/sequences: status
142
+
129
143
  ## Overall Status: PASS/FAIL
130
144
 
131
145
  ## Issues Found
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "catalyst-os",
3
- "version": "1.0.0",
3
+ "version": "1.1.1",
4
4
  "scripts": {
5
5
  "postinstall": "node .catalyst/bin/install.js"
6
6
  },