macca-method 1.1.0 → 2.0.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 (56) hide show
  1. package/.agents/legacy-payloads.json +22 -0
  2. package/{skills-lock.json → .agents/macca-lock.json} +3 -2
  3. package/.agents/macca-managed-skills.txt +2 -1
  4. package/.agents/skills/_shared/references/additional-skills.md +30 -0
  5. package/.agents/skills/_shared/references/brainstorm-session.md +42 -11
  6. package/.agents/skills/_shared/references/config-mutation.md +25 -0
  7. package/.agents/skills/_shared/references/finding-format.md +25 -0
  8. package/.agents/skills/_shared/references/fix-mode.md +39 -0
  9. package/.agents/skills/_shared/references/human-loop.md +3 -1
  10. package/.agents/skills/_shared/references/implementation-principles.md +19 -0
  11. package/.agents/skills/_shared/references/invocation-policy.md +39 -0
  12. package/.agents/skills/_shared/references/language-config.md +15 -0
  13. package/.agents/skills/_shared/references/output-ownership.md +4 -2
  14. package/.agents/skills/_shared/references/runtime-config.md +7 -168
  15. package/.agents/skills/_shared/references/skill-catalog.md +34 -0
  16. package/.agents/skills/_shared/scripts/validate-skills.py +106 -4
  17. package/.agents/skills/add-feature/SKILL.md +10 -7
  18. package/.agents/skills/brainstorm-api/SKILL.md +49 -194
  19. package/.agents/skills/brainstorm-api/assets/api.template.md +147 -0
  20. package/.agents/skills/brainstorm-architecture/SKILL.md +22 -127
  21. package/.agents/skills/brainstorm-architecture/assets/architecture.template.md +135 -0
  22. package/.agents/skills/brainstorm-prd/SKILL.md +19 -102
  23. package/.agents/skills/brainstorm-prd/assets/PRD.template.md +106 -0
  24. package/.agents/skills/brainstorm-rules/SKILL.md +17 -151
  25. package/.agents/skills/brainstorm-rules/assets/rules.template.md +127 -0
  26. package/.agents/skills/brainstorm-schema/SKILL.md +49 -115
  27. package/.agents/skills/brainstorm-schema/assets/schema.template.md +109 -0
  28. package/.agents/skills/brainstorm-styleguide/SKILL.md +19 -134
  29. package/.agents/skills/brainstorm-styleguide/assets/StyleGuide.template.md +147 -0
  30. package/.agents/skills/brainstorm-task/SKILL.md +22 -107
  31. package/.agents/skills/brainstorm-task/assets/Task.template.md +113 -0
  32. package/.agents/skills/bug-fix/SKILL.md +45 -54
  33. package/.agents/skills/code-review/SKILL.md +26 -19
  34. package/.agents/skills/code-review/references/review-checklist.md +24 -26
  35. package/.agents/skills/developer/SKILL.md +25 -39
  36. package/.agents/skills/developer/references/close-phase.md +25 -0
  37. package/.agents/skills/developer/references/execute-task.md +69 -0
  38. package/.agents/skills/developer/references/onboarding.md +47 -0
  39. package/.agents/skills/help/SKILL.md +12 -13
  40. package/.agents/skills/meet/SKILL.md +168 -0
  41. package/.agents/skills/quick-dev/SKILL.md +28 -32
  42. package/.agents/skills/release-readiness/SKILL.md +149 -0
  43. package/.agents/skills/spec-audit/SKILL.md +37 -22
  44. package/.agents/skills/spec-compliance/SKILL.md +41 -40
  45. package/.agents/skills/spec-init/SKILL.md +29 -14
  46. package/README.md +171 -122
  47. package/bin/macca-method.js +779 -85
  48. package/flow.webp +0 -0
  49. package/image-macca-method.webp +0 -0
  50. package/package.json +12 -5
  51. package/scripts/run-skill-validator.js +24 -0
  52. package/scripts/test-install.js +398 -0
  53. package/scripts/test-upgrade-legacy.js +107 -0
  54. package/scripts/validate-skill-behavior.js +124 -0
  55. package/.agents/skills/developer/references/execution-workflow.md +0 -322
  56. package/.agents/skills/rapat/SKILL.md +0 -172
