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,6 +1,6 @@
1
1
  ---
2
2
  name: brainstorm-prd
3
- description: Interviews users and generates `PRD.md` with scope, outcomes, metrics, rollout, business rules, and traceability. Use only when the user explicitly wants to define a new product or create/recreate its PRD.
3
+ description: Creates or updates `PRD.md` with scope, outcomes, metrics, rollout, business rules, and traceability. Use for explicit product/PRD planning, targeted completion/update user intent, or an authorized owner handoff, including spec-init Missing Decisions and approved technical sync.
4
4
  compatibility: Requires the complete MACCA-METHOD collection with sibling _shared resources and workspace file access.
5
5
  metadata:
6
6
  persona: "Galbi"
@@ -43,20 +43,20 @@ Before any interview:
43
43
  2. Read `../_shared/references/config-mutation.md`.
44
44
  3. Read `../_shared/references/brainstorm-session.md`.
45
45
  4. Read `../_shared/references/scope-rules.md`.
46
- 5. Use `languagePreferences.communication.normalized` for chat.
47
- 6. Use `languagePreferences.documents.normalized` for the final `project-context/PRD.md`.
46
+ 5. Use the resolved communication language from `language-config.md` for chat.
47
+ 6. Use the resolved document language from `language-config.md` for the final `project-context/PRD.md`.
48
48
  7. Apply `brainstormPreferences.discussionMode`, `recommendations`, and `discoveryDepth` using the shared session policy.
49
49
 
50
50
  ---
51
51
 
52
52
  ## How to Use This Skill
53
53
 
54
- 1. Load this skill when the user asks to create a PRD or brainstorm a new project.
54
+ 1. Select the mode in `../_shared/references/brainstorm-session.md` before startup questions. Baseline-completion, targeted update, and approved technical sync take precedence over the new-document interview below.
55
55
 
56
56
  2. **Read existing project-context** before any user interaction:
57
57
  - Check whether `project-context/PRD.md` already exists to avoid duplication
58
58
 
59
- 3. If `.agents/developer-config.json` exists, read `developerPreferences.scope`.
59
+ 3. Read the configured scope value from the safe preference summary under `language-config.md`.
60
60
  - `frontend` → PRD MUST focus on UI flows, pages, state, client validation, and backend/API dependencies
61
61
  - `backend` → PRD MUST focus on business rules, service/API/data/auth, and consumer dependencies
62
62
  - `fullstack` → full PRD
@@ -65,12 +65,16 @@ Before any interview:
65
65
 
66
66
  5. Run the interview in the chosen mode. Wait for the answer before continuing.
67
67
 
68
- 6. After all topics, create `project-context/PRD.md`.
69
-
70
- > ⚠️ **If the file already exists:** "(A) Overwrite all, (B) Cancel and review first." Wait for the answer.
68
+ 6. In new-document mode, complete applicable discovery and create `project-context/PRD.md`. For an existing file, follow the selected bounded mode; retain evidence, confidence, IDs, unrelated unknowns, and unrelated text. Regenerate only on an explicit request with approval of the named replacement.
71
69
 
72
70
  7. Summarize the PRD and suggest next steps based on scope.
73
71
 
72
+ ## Domain Applicability: Smallest Sufficient Product
73
+
74
+ Apply the shared planning principles loaded by `brainstorm-session.md`. Define the smallest scope that fulfills approved current outcomes and security/recovery obligations, using evidence about expected usage, team, budget, and operations. Do not add admin panels, login, analytics, subscriptions, roles, or integrations merely because similar products have them. Critical depth means deeper discovery, not extra features.
75
+
76
+ Keep acceptance criteria small, measurable, and tied to actual behavior. Do not invent SLOs or analytics infrastructure to make a template look complete; use existing/manual measurement when sufficient. Preserve required safeguards. Record user-mentioned future ideas as non-goals or unapproved possibilities, never as current requirements or implementation tasks. Unknown mandatory decisions remain open for approval, not `N/A`.
77
+
74
78
  ## Interview Topics (15 Topics)
75
79
 
76
80
  Ask the topics in order. Use conversational language.
@@ -91,9 +95,9 @@ _"Who are the target users? There may be multiple personas."_
91
95
 
92
96
  Collect:
93
97
 
94
- - User personas (Admin, Customer, Cashier, etc.)
95
- - Demographics (age, role, background)
96
- - Multiple roles with different access?
98
+ - Actual users and needs supported by evidence
99
+ - Relevant context/background only where it affects requirements
100
+ - Distinct roles/access only if the approved workflows need them
97
101
 
98
102
  ### 3. Problem Statement
