macca-method 2.1.2 → 3.0.0-rc.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 (89) hide show
  1. package/.agents/macca-lock.json +2 -1
  2. package/.agents/macca-managed-skills.txt +1 -0
  3. package/.agents/skills/_shared/references/additional-skills.md +17 -1
  4. package/.agents/skills/_shared/references/brainstorm-session.md +61 -21
  5. package/.agents/skills/_shared/references/config-mutation.md +58 -18
  6. package/.agents/skills/_shared/references/fix-mode.md +21 -7
  7. package/.agents/skills/_shared/references/human-loop.md +2 -0
  8. package/.agents/skills/_shared/references/implementation-principles.md +4 -0
  9. package/.agents/skills/_shared/references/interaction-contract.md +33 -0
  10. package/.agents/skills/_shared/references/invocation-policy.md +14 -3
  11. package/.agents/skills/_shared/references/language-config.md +24 -4
  12. package/.agents/skills/_shared/references/output-ownership.md +12 -5
  13. package/.agents/skills/_shared/references/planning-principles.md +35 -0
  14. package/.agents/skills/_shared/references/scope-delta.md +21 -0
  15. package/.agents/skills/_shared/references/scope-rules.md +1 -1
  16. package/.agents/skills/_shared/references/skill-catalog.md +30 -13
  17. package/.agents/skills/_shared/references/workspace-safety.md +11 -0
  18. package/.agents/skills/_shared/scripts/config-file.js +132 -0
  19. package/.agents/skills/_shared/scripts/config-validator.js +164 -0
  20. package/.agents/skills/_shared/scripts/read-preferences.js +128 -0
  21. package/.agents/skills/add-feature/SKILL.md +24 -18
  22. package/.agents/skills/brainstorm-api/SKILL.md +24 -23
  23. package/.agents/skills/brainstorm-api/assets/api.template.md +11 -23
  24. package/.agents/skills/brainstorm-architecture/SKILL.md +41 -48
  25. package/.agents/skills/brainstorm-architecture/assets/architecture.template.md +24 -16
  26. package/.agents/skills/brainstorm-prd/SKILL.md +26 -28
  27. package/.agents/skills/brainstorm-prd/assets/PRD.template.md +10 -9
  28. package/.agents/skills/brainstorm-rules/SKILL.md +42 -46
  29. package/.agents/skills/brainstorm-rules/assets/rules.template.md +8 -8
  30. package/.agents/skills/brainstorm-schema/SKILL.md +17 -17
  31. package/.agents/skills/brainstorm-schema/assets/schema.template.md +9 -8
  32. package/.agents/skills/brainstorm-styleguide/SKILL.md +27 -26
  33. package/.agents/skills/brainstorm-styleguide/assets/StyleGuide.template.md +27 -51
  34. package/.agents/skills/brainstorm-task/SKILL.md +53 -37
  35. package/.agents/skills/brainstorm-task/assets/Task.template.md +11 -12
  36. package/.agents/skills/bug-fix/SKILL.md +78 -175
  37. package/.agents/skills/bug-fix/assets/bug-log.template.md +61 -0
  38. package/.agents/skills/code-review/SKILL.md +14 -6
  39. package/.agents/skills/code-review/references/review-checklist.md +24 -44
  40. package/.agents/skills/developer/SKILL.md +23 -25
  41. package/.agents/skills/developer/references/close-phase.md +11 -6
  42. package/.agents/skills/developer/references/execute-task.md +15 -8
  43. package/.agents/skills/developer/references/onboarding.md +16 -19
  44. package/.agents/skills/help/SKILL.md +49 -49
  45. package/.agents/skills/meet/SKILL.md +37 -85
  46. package/.agents/skills/quick-dev/SKILL.md +40 -75
  47. package/.agents/skills/release-readiness/SKILL.md +1 -1
  48. package/.agents/skills/setup-macca-method/SKILL.md +79 -0
  49. package/.agents/skills/spec-audit/SKILL.md +21 -17
  50. package/.agents/skills/spec-compliance/SKILL.md +36 -18
  51. package/.agents/skills/spec-init/SKILL.md +53 -22
  52. package/CHANGELOG.md +31 -0
  53. package/README.md +92 -1195
  54. package/bin/macca-method.js +833 -286
  55. package/docs/configuration.md +174 -0
  56. package/docs/troubleshooting.md +180 -0
  57. package/docs/workflows.md +175 -0
  58. package/package.json +48 -4
  59. package/scripts/lib/npm-command.js +76 -0
  60. package/scripts/test-cli-setup.js +869 -0
  61. package/scripts/test-config.js +320 -0
  62. package/scripts/test-install.js +63 -28
  63. package/scripts/test-installer-safety.js +545 -0
  64. package/scripts/test-npm-command.js +143 -0
  65. package/scripts/test-package-safety.js +252 -0
  66. package/scripts/test-preferences.js +475 -0
  67. package/scripts/test-upgrade-legacy.js +11 -21
  68. package/scripts/validate-docs.js +166 -0
  69. package/scripts/validate-package.js +285 -0
  70. package/scripts/validate-skill-behavior.js +914 -12
  71. package/.agents/skills/antislop-copywriting/SKILL.md +0 -372
  72. package/.agents/skills/skill-creator/LICENSE.txt +0 -202
  73. package/.agents/skills/skill-creator/SKILL.md +0 -485
  74. package/.agents/skills/skill-creator/agents/analyzer.md +0 -274
  75. package/.agents/skills/skill-creator/agents/comparator.md +0 -202
  76. package/.agents/skills/skill-creator/agents/grader.md +0 -223
  77. package/.agents/skills/skill-creator/assets/eval_review.html +0 -146
  78. package/.agents/skills/skill-creator/eval-viewer/generate_review.py +0 -471
  79. package/.agents/skills/skill-creator/eval-viewer/viewer.html +0 -1325
  80. package/.agents/skills/skill-creator/references/schemas.md +0 -441
  81. package/.agents/skills/skill-creator/scripts/__init__.py +0 -0
  82. package/.agents/skills/skill-creator/scripts/aggregate_benchmark.py +0 -401
  83. package/.agents/skills/skill-creator/scripts/generate_report.py +0 -326
  84. package/.agents/skills/skill-creator/scripts/improve_description.py +0 -247
  85. package/.agents/skills/skill-creator/scripts/package_skill.py +0 -136
  86. package/.agents/skills/skill-creator/scripts/quick_validate.py +0 -103
  87. package/.agents/skills/skill-creator/scripts/run_eval.py +0 -310
  88. package/.agents/skills/skill-creator/scripts/run_loop.py +0 -328
  89. package/.agents/skills/skill-creator/scripts/utils.py +0 -47
