bigpowers 2.1.3 → 2.2.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.
@@ -161,4 +161,7 @@ if [[ -f "$manifest" ]]; then
161
161
  fi
162
162
  fi
163
163
 
164
+ # Regenerate derived reference tables from live SKILL.md frontmatter
165
+ bash "$REPO_ROOT/scripts/generate-reference-tables.sh"
166
+
164
167
  exit 0
@@ -0,0 +1,128 @@
1
+ #!/usr/bin/env bash
2
+ # Doctrine drift guard — fails CI if any tracked invariants regress.
3
+ # Run after sync-skills.sh and before merging any branch.
4
+ # Extended by each epic: add new assertions below the relevant section header.
5
+ set -euo pipefail
6
+
7
+ REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
8
+ cd "$REPO_ROOT"
9
+
10
+ ERRORS=0
11
+
12
+ fail() {
13
+ echo "FAIL: $*" >&2
14
+ ERRORS=$((ERRORS + 1))
15
+ }
16
+
17
+ pass() {
18
+ echo "ok : $*"
19
+ }
20
+
21
+ # ── Epic 1: Dead skill names in model-profiles.md ─────────────────────────────
22
+ # Scope: model-profiles.md is the canonical skill-roster reference.
23
+ # Other docs may legitimately reference npm tools or conceptual names.
24
+ echo "--- [Epic 1] dead skill names in docs/references/model-profiles.md ---"
25
+ DEAD=()
26
+ while IFS= read -r name; do
27
+ if [[ ! -d "$name" ]]; then
28
+ DEAD+=("$name")
29
+ fi
30
+ done < <(grep -oE '`[a-z][a-z-]+`' docs/references/model-profiles.md \
31
+ | tr -d '`' \
32
+ | grep -E '^[a-z]+-[a-z]+(-[a-z]+)?$' \
33
+ | sort -u)
34
+
35
+ if [[ ${#DEAD[@]} -eq 0 ]]; then
36
+ pass "all skill names in model-profiles.md resolve to real directories"
37
+ else
38
+ for name in "${DEAD[@]}"; do
39
+ fail "dead skill name in model-profiles.md: '$name' has no matching directory"
40
+ done
41
+ fi
42
+
43
+ # ── Epic 1: Legacy MD artifact names in docs/ (excluding historical file-structure/) ──
44
+ # docs/file-structure/ is intentional historical comparison material (Epic 6 archives it).
45
+ echo "--- [Epic 1] legacy MD artifact names in docs/ ---"
46
+ LEGACY_HITS=$(grep -rE "PLAN\.md|STATE\.md|PROJECT\.md|CONTEXT\.md|SUMMARY\.md|VERIFICATION\.md|RESEARCH\.md|RELEASE-PLAN\.md" \
47
+ docs/ 2>/dev/null \
48
+ | grep -v "docs/file-structure/" \
49
+ | grep -v "docs/report-gsd-integration.md" \
50
+ | grep -v "specs/archive" \
51
+ | wc -l | tr -d ' ') || true
52
+ if [[ "$LEGACY_HITS" -eq 0 ]]; then
53
+ pass "no legacy MD artifact names in docs/ (outside file-structure/)"
54
+ else
55
+ fail "legacy MD artifact names found in docs/ ($LEGACY_HITS occurrences)"
56
+ grep -rE "PLAN\.md|STATE\.md|PROJECT\.md|CONTEXT\.md|SUMMARY\.md|VERIFICATION\.md|RESEARCH\.md|RELEASE-PLAN\.md" \
57
+ docs/ 2>/dev/null \
58
+ | grep -v "docs/file-structure/" \
59
+ | grep -v "docs/report-gsd-integration.md" \
60
+ | grep -v "specs/archive" | head -20 >&2
61
+ fi
62
+
63
+ # ── Epic 1: Skill count consistency ───────────────────────────────────────────
64
+ echo "--- [Epic 1] skill count consistency ---"
65
+ LIVE_COUNT=$(ls -d */SKILL.md 2>/dev/null | wc -l | tr -d ' ')
66
+ STALE_COUNT_HITS=$(grep -rE "expect [0-9]+" docs/ 2>/dev/null \
67
+ | grep -v "expect $LIVE_COUNT" | wc -l | tr -d ' ') || true
68
+ if [[ "$STALE_COUNT_HITS" -eq 0 ]]; then
69
+ pass "skill count annotations match live count ($LIVE_COUNT)"
70
+ else
71
+ fail "stale skill count annotation in docs/ (live=$LIVE_COUNT, $STALE_COUNT_HITS mismatches)"
72
+ grep -rE "expect [0-9]+" docs/ 2>/dev/null | grep -v "expect $LIVE_COUNT" >&2
73
+ fi
74
+
75
+ # ── Epic 2: Non-canonical specs/ subpaths ─────────────────────────────────────
76
+ # Exclusions: specs/archive, specs/epics/archive, CHANGELOG.md (auto-gen),
77
+ # specs/verifications/reports/ (generated reports), PLAN-evolve-structure.md
78
+ # (migration plan that documents the before→after paths as historical record).
79
+ echo "--- [Epic 2] canonical specs/ subpaths ---"
80
+ LEGACY_SPECS=$(grep -rE "specs/(requirements|plans|audit)\b" \
81
+ --include="*.md" --include="*.sh" --include="*.yaml" --include="*.yml" --include="*.json" . \
82
+ 2>/dev/null \
83
+ | grep -v "specs/archive\|specs/epics/archive\|\.git\|node_modules\|\.gemini\|\.cursor" \
84
+ | grep -v "CHANGELOG\.md\|specs/verifications/reports/\|PLAN-evolve-structure\.md" \
85
+ | wc -l | tr -d ' ') || true
86
+ if [[ "$LEGACY_SPECS" -eq 0 ]]; then
87
+ pass "no legacy specs/ subpaths (requirements/, plans/, audit/)"
88
+ else
89
+ fail "legacy specs/ subpaths found ($LEGACY_SPECS occurrences)"
90
+ grep -rE "specs/(requirements|plans|audit)\b" \
91
+ --include="*.md" --include="*.sh" --include="*.yaml" --include="*.yml" --include="*.json" . \
92
+ 2>/dev/null \
93
+ | grep -v "specs/archive\|specs/epics/archive\|\.git\|node_modules\|\.gemini\|\.cursor" \
94
+ | grep -v "CHANGELOG\.md\|specs/verifications/reports/\|PLAN-evolve-structure\.md" \
95
+ | head -10 >&2
96
+ fi
97
+
98
+ # ── Epic 3: BCP slop guard ────────────────────────────────────────────────────
99
+ echo "--- [Epic 3] BCP terminology ---"
100
+ BCP_SLOP=$(grep -ri "build commit point" . 2>/dev/null \
101
+ | grep -v "specs/archive\|\.git\|node_modules\|\.gemini\|\.cursor\|validate-doctrine\.sh" \
102
+ | wc -l | tr -d ' ') || true
103
+ if [[ "$BCP_SLOP" -eq 0 ]]; then
104
+ pass "no 'Build Commit Point' slop — BCP = Business Complexity Points"
105
+ else
106
+ fail "'Build Commit Point' found ($BCP_SLOP hits) — canonical term is 'Business Complexity Points'; see docs/references/bcp.md"
107
+ grep -ri "build commit point" . 2>/dev/null \
108
+ | grep -v "specs/archive\|\.git\|node_modules\|\.gemini\|\.cursor\|validate-doctrine\.sh" | head -5 >&2
109
+ fi
110
+
111
+ # ── Epic 4: SKILL.md size cap ─────────────────────────────────────────────────
112
+ echo "--- [Epic 4] SKILL.md size cap ---"
113
+ if bash "$REPO_ROOT/scripts/check-skill-size.sh" >/dev/null 2>&1; then
114
+ pass "all SKILL.md files within tiered size cap (150 critical-path / 120 utility)"
115
+ else
116
+ fail "a SKILL.md exceeds its size cap — run: bash scripts/check-skill-size.sh"
117
+ bash "$REPO_ROOT/scripts/check-skill-size.sh" 2>&1 | grep "^FAIL:" >&2 || true
118
+ fi
119
+
120
+ # ── Summary ────────────────────────────────────────────────────────────────────
121
+ echo "---"
122
+ if [[ "$ERRORS" -eq 0 ]]; then
123
+ echo "validate-doctrine: ALL checks passed"
124
+ exit 0
125
+ else
126
+ echo "validate-doctrine: $ERRORS check(s) FAILED" >&2
127
+ exit 1
128
+ fi
@@ -0,0 +1,63 @@
1
+ # Seed Conventions — Reference Templates
2
+
3
+ ## Agent config template (CLAUDE.md / GEMINI.md / AGENTS.md)
4
+
5
+ All three files use the same structure — only the header differs:
6
+ - `CLAUDE.md` → `# [Project Name] — Claude Code`
7
+ - `GEMINI.md` → `# [Project Name] — Gemini CLI`
8
+ - `AGENTS.md` → `# [Project Name] — OpenCode`
9
+
10
+ ```markdown
11
+ # [Project Name] — [Agent]
12
+
13
+ Read CONVENTIONS.md before any GitHub or git operation.
14
+
15
+ ## Project
16
+ [One sentence description]
17
+ Stack: [language, framework, runtime]
18
+
19
+ ## Commands
20
+ | Action | Command |
21
+ |--------|---------|
22
+ | Run | `[cmd]` |
23
+ | Test | `[cmd]` |
24
+ | Build | `[cmd]` |
25
+ | Lint | `[cmd]` |
26
+
27
+ ## Architecture
28
+ [1–2 sentences. Key modules and their relationships.]
29
+
30
+ ## Conventions
31
+ - [convention 1]
32
+ - [convention 2]
33
+
34
+ ## Never
35
+ - [hard stop 1]
36
+ - [hard stop 2]
37
+
38
+ ## Agent Rules
39
+ - **Workflow Mandate:** You MUST use the bigpowers skills (e.g. `plan-work`, `develop-tdd`, `orchestrate-project`) to perform tasks. DO NOT write code directly in response to a user prompt like "build this feature".
40
+ - Read specs/ before writing code.
41
+ - All planning and specifications MUST be written to `specs/` (`product/SCOPE_LATEST.yaml`, `release-plan.yaml`, `epics/`) before any code is generated.
42
+ - Write the minimum code that solves the stated problem. Nothing extra.
43
+ - Never refactor, rename, or reorganize code outside the task scope.
44
+ - Run tests after every change. Show evidence before declaring done.
45
+ - One clarifying question beats a wrong assumption baked into 200 lines.
46
+ ```
47
+
48
+ ## opencode.json template
49
+
50
+ ```json
51
+ {
52
+ "$schema": "https://opencode.ai/config.json",
53
+ "instructions": [".cursor/rules/*.mdc"]
54
+ }
55
+ ```
56
+
57
+ ## CONVENTIONS.md
58
+
59
+ Use the standard bigpowers CONVENTIONS.md as the base. Fill in the project-specific defensive code categories from the interview answers.
60
+
61
+ ## Stack profile fragments
62
+
63
+ If the user selected a stack profile, merge the matching `profiles/<name>.md` fragment into the generated `CONVENTIONS.md` under a `## Stack Conventions` section. Profiles supply language-specific commands, architecture patterns, and never-do additions.
@@ -5,8 +5,7 @@ description: Generate CLAUDE.md and CONVENTIONS.md for a brand-new project throu
5
5
  ---
6
6
 
7
7
  # Seed Conventions
8
- > **HARD GATE** — **HARD GATE** — Before any new code lands, confirm the project conventions are understood. Ask: 'What does a good commit message look like in this project?'
9
-
8
+ > **HARD GATE** — Before any new code lands, confirm the project conventions are understood. Ask: 'What does a good commit message look like in this project?'
10
9
 
11
10
  Bootstrap a new project with the AI agent conventions it needs. Run this once at the start of a greenfield project.
12
11
 
@@ -23,196 +22,41 @@ Bootstrap a new project with the AI agent conventions it needs. Run this once at
23
22
  Ask the user these questions (one at a time, wait for each answer):
24
23
 
25
24
  1. **Project name and one-sentence description** — "What is this project? One sentence."
26
-
27
25
  2. **Stack** — "What language, framework, and runtime? (e.g. TypeScript / Next.js / Node 22)"
28
-
29
- 2b. **Stack profile (optional)** — Offer: `swift`, `typescript-vue`, `node-service`, or none. If chosen, merge the matching fragment from `profiles/<name>.md` into generated `CONVENTIONS.md` (commands, architecture, never-do).
30
-
31
- 3. **Commands** — "What commands do you use for: run, test, build, lint? I'll document them so agents know how to verify their work."
32
-
33
- 4. **Architecture** — "Describe the key modules and their relationships in 1–2 sentences. What are the main moving parts?"
34
-
35
- 5. **Conventions** — "Any naming conventions, file organization rules, or patterns that every contributor (human or agent) must follow?"
36
-
37
- 6. **Never-do list** — "What are the hard stops? Things an agent must never touch or do in this project?"
38
-
39
- 7. **Defensive code categories** — "Which of these apply to your project? (Rate limit / Retry with backoff / Circuit breaker / Timeout / Graceful degradation)"
26
+ 2b. **Stack profile (optional)** — Offer: `swift`, `typescript-vue`, `node-service`, or none. If chosen, merge the matching fragment from `profiles/<name>.md` into generated `CONVENTIONS.md`.
27
+ 3. **Commands** — "What commands do you use for: run, test, build, lint?"
28
+ 4. **Architecture** — "Key modules and relationships in 1–2 sentences."
29
+ 5. **Conventions** — "Any naming, file organization, or patterns all agents must follow?"
30
+ 6. **Never-do list** — "What are the hard stops? Things an agent must never touch?"
31
+ 7. **Defensive code categories** — "Which apply? (Rate limit / Retry / Circuit breaker / Timeout / Graceful degradation)"
40
32
 
41
33
  ## Generate files
42
34
 
43
- After the interview, generate:
44
-
45
- ### `CLAUDE.md`
46
-
47
- ```markdown
48
- # [Project Name] — Claude Code
49
-
50
- Read CONVENTIONS.md before any GitHub or git operation.
51
-
52
- ## Project
53
- [One sentence description]
54
- Stack: [language, framework, runtime]
55
-
56
- ## Commands
57
- | Action | Command |
58
- |--------|---------|
59
- | Run | `[cmd]` |
60
- | Test | `[cmd]` |
61
- | Build | `[cmd]` |
62
- | Lint | `[cmd]` |
63
-
64
- ## Architecture
65
- [1–2 sentences. Key modules and their relationships.]
66
-
67
- ## Conventions
68
- - [convention 1]
69
- - [convention 2]
70
-
71
- ## Never
72
- - [hard stop 1]
73
- - [hard stop 2]
74
-
75
- ## Agent Rules
76
- - **Workflow Mandate:** You MUST use the bigpowers skills (e.g. `plan-work`, `develop-tdd`, `orchestrate-project`) to perform tasks. DO NOT write code directly in response to a user prompt like "build this feature".
77
- - Read specs/ before writing code.
78
- - All planning and specifications MUST be written to `specs/` (`product/SCOPE_LATEST.yaml`, `release-plan.yaml`, `epics/`) before any code is generated.
79
- - Write the minimum code that solves the stated problem. Nothing extra.
80
- - Never refactor, rename, or reorganize code outside the task scope.
81
- - Run tests after every change. Show evidence before declaring done.
82
- - One clarifying question beats a wrong assumption baked into 200 lines.
83
- ```
84
-
85
- ### `GEMINI.md`
86
-
87
- ```markdown
88
- # [Project Name] — Gemini CLI
89
-
90
- Read CONVENTIONS.md before any GitHub or git operation.
91
-
92
- ## Project
93
- [One sentence description]
94
- Stack: [language, framework, runtime]
95
-
96
- ## Commands
97
- | Action | Command |
98
- |--------|---------|
99
- | Run | `[cmd]` |
100
- | Test | `[cmd]` |
101
- | Build | `[cmd]` |
102
- | Lint | `[cmd]` |
103
-
104
- ## Architecture
105
- [1–2 sentences. Key modules and their relationships.]
106
-
107
- ## Conventions
108
- - [convention 1]
109
- - [convention 2]
110
-
111
- ## Never
112
- - [hard stop 1]
113
- - [hard stop 2]
114
-
115
- ## Agent Rules
116
- - **Workflow Mandate:** You MUST use the bigpowers skills (e.g. `plan-work`, `develop-tdd`, `orchestrate-project`) to perform tasks. DO NOT write code directly in response to a user prompt like "build this feature".
117
- - Read specs/ before writing code.
118
- - All planning and specifications MUST be written to `specs/` (`product/SCOPE_LATEST.yaml`, `release-plan.yaml`, `epics/`) before any code is generated.
119
- - Write the minimum code that solves the stated problem. Nothing extra.
120
- - Never refactor, rename, or reorganize code outside the task scope.
121
- - Run tests after every change. Show evidence before declaring done.
122
- - One clarifying question beats a wrong assumption baked into 200 lines.
123
- ```
124
-
125
- ### `AGENTS.md`
126
-
127
- ```markdown
128
- # [Project Name] — OpenCode
129
-
130
- Read CONVENTIONS.md before any GitHub or git operation.
131
-
132
- ## Project
133
- [One sentence description]
134
- Stack: [language, framework, runtime]
135
-
136
- ## Commands
137
- | Action | Command |
138
- |--------|---------|
139
- | Run | `[cmd]` |
140
- | Test | `[cmd]` |
141
- | Build | `[cmd]` |
142
- | Lint | `[cmd]` |
143
-
144
- ## Architecture
145
- [1–2 sentences. Key modules and their relationships.]
146
-
147
- ## Conventions
148
- - [convention 1]
149
- - [convention 2]
150
-
151
- ## Never
152
- - [hard stop 1]
153
- - [hard stop 2]
154
-
155
- ## Agent Rules
156
- - **Workflow Mandate:** You MUST use the bigpowers skills (e.g. `plan-work`, `develop-tdd`, `orchestrate-project`) to perform tasks. DO NOT write code directly in response to a user prompt like "build this feature".
157
- - Read specs/ before writing code.
158
- - All planning and specifications MUST be written to `specs/` (`product/SCOPE_LATEST.yaml`, `release-plan.yaml`, `epics/`) before any code is generated.
159
- - Write the minimum code that solves the stated problem. Nothing extra.
160
- - Never refactor, rename, or reorganize code outside the task scope.
161
- - Run tests after every change. Show evidence before declaring done.
162
- - One clarifying question beats a wrong assumption baked into 200 lines.
163
- ```
164
-
165
- ### `opencode.json`
166
-
167
- ```json
168
- {
169
- "$schema": "https://opencode.ai/config.json",
170
- "instructions": [".cursor/rules/*.mdc"]
171
- }
172
- ```
173
-
174
- ### `CONVENTIONS.md`
175
-
176
- Use the standard bigpowers CONVENTIONS.md template, filling in the project-specific defensive code categories from the interview.
35
+ After the interview, generate each file using the templates in [REFERENCE.md](REFERENCE.md):
36
+ - `CLAUDE.md`, `GEMINI.md`, `AGENTS.md` — from the agent-config template
37
+ - `opencode.json` — from the opencode template
38
+ - `CONVENTIONS.md` — bigpowers standard template + project defensive code categories
177
39
 
178
40
  ### `specs/` directory
179
41
 
180
- Create the evolved bigpowers directory structure:
181
-
182
42
  ```bash
183
- mkdir -p specs/product
184
- mkdir -p specs/product/snapshots
185
- mkdir -p specs/epics/archive
186
- mkdir -p specs/tech-architecture
187
- mkdir -p specs/adr
188
- mkdir -p specs/verifications
189
- mkdir -p specs/bugs
190
-
191
- # Create empty placeholder files
192
- touch specs/product/SCOPE_LATEST.yaml
193
- touch specs/product/VISION_LATEST.yaml
194
- touch specs/product/GLOSSARY_LATEST.yaml
195
- touch specs/release-plan.yaml
196
- touch specs/execution-status.yaml
197
- touch specs/planning-status.yaml
198
- touch specs/state.yaml
199
- touch specs/tech-architecture/tech-stack.md
200
- touch specs/tech-architecture/security.md
201
- touch specs/tech-architecture/test.md
202
- touch specs/tech-architecture/design.md
203
- touch specs/tech-architecture/REFACTOR_LATEST.md
204
- touch specs/tech-architecture/IMPACT_LATEST.md
43
+ mkdir -p specs/product specs/product/snapshots specs/epics/archive
44
+ mkdir -p specs/tech-architecture specs/adr specs/verifications specs/bugs
45
+ touch specs/product/SCOPE_LATEST.yaml specs/product/VISION_LATEST.yaml specs/product/GLOSSARY_LATEST.yaml
46
+ touch specs/release-plan.yaml specs/execution-status.yaml specs/planning-status.yaml specs/state.yaml
47
+ touch specs/tech-architecture/tech-stack.md specs/tech-architecture/security.md
48
+ touch specs/tech-architecture/test.md specs/tech-architecture/design.md
49
+ touch specs/tech-architecture/REFACTOR_LATEST.md specs/tech-architecture/IMPACT_LATEST.md
205
50
  touch specs/bugs/registry.yaml
206
- echo "# Specs\n\nAll planning documents for this project. Evolved bigpowers structure (v2.0.0+)." > specs/README.md
51
+ echo "# Specs\n\nAll planning documents for this project." > specs/README.md
207
52
  ```
208
53
 
209
- **Note:** `specs/state.yaml.lock` is NOT pre-created — it is acquired and released dynamically during writes to prevent concurrency conflicts.
54
+ **Note:** `specs/state.yaml.lock` is NOT pre-created — acquired/released dynamically.
210
55
 
211
- ### Verify
56
+ ## Verify
212
57
 
213
58
  - [ ] CLAUDE.md exists and is populated
214
59
  - [ ] CONVENTIONS.md exists and includes specs/ output convention
215
- - [ ] specs/ directory exists
216
60
  - [ ] specs/product/ exists with SCOPE_LATEST.yaml, VISION_LATEST.yaml, GLOSSARY_LATEST.yaml
217
61
  - [ ] specs/tech-architecture/ exists with tech-stack.md, security.md, test.md, design.md
218
62
  - [ ] specs/verifications/ exists
@@ -16,7 +16,7 @@ Create high-signal technical documentation that serves as an expert collaborator
16
16
  | :--- | :--- |
17
17
  | **B**old | Make strong assertions. Define clear boundaries and "Never" rules. No "it might" or "usually." |
18
18
  | **M**inimal | High-density, low-filler. **Circuit Breaker**: If the file exceeds 300 lines or the session exceeds 20 turns, you MUST run `terse-mode` and compact state before saving. |
19
- | **A**ctionable | Link every doc to a verifiable outcome. **Architectural Docs**: Verify via Gherkin features (`specs/audit/features/`) or grep-based structure checks (`grep -c "pattern" file`) that prove the design's *constraints* are present. |
19
+ | **A**ctionable | Link every doc to a verifiable outcome. **Architectural Docs**: Verify via Gherkin features (`specs/verifications/features/`) or grep-based structure checks (`grep -c "pattern" file`) that prove the design's *constraints* are present. |
20
20
  | **D**urable | Design for the long-term. **Scalability**: Use "Nested Indexing"—root files link to module-level `GEMINI.md` indexes; do not list individual sub-files in the root. |
21
21
 
22
22
  ## Process
@@ -27,7 +27,7 @@ Choose the correct BMAD-BigPowers artifact:
27
27
  - **Decision Record (ADR)**: For "Why" decisions (saved to `specs/adr/`).
28
28
  - **Context Map**: For system-wide architectural mapping (`specs/tech-architecture/tech-stack.md`).
29
29
  - **Technical Guide**: For "How-to" with verification (saved to `<module>/REFERENCE.md`).
30
- - **Behavioral Feature**: Gherkin-style compliance specs (saved to `specs/audit/features/`).
30
+ - **Behavioral Feature**: Gherkin-style compliance specs (saved to `specs/verifications/features/`).
31
31
  - **Project README**: Project-facing documentation (saved to `README.md` at project root).
32
32
 
33
33
  **Cross-Cutting Concerns**: If a doc affects multiple modules, place the authoritative source in the lowest common ancestor directory and use "Delegates" (one-line pointers) in sub-directories to maintain the Single Source of Truth without violating the Stepdown Rule.