99
103
 
@@ -113,8 +117,8 @@ _"What are the main features?"_
113
117
  Collect:
114
118
 
115
119
  - MVP features (release 1)
116
- - Future enhancements
117
- - Priority of each
120
+ - User-mentioned future possibilities, explicitly outside current approved scope
121
+ - Priority of each approved feature
118
122
 
119
123
  ### 5. Business Rules
120
124
 
@@ -122,9 +126,9 @@ _"What business rules apply? For example: min/max values, pricing rules, special
122
126
 
123
127
  Collect:
124
128
 
125
- - Validation rules (for example password ≥ 8 characters)
126
- - Calculation rules (for example 10% member discount)
127
- - Access rules (for example only admins can delete)
129
+ - Validation rules for actual inputs
130
+ - Calculation rules for approved behavior
131
+ - Access rules where restricted actions or data require them
128
132
  - Limits/thresholds
129
133
 
130
134
  ### 6. User Flow
@@ -168,10 +172,10 @@ _"What is the minimum definition of success for this project?"_
168
172
  Collect:
169
173
 
170
174
  - MVP criteria
171
- - Success metrics with baseline, target, timeframe, measurement source, and owner
175
+ - Small measurable success criteria; baseline, target, timeframe, existing/manual measurement source, and owner where relevant
172
176
  - Timeline/deadline
173
177
  - Product rollout: pilot/beta/phased/full launch, target audience, and readiness criteria
174
- - Analytics events needed to measure the selected metrics, only when behavioral measurement is relevant
178
+ - Analytics events only when approved measurement needs cannot be met sufficiently without them
175
179
 
176
180
  ### 10. Acceptance Criteria
177
181
 
@@ -210,7 +214,7 @@ Collect:
210
214
 
211
215
  - Stories per main feature
212
216
  - Ordered by priority
213
- - Example: "As an admin, I want to see the order list so I can process shipping"
217
+ - Use only actual personas and approved features; a story does not authorize a new role or feature
214
218
 
215
219
  ### 14. Stakeholders
216
220
 
@@ -252,15 +256,9 @@ Adapt only sections that are applicable and preserve every required contract fro
252
256
 
253
257
  1. Confirm `project-context/PRD.md` was created successfully
254
258
  2. Summarize the PRD (2-3 sentences)
255
- 3. Suggest the next workflow:
256
- 1. **`brainstorm-architecture`** ← required next
257
- 2. `brainstorm-schema` after architecture (only if scope includes backend/data)
258
- 3. `brainstorm-api` → after schema or directly as a consumer contract (for frontend)
259
- 4. `brainstorm-styleguide` → optional after architecture, only if scope includes frontend/UI
260
- 5. `brainstorm-rules` → after API (or style guide)
261
- 6. `brainstorm-task` → final step before coding
262
-
263
- Each step can be skipped. Always confirm before proceeding.
259
+ 3. Recommend one next step using the applicability-aware priority in `brainstorm-session.md`: normally `brainstorm-architecture` after a new PRD. For a bounded update, return approved scope, IDs, changed sections, and evidence freshness to the caller instead of restarting planning.
260
+
261
+ Only inapplicable inputs are `N/A`; do not bypass applicable prerequisites or start another skill without user intent or an authorized handoff.
264
262
 
265
263
  ## Important Notes
266
264
 
@@ -1,5 +1,7 @@
1
1
  # PRD: [Project Name]
2
2
 
3
+ > **Authoring note:** This is a placeholder menu, not a checklist to build. Use the smallest scope that fulfills approved current requirements and security/recovery obligations within evidenced scale, team, budget, and operational constraints. Prune inapplicable sections or mark `N/A` with a reason; unknown mandatory decisions remain open, not `N/A`. Do not infer login, admin, roles, subscriptions, analytics, or integrations from examples. Critical depth adds questions, not features. Use small measurable acceptance criteria and confirmed targets, not invented SLOs; future possibilities do not authorize requirements or tasks.
4
+
3
5
  > **Version:** 1.0 | **Date:** [date] | **Status:** Draft
4
6
 
5
7
  ## Document Role
@@ -24,7 +26,7 @@
24
26
 
25
27
  | Persona | Description | Role |
26
28
  | ----------- | ------------- | ---------------------- |
27
- | [Persona 1] | [Description] | End User / Admin / etc |
29
+ | [Persona 1] | [Description] | [Actual role, if needed] |
28
30
 
29
31
  ## 3. Problem Statement
30
32
 
@@ -43,9 +45,9 @@
43
45
  | ------- | --------- | ------------- | -------- |
