macca-method 2.1.1 → 2.1.2

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 (60) hide show
  1. package/.agents/macca-lock.json +1 -1
  2. package/.agents/skills/_shared/references/brainstorm-session.md +5 -5
  3. package/.agents/skills/_shared/references/invocation-policy.md +20 -20
  4. package/.agents/skills/_shared/references/output-ownership.md +11 -11
  5. package/.agents/skills/_shared/references/scope-rules.md +1 -1
  6. package/.agents/skills/_shared/references/skill-catalog.md +20 -20
  7. package/.agents/skills/_shared/scripts/validate-skills.py +37 -15
  8. package/.agents/skills/add-feature/SKILL.md +9 -3
  9. package/.agents/skills/antislop-copywriting/SKILL.md +372 -0
  10. package/.agents/skills/brainstorm-api/SKILL.md +28 -16
  11. package/.agents/skills/brainstorm-api/assets/api.template.md +35 -15
  12. package/.agents/skills/brainstorm-architecture/SKILL.md +35 -15
  13. package/.agents/skills/brainstorm-architecture/assets/architecture.template.md +44 -25
  14. package/.agents/skills/brainstorm-prd/SKILL.md +47 -17
  15. package/.agents/skills/brainstorm-prd/assets/PRD.template.md +47 -23
  16. package/.agents/skills/brainstorm-rules/SKILL.md +36 -19
  17. package/.agents/skills/brainstorm-rules/assets/rules.template.md +32 -18
  18. package/.agents/skills/brainstorm-schema/SKILL.md +18 -8
  19. package/.agents/skills/brainstorm-schema/assets/schema.template.md +25 -10
  20. package/.agents/skills/brainstorm-styleguide/SKILL.md +37 -19
  21. package/.agents/skills/brainstorm-styleguide/assets/StyleGuide.template.md +78 -60
  22. package/.agents/skills/brainstorm-task/SKILL.md +27 -14
  23. package/.agents/skills/brainstorm-task/assets/Task.template.md +29 -18
  24. package/.agents/skills/bug-fix/SKILL.md +25 -1
  25. package/.agents/skills/code-review/SKILL.md +7 -7
  26. package/.agents/skills/code-review/references/review-checklist.md +21 -10
  27. package/.agents/skills/developer/SKILL.md +8 -0
  28. package/.agents/skills/developer/references/execute-task.md +13 -7
  29. package/.agents/skills/help/SKILL.md +32 -20
  30. package/.agents/skills/meet/SKILL.md +9 -4
  31. package/.agents/skills/quick-dev/SKILL.md +27 -22
  32. package/.agents/skills/release-readiness/SKILL.md +17 -13
  33. package/.agents/skills/skill-creator/LICENSE.txt +202 -0
  34. package/.agents/skills/skill-creator/SKILL.md +485 -0
  35. package/.agents/skills/skill-creator/agents/analyzer.md +274 -0
  36. package/.agents/skills/skill-creator/agents/comparator.md +202 -0
  37. package/.agents/skills/skill-creator/agents/grader.md +223 -0
  38. package/.agents/skills/skill-creator/assets/eval_review.html +146 -0
  39. package/.agents/skills/skill-creator/eval-viewer/generate_review.py +471 -0
  40. package/.agents/skills/skill-creator/eval-viewer/viewer.html +1325 -0
  41. package/.agents/skills/skill-creator/references/schemas.md +441 -0
  42. package/.agents/skills/skill-creator/scripts/__init__.py +0 -0
  43. package/.agents/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  44. package/.agents/skills/skill-creator/scripts/generate_report.py +326 -0
  45. package/.agents/skills/skill-creator/scripts/improve_description.py +247 -0
  46. package/.agents/skills/skill-creator/scripts/package_skill.py +136 -0
  47. package/.agents/skills/skill-creator/scripts/quick_validate.py +103 -0
  48. package/.agents/skills/skill-creator/scripts/run_eval.py +310 -0
  49. package/.agents/skills/skill-creator/scripts/run_loop.py +328 -0
  50. package/.agents/skills/skill-creator/scripts/utils.py +47 -0
  51. package/.agents/skills/spec-audit/SKILL.md +28 -1
  52. package/.agents/skills/spec-compliance/SKILL.md +31 -18
  53. package/.agents/skills/spec-init/SKILL.md +29 -17
  54. package/README.md +158 -122
  55. package/bin/macca-method.js +1378 -1077
  56. package/package.json +40 -40
  57. package/scripts/run-skill-validator.js +27 -9
  58. package/scripts/test-install.js +599 -357
  59. package/scripts/test-upgrade-legacy.js +119 -100
  60. package/scripts/validate-skill-behavior.js +175 -64
