macca-method 1.1.0 → 2.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.
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 +54 -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 +17 -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 +12 -7
  18. package/.agents/skills/brainstorm-api/SKILL.md +53 -196
  19. package/.agents/skills/brainstorm-api/assets/api.template.md +147 -0
  20. package/.agents/skills/brainstorm-architecture/SKILL.md +26 -129
  21. package/.agents/skills/brainstorm-architecture/assets/architecture.template.md +135 -0
  22. package/.agents/skills/brainstorm-prd/SKILL.md +23 -104
  23. package/.agents/skills/brainstorm-prd/assets/PRD.template.md +106 -0
  24. package/.agents/skills/brainstorm-rules/SKILL.md +19 -153
  25. package/.agents/skills/brainstorm-rules/assets/rules.template.md +127 -0
  26. package/.agents/skills/brainstorm-schema/SKILL.md +53 -117
  27. package/.agents/skills/brainstorm-schema/assets/schema.template.md +109 -0
  28. package/.agents/skills/brainstorm-styleguide/SKILL.md +21 -136
  29. package/.agents/skills/brainstorm-styleguide/assets/StyleGuide.template.md +147 -0
  30. package/.agents/skills/brainstorm-task/SKILL.md +24 -107
  31. package/.agents/skills/brainstorm-task/assets/Task.template.md +113 -0
  32. package/.agents/skills/bug-fix/SKILL.md +54 -56
  33. package/.agents/skills/code-review/SKILL.md +28 -19
  34. package/.agents/skills/code-review/references/review-checklist.md +24 -26
  35. package/.agents/skills/developer/SKILL.md +27 -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 +19 -16
  40. package/.agents/skills/meet/SKILL.md +170 -0
  41. package/.agents/skills/quick-dev/SKILL.md +32 -34
  42. package/.agents/skills/release-readiness/SKILL.md +151 -0
  43. package/.agents/skills/spec-audit/SKILL.md +39 -22
  44. package/.agents/skills/spec-compliance/SKILL.md +43 -40
  45. package/.agents/skills/spec-init/SKILL.md +31 -14
  46. package/README.md +181 -132
  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 +430 -0
  53. package/scripts/test-upgrade-legacy.js +143 -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,20 +1,26 @@
1
1
  ---
2
2
  name: bug-fix
3
- description: Diagnose, fix, and document bugs. Check `bug-log.md` first to recognize similar patterns. Record to the bug log only after the user confirms the fix is correct.
4
- persona: "Ikhsan"
5
- persona_role: "Debugger"
3
+ description: Diagnoses, fixes, validates, and documents bugs, checking `bug-log.md` for recurring patterns. Use for bug reports, runtime errors, regressions, and to resume an approved bug fix after a report-first gate. Always explain the root cause and obtain explicit implementation approval before the first code change, then record the bug only after the user confirms the fix works.
4
+ compatibility: Requires the complete MACCA-METHOD collection with sibling _shared resources and workspace file access.
5
+ metadata:
6
+ persona: "Ikhsan"
7
+ persona-role: "Debugger"
6
8
  ---
7
9
 
8
10
  # Bug Fix
9
11
 
10
12
  ## Shared Runtime Setup
11
13
 
14
+ Paths written as `../...` below are relative to this SKILL.md's own folder, not the project's working directory - resolve them as a sibling of the folder that contains this file.
15
+
12
16
  Before continuing:
13
17
 
14
- 1. Read `../_shared/references/runtime-config.md`.
15
- 2. Read `../_shared/references/human-loop.md`.
16
- 3. 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.
17
- 4. Use `languagePreferences.communication.normalized` for all chat output.
18
+ 1. Read `../_shared/references/language-config.md`.
19
+ 2. Read `../_shared/references/fix-mode.md`.
20
+ 3. Read `../_shared/references/human-loop.md`.
21
+ 4. If the current message answers this skill's active report-first gate, resume directly at the approved fix under the Approval Resume Protocol. Do not repeat diagnosis or ask again.
22
+ 5. 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]`.
23
+ 6. Use `languagePreferences.communication.normalized` for all chat output.
18
24
 
19
25
  ---
20
26
 
@@ -69,9 +75,9 @@ Compare the reported bug with existing entries:
69
75
  > "This looks like **BUG-[ID]** that we fixed before.
70
76
  > The root cause was: [short explanation]
71
77
  > The applied fix was: [short explanation]
72
- > I will apply the same fix. OK?"
78
+ > I can reuse the proven fix after checking that the current code still has the same root cause."
73
79
 
74
- Wait for confirmation before going to Step 3.
80
+ Continue to Step 2 long enough to verify the current root cause, then use the single gate in Step 2d.
75
81
 
76
82
  **B. Similar but different:**
77
83
  > "This is similar to **BUG-[ID]** - both share [similarity], but this one differs in: [specific difference].
@@ -100,11 +106,12 @@ Before reading code, use every available aid:
100
106
  - Files named by the user
101
107
  - Files directly called
102
108
  - If the bug sits behind shared code, MUST check all callers of that shared code - one root fix beats many per-caller guards
109
+ - Search for the same bug pattern across the codebase now, before the gate. Include every known occurrence proposed for repair in the fix manifest.
103
110
  - Relevant specs (`project-context/architecture.md`, `schema.md`, etc.) if the bug spans multiple layers
104
111
 
105
- ### 2c. Explain the diagnosis to the user
112
+ ### 2c. Explain the diagnosis and propose the fix - one response
106
113
 
107
- MUST use EXACTLY these 3 points. MUST NOT show code - explain only in working logic:
114
+ MUST use EXACTLY these points, in this order, in a single response. MUST NOT show code in the first three points - explain only in working logic. This response does not end here - continue straight into the gate in 2d; do not stop after "Recommended fix" and wait for a separate reply:
108
115
 
109
116
  ```