44
46
  | FEAT-01 | [Feature] | [Description] | High |
45
47
 
46
- ### Future Enhancements
48
+ ### User-Mentioned Future Possibilities (Not Approved Scope)
47
49
 
48
- - **FEAT-02:** [Feature] [Description]
50
+ - [Possibility explicitly raised by the user; exclude from current requirements and tasks until approved]
49
51
 
50
52
  ## 5. Business Rules
51
53
 
@@ -76,21 +78,20 @@
76
78
 
77
79
  | ID | Category | Requirement | Target |
78
80
  | ------ | ------------- | ---------------- | ----------- |
79
- | NFR-01 | Performance | Page load time | < 3 seconds |
80
- | NFR-02 | Security | [Requirement] | [Target] |
81
- | NFR-03 | Scalability | Concurrent users | [Count] |
82
- | NFR-04 | Accessibility | [Requirement] | [Target] |
81
+ | NFR-01 | [Applicable category] | [Approved requirement] | [Evidence-backed agreed target] |
82
+
83
+ Record unresolved required targets as open decisions; retain applicable security, recovery, and accessibility obligations.
83
84
 
84
85
  ## 9. Success Metrics and Rollout
85
86
 
86
87
  | Metric | Baseline | Target | Timeframe | Measurement Source | Owner |
87
88
  | -------- | ----------------- | -------- | --------- | ------------------ | ------- |
88
- | [Metric] | [current/unknown] | [target] | [period] | [analytics/report] | [owner] |
89
+ | [Metric] | [current/unknown] | [target] | [period] | [existing/manual source if sufficient] | [owner] |
89
90
 
90
91
  **Rollout:** [pilot / beta / phased / full]
91
92
  **Target Audience:** [initial cohort]
92
93
  **Readiness Criteria:** [conditions before expansion]
93
- **Analytics Events:** [only events required to measure the metrics]
94
+ **Analytics Events:** [only if approved measurement cannot be met sufficiently with existing/manual sources]
94
95
 
95
96
  ## 10. Acceptance Criteria
96
97
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: brainstorm-rules
3
- description: Interviews users and generates `rules.md` for coding, security, dependency, testing, AI behavior, and conditional operational conventions. Use only when the user explicitly requests repository-wide implementation rules.
3
+ description: Creates or updates `rules.md` for coding, security, dependency, testing, AI behavior, and conditional operational conventions. Use for repository-wide rules, targeted completion/update user intent, or an authorized owner handoff, including spec-init Missing Decisions, approved technical sync, and missing rules routed by implementation after applicable inputs are ready.
4
4
  compatibility: Requires the complete MACCA-METHOD collection with sibling _shared resources and workspace file access.
5
5
  metadata:
6
6
  persona: "Fachri"
@@ -37,13 +37,16 @@ This skill generates **rules.md**: a "code constitution" so AI works consistentl
37
37
 
38
38
  ## Usage
39
39
 
40
- 1. Ideally run this before coding starts.
40
+ 1. Select the mode in `../_shared/references/brainstorm-session.md` before startup questions. Baseline-completion, targeted update, and approved technical sync take precedence over the new-document interview below. Run new rules discovery only after usable architecture and all applicable upstream inputs are ready, including persistence, API, and UI contracts. A missing `rules.md` does not bypass those prerequisites; route the first unmet applicable input to its owner. Implementation may hand off here automatically, but new rules still require applicable discovery and approval before writing.
41
41
 
42
42
  2. **Read existing project-context** before any user interaction:
43
- - `project-context/architecture.md` — chosen tech stack and established patterns
44
- - `project-context/PRD.md` — platform and constraints that affect coding standards
45
- - `project-context/schema.md` — decisions about PII, retention, data protection
46
- - `project-context/api.md` — auth contract, rate limiting, abuse controls
43
+ - `project-context/architecture.md` — required; chosen tech stack and established patterns
44
+ - `project-context/PRD.md` — required when available; platform and constraints that affect coding standards
45
+ - `project-context/schema.md` — only for backend/fullstack scope with persistence; decisions about PII, retention, and data protection
46
+ - `project-context/api.md` — only when the project exposes or consumes an API; auth contract, rate limiting, and abuse controls
47
+ - `project-context/StyleGuide.md` — only when frontend/UI rules apply
48
+
49
+ If a document is outside the declared scope or the project has no such contract, record it as `N/A`; do not treat it as a missing prerequisite.
47
50
 
48
51
  3. **Shared Runtime Setup** — before the interview (paths written as `../...` are relative to this SKILL.md's own folder, not the project's working directory):
49
52
 
