macca-method 1.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 (31) hide show
  1. package/.agents/macca-managed-skills.txt +17 -0
  2. package/.agents/skills/_shared/references/brainstorm-session.md +84 -0
  3. package/.agents/skills/_shared/references/human-loop.md +55 -0
  4. package/.agents/skills/_shared/references/output-ownership.md +31 -0
  5. package/.agents/skills/_shared/references/personas.md +39 -0
  6. package/.agents/skills/_shared/references/runtime-config.md +171 -0
  7. package/.agents/skills/_shared/references/scope-rules.md +55 -0
  8. package/.agents/skills/_shared/scripts/validate-skills.py +82 -0
  9. package/.agents/skills/add-feature/SKILL.md +190 -0
  10. package/.agents/skills/brainstorm-api/SKILL.md +313 -0
  11. package/.agents/skills/brainstorm-architecture/SKILL.md +302 -0
  12. package/.agents/skills/brainstorm-prd/SKILL.md +323 -0
  13. package/.agents/skills/brainstorm-rules/SKILL.md +302 -0
  14. package/.agents/skills/brainstorm-schema/SKILL.md +218 -0
  15. package/.agents/skills/brainstorm-styleguide/SKILL.md +273 -0
  16. package/.agents/skills/brainstorm-task/SKILL.md +279 -0
  17. package/.agents/skills/bug-fix/SKILL.md +352 -0
  18. package/.agents/skills/code-review/SKILL.md +100 -0
  19. package/.agents/skills/code-review/references/review-checklist.md +189 -0
  20. package/.agents/skills/developer/SKILL.md +117 -0
  21. package/.agents/skills/developer/references/execution-workflow.md +322 -0
  22. package/.agents/skills/help/SKILL.md +153 -0
  23. package/.agents/skills/rapat/SKILL.md +172 -0
  24. package/.agents/skills/spec-audit/SKILL.md +267 -0
  25. package/.agents/skills/spec-compliance/SKILL.md +303 -0
  26. package/.agents/skills/spec-init/SKILL.md +266 -0
  27. package/LICENSE +21 -0
  28. package/README.md +1129 -0
  29. package/bin/macca-method.js +651 -0
  30. package/package.json +35 -0
  31. package/skills-lock.json +22 -0