110
117
  **Why can this happen?**
@@ -115,38 +122,32 @@ MUST use EXACTLY these 3 points. MUST NOT show code - explain only in working lo
115
122
 
116
123
  **Recommended fix**
117
124
  [Explain what needs to change in the logic and flow, not syntax. Speak as if explaining how the app works.]
118
- ```
119
-
120
- ### 2d. Confirm before fixing
121
- Wait for the user's approval of the diagnosis before continuing.
122
-
123
- ---
124
-
125
- ## Step 3 - Fix
126
125
 
127
- ### Fix Mode Gate
126
+ **Files to change**
127
+ - `[path]` - [bounded change]
128
+ - `[path]` - [bounded change]
129
+ ```
128
130
 
129
- Before applying any code change, check fixMode (read in Shared Runtime Setup):
131
+ ### 2d. Root-Cause Approval Gate
130
132
 
131
- **`report-first` (default):** Present a summary of the proposed fix:
133
+ End the SAME response as 2c with the `report-first` gate block from `fix-mode.md`, in the language required by `language-config.md`.
132
134
 
133
- ```
134
- Proposed fix for [bug title]:
135
- Root cause: [one sentence]
136
- Files to change:
137
- - [path/file] - [what will change]
138
- ```
135
+ - Always wait for explicit user approval before the first code change, regardless of `fixMode`.
136
+ - MUST NOT split 2c and 2d across two responses - the diagnosis, the files to change, and the gate are one message, one turn.
137
+ - MUST NOT invent an alternate approval question (for example "reply agree" or "balas setuju"). Use only the exact gate block from `fix-mode.md`.
138
+ - After the first implementation approval, `fixMode` governs downstream `spec-compliance` and `code-review` remediation only.
139
+ - Do not add another implementation approval gate in Step 3.
139
140
 
140
- Show the gate prompt from `../_shared/references/runtime-config.md § Fix Mode Contract`. End the response. Apply the fix only after user confirmation in the next message.
141
+ ---
141
142
 
142
- **`fix-then-report`:** Continue directly to the fix implementation below.
143
+ ## Step 3 - Fix
143
144
 
144
145
  ### Apply the Fix
145
146
 
146
147
  Apply the fix with the **minimal-change principle:**
147
148
  - Fix only the reported bug - nothing else in scope
148
149
  - Use the most direct fix, not a workaround
149
- - Target: change <=2 files. If it needs >3 files, ask the user first
150
+ - Target: change <=2 files. If it needs 3 or more files, ask before expanding the disclosed scope
150
151
  - No new dependencies unless truly necessary
151
152
  - No refactoring or cleanup - that is separate work
152
153
 
@@ -172,26 +173,9 @@ Internal check before spec-compliance:
172
173
  2. Are other files affected but unchanged?
173
174
  3. Does the change stay within the bug scope?
174
175
 
175
- ### Check the Same Pattern Elsewhere
176
-
177
- MUST do this after applying the fix - before continuing to verification:
178
-
179
- Search the whole codebase for the same bug pattern elsewhere. Use MCP or a subagent if needed.
180
-
181
- - If the same pattern is found elsewhere:
182
- ```
183
- ⚠️ The same pattern was also found in:
184
- - [file/page name] - [briefly explain the situation without code]
185
-
186
- Should I fix all of them now, or only the reported one first?
187
- 1) Fix all now -> recommended
188
- 2) Fix only the reported one first, the rest later
189
- ```
190
- Wait for the answer before continuing.
191
-
192
- - If none is found: continue to Step 4.
176
+ ### Recheck Approved Scope
193
177
 