@@ -51,19 +54,23 @@ This skill generates **rules.md**: a "code constitution" so AI works consistentl
51
54
  - Read `../_shared/references/config-mutation.md`.
52
55
  - Read `../_shared/references/brainstorm-session.md`.
53
56
  - Read `../_shared/references/scope-rules.md`.
54
- - Use `languagePreferences.communication.normalized` for chat.
55
- - Use `languagePreferences.documents.normalized` for the final `project-context/rules.md`.
57
+ - Use the resolved communication language from `language-config.md` for chat.
58
+ - Use the resolved document language from `language-config.md` for the final `project-context/rules.md`.
56
59
  - Apply `brainstormPreferences.discussionMode`, `recommendations`, and `discoveryDepth` using the shared session policy.
57
- - For this skill: announce that there are 7 topics, ask for pacing (one by one / three at once / all at once), and ask for recommendation preference if it is not already stored.
60
+ - Use shared mode selection and setup only; reuse saved preferences and ask only missing preferences. Count remaining applicable topics rather than announcing a full interview for a bounded update.
58
61
 
59
62
  4. Run the interview in the selected mode. Wait for the answer before continuing.
60
63
 
61
- 5. After all topics are complete, create `project-context/rules.md` (create `project-context/` if needed).
62
-
63
- > ⚠️ **If the file already exists:** "(A) Overwrite all, (B) Cancel and review first." Wait for the answer.
64
+ 5. In new-document mode, complete applicable discovery, obtain approval, and create `project-context/rules.md` (create `project-context/` if needed). For an existing file, follow the selected bounded mode; retain evidence, confidence, IDs, unrelated unknowns, and unrelated text. Regenerate only on an explicit request with approval of the named replacement.
64
65
 
65
66
  6. Summarize the result and provide next steps.
66
67
 
68
+ ## Domain Applicability: Smallest Sufficient Rules
69
+
70
+ Apply the shared planning principles loaded by `brainstorm-session.md`. Reuse mature approved conventions and native/existing tooling. Each rule should prevent a real project risk or support an approved requirement within the team's scale, budget, and operational capacity. New tools need evidence that simpler options are insufficient, implementation/maintenance cost, and a concrete escalation trigger.
71
+
72
+ Do not impose universal strict mode, coverage percentages, naming schemes, frameworks, linters, or formatting tools. Match checks to the actual language and risk; record thresholds only when justified and approved. Critical depth means deeper questions about failure and enforcement, not more tooling. Preserve required security, data integrity/recovery, and accessibility safeguards. Unknown mandatory decisions remain open, not `N/A`.
73
+
67
74
  ## Interview Topics (7)
68
75
 
69
76
  ### 1. AI Persona & Tech Stack
@@ -72,10 +79,10 @@ This skill generates **rules.md**: a "code constitution" so AI works consistentl
72
79
 
73
80
  **Collect:**
74
81
 
75
- - List of technologies (for example TypeScript, React, Next.js 14, Prisma, PostgreSQL)
76
- - Prioritized libraries (for example TanStack Query, Zustand, React Hook Form, Zod)
77
- - Preferred patterns (for example functional components, Server Components, App Router)
78
- - Patterns to avoid (for example class components, Pages Router, `any` type)
82
+ - Technologies and versions already approved in architecture
83
+ - Existing libraries and conventions relevant to this repository
84
+ - Patterns justified by actual responsibilities and team practices
85
+ - Patterns to avoid only for a documented project reason
79
86
 
80
87
  ### 2. Naming Conventions
81
88
 
@@ -83,13 +90,9 @@ This skill generates **rules.md**: a "code constitution" so AI works consistentl
83
90
 
84
91
  **Collect:**
85
92
 
86
- - Variables & functions: camelCase
87
- - React components: PascalCase
88
- - Files & folders: kebab-case or camelCase?
89
- - Global constants: UPPER_CASE
90
- - Event handlers: `handle` prefix (for example `handleSubmit`, `handleClick`)
91
- - Boolean variables: `is/has/can` prefix (for example `isLoading`, `hasError`)
92
- - Database tables: snake_case, plural?
93
+ - Existing language-native naming for symbols, files, and directories
94
+ - UI/event-handler conventions only where those concepts exist
95
+ - Datastore naming only when persistence is in scope
93
96
 
94
97
  ### 3. Code Style & Quality
95
98
 
@@ -97,13 +100,9 @@ This skill generates **rules.md**: a "code constitution" so AI works consistentl
97
100
 
98
101
  **Collect:**
99
102
 