@@ -1,8 +1,10 @@
1
1
  ---
2
2
  name: spec-compliance
3
- description: Verify that code matches all project spec documents (PRD.md, architecture.md, schema.md, api.md, rules.md, StyleGuide.md, Task.md). Run after each phase completes, before code-review.
4
- persona: "Fachri"
5
- persona_role: "Tech Lead"
3
+ description: Verifies that code matches all applicable project specs and applies approved compliance fixes. Use after each phase before code-review, on explicit compliance requests, and when the user replies yes, fix, continue, or finding IDs to this skill's report-first gate.
4
+ compatibility: Requires the complete MACCA-METHOD collection with sibling _shared resources and workspace file access.
5
+ metadata:
6
+ persona: "Fachri"
7
+ persona-role: "Tech Lead"
6
8
  ---
7
9
 
8
10
  # Spec Compliance
@@ -11,9 +13,13 @@ persona_role: "Tech Lead"
11
13
 
12
14
  Before continuing:
13
15
 
14
- 1. Read `../_shared/references/runtime-config.md`.
15
- 2. Read `codeReviewPreferences.fixMode` from `.agents/developer-config.json`. If it is missing, treat it as `"report-first"`. Announce: `[Fix mode: report-first]` or `[Fix mode: fix-then-report]`. See § Fix Mode Contract in runtime-config.md for the full enforcement rules.
16
- 3. Use `languagePreferences.communication.normalized` for all user-facing reports and review output.
16
+ 1. Read `../_shared/references/language-config.md`.
17
+ 2. Read `../_shared/references/fix-mode.md`.
18
+ 3. Read `../_shared/references/human-loop.md`.
19
+ 4. Read `../_shared/references/finding-format.md`.
20
+ 3. If this message answers this skill's active report-first gate, resume directly under the Approval Resume Protocol. Do not rerun startup or compliance analysis.
21
+ 4. Otherwise, read `codeReviewPreferences.fixMode` from `.agents/developer-config.json`. If it is missing, treat it as `"report-first"`. Announce: `[Fix mode: report-first]` or `[Fix mode: fix-then-report]`.
22
+ 5. Use `languagePreferences.communication.normalized` for all user-facing reports and review output.
17
23
 
18
24
  ---
19
25
 
@@ -41,7 +47,7 @@ You are a **QA Engineer and Spec Auditor** who ensures that no implementation dr
41
47
 
42
48
  ## Fix Mode
43
49
 
44
- Mode is read in Shared Runtime Setup. Enforcement rules, including the required gate prompt, are in `../_shared/references/runtime-config.md § Fix Mode Contract`.
50
+ Mode is read in Shared Runtime Setup. Enforcement rules, including the required gate prompt, are in `../_shared/references/fix-mode.md`.
45
51
 
46
52
  To change it: update `codeReviewPreferences.fixMode` in `.agents/developer-config.json`.
47
53
 
@@ -66,6 +72,8 @@ To change it: update `codeReviewPreferences.fixMode` in `.agents/developer-confi
66
72
  - [ ] Acceptance criteria per feature are met (Given/When/Then from `PRD.md`)
67
73
  - [ ] No features from `PRD.md § Non-Goals` are included
68
74
  - [ ] NFRs are considered: performance, security, accessibility per `PRD.md § Non-Functional Requirements`
75
+ - [ ] If this phase implements analytics or rollout behavior, it matches `PRD.md § Success Metrics and Rollout`; otherwise mark N/A
76
+ - [ ] Failure/degraded behavior implemented by this phase matches the PRD where specified
69
77
  - [ ] If the PRD uses requirement IDs (`FEAT-*`, `BR-*`, etc.), phase code is traceable to the relevant IDs through Task.md
70
78
  - [ ] 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.
71
79
 
@@ -87,6 +95,7 @@ To change it: update `codeReviewPreferences.fixMode` in `.agents/developer-confi
87
95
  - [ ] Auth method matches `architecture.md § Authentication & Authorization`