194
- If unsure, review the code again before verification.
178
+ After applying the fix, recheck only the approved targets and directly affected callers. Same-pattern discovery was completed before the gate. Ask again only if validation reveals a materially new, destructive, or out-of-scope occurrence under the shared Approval Resume Protocol.
195
179
 
196
180
  ---
197
181
 
@@ -201,11 +185,11 @@ After the fix is applied:
201
185
 
202
186
  ### 4a. Run spec-compliance
203
187
  Load the `spec-compliance` skill for the modified files.
204
- If issues exist: fix them first.
188
+ If issues exist, follow its configured `fixMode`. In `report-first`, stop at its report and gate; the earlier bug approval does not authorize newly discovered compliance fixes.
205
189
 
206
190
  ### 4b. Run code-review
207
191
  Load the `code-review` skill for the same files.
208
- If critical issues exist (high severity): fix them first.
192
+ If issues exist, follow its configured `fixMode`. In `report-first`, stop at its report and gate; do not auto-fix findings outside the approved bug manifest.
209
193
 
210
194
  ---
211
195
 
@@ -268,6 +252,19 @@ Regression prevention added.
268
252
 
269
253
  ---
270
254
 
255
+ ## Step 6b - Validate Regression Prevention
256
+
257
+ After Step 6 changes code, tests, or spec/rule documents:
258
+
259
+ 1. Run the new regression test or the narrowest equivalent verification.
260
+ 2. If Step 6 changed a spec/rule, rerun the affected `spec-compliance` and `code-review` checks before recording the bug.
261
+ 3. If Step 6 changed only a manual checklist, no rerun is required; keep the checklist concrete and reproducible.
262
+ 4. If this validation fails, repair the prevention change before continuing.
263
+
264
+ Only then continue to Step 7.
265
+
266
+ ---
267
+
271
268
  ## Step 7 - Record in the Bug Log
272
269
 
273
270
  After the user confirms the fix worked, record it in `project-context/bug-log.md`.
@@ -328,14 +325,15 @@ Number BUG-N automatically from existing entries.
328
325
 
329
326
  MUST follow these without exception. Breaking even one makes the bug-fix process invalid.
330
327
 
331
- 1. **MUST diagnose first, then fix** - MUST NOT touch code before the root cause is found and confirmed.
328
+ 1. **MUST diagnose first, then fix** - MUST NOT touch code before the root cause is found and explicitly approved for implementation.
332
329
  2. **MUST get user confirmation that the fix works** - MUST NOT write to the bug log before confirmation.
333
330
  3. **MUST check the bug log before starting** - MUST NOT skip this step; recurring bugs may already have a proven solution.
334
331
  4. **MUST make only minimal changes** - MUST NOT fix unrelated issues in one bug-fix.
335
332
  5. **MUST run spec-compliance + code-review after the fix** - MUST NOT report done without both.
336
- 6. **MUST add regression prevention** - at least one of test, spec guard, or manual check is required.
337
- 7. **MUST check for the same pattern elsewhere** - MUST NOT assume the bug exists in only one place without checking.
338
- 8. **MUST use MCP if available** - MUST NOT guess library behavior or database structure without confirmation from the right source.
333
+ 6. **MUST validate regression prevention** - test/spec changes require their own verification before the bug log is written.
334
+ 7. **MUST add regression prevention** - at least one of test, spec guard, or manual check is required.
335
+ 8. **MUST check for the same pattern elsewhere** - MUST NOT assume the bug exists in only one place without checking.
336
+ 9. **MUST use MCP if available** - MUST NOT guess library behavior or database structure without confirmation from the right source.
339
337
 
340
338
  ---
341
339
 
@@ -1,19 +1,27 @@
1
1
  ---
2
2
  name: code-review
3
- description: Review code quality and security after each phase. Run after spec-compliance. Uses a 27-point code-quality checklist and essential security checks.
4
- persona: "Fachri"
5
- persona_role: "Tech Lead"
3
+ description: Reviews code quality and security using a 27-point checklist and essential security checks, then applies and validates approved findings. Use after spec-compliance, before a commit or PR, on explicit review 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
  # Code Review
9
11
 
10
12
  ## Shared Runtime Setup
11
13
 
14
+ Paths written as `../...` below are relative to this SKILL.md's own folder, not the project's working directory - resolve them as a sibling of the folder that contains this file.
15
+
12
16
  Before continuing:
13
17
 
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 the Fix Mode Contract in `runtime-config.md` for full enforcement rules.
16
- 3. Use `languagePreferences.communication.normalized` for all review output.
18
+ 1. Read `../_shared/references/language-config.md`.
19
+ 2. Read `../_shared/references/fix-mode.md`.
20
+ 3. Read `../_shared/references/human-loop.md`.
21
+ 4. Read `../_shared/references/finding-format.md`.
22
+ 5. If the current message answers this skill's active report-first gate, follow the Approval Resume Protocol immediately. Do not repeat setup announcements, context reads, or review.
23
+ 6. 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]`.
24
+ 7. Use `languagePreferences.communication.normalized` for all review output.
17
25
 
18
26
  ---
19
27
 
@@ -25,7 +33,7 @@ You are a **Senior Code Reviewer** evaluating the quality and safety of new code
25
33
 
26
34
  **Expertise:** duplicate/unused code detection, memory leaks, anti-patterns, injection/XSS/auth bugs, data exposure, performance bottlenecks (N+1 queries, missing indexes), naming/standards fit, and over-engineering cuts (`delete` / `stdlib` / `native` / `yagni` / `shrink`).
27
35
 
28
- **Mindset:** Review protects the codebase and users from real problems. Every finding MUST follow the 4-point format below. Severity must stay proportional.
36
+ **Mindset:** Review protects the codebase and users from real problems. Every finding follows the shared finding format. Severity must stay proportional.
29
37
 
30
38
  **Priority:** Security -> code quality -> performance -> correctness -> maintainability.
31
39
 
@@ -37,17 +45,6 @@ You are a **Senior Code Reviewer** evaluating the quality and safety of new code
37
45
 
38
46
  > **Rule:** Run this after `spec-compliance`. Never say the phase is done without running it.
39
47
 
40
- ## Required Finding Format
41
-
42
- MUST use EXACTLY these 4 points for every finding. MUST NOT add or remove points. MUST NOT show code in any point.
43
-
44
- 1. **Where?** - Name only the page or file.
45
- 2. **What happens if it is not fixed?** - Explain the impact in simple app-level logic, not code-level jargon.
46
- 3. **What happens if it is fixed?** - Explain the practical benefit the same way.
47
- 4. **Recommended fix** - Explain what needs to change in the logic/flow, not the syntax.
48
-
49
- ---
50
-
51
48
  ## When to Use
52
49
 
53
50
  - **MUST:** after `spec-compliance` passes, before reporting the phase to the user
@@ -58,10 +55,22 @@ MUST use EXACTLY these 4 points for every finding. MUST NOT add or remove points
58
55
 
59
56
  ## Fix Mode
60
57
 
61
- Mode is read in Shared Runtime Setup. Enforcement rules, including the required gate prompt, are in `../_shared/references/runtime-config.md § Fix Mode Contract`.
58
+ Mode is read in Shared Runtime Setup. Enforcement rules, including the required gate prompt, are in `../_shared/references/fix-mode.md`.
62
59
 
63
60
  To change it: update `codeReviewPreferences.fixMode` in `.agents/developer-config.json`.
64
61
 
62
+ ### Resume After Approval
63
+
64
+ When the user answers the active gate with `yes`, `fix`, `continue`, or finding IDs:
65
+
66
+ 1. Select the approved findings from the immediately preceding report.
67
+ 2. Apply their recorded fixes directly; do not ask what to fix again.
68
+ 3. Run targeted tests, type/lint/build checks as applicable.
69
+ 4. Recheck only the approved findings and directly affected CR/SEC checks.
70
+ 5. Report each finding as `resolved`, `partial`, or `unresolved` and include validation evidence.
71
+
72
+ Ask again only for a material workspace change, conflicting findings, or newly destructive/out-of-scope work.
73
+
65
74
  ---
66
75
 
67
76
  ## Preflight - Read Project Context
@@ -6,7 +6,8 @@
6
6
  2. Phase 2 - Essential Security
7
7
  3. Self-Review Before Reporting
8
8
  4. Phase 3 - Report & Fix
9
- 5. Key Points
9
+ 5. Post-Fix Validation
10
+ 6. Key Points
10
11
 
11
12
  ## Phase 1 - 27 Code Quality Points (All Required)
12
13
 
@@ -22,7 +23,7 @@ Check CR-01 through CR-27 without skipping. Continue to Phase 2 only after all 2
22
23
 
23
24
  ### Level 2: MAJOR
24
25
 
25
- - **CR-06 Duplicate Functions** - grep first before accepting a new helper
26
+ - **CR-06 Duplicate Functions** - search the codebase with the host's available symbol, graph, or content-search tool before accepting a new helper
26
27
  - **CR-07 Unused Code** - imports, variables, functions
27
28
  - **CR-08 Duplicate / Redundant Code Blocks** - consolidate repeated logic
28
29
  - **CR-09 Stale Code Not Removed** - commented code, TODOs, replaced paths
@@ -33,7 +34,7 @@ Check CR-01 through CR-27 without skipping. Continue to Phase 2 only after all 2
33
34
  - **CR-14 Memory Leaks** - listeners, timers, subscriptions, connections
34
35
  - **CR-15 Security Ignored** - sensitive surfaces were not reviewed deeply enough
35
36
  - **CR-16 Missing API Rate Limits** - no handling around repeated external API calls
36
- - **CR-17 No Tests (TDD Violation)** - missing tests for new logic
37
+ - **CR-17 Missing Required Tests** - new logic lacks the tests required by `rules.md`; call it a TDD violation only when test-first is explicitly required
37
38
 
38
39
  ### Level 3: MINOR
39
40
 
@@ -78,7 +79,7 @@ Check all of these:
78
79
  - **Django**: `ALLOWED_HOSTS` is set for production; `CSRF_TRUSTED_ORIGINS` is configured; `SECRET_KEY` is not hardcoded or exposed; `DEBUG=False` is enforced in production settings
79
80
  - **Express / Fastify / NestJS**: `helmet` is configured; CORS is limited to known origins (no wildcards in production); `body-parser` size limits are set; raw `req.body` is not passed directly into queries or shell commands
80
81
  - **Rails**: strong parameters are enforced for all mass assignment; CSRF protection is not disabled; secrets are stored in `credentials.yml.enc`, not plain text
81
- - **SEC-10 Dependency Vulnerabilities** - note if packages used in this phase have known CVEs. Mark MAJOR for critical/high severity in direct dependencies. Check `npm audit`, `pnpm audit`, `pip audit`, `composer audit`, or `bundle audit` as applicable.
82
+ - **SEC-10 Dependency Vulnerabilities** - note known CVEs in packages used in this phase. Run the applicable installed audit command only when network policy permits; never install audit tooling during review. Mark critical/high issues in direct dependencies as MAJOR.
82
83
 
83
84
  ## Self-Review Before Reporting
84
85
 
@@ -110,36 +111,23 @@ Use this report structure:
110
111
 
111
112
  Then list findings by severity, followed by the checklist status table.
112
113
 
113
- For each finding, use EXACTLY this structure. MUST NOT show code in any point:
114
+ Before a report-first gate, retain this fix manifest for actionable findings:
114
115
 
115
116
  ```markdown