@@ -41,7 +41,7 @@ You are a **QA Engineer and Spec Auditor** who ensures that no implementation dr
41
41
 
42
42
  ---
43
43
 
44
- **Core question:** *Does the code match what we agreed in the specs?*
44
+ **Core question:** _Does the code match what we agreed in the specs?_
45
45
 
46
46
  > **Rule:** Run this before `code-review`. Spec violations are more fundamental than code quality issues.
47
47
 
@@ -80,6 +80,7 @@ To change it: update `codeReviewPreferences.fixMode` in `.agents/developer-confi
80
80
  - [ ] If changes are not yet in the PRD but are recorded in the active phase plan `## Approved Scope Delta`, DO NOT mark them as scope creep violations for this phase. Note them as `pending formal spec update` if needed.
81
81
 
82
82
  **Example findings:**
83
+
83
84
  ```
84
85
  ❌ SC-01 MAJOR: Business rule "stock never goes negative" is not validated in createOrder()
85
86
  ❌ SC-01 BLOCKER: "CSV export" is a Non-Goal but was included in the implementation
@@ -100,6 +101,7 @@ To change it: update `codeReviewPreferences.fixMode` in `.agents/developer-confi
100
101
  - [ ] Operations, observability, rollback, and recovery constraints touched by this phase follow architecture; otherwise mark N/A
101
102
 
102
103
  **Example findings:**
104
+
103
105
  ```
104
106
  ❌ SC-02 MAJOR: architecture.md defines routes→controller→service→repository,
105
107
  but a Prisma query is in the route handler
@@ -122,6 +124,7 @@ To change it: update `codeReviewPreferences.fixMode` in `.agents/developer-confi
122
124
  - [ ] If a table has `Trace to`, its usage aligns with the referenced requirement
123
125
 
124
126
  **Example findings:**
127
+
125
128
  ```
126
129
  ❌ SC-03 BLOCKER: schema.md defines "product_categories" (snake_case, plural)
127
130
  but the query uses "ProductCategory" - production will fail
@@ -144,6 +147,7 @@ To change it: update `codeReviewPreferences.fixMode` in `.agents/developer-confi
144
147
  - [ ] A new operation listed in `## Approved Scope Delta` is temporary approved scope, not a rogue operation; note pending formal spec sync
145
148
 
146
149
  **Example findings:**
150
+
147
151
  ```
148
152
  ❌ SC-04 MAJOR: api.md defines response { success, data, message }
149
153
  but the code returns { status: "ok", result: {...} } - frontend breaks
@@ -164,6 +168,7 @@ To change it: update `codeReviewPreferences.fixMode` in `.agents/developer-confi
164
168
  - [ ] Applicable logging, migration, feature-flag, generated-code, and secret-rotation rules are followed
165
169
 
166
170
  **Example findings:**
171
+
167
172
  ```
168
173
  ❌ SC-05 MINOR: rules.md requires camelCase, found const user_data = ...
169
174
  ❌ SC-05 MAJOR: rules.md forbids 'any', but function processData(input: any) exists in 3 files
@@ -173,7 +178,7 @@ To change it: update `codeReviewPreferences.fixMode` in `.agents/developer-confi
173
178
 
174
179
  ## [SC-06] StyleGuide Compliance
175
180
 
176
- **Read:** `project-context/StyleGuide.md` *(if present, UI code only)*
181
+ **Read:** `project-context/StyleGuide.md` _(if present, UI code only)_
177
182
 
178
183
  - [ ] CSS framework matches the guide - do not mix Tailwind + Bootstrap