88
96
  - [ ] State management is consistent - do not mix Zustand and Redux
89
97
  - [ ] API type is consistent - REST stays REST, not suddenly GraphQL
98
+ - [ ] Operations, observability, rollback, and recovery constraints touched by this phase follow architecture; otherwise mark N/A
90
99
 
91
100
  **Example findings:**
92
101
  ```
@@ -101,11 +110,12 @@ To change it: update `codeReviewPreferences.fixMode` in `.agents/developer-confi
101
110
 
102
111
  **Read:** `project-context/schema.md`
103
112
 
104
- - [ ] Table/column names match exactly in queries/ORM - no invented names
105
- - [ ] Naming conventions are followed (`schema.md § Global Conventions`) - snake_case, singular/plural
106
- - [ ] Relationships are correct - FKs, cascade delete as defined
107
- - [ ] Soft delete is respected - if using `deleted_at`, do not hard delete
108
- - [ ] Audit fields exist: `created_at`, `updated_at` on relevant models
113
+ - [ ] Persisted entity and field names match the datastore-native contract; no invented names
114
+ - [ ] Naming, identifier, validation, retention, and consistency conventions follow `schema.md`
115
+ - [ ] Relationships/data placement match the selected model: keys, references, embedding, edges, streams, or equivalent
116
+ - [ ] Delete, retention, archival, and projection behavior matches the contract where applicable
117
+ - [ ] Required audit/version fields or event metadata exist where the selected model defines them
118
+ - [ ] Tenant isolation, concurrency, and schema-evolution constraints touched by this phase match `schema.md`; otherwise mark N/A
109
119
  - [ ] PII is handled safely - never logged, never exposed in responses
110
120
  - [ ] If a table has `Trace to`, its usage aligns with the referenced requirement
111
121
 
@@ -122,15 +132,14 @@ To change it: update `codeReviewPreferences.fixMode` in `.agents/developer-confi
122
132
 
123
133
  **Read:** `project-context/api.md`
124
134
 
125
- - [ ] Endpoint paths match the contract exactly - no typos, no version mismatch
126
- - [ ] HTTP methods are correct
127
- - [ ] Request body field names/types match the `api.md` schema
128
- - [ ] Response format (success/error) matches the standard in `api.md`
129
- - [ ] Error codes come only from `api.md § Error Catalog`
130
- - [ ] Pagination follows the `api.md` pattern where applicable
131
- - [ ] Auth headers exist/are correct per `api.md § Authentication`
132
- - [ ] If endpoints have `API-*` IDs, the implementation is traceable to the requirement
133
- - [ ] If a new endpoint is not yet recorded in `api.md` but is listed in `## Approved Scope Delta`, do not mark it as a rogue endpoint for the active phase. Note that a formal spec update is still pending.
135
+ - [ ] Operation identity matches the selected protocol: REST method/path, GraphQL operation, RPC procedure, or event channel/topic
136
+ - [ ] Input arguments/payload fields and types match `api.md`
137
+ - [ ] Success result and error semantics match the protocol-native contract
138
+ - [ ] Pagination/filtering or subscription/delivery behavior follows `api.md` where applicable
139
+ - [ ] Authentication, authorization, idempotency, and replay controls match the contract
140
+ - [ ] Deprecation, retry/timeout, SLO, and contract-test invariants touched by this phase match `api.md`; otherwise mark N/A
141
+ - [ ] `API-*` operations remain traceable to requirements
142
+ - [ ] A new operation listed in `## Approved Scope Delta` is temporary approved scope, not a rogue operation; note pending formal spec sync
134
143
 