100
- - TypeScript: strict mode? Avoid `any`? Avoid `enum` (use `as const`)?
101
- - `console.log`: forbidden in production?
102
- - Error handling: `try-catch` required? Prefer guard clauses (early return)?
103
- - Comments: JSDoc required? Minimal?
104
- - Maximum function length?
105
- - Preferred import order?
106
- - `else` after `return` — forbidden (prefer early return)?
103
+ - Language-specific checks already used or justified by actual risk
104
+ - Production diagnostics and error handling appropriate to the runtime
105
+ - Comments, readability, and import conventions; numeric limits only if justified
107
106
  - Dependency decision ladder: reuse existing code → standard library → native platform → installed dependencies → new dependencies?
108
107
  - Intentional simplification: require a `tradeoff:` comment with ceiling and upgrade trigger?
109
108
  - What must never be simplified: trust-boundary validation, data-loss protection, accessibility basics, explicit requirements?
@@ -114,13 +113,13 @@ This skill generates **rules.md**: a "code constitution" so AI works consistentl
114
113
 
115
114
  **Collect:**
116
115
 
117
- - Token storage (httpOnly cookie, NOT localStorage)
118
- - User input sanitization before processing
119
- - Environment variable handling (do not hardcode, use `.env.example`)
120
- - SQL/query injection prevention (parameterized queries, ORM, no string concatenation)
121
- - XSS prevention (`dangerouslySetInnerHTML` policy?)
122
- - CORS: which origins are allowed?
123
- - Secret scanning: pre-commit hooks?
116
+ - Credential/session protection appropriate to the approved authentication and platform
117
+ - Untrusted-input validation and context-appropriate sanitization/encoding
118
+ - Secret/configuration handling without hardcoded secrets; existing platform mechanisms first
119
+ - Injection prevention for applicable query, shell, template, and parser boundaries
120
+ - XSS prevention if rendering untrusted content
121
+ - Cross-origin policy for applicable network surfaces
122
+ - Secret scanning using existing tooling or justified additions
124
123
  - Align with decisions in `architecture.md`, `schema.md`, `api.md` — no contradictions.
125
124
  - If architecture defines observability: structured log levels, correlation IDs, redaction, sampling, and forbidden sensitive fields
126
125
  - If schema defines migrations: naming, compatibility, destructive-change approval, transaction/backfill, and validation conventions
@@ -156,16 +155,14 @@ This skill generates **rules.md**: a "code constitution" so AI works consistentl
156
155
 
157
156
  ### 7. Linter, Formatter & Testing
158
157
 
159
- **Ask:** _"What quality tools are used: ESLint, Prettier, test framework?"_
158
+ **Ask:** _"Which quality checks already run, and which actual risks need additional verification?"_
160
159
 
161
160
  **Collect:**
162
161
 
163
- - ESLint: version? Rule set? (`eslint:recommended`, `@typescript-eslint/recommended`)
164
- - Prettier: options? (semicolon, quote style, print width)
165
- - `.editorconfig`: used?
166
- - Test framework: Jest, Vitest, Playwright?
167
- - Minimum coverage percentage?
168
- - Test requirement: mandatory for every new feature?
162
+ - Existing linter, formatter, editor, and test configuration where applicable
163
+ - Risk-based verification for changed behavior and critical paths
164
+ - Coverage thresholds only if justified and approved; no universal minimum
165
+ - Additional tools only where native/existing checks leave a demonstrated gap
169
166
 
170
167
  ## rules.md Output
171
168
 
@@ -179,7 +176,6 @@ Adapt only sections that are applicable and preserve every required contract fro
179
176
 
180
177
  After rules.md is complete:
181
178
 
182
- 1. Run `brainstorm-task` to create Task.md from all spec documents
183
- 2. Then: use the `developer` skill to start implementation
179
+ Recommend one next step: normally `brainstorm-task` to derive work from the completed applicable specs. For bounded updates, return approved scope, IDs, changed sections, and evidence freshness to the caller; a rules update does not itself authorize implementation.
184
180
 
185
181
  ---
@@ -1,5 +1,7 @@
1
1
  # Coding Standards (Rules)
2
2
 
3
+ > **Authoring note:** This is a placeholder menu, not a checklist to build. Keep rules justified by approved current requirements and real project risks; prune inapplicable sections or mark `N/A` with a reason. Unknown mandatory decisions remain open, not `N/A`. Reuse mature conventions and native/existing tooling. Do not impose universal strict mode, naming, coverage percentages, frameworks, or tools. New tooling needs a current requirement, why simpler options fail, cost within scale/team/budget/operations constraints, and an escalation trigger. Critical depth deepens questions; required security, integrity/recovery, and accessibility safeguards stay intact.
4
+
3
5
  ## Document Role