@@ -1,5 +1,7 @@
1
1
  # Code Review Checklist
2
2
 
3
+ Follow `../../_shared/references/interaction-contract.md` loaded through the parent skill. Reuse current unchanged sources already read; refresh changed sources or unknown/compacted context. Delegates must read this checklist before reviewing. All checks below remain mandatory to assess internally: perform applicable checks, retain evidence, and mark only genuinely inapplicable checks `N/A` with a reason. Missing required evidence is `NOT VERIFIED`, never `N/A` or an assumed pass.
4
+
3
5
  ## Table of Contents
4
6
 
5
7
  1. Phase 1 - 27 Code Quality Points
@@ -7,7 +9,8 @@
7
9
  3. Self-Review Before Reporting
8
10
  4. Phase 3 - Report & Fix
9
11
  5. Post-Fix Validation
10
- 6. Key Points
12
+ 6. Completion Handoff
13
+ 7. Key Points
11
14
 
12
15
  ## Phase 1 - 27 Code Quality Points (All Required)
13
16
 
@@ -56,6 +59,8 @@ For **CR-23**, prefer these tags:
56
59
 
57
60
  Never mark a single smoke test, regression test, or safety guard as bloat.
58
61
 
62
+ Assess CR-22 and CR-23 together: the smallest design must still satisfy current requirements, applicable security/integrity controls, maintainability, and meaningful validation. Justify a "best practice" finding with relevant project evidence or version-appropriate official guidance, not taste or novelty. Do not recommend custom high-risk replacements merely to remove a dependency. Escalate severity according to concrete impact; an under-engineered security or correctness failure is not automatically MINOR.
63
+
59
64
  ### Level 4: INFO
60
65
 
61
66
  - **CR-25 Missing Comments**
@@ -87,20 +92,22 @@ Check all of these:
87
92
  Before producing the report:
88
93
 
89
94
  1. Verify that all 27 CR checks and 10 SEC checks were actually reviewed.
90
- 2. Quickly reread touched files for duplicate functions and hallucinated imports.
95
+ 2. Recheck touched code for duplicate functions and hallucinated imports using fresh source already in context; read changed or missing sections instead of repeating unchanged file I/O.
91
96
  3. Recheck severity proportionality.
92
97
  4. Ask whether rerunning after fixing the current findings would reveal new findings. If yes, include them now.
93
98
 
94
99
  ## Phase 3 - Report & Fix
95
100
 