135
144
  **Example findings:**
136
145
  ```
@@ -150,6 +159,7 @@ To change it: update `codeReviewPreferences.fixMode` in `.agents/developer-confi
150
159
  - [ ] TypeScript rules are followed: strict, no `any`, no `enum` (if forbidden)
151
160
  - [ ] Code style rules are followed: no `console.log`, early return, max function length
152
161
  - [ ] Security rules are followed: tokens in httpOnly cookies, no secrets in code
162
+ - [ ] Applicable logging, migration, feature-flag, generated-code, and secret-rotation rules are followed
153
163
 
154
164
  **Example findings:**
155
165
  ```
@@ -169,6 +179,7 @@ To change it: update `codeReviewPreferences.fixMode` in `.agents/developer-confi
169
179
  - [ ] Spacing uses the system - no random margin/padding
170
180
  - [ ] Border radius/shadow follow `StyleGuide § Component Style`
171
181
  - [ ] Breakpoints follow `StyleGuide § Responsive & Breakpoints`
182
+ - [ ] Applicable operational states, accessibility, localization, and UI performance constraints are implemented
172
183
 
173
184
  **Example findings:**
174
185
  ```
@@ -190,6 +201,7 @@ To change it: update `codeReviewPreferences.fixMode` in `.agents/developer-confi
190
201
  - [ ] The task is not half-finished - no unfinished work remains
191
202
  - [ ] If the task has traceability IDs, all are valid and point to real upstream artifacts
192
203
  - [ ] If an active phase task implements new scope recorded only in `## Approved Scope Delta`, treat it as valid for the active phase, but mention that syncing into the main spec documents is still pending if not done yet.
204
+ - [ ] Every applicable Phase Definition of Done item has evidence; `N/A` items include a reason
193
205
 
194
206
  **Example findings:**
195
207
  ```
@@ -260,26 +272,15 @@ The report is shown in this session chat. Do not save it to a file unless the us
260
272
  | developer-config.json (scope) | ✅ OK | — |
261
273
  ### Detailed Findings
262
274
  [list findings per item - use the 4-point format below]
263
- ```
264
-
265
- **Format for each finding - MUST use these 4 points. MUST NOT show code:**
266
-
267
- ```markdown
268
- #### [Severity] [ID] [Short Title]
269
275
 
270
- **Where?**
271
- [Page or file name only]
272
-
273
- **What happens if it is not fixed?**
274
- [Explain the impact in simple logic - as if speaking to a user who understands how the app works, not the code. Short and direct.]
275
-
276
- **What happens if it is fixed?**
277
- [Explain the benefit in simple logic. Short and direct.]
278
-
279
- **Recommended fix**
280
- [Explain what needs to change in logic and flow, not code syntax.]
276
+ ### Fix Manifest
277
+ | Finding | Target | Intended change | Validation |
278
+ |---|---|---|---|
279
+ | [ID] | `[path]` | [bounded change] | [compliance check/test] |
281
280
  ```
282
281
 
282
+ Format each finding with the shared `finding-format.md` loaded during setup.
283
+
283
284
  ---
284
285
 
285
286
  ## Execution Rules
@@ -295,8 +296,8 @@ The report is shown in this session chat. Do not save it to a file unless the us
295
296
 
296
297
  **`report-first`:**
297
298
  ```
298
- 💥 BLOCKER / 🔴 MAJOR -> Report all findings. Show the gate prompt (see runtime-config.md § Fix Mode Contract). End the response. Wait for user confirmation in the next message before fixing.
299
- ⚠️ MINOR / ℹ️ INFO -> Only report.
299
+ 💥 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.
300
+ ℹ️ INFO / non-actionable note -> Report only; do not include it in the fix manifest.
300
301
  ✅ OK -> Continue to the code-review skill.
301
302
  ```