179
184
  - [ ] Colors use defined tokens - no hardcoded hex outside the list
@@ -184,6 +189,7 @@ To change it: update `codeReviewPreferences.fixMode` in `.agents/developer-confi
184
189
  - [ ] Applicable operational states, accessibility, localization, and UI performance constraints are implemented
185
190
 
186
191
  **Example findings:**
192
+
187
193
  ```
188
194
  ❌ SC-06 MINOR: The button uses bg-blue-500, but StyleGuide defines Primary = bg-blue-600
189
195
  ❌ SC-06 MINOR: Card padding is 14px, outside the spacing system (should be 8px, 16px, 24px)
@@ -206,6 +212,7 @@ To change it: update `codeReviewPreferences.fixMode` in `.agents/developer-confi
206
212
  - [ ] Every applicable Phase Definition of Done item has evidence; `N/A` items include a reason
207
213
 
208
214
  **Example findings:**
215
+
209
216
  ```
210
217
  ❌ SC-07 BLOCKER: Task 2.3 AC "404 when user does not exist" is not implemented
211
218
  ❌ SC-07 MAJOR: The task says to create src/services/user.service.ts - the file does not exist
@@ -231,6 +238,7 @@ To change it: update `codeReviewPreferences.fixMode` in `.agents/developer-confi
231
238
  - [ ] No changes to `StyleGuide.md`
232
239
 
233
240
  **Example findings:**
241
+
234
242
  ```
235
243
  ❌ SC-08 MAJOR: developerPreferences.scope = "frontend" but src/routes/product.ts was created
236
244
  ❌ SC-08 MAJOR: developerPreferences.scope = "backend" but src/components/Button.tsx was modified
@@ -244,7 +252,7 @@ To change it: update `codeReviewPreferences.fixMode` in `.agents/developer-confi
244
252
 
245
253
  1. **Verify all 8 items** (SC-01 through SC-08) were actually checked - not skipped. An "OK" item must have been checked, not skipped.
246
254
  2. **Reread every finding** - is the severity proportional? Are code examples quoted accurately?
247
- 3. **Ask yourself:** *"If the developer fixes all findings and compliance is run again, will new findings appear?"* If yes, add them now.
255
+ 3. **Ask yourself:** _"If the developer fixes all findings and compliance is run again, will new findings appear?"_ If yes, add them now.
248
256
  4. **Recheck Task.md acceptance criteria** one more time - this is the most commonly missed area.
249
257
 
250
258
  Only after self-review, create the report.
@@ -262,23 +270,26 @@ The report is shown in this session chat. Do not save it to a file unless the us
262
270
  **Scope:** [reviewed files]
263
271
  **Status:** [✅ PASS | ⚠️ MINOR ISSUES | 🔴 MAJOR ISSUES | 💥 BLOCKER]
264
272
 
265
- | Document | Status | Finding |
266
- |---------|--------|--------|
267
- | project-context/PRD.md | ✅ OK | — |
268
- | project-context/architecture.md | 🔴 MAJOR | SC-02: DB query in route handler |
269
- | project-context/schema.md | ✅ OK | — |
270
- | project-context/api.md | ⚠️ MINOR | SC-04: missing "hasNext" field |
271
- | project-context/rules.md | ✅ OK | — |
272
- | project-context/StyleGuide.md | ⚠️ MINOR | SC-06: hardcoded color |
273
- | project-context/Task.md | 💥 BLOCKER | SC-07: AC not met |
274
- | developer-config.json (scope) | ✅ OK | — |
273
+ | Document | Status | Finding |
274
+ | ------------------------------- | ---------- | -------------------------------- |
275
+ | project-context/PRD.md | ✅ OK | — |
276
+ | project-context/architecture.md | 🔴 MAJOR | SC-02: DB query in route handler |
277
+ | project-context/schema.md | ✅ OK | — |
278
+ | project-context/api.md | ⚠️ MINOR | SC-04: missing "hasNext" field |
279
+ | project-context/rules.md | ✅ OK | — |
280
+ | project-context/StyleGuide.md | ⚠️ MINOR | SC-06: hardcoded color |
281
+ | project-context/Task.md | 💥 BLOCKER | SC-07: AC not met |
282
+ | developer-config.json (scope) | ✅ OK | — |
283
+
275
284
  ### Detailed Findings
285
+
276
286
  [list findings per item - use the 4-point format below]
277
287
 
278
288
  ### Fix Manifest
279
- | Finding | Target | Intended change | Validation |
280
- |---|---|---|---|
281
- | [ID] | `[path]` | [bounded change] | [compliance check/test] |
289
+
290
+ | Finding | Target | Intended change | Validation |
291
+ | ------- | -------- | ---------------- | ----------------------- |
292
+ | [ID] | `[path]` | [bounded change] | [compliance check/test] |
282
293
  ```