4
6
 
5
7
  - **Source of Truth:** Coding standards, AI behavior constraints, and implementation security rules
@@ -39,10 +41,10 @@
39
41
  - **Error Handling:** [stack-native strategy confirmed by the project]
40
42
  - **Control flow:** [confirmed readability rule]
41
43
  - **Import/dependency order:** [confirmed convention if applicable]
42
- - **Max function length:** [X lines]
43
- - **Comments:** [JSDoc required / minimal]
44
+ - **Size limits:** [only if justified and approved]
45
+ - **Comments:** [confirmed language-native documentation needs]
44
46
  - **Dependency ladder:** Reuse existing code first, then standard library, native platform, installed dependencies, and only then add new dependencies.
45
- - **Intentional simplification:** Mark with a `tradeoff:` comment that states the ceiling and upgrade trigger.
47
+ - **Intentional simplification:** [agreed way to document material ceilings and upgrade triggers; no boilerplate comment for ordinary simple code]
46
48
  - **Never simplify:** trust-boundary validation, data-loss protection, accessibility basics, or explicitly requested behavior.
47
49
 
48
50
  Add a language-specific example only when it communicates a confirmed rule better than prose.
@@ -105,13 +107,11 @@ Add a language-specific example only when it communicates a confirmed rule bette
105
107
  | `perf:` | Performance improvement |
106
108
  | `ci:` | CI/CD config changes |
107
109
 
108
- **Example:** `feat(auth): add Google OAuth login`
110
+ **Example:** [actual project change using the confirmed convention]
109
111
 
110
112
  **Branch naming:**
111
113
 
112
- - `feature/[feature-name]`
113
- - `fix/[bug-name]`
114
- - `chore/[task-name]`
114
+ - [Existing/confirmed convention; no new branching scheme by default]
115
115
 
116
116
  ---
117
117
 
@@ -121,7 +121,7 @@ Add a language-specific example only when it communicates a confirmed rule bette
121
121
  - **Formatter:** [existing tool/options; omit if none].
122
122
  - **Editor settings:** [existing settings; omit if none].
123
123
  - **Test Framework:** [existing project framework]
124
- - **Minimum Coverage:** [X%]
124
+ - **Coverage / Verification:** [risk-based checks; numeric threshold only if justified and approved]
125
125
  - **Test Requirement:** [project policy: test-first, test-with-change, or another explicit workflow].
126
126
 
127
127
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: brainstorm-schema
3
- description: Interviews users and generates `schema.md` for relational, document, key-value, graph, event-store, or mixed persistence, including evolution and recovery. Use only when the user explicitly requests data-model design after architecture.
3
+ description: Creates or updates `schema.md` for relational, document, key-value, graph, event-store, or mixed persistence, including evolution and recovery. Use after applicable architecture decisions for explicit data-model planning, targeted completion/update user intent, or an authorized owner handoff, including spec-init Missing Decisions and approved technical sync.
4
4
  compatibility: Requires the complete MACCA-METHOD collection with sibling _shared resources and workspace file access.
5
5
  metadata:
6
6
  persona: "Fachri"
@@ -43,45 +43,49 @@ Before any interview:
43
43
  2. Read `../_shared/references/config-mutation.md`.
44
44
  3. Read `../_shared/references/brainstorm-session.md`.
45
45
  4. Read `../_shared/references/scope-rules.md`.
46
- 5. Use `languagePreferences.communication.normalized` for chat.
47
- 6. Use `languagePreferences.documents.normalized` for the final `project-context/schema.md`.
46
+ 5. Use the resolved communication language from `language-config.md` for chat.
47
+ 6. Use the resolved document language from `language-config.md` for the final `project-context/schema.md`.
48
48
  7. Apply `brainstormPreferences.discussionMode`, `recommendations`, and `discoveryDepth` using the shared session policy.
49
49
 
50
50
  ---
51
51
 
52
52
  ## How to Use This Skill
53
53
 
54
- 1. Load after `architecture.md` is complete.
54
+ 1. Select the mode in `../_shared/references/brainstorm-session.md` before startup questions. Baseline-completion, targeted update, and approved technical sync take precedence over the new-document interview below. New schema planning follows usable architecture decisions and applies only to in-scope persistence; otherwise report schema as `N/A`.
55
55
 
56
56
  2. **Read existing project-context**:
57
57
  - `project-context/PRD.md` — features and business rules that determine tables
58
58
  - `project-context/architecture.md` — tech stack, ORM, database conventions
59
59
 