302
303
 
@@ -1,8 +1,10 @@
1
1
  ---
2
2
  name: spec-init
3
- description: Generate all `project-context/` documents from an existing codebase. Supports Batch Generate (all at once) or Guided Generate (one by one with confirmation). Suitable for active projects or boilerplates.
4
- persona: "Fachri"
5
- persona_role: "Tech Lead"
3
+ description: Generates evidence-backed `project-context/` specs from an existing codebase in batch or guided mode, recording confidence and missing decisions. Use only when the user explicitly requests spec bootstrapping or reverse documentation.
4
+ compatibility: Requires the complete MACCA-METHOD collection with sibling _shared resources and workspace file access.
5
+ metadata:
6
+ persona: "Fachri"
7
+ persona-role: "Tech Lead"
6
8
  ---
7
9
 
8
10
  # Spec Init
@@ -11,7 +13,7 @@ persona_role: "Tech Lead"
11
13
 
12
14
  Before starting:
13
15
 
14
- 1. Read `../_shared/references/runtime-config.md`.
16
+ 1. Read `../_shared/references/language-config.md`.
15
17
  2. Read `../_shared/references/human-loop.md`.
16
18
  3. Read `../_shared/references/scope-rules.md`.
17
19
  4. Use `languagePreferences.communication.normalized` for chat output and review prompts.
@@ -42,6 +44,8 @@ Every claim carries a **confidence level**:
42
44
 
43
45
  ## Step 0 — Choose a Mode
44
46
 
47
+ Before asking for a mode, inventory the target files in `project-context/`. Never overwrite an existing document implicitly. If any target exists, ask one decision for this run: preserve and skip existing files, regenerate named files, or cancel and review. List every file that would be replaced. This approval applies only to the named files.
48
+
45
49
  Ask the user before starting:
46
50
 