116
- #### [Severity] [ID] [Short Title]
117
-
118
- **Where?**
119
- [Page or file name only]
120
-
121
- **What happens if it is not fixed?**
122
- [Explain the impact in simple app-level logic. Short and direct.]
123
-
124
- **What happens if it is fixed?**
125
- [Explain the practical benefit in simple app-level logic. Short and direct.]
126
-
127
- **Recommended fix**
128
- [Explain what needs to change in the logic/flow, not the syntax.]
117
+ ### Fix Manifest
118
+ | Finding | Target | Intended change | Validation |
119
+ |---|---|---|---|
120
+ | [ID] | `[path]` | [bounded change] | [targeted check] |
129
121
  ```
130
122
 
131
- Finding rules:
132
- - `Where?` should name only the page/file, not code symbols or noisy technical paths.
133
- - `Not fixed?` must describe a real app/user consequence, not technical jargon.
134
- - `Fixed?` must describe a practical benefit, not jargon.
135
- - `Recommendation` must explain change logic, not code or a diff.
136
- - MUST NOT add a 5th point or a `Why this fix?` section.
137
- - If a checklist item has no issue, MUST NOT create an empty finding just to fill the format.
123
+ If the workflow will update a phase plan status or append Code Review Notes, include that plan file and mutation in the manifest. Otherwise return plan-status completion to `developer`; approval never authorizes an undisclosed plan edit.
124
+
125
+ Format every finding with the shared `finding-format.md` loaded by the parent skill. Keep exact technical targets and validation in the fix manifest, not as a fifth finding point.
138
126
 
139
127
  Fix priority - follow `fixMode` from Shared Runtime Setup:
140
128
 
141
129
  **`report-first` (default):**
142
- Present the full report. Show the gate prompt from `../_shared/references/runtime-config.md § Fix Mode Contract`. **End the response. DO NOT apply any fixes in the same response.** Wait for user confirmation in the next message.
130
+ Present the full report and fix manifest. Show the gate prompt from the shared runtime contract loaded by the parent skill. **End the response. DO NOT apply any fixes in the same response.** On approval, follow the Approval Resume Protocol without another question.
143
131
 
144
132
  **`fix-then-report`:**
145
133
  - `💥 BLOCKER` -> fix now
@@ -147,6 +135,16 @@ Present the full report. Show the gate prompt from `../_shared/references/runtim
147
135
  - `⚠️ MINOR` -> report and discuss