60
- 3. If `.agents/developer-config.json` exists and `developerPreferences.scope = "frontend"`, DO NOT create `schema.md`. Explain that database and schema work is outside the current scope, and that backend dependencies should be documented only through the `api.md` consumer contract.
60
+ 3. If the configured scope value from the safe preference summary under `language-config.md` is `frontend`, DO NOT create `schema.md`. Explain that database and schema work is outside the current scope, and that backend dependencies should be documented only through the `api.md` consumer contract.
61
61
 
62
62
  4. Run the shared runtime setup above and apply all three pacing modes from the shared session policy. If preferences are saved, announce and proceed without another confirmation.
63
63
 
64
64
  5. Run the interview in the chosen mode. Wait for answers.
65
65
 
66
- 6. After all topics, create `project-context/schema.md`.
67
-
68
- > ⚠️ **If the file already exists:** "(A) Overwrite all, (B) Cancel and review first."
66
+ 6. In new-document mode, complete applicable discovery and create `project-context/schema.md`. For an existing file, follow the selected bounded mode; retain evidence, confidence, IDs, unrelated unknowns, and unrelated text. Regenerate only on an explicit request with approval of the named replacement.
69
67
 
70
68
  7. Summarize the result and suggest next steps.
71
69
 
70
+ ## Domain Applicability: Smallest Sufficient Data Model
71
+
72
+ Apply the shared planning principles loaded by `brainstorm-session.md`. Reuse the approved datastore and native integrity facilities. Every entity, field, index, and projection must serve an approved current requirement, integrity obligation, or actual access pattern at the expected scale. New storage components need evidence that simpler options are insufficient, implementation/operating cost within team/budget constraints, and a concrete escalation trigger.
73
+
74
+ Do not automatically add soft delete, version/history fields, tenant columns, event stores, or structures for future features. Use integrity constraints, transactions, concurrency protection, retention, and recovery where real data risks require them; simplicity does not justify data loss or weakened protection. Critical depth probes those risks more deeply without automatically adding infrastructure. Unknown mandatory decisions remain open rather than `N/A`.
75
+
72
76
  ## Interview Topics (5 Topics — All Required)
73
77
 
74
78
  Ask all five topics using the chosen pacing mode. First classify the persistence model from `architecture.md` as relational, document, key-value, graph, event store, or mixed. Adapt terminology and output to that model.
75
79
 
76
80
  ### 1. Database Conventions
77
81
 
78
- _"Before tables, let's align on conventions. Any preferences?"_
82
+ _"Which conventions already apply to the selected datastore, and which current data requirements need a decision?"_
79
83
 
80
84
  Collect:
81
85
 
82
86
  - **Identity strategy:** primary key, document ID, aggregate/stream ID, graph ID, or key format?
83
87
  - **Naming:** datastore-native naming for tables, collections, keys, node labels, streams, and fields?
84
- - **Audit/version metadata:** timestamps, version/revision, event metadata, or none?
88
+ - **Audit/version metadata:** only timestamps, revision, or event metadata required by current behavior, integrity, or audit obligations; otherwise none
85
89
  - **Deletion/retention:** hard delete, soft delete, tombstone, archival, compaction, or immutable events?
86
90
  - **Timestamp:** UTC or local timezone?
87
91
  - **Retention:** How long is data stored? Any anonymization or archival schedule?
@@ -125,7 +129,7 @@ Collect:
125
129
  - **Graph:** edge direction/cardinality and traversal boundaries
126
130
  - **Event store:** aggregate boundaries, stream correlation, projection consistency, and event evolution
127
131
  - **All modes:** delete/retention behavior and cross-structure consistency
128
- - Concurrency model: transaction boundary, optimistic version, lock/contention policy, duplicate update protection, or equivalent
132
+ - Actual conflicting-write and duplicate-effect risks; use native transaction/constraint guarantees first, adding version/lock policies only where necessary
129
133
 
130
134
  ### 5. Indexes & Performance
131
135
 
@@ -134,7 +138,7 @@ _"Which access patterns, filters, sorts, traversals, stream reads, or lookups mu
134
138
  Collect:
135
139
 
136
140
  - Required reads/writes and expected scale
137
- - Datastore-native indexes, projections, partitioning, traversal, or caching needed for those access patterns
141
+ - Datastore-native indexes needed for evidenced access patterns or integrity; projections, partitioning, and caching only for demonstrated needs
138
142
  - Consistency and latency expectations that constrain the design
139
143
  - Schema evolution: backward/forward compatibility, migration order, backfill, validation, rollback/roll-forward, and zero-downtime constraints when migrations apply
140
144
 