283
294
 
284
295
  Format each finding with the shared `finding-format.md` loaded during setup.
@@ -288,6 +299,7 @@ Format each finding with the shared `finding-format.md` loaded during setup.
288
299
  ## Execution Rules
289
300
 
290
301
  **`fix-then-report`:**
302
+
291
303
  ```
292
304
  💥 BLOCKER -> Fix now. After fixing, **rerun spec-compliance** before code-review.
293
305
  🔴 MAJOR -> Fix before the next phase. After fixing, **rerun spec-compliance**.
@@ -297,10 +309,11 @@ Format each finding with the shared `finding-format.md` loaded during setup.
297
309
  ```
298
310
 
299
311
  **`report-first`:**
312
+
300
313
  ```
301
- 💥 BLOCKER / 🔴 MAJOR / ⚠️ actionable MINOR -> Report all findings and the fix manifest. Show one gate. On approval, edit the approved manifest directly, validate, and rerun only affected compliance checks without another gate.
314
+ 💥 BLOCKER / 🔴 MAJOR / ⚠️ actionable MINOR -> Report all findings and the fix manifest. Show one gate ([GATE — Mode: report-first]). On approval, edit the approved manifest directly, validate, and rerun only affected compliance checks without another gate.
302
315
  ℹ️ INFO / non-actionable note -> Report only; do not include it in the fix manifest.
303
- ✅ OK -> Continue to the code-review skill.
316
+ ✅ OK -> Present the report with Status: ✅ PASS. DO NOT show the approval gate block or ask for approval/fix replies ("ya", "setuju", "perbaiki", "yes", "fix"). Continue directly to the code-review skill.
304
317
  ```
305
318
 
306
319
  ---
@@ -29,13 +29,14 @@ Run as `@Fachri` (Tech Lead). Use the shared persona profile in `../_shared/refe
29
29
 
30
30
  ## Role
31
31
 
32
- You are **@Fachri — Tech Lead** acting as a **Spec Archaeologist**. Read an existing codebase and produce spec documents that describe *what is already built*, not what should exist.
32
+ You are **@Fachri — Tech Lead** acting as a **Spec Archaeologist**. Read an existing codebase and produce spec documents that describe _what is already built_, not what should exist.
33
33
 
34
34
  Do not invent. Read code and extract facts: folder structure, tables, endpoints, libraries.
35
35
 
36
36
  **Output:** Spec documents that reflect the current codebase: `architecture.md`, `rules.md`, `schema.md` (if relevant), `api.md`, `StyleGuide.md` (if relevant), and `PRD.md`. `Task.md` is not generated here.
37
37
 
38
38
  Every claim carries a **confidence level**:
39
+
39
40
  - **High** — seen directly in code, config, manifest, migration, or explicit files
40
41
  - **Medium** — strong inference from usage patterns, naming, or project structure
41
42
  - **Low** — weak guess; must be marked for user verification
@@ -80,6 +81,7 @@ Wait for the answer, then continue.
80
81
  4. `README.md` if present
81
82
 
82
83
  Determine:
84
+
83
85
  - Which tech stack is used
84
86
  - Where models, routes, and components live
85
87
  - Project size (small / medium / large)
@@ -109,6 +111,7 @@ PRD.md ← synthesized from the above (last, not guessed)
109
111
  > **Note:** `Task.md` is **NOT** generated by `spec-init`. Use `brainstorm-task` after the specs are verified.
110
112
 
111
113
  If `.agents/developer-config.json` exists, read `developerPreferences.scope`:
114
+
112
115
  - `frontend` → generate only `architecture.md`, `rules.md`, observable `api.md` consumer contract if possible, `StyleGuide.md` if UI exists, and a frontend-scope `PRD.md`; skip `schema.md`
113
116
  - `backend` → generate only `architecture.md`, `rules.md`, `schema.md`, observable provider-side `api.md` if possible, and a backend-scope `PRD.md`; skip `StyleGuide.md`
114
117
  - `fullstack` → generate the full set based on codebase observations
@@ -121,16 +124,16 @@ Every document **must include `## Input Evidence`** and `## Confidence Summary`.
121
124
 