96
- Use this report structure:
101
+ **Clean result:** Return evidence internally to developer, quick-dev, or bug-fix for one combined summary at the origin. Do not print the full clean checklist, zero-count table, or another mode announcement. A standalone review shows a compact result with reviewed scope, actual status, validation evidence, and limitations. Detailed check evidence remains available on request.
102
+
103
+ **Findings or requested detail:** Use this report structure for findings; expand the internal checklist/evidence when requested. Missing required evidence and its owner must always be visible, even with zero findings. Omit empty headings and zero-count tables unless useful.
97
104
 
98
105
  ```markdown
99
106
  ## Code Review Report
100
107
 
101
108
  **Task/Phase:** [name]
102
109
  **Scope:** [reviewed files]
103
- **Status:** [💥 BLOCKER | 🔴 MAJOR | ⚠️ MINOR | ✅ PASS]
110
+ **Status:** [💥 BLOCKER | 🔴 MAJOR | ⚠️ MINOR | NOT VERIFIED | ✅ PASS]
104
111
 
105
112
  ### Summary
106
113
 
@@ -112,7 +119,7 @@ Use this report structure:
112
119
  | ℹ️ Info | X |
113
120
  ```
114
121
 
115
- Then list findings by severity, followed by the checklist status table.
122
+ Then list all findings by severity using the shared four-point format. Include affected or unverified checks; include the full checklist status table only on request. Do not suppress findings to make a report compact.
116
123
 
117
124
  Before a report-first gate, retain this fix manifest for actionable findings:
118
125
 
@@ -124,7 +131,7 @@ Before a report-first gate, retain this fix manifest for actionable findings:
124
131
  | [ID] | `[path]` | [bounded change] | [targeted check] |
125
132
  ```
126
133
 
127
- 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.
134
+ Return plan-status completion and deviation notes to `developer`. Do not add a status-only finding to obtain mutation approval. An explicitly requested bounded plan correction must be disclosed as such; it does not authorize marking a whole phase done.
128
135
 
129
136
  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.
130
137
 
@@ -132,8 +139,9 @@ Fix priority - follow `fixMode` from Shared Runtime Setup:
132
139
 
133
140
  **`report-first` (default):**
134
141
 
135
- - **When actionable findings exist (`💥 BLOCKER`, `🔴 MAJOR`, or actionable `⚠️ MINOR`):** Present the full report and fix manifest. Show the gate prompt (`[GATE — Mode: report-first]`) from the shared runtime contract (`fix-mode.md`). **End the response. DO NOT apply any fixes in the same response.** On approval, follow the Approval Resume Protocol without another question.
136
- - **When all checks pass (`✅ PASS` / 0 actionable findings):** Present the report with `Status: PASS`. **DO NOT show the approval gate block or ask for approval/fix replies ("ya", "setuju", "perbaiki", "yes", "fix").** Proceed directly to Plan Status Update and complete the review cleanly.
142
+ - **When actionable findings exist (`💥 BLOCKER`, `🔴 MAJOR`, or actionable `⚠️ MINOR`):** Present all findings and the fix manifest. Show the gate prompt (`[GATE — Mode: report-first]`) from the shared runtime contract (`fix-mode.md`) once. **End the response. DO NOT apply any fixes in the same response.** On approval, follow the Approval Resume Protocol without another question.
143
+ - **When all applicable required checks pass (including INFO-only reports):** Return `Status: PASS`, notes, and evidence to the origin for its combined summary; show a compact result if standalone. **DO NOT show the approval gate block or ask for approval/fix replies ("ya", "setuju", "perbaiki", "yes", "fix").** Do not edit plan status.
144
+ - **When required evidence is missing:** Report `NOT VERIFIED`, identify the evidence/owner, and apply shared Gate Eligibility. Zero actionable findings is not sufficient for PASS; do not fabricate a fix manifest.
137
145
 
138
146
  **`fix-then-report`:**
139
147
 
@@ -141,11 +149,11 @@ Fix priority - follow `fixMode` from Shared Runtime Setup:
141
149
  - `🔴 MAJOR` -> fix before the next phase
142
150
  - `⚠️ MINOR` -> report and discuss
143
151
  - `ℹ️ INFO` -> backlog
144
- - `✅ PASS` -> no fixes needed, proceed directly to Plan Status Update
152
+ - `✅ PASS` -> no fixes needed, return evidence to the origin without editing plan status
145
153
 
146
154
  ## Post-Fix Validation
147
155
 
148
- Before updating plan status or claiming completion:
156
+ Before claiming remediation completion:
149
157
 
150
158
  1. Run the narrowest relevant tests and available type/lint/build checks.
151
159
  2. Recheck the approved findings and directly affected CR/SEC items only.
@@ -153,43 +161,15 @@ Before updating plan status or claiming completion:
153
161
  4. Report every approved ID as `resolved`, `partial`, or `unresolved`, with command/check evidence.
154
162
  5. Do not start a fresh unbounded finding pass. Newly noticed unrelated work is reported separately and is not auto-fixed.
155
163
 
156
- ## Plan Status Update (run after all fixes are done)
157
-
158
- 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:
159
-
160
- **Step 1 - Detect plan-level deviations.**
161
-
162
- A plan-level deviation is any finding where the implementation differs from a decision explicitly stated in the plan, for example:
163
-
164
- - The wrong library was used (the plan says Prisma, the code uses Drizzle)
165
- - The architectural pattern was not followed (the plan says repository pattern, the code puts queries in the controller)
166
- - Scope was expanded or reduced compared to the plan
167
- - The approach changed during implementation without a plan update
168
-
169
- Code quality findings are **not** plan deviations - naming issues, missing tests, performance, formatting, and security hardening do not count as plan deviations even if marked BLOCKER/MAJOR.
170
-
171
- **Step 2 - Update the plan file.**
172
-
173
- - **If plan-level deviations were found:**
174
- 1. Add this section at the bottom of the plan file:
175
-
176
- ```markdown
177
- ## Code Review Notes
178
-
179
- **Reviewed:** [YYYY-MM-DD]
180
- **Plan deviations found:**
181
-
182
- - [Deviation 1 - short description of what differed and how it was resolved]
183
- - [Deviation 2 - ...]
164
+ ## Completion Handoff
184
165
 