47
51
  ```
@@ -143,11 +147,22 @@ When any Medium or Low confidence exists, also include:
143
147
  - [question that still needs user confirmation]
144
148
  ````
145
149
 
150
+ Every generated document must include unresolved decisions that cannot be observed from code:
151
+
152
+ ````markdown
153
+ ## Missing Decisions
154
+
155
+ | Decision Needed | Why It Cannot Be Inferred | Recommended Owner Skill |
156
+ |-----------------|---------------------------|-------------------------|
157
+ | [decision] | [missing evidence] | `[brainstorm-* skill]` |
158
+ ````
159
+
146
160
  Rules:
147
161
  - Do not mark **High** unless direct evidence exists.
148
162
  - For **Medium**, explain the inference basis briefly.
149
163
  - For **Low**, write it as a question or note, not a final fact.
150
164
  - `PRD.md` usually mixes High and Medium confidence because it is synthesized last from other artifacts.
165
+ - Never infer missing business motivation, rollout, SLO, tenancy, migration, recovery, or operational policy from convention alone. Record it under `Missing Decisions` and route it to the owning brainstorm skill.
151
166
 
152
167
  ---
153
168
 
@@ -216,40 +231,40 @@ Next steps:
216
231
  **Read:** folder structure, `package.json`, config files
217
232
  **Extract:** tech stack, folder structure, database choice, deployment setup, visible design patterns
218
233
  **Add:** `Input Evidence` listing the files and folders used to infer the architecture
219
- **Add if possible:** `Document Role`, `System Boundaries`, `Canonical Terminology`, `ADR Index`, `Assumptions & Open Questions`
234
+ **Add if possible:** `Document Role`, `System Boundaries`, `Canonical Terminology`, `ADR Index`, observed operations/observability/recovery facts, `Assumptions & Open Questions`, `Missing Decisions`
220
235
 
221
236
  ### rules.md
222
237
  **Read:** `.eslintrc*`, `.prettierrc*`, `tsconfig.json`, 2-3 code examples
223
238
  **Extract:** naming conventions in use, indentation, quote style, consistent patterns
224
239
  **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.
225
240
  **Add:** `Input Evidence` listing the config files and code examples used
226
- **Add if possible:** `Document Role`, `Rule Priority`, `Assumptions & Exceptions`
241
+ **Add if possible:** `Document Role`, `Rule Priority`, observed conditional operational rules, `Assumptions & Exceptions`, `Missing Decisions`
227
242
 
228
243
  ### schema.md
229
244
  **Read:** `migrations/`, `models/`, `prisma/schema.prisma`, or equivalents
230
- **Extract:** table names, columns, data types, relationships, indexes
245
+ **Extract:** datastore-native entities (tables, collections, aggregates, nodes, streams, or keys), fields/payloads, types, relationships, validation, retention, and indexes/projections
231
246
  **Add:** `Input Evidence` listing the schema sources inspected
232
- **Add if possible:** `Document Role`, `Entity Map`, `Not Yet Modeled / Deferred`, `Assumptions & Open Questions`
247
+ **Add if possible:** `Document Role`, `Entity Map`, observed scale/tenancy/concurrency/migration facts, `Not Yet Modeled / Deferred`, `Assumptions & Open Questions`, `Missing Decisions`
233
248
 
234
249
  ### api.md
235
- **Read:** `routes/`, `controllers/`, `handlers/`, OpenAPI/Swagger if available
236
- **Extract:** method + path for each endpoint, request body, response format, auth requirements
250
+ **Read:** protocol-native routing/integration sources such as `routes/`, `controllers/`, `handlers/`, GraphQL schemas/resolvers, RPC routers, event producers/consumers, and OpenAPI/Swagger if available
251
+ **Extract:** protocol-native operation identity, request/input shape, response/output/event shape, auth requirements, lifecycle/deprecation facts, and reliability signals
237
252
  **Add:** `Input Evidence` listing the routing/controller sources inspected
238
- **Add if possible:** `Document Role`, `Scope Summary`, `Canonical Terminology`, `Endpoint Inventory`, `Assumptions & Open Questions`
253
+ **Add if possible:** `Document Role`, `Scope Summary`, `Canonical Terminology`, operation inventory, observed reliability/deprecation facts, `Assumptions & Open Questions`, `Missing Decisions`
239
254
 
240
255
  ### StyleGuide.md
241
256
  **Read:** `tailwind.config.*`, `components/` folder, main CSS/SCSS files
242
257
  **Extract:** colors in use, existing components, spacing system, fonts
243
258
  **Skip if:** there is no UI folder or the project is backend-only
244
259
  **Add:** `Input Evidence` listing the UI assets inspected
245
- **Add if possible:** `Document Role`, `Supported Surfaces`, `Component Inventory`, `Non-Goals / Not Yet Defined`, `Assumptions & Open Questions`
260
+ **Add if possible:** `Document Role`, `Supported Surfaces`, `Component Inventory`, observed accessibility/operational states, `Non-Goals / Not Yet Defined`, `Assumptions & Open Questions`, `Missing Decisions`
246
261
 
247
262
  ### PRD.md
248
263
  **Do not read new files**. Only synthesize from previous documents.
249
- **Extract:** features already built (from api + schema), business rules from schema constraints, non-goals (features that are *not* present)
264
+ **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.
250
265
  **Confidence note:** PRD usually mixes **High** and **Medium**. Do not state business motivation as fact unless it is explicitly visible in the codebase.
251
266
  **Add:** `Input Evidence` referencing the previously generated spec files used for synthesis
252
- **Add if possible:** `Document Role`, `Canonical Terminology`, `Reading Guide for AI`
267
+ **Add if possible:** `Document Role`, `Canonical Terminology`, observed metrics/workarounds, `Reading Guide for AI`, `Missing Decisions`
253
268
 
254
269
  ---
255
270