@@ -147,11 +151,7 @@ Adapt only sections that are applicable and preserve every required contract fro
147
151
  ## After schema.md Is Created
148
152
 
149
153
  1. Confirm the file was created successfully
150
- 2. Suggest the next workflow:
151
- 1. **`brainstorm-api`** ← endpoints next
152
- 2. `brainstorm-styleguide` → optional if scope includes UI
153
- 3. `brainstorm-rules` → coding standards
154
- 4. `brainstorm-task` → work plan
154
+ 2. Recommend one next step using the applicability-aware priority in `brainstorm-session.md`: applicable unfinished API, then in-scope UI, then rules after all applicable inputs, then tasks. For bounded updates, return approved scope, IDs, changed sections, and evidence freshness to the caller.
155
155
 
156
156
  ## Important Notes
157
157
 
@@ -1,5 +1,7 @@
1
1
  # Database Schema
2
2
 
3
+ > **Authoring note:** This is a placeholder menu, not a checklist to build. Keep entities, fields, indexes, and projections only for approved current requirements, integrity obligations, and actual access patterns. Prune inapplicable sections or mark `N/A` with a reason; unknown mandatory decisions remain open, not `N/A`. Reuse the approved datastore and native guarantees; no automatic soft delete, version/history, tenant columns, or future event store. New components need a current requirement, why simpler options fail, cost within scale/team/budget/operations constraints, and an escalation trigger. Critical depth deepens questions; preserve necessary integrity, concurrency, security, retention, and recovery protection.
4
+
3
5
  ## Document Role
4
6
 
5
7
  - **Source of Truth:** Data model and persistence contract
@@ -9,10 +11,10 @@
9
11
  ## Persistence Profile
10
12
 
11
13
  - **Model:** Relational / Document / Key-value / Graph / Event store / Mixed
12
- - **Identity Strategy:** [UUID / key format / aggregate ID / stream ID]
14
+ - **Identity Strategy:** [selected datastore-native identity justified by current needs]
13
15
  - **Naming:** [datastore-native naming rules]
14
- - **Audit / Version Metadata:** [timestamps/version/event metadata]
15
- - **Deletion / Retention:** [soft delete / archival / tombstone / immutable event / retention policy]
16
+ - **Audit / Version Metadata:** [only metadata required by current behavior, integrity, or audit obligations]
17
+ - **Deletion / Retention:** [required deletion and retention behavior; no automatic soft delete/history]
16
18
  - **Timezone:** [UTC/local/N/A]
17
19
 
18
20
  ## Entity / Storage Map
@@ -25,18 +27,18 @@
25
27
 
26
28
  | Structure/Field | Category | Protection | Retention | Notes |
27
29
  | --------------- | -------- | -------------------- | ---------------- | ------- |
28
- | [users.email] | PII | [encrypt/mask/plain] | [retention rule] | [notes] |
30
+ | [actual field] | [sensitivity] | [required protection] | [retention rule] | [notes] |
29
31
 
30
32
  ## Scale, Tenancy & Concurrency
31
33
 
32
34
  - **Expected Scale/Growth:** [records, payload, growth]
33
35
  - **Tenant Isolation:** [N/A or enforcement model]
34
- - **Concurrency Strategy:** [transaction/version/lock/idempotency]
36
+ - **Concurrency Strategy:** [actual conflicting-write/duplicate-effect risk and native guarantee; extra mechanisms only if needed]
35
37
 
36
38
  ## Schema Evolution & Migration
37
39
 
38
40
  - **Compatibility:** [backward/forward policy]
39
- - **Migration Order:** [expand/backfill/switch/contract or equivalent]
41
+ - **Migration Order:** [steps required for actual data and compatibility constraints]
40
42
  - **Backfill & Validation:** [strategy]
41
43
  - **Failure Recovery:** [rollback or roll-forward]
42
44
  - **Zero-Downtime Constraint:** [if applicable]
@@ -53,7 +55,6 @@
53
55
 
54
56
  | Column | Type | Nullable | Default | Constraint | Notes |
55
57
  | -------- | ------ | -------- | ----------------- | ------------ | ------- |
56
- | id | UUID | No | gen_random_uuid() | PRIMARY KEY | |
57
58
  | [column] | [type] | [Yes/No] | [default] | [constraint] | [notes] |
58
59
 
59
60
  **Relationships:**
@@ -62,7 +63,7 @@
62
63
 
63
64
  **Indexes:**
64
65
 
65
- - [column/index purpose]
66
+ - [column/index, actual access pattern or integrity requirement, expected scale]
66
67
 
67
68
  ---
68
69