185
- > These deviations were identified during code review. The implementation was corrected where possible. See the review report for full detail.
186
- ```
166
+ Retain the review unit, origin/return step, approved scope/files and IDs, criteria, checked sources/freshness, validation evidence, pending issues, and next action. Keep this context in the session without secrets or a new state file. A clean result is consolidated at the origin; findings and missing evidence are shown when discovered. Use plain language outside exact keys, IDs, paths, and gate markers.
187
167
 
188
- 2. Update the plan header: `status: code-review` -> `status: done`
168
+ - **Standalone:** End with the report. Do not mutate Task.md or plan status automatically, even when every check passes or a phase plan exists.
169
+ - **Task or bug review:** Return evidence to quick-dev, developer's selected task, or bug-fix at the retained return step. A task review never marks the whole phase done.
170
+ - **Phase review:** Return the result and any plan-level deviations to developer's `close-phase.md`. Developer owns status completion after all phase tasks, formal spec sync, applicable DoD, and both gates pass.
189
171
 
190
- - **If no plan-level deviations were found (only code-quality findings):**
191
- 1. Update only the plan header: `status: code-review` -> `status: done`
192
- 2. Do not add a notes section.
172
+ Plan deviations mean disagreement with an explicit plan decision (library, architecture, scope, or approach), not merely naming, formatting, tests, performance, or security findings. Report what differed and how it was resolved; the phase owner records useful Code Review Notes. Do not create an artifact for a standalone report unless requested.
193
173
 
194
174
  ## Key Points
195
175
 
@@ -15,13 +15,17 @@ Paths written as `../...` below are relative to this SKILL.md's own folder, not
15
15
 
16
16
  Before continuing:
17
17
 
18
+ An active approval reply resumes the originating review/remediation skill under `fix-mode.md` before identity, onboarding, or work-mode setup. Preserve its task/phase/bug scope and return step; do not treat it as a fresh implementation request.
19
+
18
20
  1. Read `../_shared/references/language-config.md`.
19
21
  2. Read `../_shared/references/config-mutation.md`.
20
22
  3. Read `../_shared/references/fix-mode.md`.
21
23
  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.
24
+ 5. Read the configured fix-mode value from the safe preference summary under `language-config.md`. If it is missing, treat it as `"report-first"`. This controls how `spec-compliance` and `code-review` behave after each phase.
25
+ 6. Use the resolved communication language from `language-config.md` for chat.
26
+ 7. Use the resolved document language from `language-config.md` for generated plans and spec-side artifacts.
27
+
28
+ Follow `../_shared/references/interaction-contract.md`, loaded by `language-config.md`: reuse already-read, current unchanged sources; refresh changed sources or context lost through compaction. Missing or uncertain context requires a read, not an assumption. Announce fix mode once per authorized workflow, not at each handoff. Use plain language outside exact config keys, IDs, paths, and gate markers.
25
29
 
26
30
  ---
27
31
 
@@ -46,7 +50,7 @@ Developer-specific additions:
46
50
 
47
51
  ## When You MUST Ask
48
52
 
49
- - If the user request adds business scope, endpoints, data, components, or behavior not recorded in `project-context/`
53
+ - If business scope or behavior needs a new decision; route significant product expansion to `add-feature`
50
54
  - If 2+ valid approaches would change the final outcome significantly and the specs, `additionalSkills`, or MCP do not resolve the choice
51
55
  - If the change is destructive or hard to undo
52
56
  - If documents, plans, or user instructions conflict in a way that changes the next action
@@ -56,10 +60,12 @@ Developer-specific additions:
56
60
  - If the answer is already explicit in `project-context/`, relevant `additionalSkills`, or relevant MCP results
57
61
  - If the decision is purely technical, low-risk, and does not change business scope
58
62
  - If the change is easy to undo and stays within the current phase scope
63
+ - If an explicit request already approves a bounded technical delta: follow `../_shared/references/scope-delta.md` and record it before coding. Absence from the specs alone does not require another question. Business-scope and destructive-change approvals remain distinct.
59
64
 
60
65
  **Workflow:**
61
66
 
62
67
  - Read only the specs needed for the current task - not all specs
68
+ - `rules.md` and `architecture.md` are mandatory before any code change; if either is missing, route to its owning brainstorm skill and do not code
63
69
  - One phase at a time
64
70
  - Mark each completed task in `Task.md` with implementation notes if important decisions were made
65
71
  - After a phase completes: run `spec-compliance` then `code-review` - both follow `fixMode`
@@ -67,11 +73,12 @@ Developer-specific additions:
67
73
  - If all tasks in `Task.md` are done but the user still asks for small technical changes, hardening, cleanup, optimization, or workflow adjustments within the current work scope, keep using `developer` in **Post-Task / Maintenance Mode**.
68
74
  - In **Post-Task / Maintenance Mode**, MUST create a small delta phase or task in `Task.md` / the active phase plan before coding so the change stays traceable.
69
75
 
70
- **MCP (MUST use if available and relevant, based on `availableMCPs` in `developer-config.json`):**
76
+ **MCP and additional skills:**
71
77
 
72
- - Use every MCP relevant to the current task. MUST NOT use MCPs the user did not register.
78
+ - Detect available tools/skills from host context. Summary counts do not authorize use; check a requested tool's saved membership or a named skill's path through the local-only exception in `config-mutation.md`, returning only safe status and never raw saved names or paths. Availability alone is not authorization. Respect the saved `availableMCPs` allowlist and explicit denials; follow `references/onboarding.md` when a material authorization decision is missing.
79
+ - Use available, authorized tools when relevant. Do not ask a tool-setup questionnaire for work that needs none.
73
80
  - Examples: `context7` for external library docs, `codebase-memory-mcp` for codebase discovery and symbol relationships
74
- - MUST NOT code against external libraries from memory if a relevant docs MCP exists
81
+ - MUST NOT code against external libraries from memory when a relevant docs MCP is available and authorized. If current API evidence cannot be obtained, surface that gap without overriding tool permissions.
75
82
 
76
83
  **Priority:** Correctness -> spec compliance -> clean/safe code -> maintainability.
77
84
 
@@ -79,26 +86,13 @@ Developer-specific additions:
79
86
 
80
87
  ---
81
88
 
82
- ## Step 0 - Identify Name & Project
83
-
84
- Read `.agents/developer-config.json` and extract `name`, `project`, and `developerPreferences.workMode`.
85
-
86
- **If name and project exist:**
87
-
88
- > "Welcome back, [name]. **Firdaus** here - ready to continue **[project]**. Let us see what needs work today."
89
+ ## Step 0 - Resolve the Request and Saved Preferences
89
90
 
90
- **If name exists but project is empty:**
91
+ Use the safe preference summary from `language-config.md` for the configured work-mode value and identity configured indicators only. Do not extract or display saved identity labels.
91
92
 
92
- > "Welcome back, [name]. **Firdaus** here - ready to continue. Let us see what needs work today."
93
+ Reuse the configured work-mode value. A user name supplied in the conversation may be used optionally; never recover it from config. An explicit implementation request proceeds without an identity interview, welcome banner, or generic "What needs work?" question. Missing `name` or `project` is optional setup, not a blocker. Ask for identity only when the user requests setup; save supplied values through the shared config-mutation contract, preserving unrelated fields.
93
94
 
94
- **If name does not exist:**
95
-
96
- > "Hi. I am **Firdaus**, the developer on this team. Before we start:
97
- >
98
- > 1. What is your name?
99
- > 2. What is the project name?"
100
-
101
- After the user answers, **create or update `.agents/developer-config.json`** with `name` and `project`. Preserve all other fields.
95
+ If no task was supplied, ask what the user wants to accomplish. Resolve only missing decisions that materially affect execution; use a concise scope acknowledgement when useful.
102
96
 
103
97
  ---
104
98
 
@@ -106,8 +100,12 @@ After the user answers, **create or update `.agents/developer-config.json`** wit
106
100
 
107
101
  Load only the current state:
108
102
 
109
- - Missing config, scope, work mode, or starting plan-first: read `references/onboarding.md`. If adding skill paths, also read `../_shared/references/additional-skills.md`.
103
+ - A material setup decision is missing, setup was requested, or plan-first must start: read `references/onboarding.md`. Missing optional config alone does not trigger onboarding. If adding skill paths, also read `../_shared/references/additional-skills.md`.
110
104
  - Executing a task: read `references/execute-task.md`.
111
105
  - Closing a completed phase/project: read `references/close-phase.md`.
112
106
 
113
107
  Do not load all three by default.
108
+
109
+ ## Workflow Handoff
110
+
111
+ Keep the review unit, origin and exact return step, approved scope/files and IDs, acceptance criteria, checked sources and freshness, validation evidence, pending issues, and next action in the current workflow context. A delegate must read the relevant reference pointer, using the same freshness rule; a summary does not replace unknown source instructions. Return clean compliance/review evidence internally for one combined result at the origin. Findings and missing evidence remain visible. Do not persist secrets or create a state file for this handoff.
@@ -2,18 +2,23 @@
2
2
 
3
3
  Read this file only after every task in the active phase is complete.
4
4
 
5
+ Follow `../../_shared/references/interaction-contract.md`. Reuse current unchanged sections already in context and refresh changed/unknown sources. A delegate reads the reference relevant to its work; send the review unit, origin/return step, approved scope/files and IDs, criteria, checked sources/freshness, pending issues, validation evidence, and next action. Keep this context in the session without secrets or a new state file.
6
+
5
7
  ## Close the Phase
6
8
 
7
- 1. Show the phase summary.
9
+ 1. Assemble the phase summary for the combined closing result; do not print a separate clean report before each gate.
8
10
  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.
11
+ 3. Read `../../_shared/references/scope-delta.md`. Collect approved deltas from Task.md and the phase plan, complete each named formal spec sync through its owning skill, and validate affected document pairs. Record sync evidence; unresolved sync blocks phase closure. Reuse approved technical decisions without reopening discovery.
12
+ 4. If a phase plan exists, set `status: code-review`.
13
+ 5. Run `spec-compliance` with review unit `phase`, all phase tasks, delta/sync evidence, and implementation-side DoD using configured fix mode. Its own result and downstream code-review remain pending, not circular prerequisites.
14
+ 6. Only after compliance passes, run `code-review` for that same phase using configured fix mode. Retain developer's phase-close return step across approval pauses.
15
+ 7. Only after both pass and all applicable DoD and sync evidence exist, developer marks quality-gate items complete and sets the phase plan to `status: done`. Record any relevant review deviation notes here. A task-only review or standalone report never authorizes phase completion.
16
+ 8. Show one combined phase result with changed files, actual validation/gate results, and remaining issues or limitations. Offer the next phase and wait according to Task.md execution rules and the user's ongoing authorization.
14
17
 
15
18
  In report-first mode, stop at the active gate. Do not invoke the next gate in the same response.
16
19
 
20
+ All applicable compliance, code-quality, and security checks remain mandatory internally. Keep evidence available; show detailed findings and the actionable manifest with one shared gate when eligible. Missing evidence stays visible as `NOT VERIFIED`; `N/A` requires genuine inapplicability and a reason. Clean gate results return to developer for the combined summary, not separate user-facing tables. Announce fix mode only once for the authorized workflow.
21
+
17
22
  ## Project Complete
18
23
 
19
24
  When all phases are complete:
@@ -2,9 +2,11 @@
2
2
 
3
3
  Read this file only when executing the current task.
4
4
 
5
+ Follow `../../_shared/references/interaction-contract.md`. A delegate reads this reference when executing; pass the review unit, origin/return step, approved scope/files and IDs, checked sources/freshness, pending issues, and next action. Reuse current unchanged source already read; refresh changed sources or unknown/compacted context. Keep handoff context in the session, without secrets or a new state file.
6
+
5
7
  ## Select Relevant Specs
6
8
 
7
- `architecture.md` is required. Read `rules.md` and architecture for every task, then conditionally:
9
+ `architecture.md` and `rules.md` are required. Before each task, ensure their fresh relevant sections are in context, including applicable boundaries and all relevant `[FORBIDDEN]` rules. Reuse sections already read from current unchanged sources; read again only for changes, missing sections, or unknown/compacted context. If `architecture.md` is missing, stop and route to `brainstorm-architecture`; if `rules.md` is missing, stop and route to `brainstorm-rules`. Do not write code until both documents exist.
8
10
 
9
11
  | Condition | Additional source |
10
12
  | ------------------------ | ----------------- |
@@ -19,7 +21,9 @@ Scan `[FORBIDDEN]` in rules before coding. Enforce `developerPreferences.scope`
19
21
 
20
22
  Read the task, acceptance criteria, traceability, and Definition of Done. Follow the shared implementation principles loaded by the parent skill.
21
23
 
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:
24
+ If requested behavior is not recorded in `project-context/`, read `../../_shared/references/scope-delta.md`. An explicit request is sufficient approval for a bounded technical delta; do not ask again merely because the specs have not recorded it. Ask only for an unresolved material scope/business decision or separate destructive-change approval. Record an `## Approved Scope Delta` before coding: use the active phase plan in plan-first mode, a lightweight Task.md entry for quick-dev, or Task.md/a minimal phase plan in direct mode. These are equivalent evidence; do not require a phase plan for a valid Task.md delta.
25
+
26
+ Minimum example (also include the task/phase anchor, bounded change, validation, and owning-skill sync checklist):
23
27
 