148
136
  - `ℹ️ INFO` -> backlog
149
137
 
138
+ ## Post-Fix Validation
139
+
140
+ Before updating plan status or claiming completion:
141
+
142
+ 1. Run the narrowest relevant tests and available type/lint/build checks.
143
+ 2. Recheck the approved findings and directly affected CR/SEC items only.
144
+ 3. If validation fails, repair within approved scope and validate one more time.
145
+ 4. Report every approved ID as `resolved`, `partial`, or `unresolved`, with command/check evidence.
146
+ 5. Do not start a fresh unbounded finding pass. Newly noticed unrelated work is reported separately and is not auto-fixed.
147
+
150
148
  ## Plan Status Update (run after all fixes are done)
151
149
 
152
150
  After fixes are applied and the review is complete, check whether a plan file exists for this phase (`project-context/plans/phase-[N]-*.md`). If it does:
@@ -1,21 +1,27 @@
1
1
  ---
2
2
  name: developer
3
- description: Executes Task.md work phase by phase. Reads only relevant specs, writes minimal code, updates Task.md, and runs spec-compliance plus code-review after each phase. Use for implementation, maintenance changes, or post-task technical work.
4
- persona: "Firdaus"
5
- persona_role: "Expert Developer"
3
+ description: Executes Task.md phases and explicit implementation or maintenance requests, reading only relevant specs and running compliance plus review gates. Use when the user clearly intends code/config changes; never start merely because tasks exist.
4
+ compatibility: Requires the complete MACCA-METHOD collection with sibling _shared resources and workspace file access.
5
+ metadata:
6
+ persona: "Firdaus"
7
+ persona-role: "Expert Developer"
6
8
  ---
7
9
 
8
10
  # Developer
9
11
 
10
12
  ## Shared Runtime Setup
11
13
 
14
+ Paths written as `../...` below are relative to this SKILL.md's own folder, not the project's working directory - resolve them as a sibling of the folder that contains this file.
15
+
12
16
  Before continuing:
13
17
 
14
- 1. Read `../_shared/references/runtime-config.md`.
15
- 2. Read `../_shared/references/human-loop.md`.
16
- 3. Read `codeReviewPreferences.fixMode` from `.agents/developer-config.json`. If it is missing, treat it as `"report-first"`. This controls how `spec-compliance` and `code-review` behave after each phase. See the Fix Mode Contract in `runtime-config.md`.
17
- 4. Use `languagePreferences.communication.normalized` for chat.
18
- 5. Use `languagePreferences.documents.normalized` for generated plans and spec-side artifacts.
18
+ 1. Read `../_shared/references/language-config.md`.
19
+ 2. Read `../_shared/references/config-mutation.md`.
20
+ 3. Read `../_shared/references/fix-mode.md`.
21
+ 4. Read `../_shared/references/human-loop.md`.
22
+ 5. Read `codeReviewPreferences.fixMode` from `.agents/developer-config.json`. If it is missing, treat it as `"report-first"`. This controls how `spec-compliance` and `code-review` behave after each phase.
23
+ 6. Use `languagePreferences.communication.normalized` for chat.
24
+ 7. Use `languagePreferences.documents.normalized` for generated plans and spec-side artifacts.
19
25
 
20
26
  ---
21
27
 
@@ -23,29 +29,13 @@ Before continuing:
23
29
 
24
30
  Run as `@Firdaus` (Expert Developer). Use the shared persona profile in `../_shared/references/personas.md`.
25
31
 
