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.
- package/.agents/macca-managed-skills.txt +17 -0
- package/.agents/skills/_shared/references/brainstorm-session.md +84 -0
- package/.agents/skills/_shared/references/human-loop.md +55 -0
- package/.agents/skills/_shared/references/output-ownership.md +31 -0
- package/.agents/skills/_shared/references/personas.md +39 -0
- package/.agents/skills/_shared/references/runtime-config.md +171 -0
- package/.agents/skills/_shared/references/scope-rules.md +55 -0
- package/.agents/skills/_shared/scripts/validate-skills.py +82 -0
- package/.agents/skills/add-feature/SKILL.md +190 -0
- package/.agents/skills/brainstorm-api/SKILL.md +313 -0
- package/.agents/skills/brainstorm-architecture/SKILL.md +302 -0
- package/.agents/skills/brainstorm-prd/SKILL.md +323 -0
- package/.agents/skills/brainstorm-rules/SKILL.md +302 -0
- package/.agents/skills/brainstorm-schema/SKILL.md +218 -0
- package/.agents/skills/brainstorm-styleguide/SKILL.md +273 -0
- package/.agents/skills/brainstorm-task/SKILL.md +279 -0
- package/.agents/skills/bug-fix/SKILL.md +352 -0
- package/.agents/skills/code-review/SKILL.md +100 -0
- package/.agents/skills/code-review/references/review-checklist.md +189 -0
- package/.agents/skills/developer/SKILL.md +117 -0
- package/.agents/skills/developer/references/execution-workflow.md +322 -0
- package/.agents/skills/help/SKILL.md +153 -0
- package/.agents/skills/rapat/SKILL.md +172 -0
- package/.agents/skills/spec-audit/SKILL.md +267 -0
- package/.agents/skills/spec-compliance/SKILL.md +303 -0
- package/.agents/skills/spec-init/SKILL.md +266 -0
- package/LICENSE +21 -0
- package/README.md +1129 -0
- package/bin/macca-method.js +651 -0
- package/package.json +35 -0
- package/skills-lock.json +22 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
_shared
|
|
2
|
+
add-feature
|
|
3
|
+
brainstorm-api
|
|
4
|
+
brainstorm-architecture
|
|
5
|
+
brainstorm-prd
|
|
6
|
+
brainstorm-rules
|
|
7
|
+
brainstorm-schema
|
|
8
|
+
brainstorm-styleguide
|
|
9
|
+
brainstorm-task
|
|
10
|
+
bug-fix
|
|
11
|
+
code-review
|
|
12
|
+
developer
|
|
13
|
+
help
|
|
14
|
+
rapat
|
|
15
|
+
spec-audit
|
|
16
|
+
spec-compliance
|
|
17
|
+
spec-init
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Brainstorm Session Policy
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
This file defines shared session behavior for all `brainstorm-*` skills.
|
|
6
|
+
|
|
7
|
+
The caller skill must read `runtime-config.md` before this file.
|
|
8
|
+
|
|
9
|
+
## Shared Preferences
|
|
10
|
+
|
|
11
|
+
Brainstorm skills may use `brainstormPreferences` in
|
|
12
|
+
`.agents/developer-config.json` to persist session behavior across sessions.
|
|
13
|
+
|
|
14
|
+
Currently supported fields:
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
{
|
|
18
|
+
"brainstormPreferences": {
|
|
19
|
+
"discussionMode": "one-by-one",
|
|
20
|
+
"recommendations": true
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Accepted `discussionMode` values: `"one-by-one"`, `"three-at-a-time"`, `"all-at-once"`.
|
|
26
|
+
|
|
27
|
+
## Interview Pace
|
|
28
|
+
|
|
29
|
+
Brainstorm skills may batch questions when the user explicitly wants faster progress. This is separate from approval gates in execution skills.
|
|
30
|
+
|
|
31
|
+
Allowed pace strategies:
|
|
32
|
+
|
|
33
|
+
- `one-by-one` — one topic per turn
|
|
34
|
+
- `three-at-a-time` — three topics in one message
|
|
35
|
+
- `all-at-once` — all topics in one message; the user answers all of them, then the AI writes the document
|
|
36
|
+
|
|
37
|
+
### Important Difference
|
|
38
|
+
|
|
39
|
+
- Interview pace is for discovery-heavy `brainstorm-*` workflows.
|
|
40
|
+
- Approval and risk confirmation in `developer`, `bug-fix`, `spec-init`, and similar skills must still stay limited to one decision topic per pause.
|
|
41
|
+
|
|
42
|
+
## Recommendations Toggle
|
|
43
|
+
|
|
44
|
+
Use `brainstormPreferences.recommendations` as a persistent preference:
|
|
45
|
+
|
|
46
|
+
- `true` — research first, then present recommendations with reasoning
|
|
47
|
+
- `false` — ask questions without recommendations
|
|
48
|
+
|
|
49
|
+
## Session Setup Rules
|
|
50
|
+
|
|
51
|
+
When a brainstorming skill starts:
|
|
52
|
+
|
|
53
|
+
1. Read `languagePreferences` via `runtime-config.md`.
|
|
54
|
+
2. Read `brainstormPreferences` if present.
|
|
55
|
+
3. **Announce the session** before asking anything:
|
|
56
|
+
- If preferences are already saved — show a short confirmation and allow changes:
|
|
57
|
+
```
|
|
58
|
+
This session has [N] topics.
|
|
59
|
+
Saved preferences: [pacing] | recommendations: [on/off]
|
|
60
|
+
Continue with these settings? Or type the changes you want.
|
|
61
|
+
```
|
|
62
|
+
- If no preferences are saved — ask both before starting:
|
|
63
|
+
```
|
|
64
|
+
This session has [N] topics. Two things before we start:
|
|
65
|
+
1. Pace: (A) one by one (B) three at a time (C) all at once
|
|
66
|
+
2. Answer recommendations: should the AI suggest answers for each question? (Y/N)
|
|
67
|
+
```
|
|
68
|
+
4. Save the chosen preferences. Preserve all unrelated config fields when writing the update.
|
|
69
|
+
|
|
70
|
+
## Recommended Prompt Patterns
|
|
71
|
+
|
|
72
|
+
For pace:
|
|
73
|
+
|
|
74
|
+
```text
|
|
75
|
+
This session has [N] topics. Do you want to discuss them one by one or three at a time?
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
For recommendations:
|
|
79
|
+
|
|
80
|
+
```text
|
|
81
|
+
Should I provide recommendations based on current best practices?
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Use brief questions. These settings should speed up the session, not add friction.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Human-in-the-Loop Policy
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
This file defines shared pause-and-confirm behavior across MACCA skills.
|
|
6
|
+
|
|
7
|
+
## Two Distinct Interaction Types
|
|
8
|
+
|
|
9
|
+
### 1. Interview Pace
|
|
10
|
+
|
|
11
|
+
Used by `brainstorm-*` skills to control how many discovery questions are asked per turn.
|
|
12
|
+
|
|
13
|
+
### 2. Confirmation Gates
|
|
14
|
+
|
|
15
|
+
Used by execution, audit, and bug-fix skills when a decision is risky, destructive, ambiguous, or materially changes scope.
|
|
16
|
+
|
|
17
|
+
Do not mix these two patterns.
|
|
18
|
+
|
|
19
|
+
## When Confirmation Is Required
|
|
20
|
+
|
|
21
|
+
Pause and ask before continuing when:
|
|
22
|
+
|
|
23
|
+
- there are multiple materially different paths and the spec does not resolve the choice
|
|
24
|
+
- the change is destructive or hard to undo
|
|
25
|
+
- the user's instruction is ambiguous in a way that changes scope or business behavior
|
|
26
|
+
- documents conflict and the conflict changes the next action
|
|
27
|
+
|
|
28
|
+
## When Confirmation Is Not Required
|
|
29
|
+
|
|
30
|
+
Continue without pausing when:
|
|
31
|
+
|
|
32
|
+
- the answer is already explicit in the spec or config
|
|
33
|
+
- the decision is a low-risk technical implementation detail
|
|
34
|
+
- the change is reversible and does not change business scope
|
|
35
|
+
|
|
36
|
+
## Shared Prompt Shape
|
|
37
|
+
|
|
38
|
+
Use this structure when a skill needs confirmation:
|
|
39
|
+
|
|
40
|
+
```text
|
|
41
|
+
I need confirmation before continuing.
|
|
42
|
+
|
|
43
|
+
[one brief summary of the issue]
|
|
44
|
+
|
|
45
|
+
Options:
|
|
46
|
+
1. [recommended default]
|
|
47
|
+
2. [alternative]
|
|
48
|
+
3. [other / explain]
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Keep one decision topic per pause.
|
|
52
|
+
|
|
53
|
+
## Resume Rule
|
|
54
|
+
|
|
55
|
+
After the user answers, continue from the exact paused step. Do not restart the workflow or ask for the same confirmation again unless the situation changes.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Output Ownership Matrix
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
This file defines which skill primarily owns each persistent output, so skills do not quietly compete to create the same artifact.
|
|
6
|
+
|
|
7
|
+
## Primary Owners
|
|
8
|
+
|
|
9
|
+
| Output | Primary Owner | Secondary / Limited Authors |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| `project-context/PRD.md` | `brainstorm-prd` | `add-feature`, `spec-init` |
|
|
12
|
+
| `project-context/architecture.md` | `brainstorm-architecture` | `add-feature`, `spec-init` |
|
|
13
|
+
| `project-context/schema.md` | `brainstorm-schema` | `add-feature`, `spec-init` |
|
|
14
|
+
| `project-context/api.md` | `brainstorm-api` | `add-feature`, `spec-init` |
|
|
15
|
+
| `project-context/StyleGuide.md` | `brainstorm-styleguide` | `add-feature`, `spec-init` |
|
|
16
|
+
| `project-context/rules.md` | `brainstorm-rules` | `add-feature`, `spec-init` |
|
|
17
|
+
| `project-context/Task.md` | `brainstorm-task` | `developer` only updates progress; `add-feature` must hand off to `brainstorm-task` |
|
|
18
|
+
| `project-context/bug-log.md` | `bug-fix` | none |
|
|
19
|
+
| `project-context/plans/*.md` | `developer` | `add-feature`, `code-review` limited updates per workflow |
|
|
20
|
+
|
|
21
|
+
## Ownership Rules
|
|
22
|
+
|
|
23
|
+
- `help` explains and routes. It does not create project spec files.
|
|
24
|
+
- `rapat` facilitates decisions and maps them to target artifacts. It does not replace the primary owner of spec files.
|
|
25
|
+
- `spec-audit` and `spec-compliance` report findings. They do not rewrite spec artifacts unless the user explicitly asks for follow-up fix work.
|
|
26
|
+
- `code-review` reports code issues. It does not own spec documents.
|
|
27
|
+
- `spec-init` is the bootstrap exception for existing codebases without specs.
|
|
28
|
+
|
|
29
|
+
## Drift Rule
|
|
30
|
+
|
|
31
|
+
If two skills appear to write the same artifact for the same purpose, prefer the primary owner and change the other skill to handoff or delta-update language only.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Persona Profiles
|
|
2
|
+
|
|
3
|
+
## Table of Contents
|
|
4
|
+
|
|
5
|
+
1. @Galbi
|
|
6
|
+
2. @Fachri
|
|
7
|
+
3. @Akram
|
|
8
|
+
4. @Firdaus
|
|
9
|
+
5. @Ikhsan
|
|
10
|
+
|
|
11
|
+
## @Galbi
|
|
12
|
+
|
|
13
|
+
- Role: Project Manager
|
|
14
|
+
- Tone: calm, guiding, structured
|
|
15
|
+
- Best for: status checks, next-step guidance, feature scope, task planning, meeting facilitation
|
|
16
|
+
|
|
17
|
+
## @Fachri
|
|
18
|
+
|
|
19
|
+
- Role: Tech Lead
|
|
20
|
+
- Tone: precise, analytical, high standard
|
|
21
|
+
- Best for: architecture, API/schema/rules design, spec consistency, implementation compliance, code review
|
|
22
|
+
|
|
23
|
+
## @Akram
|
|
24
|
+
|
|
25
|
+
- Role: UI/UX Designer
|
|
26
|
+
- Tone: design-focused, clarity first, consistency-minded
|
|
27
|
+
- Best for: style guides, interface systems, component appearance, accessibility-aware UI direction
|
|
28
|
+
|
|
29
|
+
## @Firdaus
|
|
30
|
+
|
|
31
|
+
- Role: Expert Developer
|
|
32
|
+
- Tone: pragmatic, implementation-focused, quality-conscious
|
|
33
|
+
- Best for: task execution, coding, behavior validation, spec integration
|
|
34
|
+
|
|
35
|
+
## @Ikhsan
|
|
36
|
+
|
|
37
|
+
- Role: Debugger
|
|
38
|
+
- Tone: systematic, patient, root-cause-focused
|
|
39
|
+
- Best for: bug reproduction, root-cause isolation, minimal fixes, regression prevention
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# Runtime Config Contract
|
|
2
|
+
|
|
3
|
+
## Table of Contents
|
|
4
|
+
|
|
5
|
+
1. Purpose
|
|
6
|
+
2. Required Read Order
|
|
7
|
+
3. Language Preferences
|
|
8
|
+
4. Stable Shared Fields
|
|
9
|
+
5. Fix Mode Contract
|
|
10
|
+
6. `additionalSkills` Compatibility
|
|
11
|
+
7. Mutation Rules
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
This file is the source of truth for how MACCA skills read and update `.agents/developer-config.json`.
|
|
16
|
+
|
|
17
|
+
Treat `developer-config.json` as a stable public contract. Do not make breaking schema changes that force existing users to edit the file manually after an upgrade.
|
|
18
|
+
|
|
19
|
+
## Required Read Order
|
|
20
|
+
|
|
21
|
+
Before any user-facing output or config mutation:
|
|
22
|
+
|
|
23
|
+
1. Read `.agents/developer-config.json` if it exists.
|
|
24
|
+
2. Preserve unknown fields when writing updates.
|
|
25
|
+
3. Merge changes into the existing object. Never replace the whole file unless the file does not exist yet.
|
|
26
|
+
|
|
27
|
+
## Language Preferences
|
|
28
|
+
|
|
29
|
+
Use this field if present:
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"languagePreferences": {
|
|
34
|
+
"communication": {
|
|
35
|
+
"raw": "Indonesian",
|
|
36
|
+
"normalized": "indonesian"
|
|
37
|
+
},
|
|
38
|
+
"documents": {
|
|
39
|
+
"raw": "Indonesian",
|
|
40
|
+
"normalized": "indonesian"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Accepted Compatibility Values
|
|
47
|
+
|
|
48
|
+
Readers must accept long and short normalized forms:
|
|
49
|
+
|
|
50
|
+
- Indonesian: `indonesian`, `id`
|
|
51
|
+
- English: `english`, `en`
|
|
52
|
+
|
|
53
|
+
Writers should preserve known values when possible. If a skill must write a new normalized value, use the installer's canonical form unless the installer is updated to a new canonical form first.
|
|
54
|
+
|
|
55
|
+
### Output Rules
|
|
56
|
+
|
|
57
|
+
- Use `languagePreferences.communication.normalized` for chat output, reports, prompts, and confirmations.
|
|
58
|
+
- Use `languagePreferences.documents.normalized` for generated project documents.
|
|
59
|
+
- Never translate file names, traceability IDs, config keys, or code literals.
|
|
60
|
+
|
|
61
|
+
## Stable Shared Fields
|
|
62
|
+
|
|
63
|
+
These fields are part of the stable contract and must remain backward compatible:
|
|
64
|
+
|
|
65
|
+
- `name`
|
|
66
|
+
- `project`
|
|
67
|
+
- `languagePreferences`
|
|
68
|
+
- `developerPreferences.workMode`
|
|
69
|
+
- `developerPreferences.scope`
|
|
70
|
+
- `brainstormPreferences`
|
|
71
|
+
- `additionalSkills`
|
|
72
|
+
- `availableMCPs`
|
|
73
|
+
- `codeReviewPreferences.fixMode`
|
|
74
|
+
|
|
75
|
+
## Fix Mode Contract
|
|
76
|
+
|
|
77
|
+
`codeReviewPreferences.fixMode` is a **binding setting for review/remediation skills**.
|
|
78
|
+
`developer`, `bug-fix`, `spec-compliance`, `code-review`, and `spec-audit` MUST follow this field before they fix findings or change files in a review/remediation workflow.
|
|
79
|
+
|
|
80
|
+
Brainstorming/document-generation skills such as `brainstorm-*`, `add-feature`, and `spec-init` are NOT required to use `fixMode`, because they do not run a report-findings-then-fix workflow.
|
|
81
|
+
|
|
82
|
+
### Read and Announce at Startup
|
|
83
|
+
|
|
84
|
+
Every covered review/remediation skill must read `fixMode` during Shared Runtime Setup — **before any analysis or action begins**:
|
|
85
|
+
|
|
86
|
+
1. Read `codeReviewPreferences.fixMode` from `developer-config.json`.
|
|
87
|
+
2. If it is missing, treat it as `"report-first"` — do not ask the user.
|
|
88
|
+
3. Announce it at the top of the output: `[Fix mode: report-first]` or `[Fix mode: fix-then-report]`.
|
|
89
|
+
|
|
90
|
+
### Values
|
|
91
|
+
|
|
92
|
+
| Value | Behavior |
|
|
93
|
+
|-------|----------|
|
|
94
|
+
| `"report-first"` | **Default.** Run all analysis. Present the full findings report. Show the gate prompt below. **End the response.** Wait for user confirmation in the next message before touching any files. |
|
|
95
|
+
| `"fix-then-report"` | Automatically apply BLOCKER/MAJOR fixes. Present the full report at the end. |
|
|
96
|
+
|
|
97
|
+
### Required Gate Prompt (`report-first` only)
|
|
98
|
+
|
|
99
|
+
After presenting all findings, the skill must display this block **verbatim**, then **end the response immediately**:
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
---
|
|
103
|
+
[GATE — Fix mode: report-first]
|
|
104
|
+
All findings have been reported. No files were changed.
|
|
105
|
+
Reply "yes" / "fix" / "continue" to apply all fixes,
|
|
106
|
+
or name which findings you want to fix.
|
|
107
|
+
---
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**Critical rule:** DO NOT apply any fixes, edit any files, run any sub-skill, or add follow-up text in the same response. The response ends at the gate prompt. Act only after the user's next message confirms.
|
|
111
|
+
|
|
112
|
+
### Default
|
|
113
|
+
|
|
114
|
+
If `codeReviewPreferences.fixMode` is missing from `developer-config.json`, always treat it as `"report-first"`. Do not ask the user — just use the default and announce it.
|
|
115
|
+
|
|
116
|
+
## `additionalSkills` Compatibility
|
|
117
|
+
|
|
118
|
+
> **Internal contract only.** These forms exist for backward compatibility across different AI hosts (Copilot, OpenCode, Codex, etc.), each of which stores skill files in different paths. Users do not choose the form — skills always write the canonical extensible form when saving. Readers must tolerate all three forms.
|
|
119
|
+
|
|
120
|
+
Readers must support all of these forms:
|
|
121
|
+
|
|
122
|
+
### Legacy Single-Path Form
|
|
123
|
+
|
|
124
|
+
```json
|
|
125
|
+
{
|
|
126
|
+
"name": "frontend-react-best-practices",
|
|
127
|
+
"path": ".agents/skills/frontend-react-best-practices/SKILL.md",
|
|
128
|
+
"purpose": "Use when working on React UI code."
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Legacy Host-Specific Form
|
|
133
|
+
|
|
134
|
+
```json
|
|
135
|
+
{
|
|
136
|
+
"name": "frontend-react-best-practices",
|
|
137
|
+
"opencodePath": ".opencode/skill/frontend-react-best-practices/SKILL.md",
|
|
138
|
+
"githubPath": ".github/skills/frontend-react-best-practices/SKILL.md",
|
|
139
|
+
"purpose": "Use when working on React UI code."
|
|
140
|
+
}
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Canonical Extensible Form
|
|
144
|
+
|
|
145
|
+
```json
|
|
146
|
+
{
|
|
147
|
+
"name": "frontend-react-best-practices",
|
|
148
|
+
"purpose": "Use when working on React UI code.",
|
|
149
|
+
"paths": {
|
|
150
|
+
"copilot": ".github/skills/frontend-react-best-practices/SKILL.md",
|
|
151
|
+
"opencode": ".opencode/skill/frontend-react-best-practices/SKILL.md",
|
|
152
|
+
"codex": ".agents/skills/frontend-react-best-practices/SKILL.md"
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Read Fallback Order
|
|
158
|
+
|
|
159
|
+
When selecting a skill path for the current host, use this order:
|
|
160
|
+
|
|
161
|
+
1. `paths[currentHost]`
|
|
162
|
+
2. `path`
|
|
163
|
+
3. legacy host-specific fields such as `githubPath`, `opencodePath`, `claudePath`, `cursorPath`, `windsurfPath`, `geminiPath`, `kiloPath`, `kimiPath`, `codexPath`
|
|
164
|
+
|
|
165
|
+
Do not remove legacy fields during unrelated updates.
|
|
166
|
+
|
|
167
|
+
## Mutation Rules
|
|
168
|
+
|
|
169
|
+
- Additive changes only by default.
|
|
170
|
+
- Do not silently rename or repurpose existing keys.
|
|
171
|
+
- If a future migration is unavoidable, skills must remain tolerant readers until upgrade tooling can migrate old configs automatically.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Work Scope Rules
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
This file defines how skills must adjust documents, recommendations, and work bounds based on `developerPreferences.scope` in `.agents/developer-config.json`.
|
|
6
|
+
|
|
7
|
+
## Scope Values
|
|
8
|
+
|
|
9
|
+
- `frontend`
|
|
10
|
+
- `backend`
|
|
11
|
+
- `fullstack`
|
|
12
|
+
- *(missing)* → treat as `fullstack`
|
|
13
|
+
|
|
14
|
+
## General Rules
|
|
15
|
+
|
|
16
|
+
Skills that affect planning, workflow recommendations, or implementation MUST read `developerPreferences.scope` if the config file exists.
|
|
17
|
+
|
|
18
|
+
- `frontend` → focus on UI, pages, components, state, styling, client-side validation, and API contracts from the consumer perspective.
|
|
19
|
+
- `backend` → focus on API implementation, business rules, auth, services/repositories, database, and API contracts from the provider perspective.
|
|
20
|
+
- `fullstack` → cover all areas.
|
|
21
|
+
|
|
22
|
+
## Frontend Scope
|
|
23
|
+
|
|
24
|
+
If scope = `frontend`:
|
|
25
|
+
|
|
26
|
+
- MUST NOT generate `schema.md`
|
|
27
|
+
- MUST NOT define controllers, services, DB queries, migrations, or backend internals
|
|
28
|
+
- `api.md` may be created, but only as a **consumer contract**
|
|
29
|
+
- `StyleGuide.md` remains relevant
|
|
30
|
+
- `Task.md` contains frontend tasks only
|
|
31
|
+
- If the backend is not ready, mark dependencies as `proposed`, `backend-owned`, `mock-only`, or `pending backend confirmation`
|
|
32
|
+
|
|
33
|
+
## Backend Scope
|
|
34
|
+
|
|
35
|
+
If scope = `backend`:
|
|
36
|
+
|
|
37
|
+
- MUST NOT generate `StyleGuide.md`
|
|
38
|
+
- MUST NOT define components, styling, or detailed UI behavior
|
|
39
|
+
- `api.md` is created as a **provider contract**
|
|
40
|
+
- `schema.md` remains relevant
|
|
41
|
+
- `Task.md` contains backend tasks only
|
|
42
|
+
|
|
43
|
+
## Fullstack Scope
|
|
44
|
+
|
|
45
|
+
If scope = `fullstack`:
|
|
46
|
+
|
|
47
|
+
- All documents and work areas may be covered
|
|
48
|
+
|
|
49
|
+
## If a Skill Is Called Outside Scope
|
|
50
|
+
|
|
51
|
+
If a skill is fully outside the user's scope:
|
|
52
|
+
|
|
53
|
+
- Explain that the area is outside the current work scope
|
|
54
|
+
- Do not generate documents or tasks in that area
|
|
55
|
+
- If needed, point only to dependency contracts, not implementation details
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import re
|
|
6
|
+
import sys
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
ROOT = Path(__file__).resolve().parents[4]
|
|
11
|
+
SKILLS_DIR = ROOT / ".agents" / "skills"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def read(path: Path) -> str:
|
|
15
|
+
return path.read_text(encoding="utf-8")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def has_toc(text: str) -> bool:
|
|
19
|
+
return "## Daftar Isi" in text or "## Table of Contents" in text
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def check_skill_file(path: Path) -> list[str]:
|
|
23
|
+
issues: list[str] = []
|
|
24
|
+
text = read(path)
|
|
25
|
+
lines = text.splitlines()
|
|
26
|
+
|
|
27
|
+
if len(lines) > 500:
|
|
28
|
+
issues.append(f"{path}: more than 500 lines ({len(lines)})")
|
|
29
|
+
|
|
30
|
+
if "<SECURITY_REVIEW>" in text:
|
|
31
|
+
issues.append(f"{path}: <SECURITY_REVIEW> placeholder was not replaced")
|
|
32
|
+
|
|
33
|
+
if re.search(r"^```markdown\s*$", text, re.MULTILINE) and re.search(
|
|
34
|
+
r"^```(?:json|text|typescript|bash)\s*$", text, re.MULTILINE
|
|
35
|
+
):
|
|
36
|
+
issues.append(
|
|
37
|
+
f"{path}: possible broken nested fence; check and use 4 backticks for the outer template"
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
return issues
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def check_reference_file(path: Path) -> list[str]:
|
|
44
|
+
issues: list[str] = []
|
|
45
|
+
text = read(path)
|
|
46
|
+
lines = text.splitlines()
|
|
47
|
+
|
|
48
|
+
if len(lines) > 100 and not has_toc(text):
|
|
49
|
+
issues.append(f"{path}: reference file >100 lines without a table of contents")
|
|
50
|
+
|
|
51
|
+
if (
|
|
52
|
+
"Baca `../references/runtime-config.md`" in text
|
|
53
|
+
or "Read `../references/runtime-config.md`" in text
|
|
54
|
+
):
|
|
55
|
+
issues.append(
|
|
56
|
+
f"{path}: chained reference to runtime-config; caller skill should read shared refs directly"
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
return issues
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def main() -> int:
|
|
63
|
+
issues: list[str] = []
|
|
64
|
+
|
|
65
|
+
for skill_md in SKILLS_DIR.glob("**/SKILL.md"):
|
|
66
|
+
issues.extend(check_skill_file(skill_md))
|
|
67
|
+
|
|
68
|
+
for ref in SKILLS_DIR.glob("**/references/*.md"):
|
|
69
|
+
issues.extend(check_reference_file(ref))
|
|
70
|
+
|
|
71
|
+
if not issues:
|
|
72
|
+
print("OK: no skill authoring issues detected")
|
|
73
|
+
return 0
|
|
74
|
+
|
|
75
|
+
print("Skill validator findings:")
|
|
76
|
+
for issue in issues:
|
|
77
|
+
print(f"- {issue}")
|
|
78
|
+
return 1
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
if __name__ == "__main__":
|
|
82
|
+
sys.exit(main())
|