24
28
  ```markdown
25
29
  ## Approved Scope Delta
@@ -31,10 +35,11 @@ If requested behavior is not recorded in `project-context/`, obtain one approval
31
35
  **Acceptance Criteria:**
32
36
 
33
37
  - [ ] [testable condition]
34
- **Sync requirement:** Update the formal owning spec before phase close or when requested.
38
+
39
+ **Sync requirement:** Update the named formal spec through its owning skill before phase close or when requested.
35
40
  ```
36
41
 
37
- Do not code an unapproved delta.
42
+ Do not code an unapproved delta. Approved technical deltas grant bounded sync permission under `scope-delta.md`, not permission for broad spec rewrites or new product scope.
38
43
 
39
44
  ## Clarify and Define Behavior
40
45
 
@@ -44,12 +49,12 @@ Ask one focused question only for unresolved material ambiguity. For non-trivial
44
49
 
45
50
  Before coding:
46
51
 
47
- 1. Read relevant registered additional skills.
48
- 2. Use relevant registered MCPs; use current documentation for external APIs.
52
+ 1. Read relevant available and authorized additional skills, respecting saved allowlists and denials.
53
+ 2. Use relevant available and authorized MCPs; use current documentation for external APIs. Availability alone is not authorization; resolve material missing permission using `onboarding.md` without a general setup interview.
49
54
  3. Apply the shared implementation-principles ladder.