26
- **Code Writing Principles:**
27
- - Clean code is mandatory - concise, expressive, self-documenting
28
- - **Comments explain WHY, not WHAT** - the code itself explains what
29
- - Needed: complex logic, unclear business rules, workarounds, design decisions, public APIs (JSDoc/TSDoc)
30
- - Avoid: comments that restate what the code already shows
31
- - **MUST climb this ladder before writing a single line of code. MUST NOT skip steps. Stop at the first sufficient step:**
32
- 1. Does this need to be built? (YAGNI) - if not, stop.
33
- 2. Does it already exist in the codebase? MUST search and reuse it - MUST NOT duplicate it.
34
- 3. Is it in the standard library? MUST use it.
35
- 4. Is it native to the platform/framework? MUST use it.
36
- 5. Is it in an installed dependency? MUST use it.
37
- 6. Can it be one line? MUST make it one line.
38
- 7. Only if none of the above applies: write the minimum working code.
39
- - This ladder runs after understanding the problem, NOT instead of reading the task.
40
- - MUST NOT add a new library if steps 1-6 already solve it. Every new library MUST include an explicit reason and user confirmation before installation.
41
- - Evaluate new libraries: active maintenance, good security record, not over-engineered for the problem size
42
- - Use modern, proven patterns for correctness, not trends
43
- - **Bug fixes = root cause, not symptoms:** grep all callers of touched functions, then fix at the source
44
- - Deletion > addition. Boring > clever. Fewest files. Shortest working diff wins.
32
+ Before implementation, read and follow `../_shared/references/implementation-principles.md`.
33
+
34
+ Developer-specific additions:
35
+ - Use modern, proven patterns for correctness, not trends.
45
36
  - Never simplify trust-boundary validation, data-loss prevention, accessibility basics, or explicitly requested behavior.
46
- - Mark intentional simplifications with a `tradeoff:` comment - note the ceiling and the upgrade trigger.
47
- - Technical decisions (library choice, code patterns, local structure): decide them yourself by best practice.
48
- - Business logic or scope changes: ask the user first.
37
+ - Mark intentional simplifications with a `tradeoff:` comment that states the ceiling and upgrade trigger.
38
+ - Architecture-level library/vendor changes require an approved ADR; bounded local package choices follow `rules.md` and require permission before installation.
49
39
 
50
40
  **Communication:**
51
41
  - Use analogies when helpful
@@ -104,14 +94,12 @@ After the user answers, **create or update `.agents/developer-config.json`** wit
104
94
 
105
95
  ---
106
96
 
107
- ## Execution Workflow Reference
97
+ ## Conditional Workflow References
98
+
99
+ Load only the current state:
108
100
 
109
- Read `references/execution-workflow.md` and follow it for:
101
+ - Missing config, scope, work mode, or starting plan-first: read `references/onboarding.md`. If adding skill paths, also read `../_shared/references/additional-skills.md`.
102
+ - Executing a task: read `references/execute-task.md`.
103
+ - Closing a completed phase/project: read `references/close-phase.md`.
110
104
 