122
125
  Minimum evidence block:
123
126
 
124
- ````markdown
127
+ ```markdown
125
128
  ## Input Evidence
126
129
 
127
130
  - `[observed/file/path]` — [what evidence it provides]
128
131
  - `[observed/file/path]` — [what evidence it provides]
129
- ````
132
+ ```
130
133
 
131
134
  Minimum format:
132
135
 
133
- ````markdown
136
+ ```markdown
134
137
  ## Confidence Summary
135
138
 
136
139
  - **High:** [finding seen directly in code/config]
@@ -138,28 +141,29 @@ Minimum format:
138
141
  - **Low:** [item needing user verification]
139
142
 
140
143
  > ⚠️ Needs verification: [unproven question or assumption]
141
- ````
144
+ ```
142
145
 
143
146
  When any Medium or Low confidence exists, also include:
144
147
 
145
- ````markdown
148
+ ```markdown
146
149
  ## Assumptions & Needs Verification
147
150
 
148
151
  - [assumption or inference basis]
149
152
  - [question that still needs user confirmation]
150
- ````
153
+ ```
151
154
 
152
155
  Every generated document must include unresolved decisions that cannot be observed from code:
153
156
 
154
- ````markdown
157
+ ```markdown
155
158
  ## Missing Decisions
156
159
 
157
160
  | Decision Needed | Why It Cannot Be Inferred | Recommended Owner Skill |
158
- |-----------------|---------------------------|-------------------------|
159
- | [decision] | [missing evidence] | `[brainstorm-* skill]` |
160
- ````
161
+ | --------------- | ------------------------- | ----------------------- |
162
+ | [decision] | [missing evidence] | `[brainstorm-* skill]` |
163
+ ```
161
164
 
162
165
  Rules:
166
+
163
167
  - Do not mark **High** unless direct evidence exists.
164
168
  - For **Medium**, explain the inference basis briefly.
165
169
  - For **Low**, write it as a question or note, not a final fact.
@@ -175,7 +179,8 @@ Read all relevant files in the Step 2 order, then generate all documents at once
175
179
  **Every document must include `Input Evidence` and `Confidence Summary`.**
176
180
 
177
181
  After completion:
178
- ````text
182
+
183
+ ```text
179
184
  spec-init complete (Batch Generate Mode).
180
185
 
181
186
  Generated documents:
@@ -192,7 +197,7 @@ Next steps:
192
197
  1. Review each document — correct inaccuracies, especially **Medium** and **Low** confidence items
193
198
  2. Run `spec-audit` to check cross-document consistency
194
199
  3. Run `brainstorm-task` to generate Task.md
195
- ````
200
+ ```
196
201
 
197
202
  ---
198
203
 
@@ -200,7 +205,7 @@ Next steps:
200
205
 
201
206
  Generate one document at a time in the Step 2 order. After each document:
202
207
 
203
- ````text
208
+ ```text
204
209
  [Document name] complete — saved to project-context/[name].md.
205
210
 
206
211
  Input Evidence + Confidence Summary:
@@ -212,30 +217,33 @@ Please review it. If anything is inaccurate, tell me and I will fix it.
212
217
  Focus review on **Medium** and **Low** items.
213
218
 
214
219
  When ready, type "continue" for [next document].
215
- ````
220
+ ```
216
221
 
217
222
  Wait for confirmation before the next document. Do not skip this.