50
55
  4. Follow the testing workflow selected in `rules.md`.
51
56
 
52
- After coding, self-review:
57
+ After coding, self-review internally and retain evidence for:
53
58
 
54
59
  ```text
55
60
  [SELF-REVIEW] Task: [name]
@@ -58,6 +63,8 @@ After coding, self-review:
58
63
  3. Spec assumption: [assumption or none]
59
64
  ```
60
65
 
66
+ Show these details only for findings, material assumptions, missing evidence, or a user request; do not print a routine clean self-review banner.
67
+
61
68
  ## Validate and Record
62
69
 
63
70
  Run the narrowest relevant test/build/type/lint/manual check. Repair local defects and rerun before continuing.
@@ -72,4 +79,4 @@ After validation:
72
79
  1. Mark the task and satisfied acceptance criteria complete.
73
80
  2. Add a short implementation note only when useful.
74
81
  3. Do not mark phase Definition of Done items complete until evidence exists.
75
- 4. Report files and validation evidence, then follow Task.md execution cadence.
82
+ 4. Retain files and validation evidence for the origin's combined summary, then follow Task.md execution cadence. Surface blockers immediately; do not print a separate clean report at each internal step.
@@ -1,42 +1,39 @@
1
1
  # Developer Onboarding and Planning
2
2
 