111
- - Step 0b - Check Additional Skills
112
- - Step 1 - Read `Task.md` and present the phase summary
113
- - Step 1b - Choose Work Mode
114
- - Step 2 - Choose Relevant Specs
115
- - Step 3 - Execute Tasks One by One
116
- - Step 4 - After All Phase Tasks Are Complete
117
- - Step 5 - Project Complete
105
+ Do not load all three by default.
@@ -0,0 +1,25 @@
1
+ # Developer Phase Close
2
+
3
+ Read this file only after every task in the active phase is complete.
4
+
5
+ ## Close the Phase
6
+
7
+ 1. Show the phase summary.
8
+ 2. Read the phase Definition of Done. Complete every applicable implementation-side item; mark inapplicable items `N/A` with a reason.
9
+ 3. If a phase plan exists, set `status: code-review`.
10
+ 4. Run `spec-compliance` using configured fix mode.
11
+ 5. Only after compliance passes, run `code-review` using configured fix mode.
12
+ 6. Mark quality-gate Definition of Done items complete only after both pass.
13
+ 7. Offer the next phase and wait according to Task.md execution rules.
14
+
15
+ In report-first mode, stop at the active gate. Do not invoke the next gate in the same response.
16
+
17
+ ## Project Complete
18
+
19
+ When all phases are complete:
20
+
21
+ 1. Show the project summary.
22
+ 2. Recommend final project-mode `spec-audit`.
23
+ 3. Before a production release, recommend `release-readiness`.
24
+ 4. For later small technical maintenance, create a traceable delta task/phase and remain in developer.
25
+ 5. Route significant business scope expansion to `add-feature`.
@@ -0,0 +1,69 @@
1
+ # Developer Task Execution
2
+
3
+ Read this file only when executing the current task.
4
+
5
+ ## Select Relevant Specs
6
+
7
+ `architecture.md` is required. Read `rules.md` and architecture for every task, then conditionally:
8
+
9
+ | Condition | Additional source |
10
+ |---|---|
11
+ | Database/data | `schema.md` |
12
+ | API/integration | `api.md` |
13
+ | UI | `StyleGuide.md` |
14
+ | Product behavior unclear | `PRD.md` |
15
+
16
+ Scan `[FORBIDDEN]` in rules before coding. Enforce `developerPreferences.scope` using architecture boundaries; stop if the task requires work outside frontend/backend scope.
17
+
18
+ ## Understand and Protect Scope
19
+
20
+ Read the task, acceptance criteria, traceability, and Definition of Done. Follow the shared implementation principles loaded by the parent skill.
21
+
22
+ If requested behavior is not recorded in `project-context/`, obtain one approval and record an `## Approved Scope Delta` in the active phase plan before coding:
23
+
24
+ ```markdown
25
+ ## Approved Scope Delta
26
+
27
+ **Approved:** [YYYY-MM-DD]
28
+ **Source:** User request
29
+ **Affected files/docs:** [paths]
30
+ **Traceability:** DELTA-[N]
31
+ **Acceptance Criteria:**
32
+ - [ ] [testable condition]
33
+ **Sync requirement:** Update the formal owning spec before phase close or when requested.
34
+ ```
35
+
36
+ Do not code an unapproved delta.
37
+
38
+ ## Clarify and Define Behavior
39
+
40
+ Ask one focused question only for unresolved material ambiguity. For non-trivial business logic, transformation, calculation, or validation, define representative input/output and one edge case before implementation.
41
+
42
+ ## Implement
43
+
44
+ Before coding:
45
+
46
+ 1. Read relevant registered additional skills.
47
+ 2. Use relevant registered MCPs; use current documentation for external APIs.
48
+ 3. Apply the shared implementation-principles ladder.
49
+ 4. Follow the testing workflow selected in `rules.md`.
50
+
51
+ After coding, self-review:
52
+
53
+ ```text
54
+ [SELF-REVIEW] Task: [name]
55
+ 1. Security risk: [risk or none identified]
56
+ 2. Performance bottleneck: [risk or none identified]
57
+ 3. Spec assumption: [assumption or none]
58
+ ```
59
+
60
+ ## Validate and Record
61
+
62
+ Run the narrowest relevant test/build/type/lint/manual check. Repair local defects and rerun before continuing.
63
+
64
+ After validation:
65
+
66
+ 1. Mark the task and satisfied acceptance criteria complete.
67
+ 2. Add a short implementation note only when useful.
68
+ 3. Do not mark phase Definition of Done items complete until evidence exists.
69
+ 4. Report files and validation evidence, then follow Task.md execution cadence.
@@ -0,0 +1,47 @@
1
+ # Developer Onboarding and Planning
2
+
3
+ Read this file only when identity/config/work mode is incomplete or plan-first must start.
4
+
5
+ ## Additional Skills and MCPs
6
+
7
+ If `additionalSkills` is missing:
8
+
9
+ 1. Ask once whether the project uses framework/domain skills.
10
+ 2. For each named skill, search every MACCA tool destination: `.agents/skills/` (codex/kimi), `.github/skills/` (copilot), `.opencode/skills/`, `.claude/skills/`, `.cursor/skills/`, `.windsurf/skills/`, `.gemini/skills/`, `.kilo/skills/`. If none match, also check the global equivalents `~/.config/opencode/skills/`, `~/.claude/skills/`, and `~/.agents/skills/`. Only then fall back to matching workspace folders.
11
+ 3. If found, record its path. If absent, ask for the path or allow `skip`.
12
+ 4. Before saving, load `../../_shared/references/additional-skills.md` and use its canonical `paths` shape.
13
+
14
+ When an additional skill is relevant to a task, read it before coding.
15
+
16
+ If `availableMCPs` is missing, ask once which MCPs are available or `none`. Save while preserving unrelated config. Use only registered MCPs that help the current task.
17
+
18
+ ## Developer Scope
19
+
20
+ If `developerPreferences.scope` exists, use it. Otherwise ask once:
21
+
22
+ ```text
23
+ A) Frontend only
24
+ B) Backend only
25
+ C) Fullstack
26
+ ```
27
+
28
+ Save `frontend`, `backend`, or `fullstack` through the shared config-mutation contract.
29
+
30
+ ## Work Mode
31
+
32
+ If `developerPreferences.workMode` exists, use it. Otherwise ask once:
33
+
34
+ ```text
35
+ A) Code now — direct
36
+ B) Plan first — review a phase plan before coding
37
+ ```
38
+
39
+ Save `direct` or `plan-first`.
40
+
41
+ For `plan-first`:
42
+
43
+ 1. Read the relevant phase, architecture, PRD, and rules.
44
+ 2. Create `project-context/plans/phase-[N]-[slug].md` with `status: review`.
45
+ 3. Include Goal, Scope, Files, Risks, and Validation.
46
+ 4. Review it against Task.md and specs.
47
+ 5. Wait for `start`; then set `status: in-progress`.