218
223
 
219
224
  After the last document (PRD.md):
220
- ````text
225
+
226
+ ```text
221
227
  All spec documents are complete.
222
228
 
223
229
  Next steps:
224
230
  1. Run `spec-audit` to check consistency
225
231
  2. Run `brainstorm-task` to generate Task.md
226
- ````
232
+ ```
227
233
 
228
234
  ---
229
235
 
230
236
  ## Per-Document Guidance
231
237
 
232
238
  ### architecture.md
239
+
233
240
  **Read:** folder structure, `package.json`, config files
234
241
  **Extract:** tech stack, folder structure, database choice, deployment setup, visible design patterns
235
242
  **Add:** `Input Evidence` listing the files and folders used to infer the architecture
236
243
  **Add if possible:** `Document Role`, `System Boundaries`, `Canonical Terminology`, `ADR Index`, observed operations/observability/recovery facts, `Assumptions & Open Questions`, `Missing Decisions`
237
244
 
238
245
  ### rules.md
246
+
239
247
  **Read:** `.eslintrc*`, `.prettierrc*`, `tsconfig.json`, 2-3 code examples
240
248
  **Extract:** naming conventions in use, indentation, quote style, consistent patterns
241
249
  **Add a `[FORBIDDEN]` section:** From ESLint rules and TypeScript strict settings, extract the 5-10 most critical technical prohibitions into a `[FORBIDDEN]` table format that matches `brainstorm-rules` output.
@@ -243,18 +251,21 @@ Next steps:
243
251
  **Add if possible:** `Document Role`, `Rule Priority`, observed conditional operational rules, `Assumptions & Exceptions`, `Missing Decisions`
244
252
 
245
253
  ### schema.md
254
+
246
255
  **Read:** `migrations/`, `models/`, `prisma/schema.prisma`, or equivalents
247
256
  **Extract:** datastore-native entities (tables, collections, aggregates, nodes, streams, or keys), fields/payloads, types, relationships, validation, retention, and indexes/projections
248
257
  **Add:** `Input Evidence` listing the schema sources inspected
249
258
  **Add if possible:** `Document Role`, `Entity Map`, observed scale/tenancy/concurrency/migration facts, `Not Yet Modeled / Deferred`, `Assumptions & Open Questions`, `Missing Decisions`
250
259
 
251
260
  ### api.md
261
+
252
262
  **Read:** protocol-native routing/integration sources such as `routes/`, `controllers/`, `handlers/`, GraphQL schemas/resolvers, RPC routers, event producers/consumers, and OpenAPI/Swagger if available
253
263
  **Extract:** protocol-native operation identity, request/input shape, response/output/event shape, auth requirements, lifecycle/deprecation facts, and reliability signals
254
264
  **Add:** `Input Evidence` listing the routing/controller sources inspected
255
265
  **Add if possible:** `Document Role`, `Scope Summary`, `Canonical Terminology`, operation inventory, observed reliability/deprecation facts, `Assumptions & Open Questions`, `Missing Decisions`
256
266
 
257
267
  ### StyleGuide.md
268
+
258
269
  **Read:** `tailwind.config.*`, `components/` folder, main CSS/SCSS files
259
270
  **Extract:** colors in use, existing components, spacing system, fonts
260
271
  **Skip if:** there is no UI folder or the project is backend-only
@@ -262,6 +273,7 @@ Next steps:
262
273
  **Add if possible:** `Document Role`, `Supported Surfaces`, `Component Inventory`, observed accessibility/operational states, `Non-Goals / Not Yet Defined`, `Assumptions & Open Questions`, `Missing Decisions`
263
274
 
264
275
  ### PRD.md
276
+
265
277
  **Do not read new files**. Only synthesize from previous documents.
266
278
  **Extract:** features already built (from API, UI, and schema evidence) and business rules supported by direct constraints or behavior. Treat absent capabilities as `not observed`, `unknown`, or `deferred`; absence is not evidence of an intentional non-goal.
267
279
  **Confidence note:** PRD usually mixes **High** and **Medium**. Do not state business motivation as fact unless it is explicitly visible in the codebase.