3
- Read this file only when identity/config/work mode is incomplete or plan-first must start.
3
+ Read this file only for a material missing setup decision, requested setup, or starting plan-first. Follow `../../_shared/references/interaction-contract.md` for source reuse, handoff, and compact output. Optional identity/config gaps do not block an explicit request.
4
4
 
5
- ## Additional Skills and MCPs
5
+ ## Optional Configuration Owner
6
6
 
7
- If `additionalSkills` is missing:
7
+ Read `../../_shared/references/config-mutation.md` before config use or persistence. `setup-macca-method` (`@Galbi`) owns optional setup, read-only settings display, and targeted saved-setting changes. Route an explicit configuration request there; use `help` for workflow guidance. Do not repeat a whole configuration interview inside developer or require setup just because `.agents/developer-config.json` is absent.
8
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.
9
+ Continue ordinary work with applicable saved choices and task-local intent. Ask only about a material unresolved decision for this work. A single answer explicitly chosen as a persistent preference may be saved here under the shared contract without a setup detour or repeated approval: validate the existing file and merged candidate with the shared validator before writing, preserve unrelated/unknown fields, and show only redacted known values. Missing validator blocks that mutation; invalid config is preserved and reported by field, not overwritten. Missing optional config does not block implementation. Never save defaults, inferred identity/project names, or task-local choices as consent.
13
10
 