package/README.md ADDED
@@ -0,0 +1,1129 @@
1
+ # MACCA — Method
2
+
3
+ **MACCA** is an AI-based software development system that works from **written specifications**, not guesses. Before a single line of code exists, all important decisions are already documented. AI reads those documents before coding, then verifies the result after coding.
4
+
5
+ > **Macca** comes from Bugis and means *smart, intelligent, capable*. In Bugis-Makassar philosophy, intelligence is always paired with noble character — a moral identity carried everywhere.
6
+
7
+ ![MACCA Method](image-macca-method.webp)
8
+
9
+ ---
10
+
11
+ ## Table of Contents
12
+
13
+ 1. [Problem Solved](#1-problem-solved)
14
+ 2. [How It Works](#2-how-it-works)
15
+ 3. [Planning Skills](#3-planning-skills)
16
+ 4. [Execution Skills](#4-execution-skills)
17
+ 5. [Utility Skills](#5-utility-skills)
18
+ 6. [The MACCA AI Team](#6-the-macca-ai-team)
19
+ 7. [Workflow](#7-workflow)
20
+ 8. [Installation & Usage](#8-installation--usage)
21
+ 9. [Configuration](#9-configuration)
22
+ 10. [Frequently Asked Questions](#10-frequently-asked-questions)
23
+ 11. [License](#11-license)
24
+
25
+ ---
26
+
27
+ ## 1. Problem Solved
28
+
29
+ When using AI for coding without clear guidance, these problems are common:
30
+
31
+ - AI writes code that does not match business needs
32
+ - Each AI session seems to "forget" previous project context
33
+ - There is no code standard — each file is written in a different style
34
+ - It is hard to know when a feature is truly done
35
+ - The same bugs appear again and again
36
+
37
+ **MACCA solves this** by writing all decisions first in spec documents: features, database, API, UI, and code standards. AI reads those documents before coding, then verifies the result after coding.
38
+
39
+ ---
40
+
41
+ ## 2. How It Works
42
+
43
+ MACCA uses **skills** — structured instructions given to AI to perform specific tasks. Each skill has a clear responsibility and does not overlap.
44
+
45
+ ```
46
+ ┌──────────────────────────────────────────────────────┐
47
+ │ PLANNING PHASE │
48
+ │ │
49
+ │ brainstorm-prd → brainstorm-architecture │
50
+ │ ↓ │
51
+ │ brainstorm-schema │
52
+ │ ↓ │
53
+ │ brainstorm-api │
54
+ │ ↓ │
55
+ │ brainstorm-styleguide (optional) │
56
+ │ ↓ │
57
+ │ brainstorm-rules │
58
+ │ ↓ │
59
+ │ brainstorm-task │
60
+ └──────────────────────────────────────────────────────┘
61
+
62
+ ┌──────────────────────────────────────────────────────┐
63
+ │ EXECUTION PHASE │
64
+ │ │
65
+ │ developer (per Task.md phase) │
66
+ │ ↓ (after each phase) │
67
+ │ spec-compliance → code-review │
68
+ └──────────────────────────────────────────────────────┘
69
+ ```
70
+
71
+ All planning output documents are stored in `project-context/` in your project.
72
+
73
+ > **Any time:** you can call `help` to see project status and recommended next steps, or `rapat` if you need a multi-persona discussion before continuing.
74
+
75
+ ---
76
+
77
+ ## 3. Planning Skills
78
+
79
+ Planning skills run as interview sessions. At the start of each session, AI announces the topic count, then asks two things (if not already saved in config):
80
+ 1. **Pacing**: (A) one by one · (B) three at a time · (C) all at once
81
+ 2. **Recommendations**: should AI provide suggested answers for each question?
82
+
83
+ These choices are saved and reused in future sessions.
84
+
85
+ ---
86
+
87
+ <details>
88
+ <summary><strong>brainstorm-prd</strong> — Create PRD.md (Product Requirements Document)</summary>
89
+
90
+ **Persona:** @Galbi — Project Manager
91
+
92
+ **Called when:** Starting a new project for the first time. If `PRD.md` already exists, AI asks before overwriting it.
93
+
94
+ **Output:** `project-context/PRD.md`
95
+
96
+ **Topic count:** 15 topics
97
+
98
+ **Topics covered:**
99
+ 1. Project Goal — long-term vision and what makes the project unique
100
+ 2. Target Users — user personas, demographics, pain points
101
+ 3. Problem Being Solved — real problems, not assumptions
102
+ 4. Main Features (MVP) — minimum features required in the first version
103
+ 5. Business Rules — rules that must never be broken (for example: stock cannot go negative)
104
+ 6. Non-Goals — what will *not* be built in this version
105
+ 7. User Stories — real workflows from the user perspective
106
+ 8. Acceptance Criteria — concrete conditions for a feature to be considered done
107
+ 9. Non-Functional Requirements — performance, security, accessibility
108
+ 10. Platform & Constraints — web, mobile, or both; technical limits
109
+ 11. External Integrations — payment gateway, email, OAuth, etc.
110
+ 12. Monetization — business model and revenue sources
111
+ 13. Analytics & Logging — what data must be tracked
112
+ 14. Roadmap — release priorities and phases after MVP
113
+ 15. Open Questions — items not yet decided
114
+
115
+ **Important behavior:**
116
+ - Use `Traceability ID` (`FEAT-*`, `BR-*`, `AC-*`, `NFR-*`, `US-*`) so each requirement can be traced to tasks and code
117
+ - Do not overwrite existing files without confirmation
118
+
119
+ </details>
120
+
121
+ ---
122
+
123
+ <details>
124
+ <summary><strong>brainstorm-architecture</strong> — Create architecture.md (System Architecture)</summary>
125
+
126
+ **Persona:** @Fachri — Tech Lead
127
+
128
+ **Called when:** After `PRD.md` is complete. **Required** before `brainstorm-schema` and `brainstorm-api`.
129
+
130
+ **Read before starting:** `project-context/PRD.md`
131
+
132
+ **Output:** `project-context/architecture.md`
133
+
134
+ **Topic count:** 10 topics
135
+
136
+ **Topics covered:**
137
+ 1. System Context — systems and external services that interact
138
+ 2. Tech Stack — frontend, backend, database, hosting, CI/CD
139
+ 3. Folder Structure — project file and directory organization
140
+ 4. Design Patterns — architecture patterns (MVC, Clean Architecture, Feature-based, Hexagonal)
141
+ 5. Authentication & Authorization — login method, JWT/session, RBAC
142
+ 6. API Style — REST, GraphQL, or tRPC
143
+ 7. State Management — Zustand, Redux, Context API, etc.
144
+ 8. Deployment — dev/staging/prod environments, deployment strategy, cloud provider
145
+ 9. Observability — logging, monitoring, error tracking
146
+ 10. Architecture Decision Records — major decisions and their reasoning
147
+
148
+ **Important behavior:**
149
+ - Every decision must be defensible with reasoning
150
+ - The `Tech Stack` and `Folder Structure` fields are mandatory references for `spec-compliance` (SC-02) and `developer` (Step 2)
151
+
152
+ </details>
153
+
154
+ ---
155
+
156
+ <details>
157
+ <summary><strong>brainstorm-schema</strong> — Create schema.md (Database Design)</summary>
158
+
159
+ **Persona:** @Fachri — Tech Lead
160
+
161
+ **Called when:** After `architecture.md` is complete.
162
+
163
+ **Read before starting:** `project-context/PRD.md`, `project-context/architecture.md`
164
+
165
+ **Output:** `project-context/schema.md`
166
+
167
+ **Topic count:** 5 topics
168
+
169
+ **Topics covered:**
170
+ 1. Database Conventions — ID strategy (UUID/auto-increment/CUID), naming convention, audit fields, soft delete, timezone
171
+ 2. Table List — all required tables/collections
172
+ 3. Per-Table Details — columns, data types, constraints, and indexes
173
+ 4. Relationships — foreign keys, one-to-many, many-to-many, cascade rules
174
+ 5. Sensitive Data & Compliance — PII, retention policy, anonymization
175
+
176
+ **Important behavior:**
177
+ - Give each table a `Traceability ID` (`DATA-*`) that can be traced to requirements in `PRD.md`
178
+ - Agreed table and column names are a **contract** — `spec-compliance` (SC-03) verifies that code uses the exact names from this document
179
+
180
+ </details>
181
+
182
+ ---
183
+
184
+ <details>
185
+ <summary><strong>brainstorm-api</strong> — Create api.md (API Endpoint Contract)</summary>
186
+
187
+ **Persona:** @Fachri — Tech Lead
188
+
189
+ **Called when:** After `schema.md` is complete.
190
+
191
+ **Read before starting:** `project-context/PRD.md`, `project-context/architecture.md`, `project-context/schema.md`
192
+
193
+ **Output:** `project-context/api.md`
194
+
195
+ **Topic count:** 5 topics
196
+
197
+ **Topics covered:**
198
+ 1. Base URL, Versioning & Auth — dev/prod base URL, versioning, authentication method, standard response format
199
+ 2. Error Catalog — all possible error codes and their meanings
200
+ 3. Core Endpoints — main endpoints based on features in `PRD.md`
201
+ 4. Pagination, Filter & Sorting — standard patterns for list endpoints
202
+ 5. Rate Limiting & Security — request-per-minute limits, CORS policy, CSRF protection
203
+
204
+ **Important behavior:**
205
+ - Give each endpoint a `Traceability ID` (`API-*`)
206
+ - Agreed request and response formats are a **contract** verified by `spec-compliance` (SC-04) during coding
207
+
208
+ </details>
209
+
210
+ ---
211
+
212
+ <details>
213
+ <summary><strong>brainstorm-styleguide</strong> — Create StyleGuide.md (UI/UX Design Guide)</summary>
214
+
215
+ **Persona:** @Akram — UI/UX Designer
216
+
217
+ **Called when:** After `PRD.md` and `architecture.md` are clear. **Optional** — skip if the project has no UI.
218
+
219
+ **Read before starting:** `project-context/PRD.md`, `project-context/architecture.md`
220
+
221
+ **Output:** `project-context/StyleGuide.md`
222
+
223
+ **Topic count:** 7 topics
224
+
225
+ **Topics covered:**
226
+ 1. CSS Framework — Tailwind CSS (v3/v4), Bootstrap, CSS Modules, or custom
227
+ 2. Color Palette — primary, secondary, accent, status colors (error/success/warning/info), dark mode
228
+ 3. Typography — font family, heading and body sizes, line height, font weight
229
+ 4. Spacing System — spacing scale used (4px, 8px, 16px, 24px, etc.)
230
+ 5. Component Styles — button, card, form input, modal, table — styling and states
231
+ 6. Responsive & Breakpoints — sm/md/lg/xl breakpoints and layout changes
232
+ 7. Icons & Assets — icon library, image formats, asset naming conventions
233
+
234
+ **Important behavior:**
235
+ - Agreed colors and spacing are a **contract** — `spec-compliance` (SC-06) flags arbitrary values outside this list
236
+
237
+ </details>
238
+
239
+ ---
240
+
241
+ <details>
242
+ <summary><strong>brainstorm-rules</strong> — Create rules.md (Code Standards / Code Constitution)</summary>
243
+
244
+ **Persona:** @Fachri — Tech Lead
245
+
246
+ **Called when:** Any time, but ideally before coding starts.
247
+
248
+ **Read before starting:** `project-context/architecture.md`, `project-context/PRD.md`, `project-context/schema.md`, `project-context/api.md`
249
+
250
+ **Output:** `project-context/rules.md`
251
+
252
+ **Topic count:** 7 topics
253
+
254
+ **Topics covered:**
255
+ 1. AI Persona & Tech Stack — main technologies, preferred libraries, favored and avoided patterns
256
+ 2. Naming Conventions — variables, functions, components, files, folders, constants
257
+ 3. Code Style — formatting (Prettier/ESLint), max function length, `console.log` rules, early return
258
+ 4. Testing Strategy — minimum coverage, testing tools, TDD approach
259
+ 5. Security Rules — token storage, input validation, secret management
260
+ 6. Git Workflow — commit message convention, branching strategy
261
+ 7. `[FORBIDDEN]` Section — list of technical prohibitions that AI **must scan** before writing code
262
+
263
+ **Important behavior:**
264
+ - The `[FORBIDDEN]` section is the first thing `developer` reads before coding
265
+ - If the `[FORBIDDEN]` section is missing, `spec-compliance` records it as a MINOR finding
266
+
267
+ </details>
268
+
269
+ ---
270
+
271
+ <details>
272
+ <summary><strong>brainstorm-task</strong> — Create Task.md (Phased Work Plan)</summary>
273
+
274
+ **Persona:** @Galbi — Project Manager
275
+
276
+ **Called when:** After all spec documents are complete. Also called automatically by `add-feature` to add a new phase.
277
+
278
+ **Read before starting:** All documents in `project-context/` (PRD, architecture, schema, api, rules, StyleGuide)
279
+
280
+ **Output:** `project-context/Task.md`
281
+
282
+ **Clarification topic count:** 4 topics
283
+
284
+ **Clarification topics:**
285
+ 1. Phase Priority Order — implementation order, which features must finish first
286
+ 2. Task Granularity — how small should tasks be? One file, one endpoint, or one full feature?
287
+ 3. Execution Rules — stop for confirmation after each task, or continue automatically by phase?
288
+ 4. Verify Available Documents — AI checks spec completeness itself before creating `Task.md`
289
+
290
+ **Two operation modes:**
291
+ - **Generate New** — create `Task.md` from scratch based on all available specs
292
+ - **Add Phase Mode** — append a new phase below existing `Task.md` content (called by `add-feature`, does not overwrite old content)
293
+
294
+ **Important behavior:**
295
+ - Tasks are **not created from guesses** — all tasks are derived from the spec documents
296
+ - Every task has concrete, verifiable `Acceptance Criteria`
297
+ - Test tasks always appear *before* implementation tasks (TDD order)
298
+ - Every task has a `Traceability ID` that links it to requirements in the specs
299
+
300
+ </details>
301
+
302
+ ---
303
+
304
+ ## 4. Execution Skills
305
+
306
+ ---
307
+
308
+ <details>
309
+ <summary><strong>developer</strong> — Execute tasks from Task.md phase by phase</summary>
310
+
311
+ **Persona:** @Firdaus — Expert Developer
312
+
313
+ **Called when:** After `Task.md` exists and is ready to execute.
314
+
315
+ **Full workflow:**
316
+
317
+ **Step 0 — Identify name & project**
318
+ Read `.agents/developer-config.json`. If `name` or `project` is missing, AI asks once and saves the answer.
319
+
320
+ **Step 0b — Setup additional skills & MCP**
321
+
322
+ *Additional Skills:*
323
+ - If `additionalSkills` already exists in config → use it directly
324
+ - If not → AI asks once: *"Are there any additional skills for this project?"*
325
+ - For every named skill, AI **first searches the workspace itself** (`.agents/skills/`, `.github/skills/`, `.opencode/skill/`). It only asks you for the path if the skill is not found.
326
+ - When working on a relevant task, AI **must read** `SKILL.md` from that skill before writing code.
327
+
328
+ *MCP (Model Context Protocol):*
329
+ - If `availableMCPs` already exists in config → use it directly
330
+ - If not → AI asks once: *"Which MCPs are available in your workspace?"*
331
+ - Only listed MCPs will be used.
332
+
333
+ **Step 0c — Set developer scope**
334
+ - If `developerPreferences.scope` already exists → use it directly
335
+ - If not → AI asks once:
336
+ ```
337
+ What is your work scope in this project?
338
+ A) Frontend only — do not touch backend/API/database
339
+ B) Backend only — do not touch UI/frontend
340
+ C) Fullstack — work across the whole stack
341
+ ```
342
+ - This scope is enforced in every phase: AI will not create/change files outside the scope.
343
+
344
+ **Step 1b — Choose work mode**
345
+ - If `developerPreferences.workMode` already exists → use it directly
346
+ - If not → AI asks once:
347
+ ```
348
+ A) Code now — start immediately
349
+ B) Plan first — write a plan first for your review
350
+ ```
351
+ - **Plan-first mode:** AI creates a plan file in `project-context/plans/phase-[N]-[slug].md` with a status header at the top. Plan status changes through this lifecycle:
352
+ ```
353
+ status: review ← when the plan is first created (you review it first)
354
+ status: in-progress ← when you type "start"
355
+ status: code-review ← when all tasks in the phase are complete
356
+ status: done ← when code-review is complete
357
+ ```
358
+
359
+ **Step 2 — Select relevant specs + enforce scope**
360
+
361
+ | Condition | Read |
362
+ |---------|--------|
363
+ | All tasks (always) | `rules.md`, `architecture.md` |
364
+ | Task touches database/model | + `schema.md` |
365
+ | Task touches API/endpoint | + `api.md` |
366
+ | Task touches UI/component | + `StyleGuide.md` |
367
+ | Requirement is unclear | + `PRD.md` |
368
+
369
+ Scope enforcement: if `scope=frontend`, AI does not touch backend files. If `scope=backend`, AI does not touch frontend files.
370
+
371
+ **Step 3 — Execute tasks one by one**
372
+
373
+ For each task:
374
+ 1. Understand the task and acceptance criteria
375
+ 2. Check the ladder: does it need to be built? Does it already exist in the codebase? Is it in the standard library? (YAGNI)
376
+ 3. Write an I/O contract for non-trivial functions
377
+ 4. Write tests first, then implementation (TDD)
378
+ 5. After finishing, write `[SELF-REVIEW]`:
379
+ ```
380
+ 1. Security risk: [1 potential issue — or "none identified"]
381
+ 2. Performance bottleneck: [1 area — or "none identified"]
382
+ 3. Spec assumption: [1 assumption — or "none"]
383
+ ```
384
+ 6. Run validation, update `Task.md` (`[ ]` → `[x]`)
385
+
386
+ **Step 4 — After all tasks in the phase are complete**
387
+ 1. Show a phase summary
388
+ 2. If there is a plan file for this phase → update plan status: `in-progress` → `code-review`
389
+ 3. Run `spec-compliance` automatically
390
+ 4. If clean, run `code-review` automatically
391
+ 5. Offer the next phase
392
+
393
+ **MCPs used (if listed in `availableMCPs`):**
394
+ - `context7` — fetch installed-version library documentation before coding
395
+ - `sequential-thinking` — for complex problems/architecture
396
+ - `grep-app` — search for real implementation examples in public repos
397
+ - `exa` — changelog, breaking changes, verify active maintenance
398
+
399
+ </details>
400
+
401
+ ---
402
+
403
+ <details>
404
+ <summary><strong>spec-compliance</strong> — Verify code against all spec documents</summary>
405
+
406
+ **Persona:** @Fachri — Tech Lead
407
+
408
+ **Called when:** Automatically after each completed phase by `developer`. Runs **before** `code-review`.
409
+
410
+ **Checklist (8 items):**
411
+
412
+ | ID | Aspect | Documents Read |
413
+ |----|-------|---------------------|
414
+ | SC-01 | PRD Compliance | `PRD.md` — features, business rules, acceptance criteria, non-goals |
415
+ | SC-02 | Architecture Compliance | `architecture.md` — tech stack, folder structure, design patterns, auth method |
416
+ | SC-03 | Schema Compliance | `schema.md` — exact table/column names, relationships, soft delete, audit fields, PII |
417
+ | SC-04 | API Compliance | `api.md` — endpoint path, HTTP method, request/response format, error codes |
418
+ | SC-05 | Rules Compliance | `rules.md` — `[FORBIDDEN]` section, naming convention, TypeScript rules |
419
+ | SC-06 | StyleGuide Compliance | `StyleGuide.md` — CSS framework, color tokens, spacing system |
420
+ | SC-07 | Task Completion | `Task.md` — all acceptance criteria met, no half-finished tasks |
421
+ | SC-08 | Scope Compliance | `developer-config.json` — frontend/backend scope respected, no files outside scope |
422
+
423
+ **Severity:** `💥 BLOCKER` → fix now, re-run | `🔴 MAJOR` → fix before the next phase | `⚠️ MINOR` → discuss | `✅ PASS` → continue to `code-review`
424
+
425
+ **Note:** SC-07 is N/A when run from `bug-fix`.
426
+
427
+ </details>
428
+
429
+ ---
430
+
431
+ <details>
432
+ <summary><strong>code-review</strong> — Code quality and security review</summary>
433
+
434
+ **Persona:** @Fachri — Tech Lead
435
+
436
+ **Called when:** Automatically after `spec-compliance` is clean. Can also be called manually any time.
437
+
438
+ **Fix mode (runtime default + can be set in config):**
439
+ ```
440
+ A) Report first — show all findings, wait for confirmation before fixing
441
+ B) Fix now — automatically fix BLOCKER/MAJOR, full report at the end
442
+ ```
443
+ If this field is missing, the default is `report-first`. To change it, the user or config workflow can set `codeReviewPreferences.fixMode` in `developer-config.json`.
444
+
445
+ **Phase 1 — 27-Item Code Quality:**
446
+
447
+ | Tier | Item |
448
+ |------|------|
449
+ | 💥 BLOCKER | CR-01 Wrong imports · CR-02 Runtime errors · CR-03 Null/undefined · CR-04 SQL injection · CR-05 Deprecated methods |
450
+ | 🔴 MAJOR | CR-06 Duplicate function · CR-07 Unused code · CR-08 Duplicate logic · CR-09 Obsolete code · CR-10 Inconsistent naming · CR-11 Ignoring existing code · CR-12 Missing dependency · CR-13 Dependency conflict · CR-14 Memory leaks · CR-15 Security ignored · CR-16 No rate limit handling · CR-17 No tests |
451
+ | ⚠️ MINOR | CR-18 Edge cases · CR-19 Happy path only · CR-20 Performance · CR-21 Outdated pattern · CR-22 Under-engineering · CR-23 Over-engineering · CR-24 Environment assumptions |
452
+ | ℹ️ INFO | CR-25 Missing comments · CR-26 Jargon · CR-27 Comment quality |
453
+
454
+ **Phase 2 — 10 Security Essentials:**
455
+
456
+ | ID | Aspect |
457
+ |----|-------|
458
+ | SEC-01 | Injection Prevention — SQL, shell, eval |
459
+ | SEC-02 | Authentication — password hashing, cookie attributes |
460
+ | SEC-03 | Authorization — deny-by-default, ownership checks, mass assignment |
461
+ | SEC-04 | XSS Prevention — innerHTML, dangerouslySetInnerHTML |
462
+ | SEC-05 | API Security — rate limiting, CORS, JWT verification |
463
+ | SEC-06 | Data Protection & Logging — no sensitive logs, no hardcoded secrets |
464
+ | SEC-07 | Error Handling Security — fail-closed, no swallowed exceptions |
465
+ | SEC-08 | Input Validation — body/params/query/headers/cookies |
466
+ | SEC-09 | Framework-Specific Security — AI reads `architecture.md` to detect the framework: **Next.js** (`NEXT_PUBLIC_*`, Server Actions, middleware, wildcard image domains), **Laravel** (CSRF, Eloquent, `.env`), **Django** (`ALLOWED_HOSTS`, `DEBUG`, `SECRET_KEY`), **Express/NestJS** (`helmet`, CORS, body limits), **Rails** (strong params) |
467
+ | SEC-10 | Dependency Vulnerabilities — packages with critical/high CVEs (`npm audit`, `pip audit`, `composer audit`, etc.) |
468
+
469
+ **Format for each finding:** Where? → If not fixed? → If fixed? → Recommended fix
470
+
471
+ **Update plan after review completes** (if a plan file exists for this phase):
472
+ - **Plan-level deviation exists** (wrong library, pattern not followed, scope changed, approach differs from the plan) → add a note to the plan + change status: `code-review` → `done`
473
+ - **No plan deviation** (only code quality issues: naming, formatting, security hardening) → change status only: `code-review` → `done`, with no note
474
+
475
+ </details>
476
+
477
+ ---
478
+
479
+ ## 5. Utility Skills
480
+
481
+ ---
482
+
483
+ <details>
484
+ <summary><strong>help</strong> — Project status dashboard and next-step guidance</summary>
485
+
486
+ **Persona:** @Galbi — Project Manager
487
+
488
+ **Called when:** Any time, especially if you are unsure where to start.
489
+
490
+ **What it checks:**
491
+
492
+ - Spec documents in `project-context/` — `PRD.md`, `StyleGuide.md`, `architecture.md`, `schema.md`, `api.md`, `rules.md`, `Task.md` (count `[ ]` vs `[x]`)
493
+ - Developer config in `.agents/developer-config.json` — `name`, `project`, `scope`, `workMode`, `additionalSkills`, `availableMCPs`
494
+ - Plans in `project-context/plans/` — list all plan files and their statuses (`review` / `in-progress` / `code-review` / `done`)
495
+
496
+ **Output format:**
497
+ ```
498
+ Checking your project now...
499
+
500
+ Spec Documents
501
+ [✓] PRD.md — Product requirements
502
+ [✓] architecture.md — System architecture
503
+ [ ] schema.md — Not created yet
504
+ ...
505
+
506
+ Developer Config
507
+ [✓] name: Firdaus
508
+ [✓] scope: fullstack
509
+ [✓] workMode: plan-first
510
+ [✓] additionalSkills: 2 skills
511
+ [ ] availableMCPs: not configured
512
+
513
+ Plans
514
+ [✓] phase-1-setup.md (status: done)
515
+ [✓] phase-2-auth.md (status: in-progress)
516
+
517
+ Status: [project status summary]
518
+ Recommended next steps: ...
519
+ ```
520
+
521
+ </details>
522
+
523
+ ---
524
+
525
+ <details>
526
+ <summary><strong>bug-fix</strong> — Diagnose, fix, and document bugs</summary>
527
+
528
+ **Persona:** @Ikhsan — Debugger
529
+
530
+ **Called when:** A bug needs to be fixed.
531
+
532
+ **Workflow:**
533
+ 1. You describe the bug (symptoms, location, reproduction steps, error message)
534
+ 2. AI checks `bug-log.md` — has it happened before?
535
+ - **Identical** → apply the same fix (ask for confirmation first)
536
+ - **Similar but different** → diagnose again
537
+ - **New** → continue to diagnosis
538
+ 3. AI reads the broken file + all callers of shared code — one root-cause fix is better than many guards in each caller
539
+ 4. AI formulates and explains the root cause → wait for confirmation before fixing
540
+ 5. Apply the fix → run `spec-compliance` + `code-review`
541
+ 6. You confirm the bug is resolved
542
+ 7. AI adds regression prevention (test, rule/spec update)
543
+ 8. AI records it in `project-context/bug-log.md` ← **only after your confirmation, never automatically**
544
+
545
+ </details>
546
+
547
+ ---
548
+
549
+ <details>
550
+ <summary><strong>add-feature</strong> — Add a new feature to an existing project</summary>
551
+
552
+ **Persona:** @Galbi — Project Manager
553
+
554
+ **Called when:** A new feature needs to be added to an existing project.
555
+
556
+ **Workflow:**
557
+ 1. You describe the new feature (name, function, users, reason)
558
+ 2. AI reads all specs in `project-context/`
559
+ 3. AI shows an impact analysis — which documents are affected (including `plans/`)
560
+ 4. You confirm the analysis
561
+ 5. AI updates **all** affected documents:
562
+ - `PRD.md` → `architecture.md` → `schema.md` → `api.md` → `StyleGuide.md` → `rules.md`
563
+ - `project-context/plans/` — if a plan file exists for an affected phase, add a `## Feature Addition: [name]` section without overwriting old content
564
+ 6. AI calls `brainstorm-task` (Add Phase Mode) to add new phases and tasks to `Task.md`
565
+ 7. Continue with `developer`
566
+
567
+ **Absolute rule:** every affected document must be updated — none may be skipped.
568
+
569
+ </details>
570
+
571
+ ---
572
+
573
+ <details>
574
+ <summary><strong>spec-audit</strong> — Check consistency across documents</summary>
575
+
576
+ **Persona:** @Fachri — Tech Lead
577
+
578
+ **Two modes:**
579
+
580
+ **Project Mode** — audit `project-context/`
581
+ Checks consistency *between* documents: tables in `schema` with no endpoint in `api`? Features in `PRD` with no task in `Task.md`? `architecture` tech stack conflicting with `rules`? `Traceability ID`s referenced but missing from the source?
582
+
583
+ **Framework Mode** — audit MACCA itself
584
+ Checks consistency *between* skill instructions: are README, skill docs, and workflow aligned, or do they conflict?
585
+
586
+ **What it checks:** direct conflicts → workflow drift → inconsistencies → ambiguities
587
+
588
+ **Finding format:** Where? → Why is it a problem? → Specific recommended fix + reasoning
589
+
590
+ </details>
591
+
592
+ ---
593
+
594
+ <details>
595
+ <summary><strong>spec-init</strong> — Generate all specs from an existing codebase</summary>
596
+
597
+ **Persona:** @Fachri — Tech Lead
598
+
599
+ **Called when:** The project already exists but has no spec documents yet.
600
+
601
+ **Two modes:**
602
+ ```
603
+ Mode A — Batch Generate: scan the full codebase, generate everything at once.
604
+ Mode B — Guided Generate: one document → you review → confirm → continue.
605
+ ```
606
+
607
+ **Generation order:** `architecture.md` → `rules.md` → `schema.md` → `api.md` → `StyleGuide.md` → `PRD.md`
608
+
609
+ `PRD.md` is created last because it is inferred from existing code, not assumptions.
610
+
611
+ **Each generated document includes:**
612
+ - **Evidence Inputs** — files/sources used as the basis for each claim
613
+ - **Confidence Level** per claim: *High* (seen directly in code) / *Medium* (strong inference) / *Low* (guess, needs verification)
614
+ - **Confidence Summary** — summary of strong facts, inferences, and what still needs manual verification
615
+
616
+ </details>
617
+
618
+ ---
619
+
620
+ <details>
621
+ <summary><strong>rapat</strong> — Multi-persona team discussion</summary>
622
+
623
+ **Persona:** @Galbi (facilitator)
624
+
625
+ **Called when:** Any time you need perspectives from several specialties at once.
626
+
627
+ **How it works:** @Galbi facilitates. You can call any persona by name to ask for their view. Each persona responds according to their expertise and role.
628
+
629
+ **Available personas:**
630
+ - `@Galbi` — Project Manager: scope, priorities, business impact
631
+ - `@Fachri` — Tech Lead: technical decisions, trade-offs, security
632
+ - `@Akram` — UI/UX Designer: usability, visual consistency, accessibility
633
+ - `@Firdaus` — Developer: feasibility, complexity estimates
634
+ - `@Ikhsan` — Debugger: risks, edge cases, potential bugs
635
+
636
+ </details>
637
+
638
+ ---
639
+
640
+ ## 6. The MACCA AI Team
641
+
642
+ | Persona | Role | Skills |
643
+ |---------|------|--------|
644
+ | **@Galbi** | Project Manager | `brainstorm-prd`, `brainstorm-task`, `add-feature`, `help`, `rapat` |
645
+ | **@Fachri** | Tech Lead | `brainstorm-architecture`, `brainstorm-api`, `brainstorm-schema`, `brainstorm-rules`, `spec-init`, `spec-audit`, `spec-compliance`, `code-review` |
646
+ | **@Akram** | UI/UX Designer | `brainstorm-styleguide` |
647
+ | **@Firdaus** | Expert Developer | `developer` |
648
+ | **@Ikhsan** | Debugger | `bug-fix` |
649
+
650
+ > **Persona Rule:** Do not swap the persona assigned to a skill. Its instructions, tone, and responsibilities are designed for that role.
651
+
652
+ ---
653
+
654
+ ## 7. Workflow
655
+
656
+ <details>
657
+ <summary><strong>New Project</strong> — Start from scratch</summary>
658
+
659
+ ```
660
+ Step 1: Define product requirements
661
+ → Call: brainstorm-prd
662
+ → Output: project-context/PRD.md
663
+
664
+ Step 2: Define architecture
665
+ → Call: brainstorm-architecture ← REQUIRED before continuing
666
+ → Output: project-context/architecture.md
667
+
668
+ Step 3a: Design the database (if any)
669
+ → Call: brainstorm-schema
670
+ → Output: project-context/schema.md
671
+
672
+ Step 3b: Define the API (if any)
673
+ → Call: brainstorm-api
674
+ → Output: project-context/api.md
675
+
676
+ Step 3c: Define the UI design (optional)
677
+ → Call: brainstorm-styleguide
678
+ → Output: project-context/StyleGuide.md
679
+
680
+ Step 4: Set code standards
681
+ → Call: brainstorm-rules
682
+ → Output: project-context/rules.md
683
+
684
+ Step 5: Check consistency (recommended)
685
+ → Call: spec-audit (project mode)
686
+
687
+ Step 6: Create the work plan
688
+ → Call: brainstorm-task
689
+ → Output: project-context/Task.md
690
+
691
+ Step 7: Start coding
692
+ → Call: developer
693
+ → Per task: code → validate → [SELF-REVIEW]
694
+ → Per phase: spec-compliance → code-review → next phase
695
+ → If all tasks are complete but small technical changes, hardening, optimization, or maintenance remain: keep using `developer` (post-task / maintenance mode)
696
+ ```
697
+
698
+ > Not sure where to start? Call `help`.
699
+
700
+ </details>
701
+
702
+ ---
703
+
704
+ <details>
705
+ <summary><strong>Existing Project / Boilerplate</strong> — Codebase exists, specs do not</summary>
706
+
707
+ ```
708
+ Step 1: Generate specs from the existing codebase
709
+ → Call: spec-init
710
+ → Mode A (Batch): create all documents at once
711
+ → Mode B (Guided): one document → review → continue
712
+
713
+ Generation order: architecture.md → rules.md → schema.md → api.md → StyleGuide.md → PRD.md
714
+
715
+ Step 2: Review & correct
716
+ → Pay attention to items with Confidence: Low and any assumption sections
717
+
718
+ Step 3: Check consistency
719
+ → Call: spec-audit (project mode)
720
+
721
+ Step 4: Create the work plan
722
+ → Call: brainstorm-task
723
+
724
+ Step 5: Start coding
725
+ → Call: developer
726
+ ```
727
+
728
+ </details>
729
+
730
+ ---
731
+
732
+ <details>
733
+ <summary><strong>Add a New Feature</strong></summary>
734
+
735
+ ```
736
+ → Call: add-feature
737
+
738
+ What happens:
739
+ 1. You describe the new feature
740
+ 2. AI reads all existing specs
741
+ 3. AI shows an impact analysis (affected documents + plans)
742
+ 4. You confirm the analysis
743
+ 5. AI updates ALL affected documents (none are skipped)
744
+ 6. AI calls brainstorm-task to add new phases & tasks
745
+ 7. Continue with developer
746
+ ```
747
+
748
+ </details>
749
+
750
+ ---
751
+
752
+ <details>
753
+ <summary><strong>Fix a Bug</strong></summary>
754
+
755
+ ```
756
+ → Call: bug-fix
757
+
758
+ What happens:
759
+ 1. You describe the bug
760
+ 2. AI checks bug-log.md — has it happened before?
761
+ 3. AI checks all callers of the broken code
762
+ 4. AI explains the root cause → wait for confirmation before fixing
763
+ 5. Apply the fix → spec-compliance + code-review
764
+ 6. You confirm the bug is resolved
765
+ 7. AI adds regression prevention
766
+ 8. AI records it in bug-log.md ← only after your confirmation
767
+ ```
768
+
769
+ </details>
770
+
771
+ ---
772
+
773
+ ## 8. Installation & Usage
774
+
775
+ **Prerequisite:** GitHub Copilot enabled in VS Code (or another supported AI tool).
776
+
777
+ ### Installation
778
+
779
+ **Option A — `macca-method` CLI**
780
+
781
+ Use this if you want the full bootstrap: skill files, interactive AI-tool selection, `developer-config.json`, and language preferences.
782
+
783
+ ```bash
784
+ npx macca-method install
785
+ ```
786
+
787
+ The CLI asks you to choose the AI tool, then prompts for the developer name, project name, and language preferences.
788
+
789
+ For local testing from a repository clone before the npm package is published, run:
790
+
791
+ ```bash
792
+ node bin/macca-method.js install
793
+ ```
794
+
795
+ You can also do unattended installs, for example:
796
+
797
+ ```bash
798
+ npx macca-method install --tool github-copilot --tool codex --yes
799
+ ```
800
+
801
+ **Option B — bundled MACCA installer**
802
+
803
+ Use this if you prefer a curl/PowerShell bootstrap without going through npm.
804
+
805
+ **Linux / Mac**
806
+ ```bash
807
+ curl -fsSL https://raw.githubusercontent.com/firdaus12p/MACCA-METHOD/main/install.sh | bash
808
+ ```
809
+
810
+ **Windows (PowerShell)**
811
+ ```powershell
812
+ irm https://raw.githubusercontent.com/firdaus12p/MACCA-METHOD/main/install.ps1 | iex
813
+ ```
814
+
815
+ The bundled installer shows an interactive selector to choose the AI tool, then asks for the developer name, project name, and language preferences.
816
+
817
+ **Option C — `skills` CLI**
818
+
819
+ Use this if you only want to install the MACCA skills through the shared Agent Skills ecosystem.
820
+
821
+ ```bash
822
+ npx skills add firdaus12p/MACCA-METHOD --list
823
+ npx skills add firdaus12p/MACCA-METHOD --skill '*' -a github-copilot
824
+ ```
825
+
826
+ You can swap `github-copilot` with another supported agent such as `claude-code`, `cursor`, `codex`, `opencode`, `windsurf`, or `gemini-cli`.
827
+
828
+ > `npx skills add` installs the skills only. It does **not** create `.agents/developer-config.json`, `.agents/macca-tools.txt`, or prompt for developer/project/language setup. Use the MACCA installer above if you need that bootstrap.
829
+
830
+ ### Update to the Latest Version
831
+
832
+ **Preferred**
833
+
834
+ ```bash
835
+ npx macca-method upgrade
836
+ ```
837
+
838
+ For local testing from a repository clone before the npm package is published, run:
839
+
840
+ ```bash
841
+ node bin/macca-method.js upgrade
842
+ ```
843
+
844
+ **Fallback — bundled upgrade script**
845
+
846
+ **Linux / Mac**
847
+ ```bash
848
+ curl -fsSL https://raw.githubusercontent.com/firdaus12p/MACCA-METHOD/main/upgrade.sh | bash
849
+ ```
850
+
851
+ **Windows (PowerShell)**
852
+ ```powershell
853
+ irm https://raw.githubusercontent.com/firdaus12p/MACCA-METHOD/main/upgrade.ps1 | iex
854
+ ```
855
+
856
+ > `project-context/` and `developer-config.json` are **not touched** during upgrade.
857
+
858
+ ### How to Call a Skill
859
+
860
+ ```
861
+ Use the skill brainstorm-prd
862
+ Use the skill developer
863
+ Use the skill help
864
+ ```
865
+
866
+ ### Folder Structure
867
+
868
+ The example below reflects `npx macca-method install` and the bundled MACCA installer. If you use `npx skills add`, the destination folders follow the `skills` CLI defaults for the selected agent.
869
+
870
+ ```
871
+ your-project/
872
+ ├── .agents/
873
+ │ ├── developer-config.json ← shared config across skills
874
+ │ └── macca-tools.txt ← tools selected during install
875
+
876
+ ├── .github/skills/ ← if GitHub Copilot is selected
877
+ │ ├── add-feature/
878
+ │ ├── brainstorm-api/
879
+ │ ├── brainstorm-architecture/
880
+ │ ├── brainstorm-prd/
881
+ │ ├── brainstorm-rules/
882
+ │ ├── brainstorm-schema/
883
+ │ ├── brainstorm-styleguide/
884
+ │ ├── brainstorm-task/
885
+ │ ├── bug-fix/
886
+ │ ├── code-review/
887
+ │ ├── developer/
888
+ │ ├── help/
889
+ │ ├── rapat/
890
+ │ ├── spec-audit/
891
+ │ ├── spec-compliance/
892
+ │ └── spec-init/
893
+
894
+ ├── project-context/
895
+ │ ├── PRD.md
896
+ │ ├── architecture.md
897
+ │ ├── schema.md
898
+ │ ├── api.md
899
+ │ ├── rules.md
900
+ │ ├── StyleGuide.md
901
+ │ ├── Task.md
902
+ │ ├── bug-log.md ← created when the first bug appears
903
+ │ └── plans/ ← per-phase plans (plan-first mode)
904
+ │ └── phase-1-setup.md
905
+
906
+ └── ... (your project code)
907
+ ```
908
+
909
+ | AI Tool | Skills Folder |
910
+ |---------|---------------|
911
+ | GitHub Copilot | `.github/skills/` |
912
+ | Cursor | `.cursor/skills/` |
913
+ | Claude Code | `.claude/skills/` |
914
+ | Windsurf | `.windsurf/skills/` |
915
+ | Gemini CLI | `.gemini/skills/` |
916
+ | OpenCode | `.opencode/skill/` |
917
+ | Kilo Code | `.kilo/skills/` |
918
+ | Codex (OpenAI) | `.agents/skills/` |
919
+ | Kimi CLI | `~/.config/agents/skills/` (global) |
920
+
921
+ ---
922
+
923
+ ## 9. Configuration
924
+
925
+ <details>
926
+ <summary><strong>developer-config.json — Full Schema</strong></summary>
927
+
928
+ The `.agents/developer-config.json` file is shared config across skills. All skills read and update this file by **merge**, never by overwriting the whole file.
929
+
930
+ ```json
931
+ {
932
+ "name": "User name",
933
+ "project": "Project name",
934
+ "languagePreferences": {
935
+ "communication": {
936
+ "raw": "English",
937
+ "normalized": "english"
938
+ },
939
+ "documents": {
940
+ "raw": "English",
941
+ "normalized": "english"
942
+ }
943
+ },
944
+ "developerPreferences": {
945
+ "workMode": "direct",
946
+ "scope": "fullstack"
947
+ },
948
+ "brainstormPreferences": {
949
+ "discussionMode": "one-by-one",
950
+ "recommendations": true
951
+ },
952
+ "codeReviewPreferences": {
953
+ "fixMode": "report-first"
954
+ },
955
+ "additionalSkills": [
956
+ {
957
+ "name": "laravel-best-practices",
958
+ "purpose": "Use when writing Laravel code",
959
+ "paths": {
960
+ "copilot": ".github/skills/laravel-best-practices/SKILL.md",
961
+ "opencode": ".opencode/skill/laravel-best-practices/SKILL.md",
962
+ "codex": ".agents/skills/laravel-best-practices/SKILL.md"
963
+ }
964
+ }
965
+ ],
966
+ "availableMCPs": ["context7", "supabase"]
967
+ }
968
+ ```
969
+
970
+ | Field | Filled by | Description |
971
+ |-------|--------------------|------------|
972
+ | `name` | `developer` (Step 0) | Asked once |
973
+ | `project` | `developer` (Step 0) | Asked once |
974
+ | `languagePreferences` | installer / first skill | Communication language and document language |
975
+ | `developerPreferences.workMode` | `developer` (Step 1b) | `"direct"` or `"plan-first"` |
976
+ | `developerPreferences.scope` | `developer` (Step 0c) | `"frontend"`, `"backend"`, or `"fullstack"` |
977
+ | `brainstormPreferences.discussionMode` | brainstorm-* skills | `"one-by-one"`, `"three-at-a-time"`, or `"all-at-once"` |
978
+ | `brainstormPreferences.recommendations` | brainstorm-* skills | `true` = AI gives suggested answers for each question |
979
+ | `codeReviewPreferences.fixMode` | user / config runtime | `"report-first"` or `"fix-then-report"` |
980
+ | `additionalSkills` | `developer` (Step 0b) | AI searches for the path in the workspace first, then asks only if it is not found |
981
+ | `availableMCPs` | `developer` (Step 0b) | Available MCPs; only listed MCPs are used |
982
+
983
+ **Rule:** all skills must **merge**, not overwrite the file. Unknown fields must be preserved.
984
+
985
+ </details>
986
+
987
+ ---
988
+
989
+ <details>
990
+ <summary><strong>Glossary & Traceability ID</strong></summary>
991
+
992
+ | Term | Explanation |
993
+ |---------|------------|
994
+ | **Skill** | Full instructions for AI — like an SOP for AI |
995
+ | **Spec** | Planning document containing all decisions before coding |
996
+ | **Subagent** | Helper agent for focused exploration/analysis |
997
+ | **project-context/** | Folder where all spec documents are stored |
998
+ | **[FORBIDDEN]** | Section in `rules.md` — technical prohibitions scanned by AI before coding |
999
+ | **[SELF-REVIEW]** | Short developer reflection after each task: security risk, performance, spec assumption |
1000
+ | **Traceability ID** | Stable label (`FEAT-01`, `API-03`) for tracing requirements from PRD to implementation |
1001
+ | **Acceptance Criteria** | Concrete conditions for a task to be considered done |
1002
+ | **scope** | Developer work boundary: frontend-only, backend-only, or fullstack |
1003
+ | **fixMode** | `code-review` preference: report first or fix immediately |
1004
+ | **availableMCPs** | MCPs listed and available for use in this project |
1005
+ | **Confidence Level** | In `spec-init`: High/Medium/Low for claims derived from codebase analysis |
1006
+ | **Evidence Inputs** | In `spec-init`: files/sources used as evidence for a claim |
1007
+ | **Plan status** | Plan file lifecycle status: `review` → `in-progress` → `code-review` → `done` |
1008
+ | **Plan deviation** | Implementation drift from decisions in the plan (library, pattern, scope) — recorded by `code-review` if found |
1009
+
1010
+ **Traceability ID Scheme:**
1011
+
1012
+ | Prefix | Used for |
1013
+ |--------|----------------|
1014
+ | `FEAT-01` | Main feature in `PRD.md` |
1015
+ | `BR-01` | Business rule in `PRD.md` |
1016
+ | `NFR-01` | Non-functional requirement in `PRD.md` |
1017
+ | `AC-01` | Acceptance Criteria in `PRD.md` |
1018
+ | `US-01` | User story in `PRD.md` |
1019
+ | `DATA-01` | Table or data entity in `schema.md` |
1020
+ | `API-01` | Endpoint in `api.md` |
1021
+ | `RULE-01` | Rule in `rules.md` referenced across documents |
1022
+
1023
+ </details>
1024
+
1025
+ ---
1026
+
1027
+ ## 10. Frequently Asked Questions
1028
+
1029
+ <details>
1030
+ <summary>Do all spec documents need to be complete before coding?</summary>
1031
+
1032
+ They do not need to be perfect. The minimum required before `developer` can run is `PRD.md` and `architecture.md`. The more complete the specs are, the more accurately AI can work.
1033
+
1034
+ </details>
1035
+
1036
+ <details>
1037
+ <summary>Can this be used for an existing project?</summary>
1038
+
1039
+ Yes. Use `spec-init` — AI reads the codebase and generates all spec documents. Every claim gets a confidence level (High/Medium/Low) and its evidence source.
1040
+
1041
+ </details>
1042
+
1043
+ <details>
1044
+ <summary>Can AI make mistakes?</summary>
1045
+
1046
+ Yes. That is why `spec-compliance` and `code-review` run automatically after every phase. If something is wrong, AI fixes it before continuing.
1047
+
1048
+ </details>
1049
+
1050
+ <details>
1051
+ <summary>What is [SELF-REVIEW]?</summary>
1052
+
1053
+ After each task is complete, the developer writes a short reflection: 1 potential security risk, 1 performance bottleneck, and 1 spec assumption. The goal is to expose hidden guesses before formal verification.
1054
+
1055
+ </details>
1056
+
1057
+ <details>
1058
+ <summary>Why does developer write tests before implementation?</summary>
1059
+
1060
+ This is the TDD approach. By writing tests first, AI defines function behavior precisely before implementation — preventing structural changes midway through. Test tasks always appear before implementation tasks in `Task.md`.
1061
+
1062
+ </details>
1063
+
1064
+ <details>
1065
+ <summary>Is bug-log updated automatically?</summary>
1066
+
1067
+ No. A bug is recorded only after **you confirm** that it is resolved. AI does not write to `bug-log` without permission.
1068
+
1069
+ </details>
1070
+
1071
+ <details>
1072
+ <summary>Do I need to choose developer preferences in every session?</summary>
1073
+
1074
+ No. All preferences (scope, work mode, additional skills, MCPs, code review mode) are asked once and saved. Future sessions use them directly.
1075
+
1076
+ </details>
1077
+
1078
+ <details>
1079
+ <summary>What is plan-first mode and where is the plan stored?</summary>
1080
+
1081
+ When you choose `plan-first`, AI creates a plan file in `project-context/plans/phase-[N]-[slug].md` before coding starts. The plan has a status header that is updated automatically through this lifecycle:
1082
+
1083
+ | Status | Meaning |
1084
+ |--------|---------|
1085
+ | `review` | The plan was just created — you read and review it first. Type `start` if you agree. |
1086
+ | `in-progress` | Coding starts after you type `start`. |
1087
+ | `code-review` | All tasks in the phase are complete and are being reviewed by `code-review`. |
1088
+ | `done` | Code review is complete. If implementation deviated from the plan (wrong library, different pattern), AI adds a note to the plan. If there is no deviation, status changes to `done` with no note. |
1089
+
1090
+ Plans are also recognized by `help` (displayed with status) and `add-feature` (updated if the phase is affected).
1091
+
1092
+ </details>
1093
+
1094
+ <details>
1095
+ <summary>What is scope in developer?</summary>
1096
+
1097
+ Scope sets the AI work boundary: **Frontend only** (does not touch `routes/`, `controllers/`, `migrations/`), **Backend only** (does not touch `components/`, `pages/`, `styles/`), or **Fullstack** (no restriction). It is enforced in `developer` before coding and in `spec-compliance` (SC-08) after coding.
1098
+
1099
+ </details>
1100
+
1101
+ <details>
1102
+ <summary>How do additional skills work?</summary>
1103
+
1104
+ These are project-specific skills (for example `laravel-best-practices`). `developer` asks once. AI searches the workspace first, then asks you only if the skill is not found. When working on a relevant task, AI must read that skill's `SKILL.md` before writing code.
1105
+
1106
+ </details>
1107
+
1108
+ <details>
1109
+ <summary>How is spec-audit different from spec-compliance?</summary>
1110
+
1111
+ - `spec-compliance` — code vs spec. Runs after coding.
1112
+ - `spec-audit` — spec document vs spec document. Runs before coding or any time you suspect inconsistencies.
1113
+
1114
+ Analogy: `spec-compliance` is inspection of the built result against the blueprint. `spec-audit` is cross-checking the blueprints against each other.
1115
+
1116
+ </details>
1117
+
1118
+ <details>
1119
+ <summary>Why is security review in code-review, not only in developer?</summary>
1120
+
1121
+ Developer has baseline security responsibility: `[FORBIDDEN]` in `rules.md` and `[SELF-REVIEW]`, which records a possible security risk. But `code-review` is the formal checkpoint with 10 deeper security items (SEC-01–SEC-10), including framework-specific checks and dependency CVEs. These two layers complement each other.
1122
+
1123
+ </details>
1124
+
1125
+ ---
1126
+
1127
+ ## 11. License
1128
+
1129
+ MIT License — free to use, modify, and distribute.