14
- When an additional skill is relevant to a task, read it before coding.
11
+ Use the safe preference summary from `../../_shared/references/language-config.md`; saved finite preferences are `configured`/`value` fields, not raw scalar fields. Identity has only configured indicators. Do not extract or display saved identity labels. A user name supplied in the conversation may be used optionally. Failed/unavailable reads are not absent preferences; stop the affected lookup instead of falling back to raw config.
15
12
 
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.
13
+ ## Additional Skills and MCPs
17
14
 
18
- ## Developer Scope
15
+ 1. Inspect host-provided tool/skill descriptions, applicable permission instructions, and safe configured/count/denied summary indicators for `additionalSkills` / `availableMCPs`. Summary counts do not authorize use. For a requested tool's membership or a named skill's path, follow the local-only exception in `config-mutation.md`; keep raw saved names, paths, entries, and config out of tool output and return only safe status. Distinguish **installed**, **available**, and **user-authorized/allowed**. A visible tool or installed skill is not permission to use it. Discovery itself never executes a discovered skill or grants access.
16
+ 2. Respect saved allowlists, including an empty list or `none`, and explicit denials. Do not silently add a discovered tool or override a denial. A user can explicitly revise a saved choice; preserve unrelated config when saving the revision.
17
+ 3. If configuration is missing, use host context only where it establishes both availability and authorization for the current task. Do not convert discovery into a saved allowlist. Ask one focused question only if a needed tool/skill has unresolved authorization or another material decision is missing. No mandatory MCP questionnaire for simple work needing no MCP.
18
+ 4. Read a relevant authorized skill before coding, reusing current unchanged source already in context. For a user-named skill whose path is unresolved, follow the permitted-location discovery and host-path fallback in `../../_shared/references/additional-skills.md`. Do not scan denied paths or execute a skill just to identify it. Ask for its path or allow `skip` only if it remains needed and unresolved.
19
+ 5. Before saving user-authorized skill paths, load `../../_shared/references/additional-skills.md` and use its canonical `paths` shape. Never persist credentials or secrets.
19
20
 
20
- If `developerPreferences.scope` exists, use it. Otherwise ask once:
21
+ ## Developer Scope
21
22
 
22
- ```text
23
- A) Frontend only
24
- B) Backend only
25
- C) Fullstack
26
- ```
23
+ Use an explicit user scope statement or the configured scope value from the safe preference summary (`developerPreferences.scope.configured` / `.value`). An explicit revision may change the saved boundary; a task that merely seems to need extra files does not. Never silently widen scope or treat a missing field as full-project authorization.
27
24
 
28
- Save `frontend`, `backend`, or `fullstack` through the shared config-mutation contract.
25
+ For an unambiguous bounded request, infer its authorized files/behavior and proceed without a generic scope question. Ask only if an unresolved boundary materially changes the work. Use plain language, for example: "Should this cover only the screens, only server-side behavior, or both?" Map a supplied project preference to `frontend`, `backend`, or `fullstack` through the shared config-mutation contract; do not save an inferred task-local boundary as a global preference.
29
26
 
30
27
  ## Work Mode
31
28
 
32
- If `developerPreferences.workMode` exists, use it. Otherwise ask once:
29
+ Reuse the configured work-mode value from the safe preference summary (`developerPreferences.workMode.configured` / `.value`) unless the user explicitly changes it. If missing, an explicit "implement/code now" or "plan first" request resolves the mode for this work. Ask only when the choice remains material and unresolved:
33
30
 
34
31
  ```text
35
32
  A) Code now — direct
36
33
  B) Plan first — review a phase plan before coding
37
34
  ```
38
35
 
39
- Save `direct` or `plan-first`.
36
+ Save an explicitly chosen persistent preference as `direct` or `plan-first`; do not reopen a resolved choice on a handoff or approval resume.
40
37
 
41
38
  For `plan-first`:
42
39