bigpowers 2.92.0 → 2.93.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/.gemini/extensions/bigpowers/gemini-extension.json +1 -1
- package/.pi/package.json +1 -1
- package/AGENTS.md +98 -0
- package/CHANGELOG.md +7 -0
- package/CONVENTIONS.md +47 -427
- package/package.json +1 -1
- package/scripts/lib/__pycache__/atomic_write.cpython-310.pyc +0 -0
- package/scripts/lib/__pycache__/link_utils.cpython-310.pyc +0 -0
- package/scripts/lib/__pycache__/srp_engine_links.cpython-310.pyc +0 -0
- package/scripts/lib/__pycache__/srp_engine_okf.cpython-310.pyc +0 -0
- package/CLAUDE.md +0 -400
- package/GEMINI.md +0 -75
package/.pi/package.json
CHANGED
package/AGENTS.md
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# story: e38s08
|
|
2
|
+
# story: e51s05
|
|
3
|
+
# story: e45s22
|
|
4
|
+
# story: e45s23
|
|
5
|
+
# story: e55s03
|
|
6
|
+
# story: e84s01
|
|
7
|
+
|
|
8
|
+
# bigpowers — Agent Instructions
|
|
9
|
+
|
|
10
|
+
Read CONVENTIONS.md before any GitHub or git operation.
|
|
11
|
+
[`constitution.md`](constitution.md) synthesizes this project's doctrine (this file, CONVENTIONS.md, docs/PRINCIPLES.md, docs/references/*.md). This file remains fully authoritative.
|
|
12
|
+
|
|
13
|
+
<!-- BEGIN bigpowers:context-routing -->
|
|
14
|
+
## Context Routing
|
|
15
|
+
|
|
16
|
+
Load subdirectory context by file glob — do not read the full doc tree up front.
|
|
17
|
+
|
|
18
|
+
| Glob / trigger | Load first | Fallback |
|
|
19
|
+
|----------------|------------|----------|
|
|
20
|
+
| `skills/**` | Active skill `SKILL.md` + sibling `REFERENCE.md` | `SKILL-INDEX.md` |
|
|
21
|
+
| `specs/epics/**` | Capsule `epic.yaml` + active story `-tasks.yaml` | `specs/release-plan.yaml` |
|
|
22
|
+
| `specs/product/**` | `SCOPE_LATEST.yaml`, `VISION_LATEST.yaml` | `specs/README.md` |
|
|
23
|
+
| `specs/tech-architecture/**` | `tech-stack.md` + epic `eNN-TEST_PLAN_LATEST.md` | `CONVENTIONS.md` |
|
|
24
|
+
| `scripts/**` | `CONVENTIONS.md` § Generated targets | Commands table below |
|
|
25
|
+
| `website/**` | `website/README.md` | Never edit generated docs in `website/src/content/docs/` |
|
|
26
|
+
| `docs/**` | Matching doc under `docs/` | `docs/references/` |
|
|
27
|
+
| Default / session start | This file → `CONVENTIONS.md` → `specs/state.yaml` | `survey-context` |
|
|
28
|
+
<!-- END bigpowers:context-routing -->
|
|
29
|
+
|
|
30
|
+
<!-- BEGIN bigpowers:learned-preferences -->
|
|
31
|
+
## Learned User Preferences
|
|
32
|
+
|
|
33
|
+
- Prefer `rtk`-prefixed shell commands for git, test, and build output (token savings).
|
|
34
|
+
- Run Preflight before forward work; never dismiss red gates as pre-existing.
|
|
35
|
+
- Edit `skills/*/SKILL.md` sources only — never `.cursor/rules/` or `.gemini/` artifacts.
|
|
36
|
+
|
|
37
|
+
## Workspace Facts
|
|
38
|
+
|
|
39
|
+
- Stack: Markdown / Bash documentation project; skills sync via `bash scripts/sync-skills.sh`.
|
|
40
|
+
- Planning SoT: `specs/state.yaml`, `specs/release-plan.yaml`, `specs/execution-status.yaml`.
|
|
41
|
+
- Story traceability: `# story: eNNsNN` tags in implementing files; `bash scripts/trace-stories.sh --strict` in CI.
|
|
42
|
+
- Rule matrix: `bash scripts/compile-rule-matrix.sh` → `specs/rule-matrix.json` (P0–P3 tiers from CONVENTIONS.md).
|
|
43
|
+
<!-- END bigpowers:learned-preferences -->
|
|
44
|
+
|
|
45
|
+
## Project
|
|
46
|
+
|
|
47
|
+
bigpowers — agent skills for spec-driven, test-first software development by solo developers (catalog in `SKILL-INDEX.md`).
|
|
48
|
+
Stack: Markdown / Bash (documentation-based; skills integrate with Claude Code, Cursor, Gemini CLI)
|
|
49
|
+
|
|
50
|
+
## Commands
|
|
51
|
+
|
|
52
|
+
| Action | Command |
|
|
53
|
+
|--------|---------|
|
|
54
|
+
| Install | `npm install -g bigpowers && bigpowers setup` |
|
|
55
|
+
| Run / Lint | `bash scripts/sync-skills.sh` |
|
|
56
|
+
| Test | `npm run compliance` |
|
|
57
|
+
| Build | `bash scripts/install.sh` (from source) |
|
|
58
|
+
| Validate specs YAML | `bash scripts/validate-specs-yaml.sh` |
|
|
59
|
+
| Compliance | `npm run compliance` |
|
|
60
|
+
| Verification Gates | `bash scripts/run-verification-gates.sh` |
|
|
61
|
+
| Traceability | `bash scripts/trace-stories.sh --strict` |
|
|
62
|
+
| Preflight | `npm run compliance && bash scripts/run-verification-gates.sh && bash scripts/sync-skills.sh && bash scripts/trace-stories.sh --strict` |
|
|
63
|
+
| CI | `gh pr checks` |
|
|
64
|
+
|
|
65
|
+
Pre-merge: `npm run compliance && bash scripts/run-verification-gates.sh`. If BCP Plus sized, see `docs/references/bcp-plus.md`.
|
|
66
|
+
|
|
67
|
+
## Architecture & Conventions
|
|
68
|
+
|
|
69
|
+
- Collection of verb-noun skills under `skills/`, each with a single `SKILL.md` source of truth.
|
|
70
|
+
- Runtime specs in `specs/state.yaml`, `specs/release-plan.yaml`, and `specs/execution-status.yaml`; intent in `specs/product/`; epics in `specs/epics/`.
|
|
71
|
+
- Generated targets: `.cursor/rules/`, `.gemini/extensions/bigpowers/`, `.pi/skills/`, and `website/src/content/docs/`. Run `bash scripts/sync-skills.sh` after any changes.
|
|
72
|
+
- **Never** edit generated targets directly. Never create a skill without a `SKILL.md` file. Never push without running `sync-skills.sh`.
|
|
73
|
+
|
|
74
|
+
## Token Management & Toolchain
|
|
75
|
+
|
|
76
|
+
- Context discipline: Write (short functions 4-20 lines), Select (`bts map`, `survey-context`), Compress (`sqz compress`, `rtk`), Isolate (`kickoff-branch`, `dispatch-agents`). See `docs/references/context-engineering.md`.
|
|
77
|
+
- Auto-Terse: Switch to `terse-mode` when session exceeds ~20 turns or context is heavy.
|
|
78
|
+
- Context compaction: Summarize state every 10 turns into a short, high-density note.
|
|
79
|
+
- Stream stability: Continuous output in chunks of ~200 lines without pausing.
|
|
80
|
+
- Mechanical backstop (e45s03): `scripts/hooks/token-mgmt-pre-tool-use.sh` blocks oversized tool calls.
|
|
81
|
+
- **Toolchain (bts, sqz, rtk):** Syntax tables, compression rules, MCP tools, and commands live in [docs/references/agent-tooling.md](docs/references/agent-tooling.md).
|
|
82
|
+
- Search: `bts find --print <pattern>` | Map: `bts map` | Docs: `bts docs <lib>`
|
|
83
|
+
- Compression: pipe through `sqz compress` (MCP: `sqz_read_file`, `sqz_grep`, `sqz_list_dir`)
|
|
84
|
+
- RTK: prefix commands with `rtk` (e.g. `rtk git status`, `rtk cargo test`, `rtk gh pr view`)
|
|
85
|
+
|
|
86
|
+
## Session Start
|
|
87
|
+
|
|
88
|
+
Before any task, run this sequence — not optional:
|
|
89
|
+
1. Read `CLAUDE.md` (or `AGENTS.md`)
|
|
90
|
+
2. Read `CONVENTIONS.md`
|
|
91
|
+
3. Read `specs/state.yaml` if it exists — current session and active epic
|
|
92
|
+
4. Read `specs/release-plan.yaml` if it exists — active release context
|
|
93
|
+
|
|
94
|
+
## Agent Rules
|
|
95
|
+
|
|
96
|
+
- **Workflow Mandate:** You MUST use the bigpowers skills (e.g., `plan-work`, `develop-tdd`, `craft-skill`) to perform tasks. DO NOT write code directly in response to a user prompt like "build this feature".
|
|
97
|
+
- **Always Green / fix-or-log:** Preflight and CI must be green before forward work. Any reproducible gate failure during unrelated work requires `quick-fix` or `fix-bug` (CONVENTIONS § Discovered Defects). Never dismiss failures as pre-existing or out of scope.
|
|
98
|
+
- Read specs/ and CONVENTIONS.md before writing code. Write minimum code that solves the stated problem. Run tests after every change. All written output in specs/.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [2.93.0](https://github.com/danielvm-git/bigpowers/compare/v2.92.0...v2.93.0) (2026-11-03)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **context:** shave always-loaded context in AGENTS.md and CONVENTIONS.md to <=150 lines (e84s01) ([#197](https://github.com/danielvm-git/bigpowers/issues/197)) ([34f6366](https://github.com/danielvm-git/bigpowers/commit/34f6366d481fc582e7d556148870298811a5d0ff))
|
|
7
|
+
|
|
1
8
|
# [2.92.0](https://github.com/danielvm-git/bigpowers/compare/v2.91.1...v2.92.0) (2026-11-03)
|
|
2
9
|
|
|
3
10
|
|
package/CONVENTIONS.md
CHANGED
|
@@ -12,475 +12,95 @@
|
|
|
12
12
|
# story: e29s03
|
|
13
13
|
# story: e54s03
|
|
14
14
|
# story: e55s03
|
|
15
|
+
# story: e84s01
|
|
15
16
|
|
|
16
17
|
# Conventions
|
|
17
18
|
|
|
18
|
-
[`constitution.md`](constitution.md)
|
|
19
|
-
this project's doctrine (this file, CLAUDE.md, docs/PRINCIPLES.md,
|
|
20
|
-
docs/references/*.md) into bigspec's B0-B10 + Capstone blocks, with citations
|
|
21
|
-
back to the fuller text below. It's a starting point for a reader, not a
|
|
22
|
-
replacement — this file remains fully authoritative for its own content today.
|
|
19
|
+
[`constitution.md`](constitution.md) synthesizes this project's doctrine (this file, CLAUDE.md, docs/PRINCIPLES.md, docs/references/*.md) into B0-B10 + Capstone blocks. This file remains fully authoritative.
|
|
23
20
|
|
|
24
21
|
## Conventional Commits & Semantic Versioning
|
|
25
22
|
|
|
26
|
-
All changes
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
`<type>(<scope>): <description>` (Space after colon is MANDATORY)
|
|
30
|
-
|
|
31
|
-
### Types & Version Bumps
|
|
32
|
-
- `feat`: Minor (x.Y.z) - New feature
|
|
33
|
-
- `fix`: Patch (x.y.Z) - Bug fix
|
|
34
|
-
- `perf`: Patch (x.y.Z) - Performance improvement
|
|
35
|
-
- `docs`, `chore`, `style`, `refactor`, `test`: No bump (unless breaking)
|
|
36
|
-
- `BREAKING CHANGE:` (or `!` after type): Major (X.y.z)
|
|
23
|
+
All changes MUST follow [Conventional Commits 1.0.0](https://www.conventionalcommits.org/en/v1.0.0/) and [Semantic Versioning 2.0.0](https://semver.org/).
|
|
24
|
+
- Format: `<type>(<scope>): <description>` (space after colon mandatory).
|
|
25
|
+
- Types: `feat` (minor), `fix`/`perf` (patch), `docs`/`chore`/`style`/`refactor`/`test` (no bump). `BREAKING CHANGE:` or `!` triggers major.
|
|
37
26
|
|
|
38
27
|
## GitHub & Git Operations
|
|
39
28
|
|
|
40
29
|
- No direct work on `main` or `master`. Every task MUST start with a feature branch or worktree via `kickoff-branch`.
|
|
41
|
-
- **Integrate
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
- Use `gh run view` / `gh run watch` for CI status
|
|
46
|
-
- Verify auth with `gh auth status` before operations
|
|
47
|
-
- **Git Attribution:** NEVER include `Co-authored-by`, `Co-Authored-By`, or any other footer that attributes code to an AI agent (e.g., Claude, Gemini). All commits must appear as if they were authored solely by the human user.
|
|
48
|
-
- **State Commit Policy:** To minimize git history noise, intermediate `chore(state):` commits (e.g., tracking build-epic step transitions) should either be squashed locally using the `--squash-state` flag on `release-branch` before merging, or kept out-of-band using local cycle-state files.
|
|
49
|
-
- Never call GitHub REST API directly (curl, fetch, etc.)
|
|
50
|
-
- Never create GitHub issues from automated workflows — produce local .md files in specs/ instead
|
|
51
|
-
- **Post-land branch cleanup:** `land-branch.sh` squash-merges the feature branch, so `git branch -d <branch>` afterward always fails ("not fully merged" — expected, since a squash doesn't create an ancestor relationship). `git branch -D <branch>` is the correct next step, but `guard-git`'s hook blocks agents from running `-D` directly. Leave the orphaned local branch for the human to delete, or fix `land-branch.sh` to delete its own branch under the `GIT_BIGPOWERS_LAND=1` exemption it already sets — don't spend a turn fighting the hook.
|
|
52
|
-
|
|
53
|
-
### Pre-Merge Verification Gates
|
|
54
|
-
|
|
55
|
-
Before merging any branch, run the deterministic verification gates:
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
bash scripts/run-verification-gates.sh
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
This runs compliance → G-04 self-test. If any gate fails, the merge is blocked.
|
|
62
|
-
Pin a fresh baseline with `--baseline` after major structure changes.
|
|
30
|
+
- **Integrate:** Use `gh pr create` + `gh pr merge --squash` via `release-branch`. Solo profile: `bash scripts/land-branch.sh <branch> "<msg>"` after release gates.
|
|
31
|
+
- Never push directly to `main`/`master` except via `land-branch.sh` (`GIT_BIGPOWERS_LAND=1`). Use `gh` over git/curl/fetch.
|
|
32
|
+
- **Git Attribution:** NEVER include `Co-authored-by`, `Co-Authored-By`, or any AI attribution footer in git commits. All commits must appear solely authored by the human user.
|
|
33
|
+
- **Pre-Merge Verification Gates:** Run `bash scripts/run-verification-gates.sh` (compliance → G-04 self-test) before any merge.
|
|
63
34
|
|
|
64
35
|
## Agent Workflow Mandates
|
|
65
36
|
|
|
66
37
|
**AGENTS MUST NEVER BYPASS THE BIGPOWERS WORKFLOW.**
|
|
67
|
-
|
|
68
|
-
- **
|
|
69
|
-
- **
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
- Use `develop-tdd` or `execute-plan` to implement the plan.
|
|
73
|
-
- Use `investigate-bug` for bug reports before writing a fix.
|
|
74
|
-
- **Verification Mandate:** Every story implementation MUST end with a step-by-step manual verification script provided to the user. You must wait for the user to confirm behavioral correctness (UAT) before declaring the story done or moving to the next.
|
|
75
|
-
- **Verification:** You MUST verify every change with tests. Code generation without a corresponding plan in `specs/` is strictly forbidden.
|
|
76
|
-
- **Traceability Mandate:** Every story MUST have at least one `story: eNNsNN` tag in its implementing code or test file. `trace-stories.sh --strict` runs in CI to enforce this. Untagged stories fail the CI traceability gate.
|
|
77
|
-
- **Scenario ID Format (e46s04+):** When a `specs/tech-architecture/eNN-TEST_PLAN_LATEST.md` exists for the epic, critical-path scenarios use the format `SC-eNNsYY-P{0|1|2|3}-NN` (e.g. `SC-e46s04-P0-01`). These IDs are referenced inside test files as `// scenario: SC-eNNsYY-P0-NN` comments alongside the existing `// story: eNNsNN` tag. SC gaps detected via check-blind-spots.sh; no separate SC tracing script required. gate-trace treats a P0 story with zero `SC-*-P0-*` references in test files as a CONCERNS finding (waivable via `state.yaml`). P2/P3 epics may set `test_plan: waived` in `state.yaml` to skip the `plan-tests` skill.
|
|
78
|
-
- **Stream Continuity:** When writing large files or long documents, you MUST output continuously in chunks of ~200 lines. Do not pause between sections. Continue immediately until complete. If you need time to process, emit a placeholder comment or heading rather than going silent to prevent stream idle timeouts.
|
|
79
|
-
|
|
80
|
-
## Always Green / Shift Left
|
|
81
|
-
|
|
82
|
-
Solo developers own the whole codebase. **Always Green** means Preflight and CI are green before any forward work — not "green enough for this task."
|
|
83
|
-
|
|
84
|
-
**Shift Left (1-10-100):** Defects cost roughly 1× to fix in development, 10× in integration, 100× in production (IBM Systems Sciences Institute; CloudQA benchmarks). Fixing a red gate now is cheaper than shipping and debugging later.
|
|
85
|
-
|
|
86
|
-
**Preflight** — the project's full local verification stack (chained from test, lint, typecheck, and build commands recorded in `CLAUDE.md`). Preflight MUST pass before kickoff, develop, or verify phases advance.
|
|
87
|
-
|
|
88
|
-
**CI green** — when a PR exists or remote CI applies, `gh pr checks` (or equivalent) MUST show passing before merge or land.
|
|
89
|
-
|
|
90
|
-
**Existing projects:** Projects seeded before e51 do not receive these sections automatically. Re-run `seed-conventions` and merge the Always Green blocks, or copy § Always Green and § Discovered Defects from bigpowers `CONVENTIONS.md` manually.
|
|
91
|
-
|
|
92
|
-
## Discovered Defects
|
|
93
|
-
|
|
94
|
-
Any **reproducible gate failure** encountered during unrelated work is a discovered defect — not optional background noise.
|
|
38
|
+
- **No Direct Coding:** Never write code directly for directives like "build feature X". Route feature work through bigpowers skills (`survey-context`, `plan-work`, `develop-tdd`, `verify-work`).
|
|
39
|
+
- **Verification Mandate:** Every story must include runnable `verify:` commands. Verify every change with tests. Provide step-by-step UAT to user.
|
|
40
|
+
- **Traceability Mandate:** Every story MUST have ≥1 `story: eNNsNN` tag in implementing code or tests (`bash scripts/trace-stories.sh --strict`).
|
|
41
|
+
- **Scenario ID Format (e46s04+):** Critical-path scenarios use format `SC-eNNsYY-P{0|1|2|3}-NN` in `eNN-TEST_PLAN_LATEST.md` and tests.
|
|
42
|
+
- **Stream Continuity:** Output continuously in chunks of ~200 lines. Never pause or go silent.
|
|
95
43
|
|
|
96
|
-
|
|
44
|
+
## Always Green & Discovered Defects
|
|
97
45
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
3. **Log** — only when reproduction is blocked after good-faith attempt; write a BUG spec and stop forward work on the original task until triaged.
|
|
101
|
-
|
|
102
|
-
Discovered fixes ship in the **same PR** as the original work but in **separate commits** (Conventional Commits). Never narrate a failure and continue.
|
|
103
|
-
|
|
104
|
-
**Hard block:** Red Preflight or red CI blocks kickoff-branch, develop-tdd, and verify-work forward progress until fix-or-log produces green.
|
|
46
|
+
- **Always Green (Shift Left):** Preflight (`npm run compliance && bash scripts/run-verification-gates.sh`) and CI (`gh pr checks`) must be green before forward work.
|
|
47
|
+
- **Discovered Defects (fix-or-log):** Any reproducible gate failure requires `quick-fix` or `fix-bug` (separate commit). Banned dismissive phrases: "pre-existing", "unrelated to this session", "not introduced by my changes", "out of scope".
|
|
105
48
|
|
|
106
49
|
## Risk Tiers (Effective Rule Matrix)
|
|
107
50
|
|
|
108
|
-
Human-readable source of truth for verification depth.
|
|
109
|
-
|
|
110
|
-
```bash
|
|
111
|
-
bash scripts/compile-rule-matrix.sh # → specs/rule-matrix.json
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
Diff `specs/rule-matrix.json` across git tags to audit rule drift. Schema version in JSON `matrix_version` field.
|
|
51
|
+
Human-readable source of truth for verification depth. Compile: `bash scripts/compile-rule-matrix.sh` (→ `specs/rule-matrix.json`).
|
|
115
52
|
|
|
116
53
|
### P0 — Critical (never violate)
|
|
117
|
-
|
|
118
54
|
- **[always-green]**: Preflight and CI must be green before forward work. (`verify-work`, `kickoff-branch`, `develop-tdd`)
|
|
119
55
|
- **[no-direct-coding]**: Route feature work through bigpowers skills — no ad-hoc implementation without a plan in `specs/`. (`plan-work`, `orchestrate-project`)
|
|
120
56
|
- **[traceability]**: Every story has ≥1 `story: eNNsNN` tag in implementing code or tests. (`trace-stories.sh --strict`)
|
|
121
57
|
- **[no-generated-edits]**: Never edit `.cursor/rules/`, `.gemini/`, or `website/src/content/docs/` directly. (`sync-skills.sh`)
|
|
122
58
|
|
|
123
59
|
### P1 — High (fix before merge)
|
|
124
|
-
|
|
125
60
|
- **[conventional-commits]**: All commits follow Conventional Commits; semantic-release owns version bumps. (`commit-message`, `release-branch`)
|
|
126
61
|
- **[verify-per-story]**: Every story/task has runnable `verify:` commands; `verify-work` confirms before done. (`plan-work`, `verify-work`)
|
|
127
62
|
- **[test-on-change]**: New functions and bug fixes include tests; regressions get regression tests. (`develop-tdd`, `validate-fix`)
|
|
128
63
|
- **[branch-protection]**: No direct work on `main`/`master`; feature branches via `kickoff-branch`. (`guard-git`)
|
|
129
64
|
|
|
130
65
|
### P2 — Medium (address in same epic or next)
|
|
131
|
-
|
|
132
66
|
- **[plan-tests-waiver]**: P2/P3-dominant epics may set `test_plan: waived` in `state.yaml`. (`plan-tests`)
|
|
133
67
|
- **[file-size-cap]**: Source files under 300 lines unless listed in § File-Size Exceptions. (`audit-code`)
|
|
134
68
|
- **[handoff-signaling]**: Critical-path skills write `handoff.next_skill` to `state.yaml`. (`session-state`)
|
|
135
69
|
- **[delta-requirements]**: Behavior changes require `ADDED`/`MODIFIED`/`REMOVED`/`RENAMED` tags in requirement specs. (`plan-work`, `change-request`)
|
|
136
70
|
|
|
137
71
|
### P3 — Low (best effort)
|
|
138
|
-
|
|
139
72
|
- **[boy-scout]**: Leave touched files at least as clean as found. (`audit-code`)
|
|
140
73
|
- **[terse-when-heavy]**: Switch to `terse-mode` when context exceeds ~20 turns. (`terse-mode`)
|
|
141
74
|
- **[skill-naming]**: Verb-noun kebab-case under `skills/`; documented exceptions only. (`craft-skill`)
|
|
142
75
|
|
|
143
|
-
### Banned dismissive phrases
|
|
144
|
-
|
|
145
|
-
Agents MUST NOT use these phrases (or close paraphrases) to ignore reproducible failures:
|
|
146
|
-
|
|
147
|
-
| Banned phrase | Required behavior instead |
|
|
148
|
-
|---------------|---------------------------|
|
|
149
|
-
| Pre-existing / pre-existing issues | Run fix-or-log; if truly unrelated, prove with a passing repro after revert |
|
|
150
|
-
| unrelated to this session | Same — session boundaries do not waive green gates |
|
|
151
|
-
| not introduced by my changes | Bisect or fix anyway; solo-default owns the whole tree |
|
|
152
|
-
| out of scope (ignoring a red gate) | Invoke quick-fix or fix-bug; scope-minimization never overrides Always Green |
|
|
153
|
-
|
|
154
76
|
## specs/ — All Planning Output Goes Here
|
|
155
77
|
|
|
156
|
-
Every skill
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
-
|
|
175
|
-
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
-
|
|
183
|
-
-
|
|
184
|
-
|
|
185
|
-
Missing timestamps are a gate violation — do not advance past `release-branch` without them.
|
|
186
|
-
|
|
187
|
-
### next_skill signaling mandate (v2.0.0)
|
|
188
|
-
|
|
189
|
-
Every critical-path skill (survey-context, plan-tests, plan-work, kickoff-branch, develop-tdd, verify-work, audit-code, commit-message, release-branch) MUST write `handoff.next_skill` to `specs/state.yaml` as its last action. Agents MUST read `state.yaml` and follow `handoff.next_skill` before asking "what comes next?".
|
|
190
|
-
|
|
191
|
-
`plan-tests` is an optional planning-spine step: after `slice-tasks`, before `plan-work`, for epics whose stories carry `risk: P0|P1`. It is skipped (set `test_plan: waived` in `state.yaml`) for P2/P3-dominant epics.
|
|
192
|
-
|
|
193
|
-
### Intent vs delivery vs execution
|
|
194
|
-
|
|
195
|
-
| Question | File | Format |
|
|
196
|
-
|----------|------|--------|
|
|
197
|
-
| What should the product do? | `specs/product/SCOPE_LATEST.yaml` | YAML |
|
|
198
|
-
| North star / initiative | `specs/product/VISION_LATEST.yaml` | YAML |
|
|
199
|
-
| Glossary | `specs/product/GLOSSARY_LATEST.yaml` | YAML |
|
|
200
|
-
| What ships in this release, in what order? | `specs/release-plan.yaml` | YAML |
|
|
201
|
-
| How to implement an epic/story? | `specs/epics/eNN-*.yaml` or `specs/epics/eNN-*/stories/` | YAML + MD |
|
|
202
|
-
| Where are we in the session? | `specs/state.yaml` | YAML |
|
|
203
|
-
|
|
204
|
-
Epic IDs: `e01`, `e30`. Story IDs: `e01s01`. One FR in SCOPE may span multiple epics or releases.
|
|
205
|
-
|
|
206
|
-
### Frozen release (ex-baseline)
|
|
207
|
-
|
|
208
|
-
When planning closes, copy to `specs/product/snapshots/release-<version>/` (`release-plan.yaml`, `SCOPE_LATEST.yaml`, `VISION_LATEST.yaml`). No separate `baselines/` folder.
|
|
209
|
-
|
|
210
|
-
### Semantic-release — the real version is never hand-tracked
|
|
211
|
-
|
|
212
|
-
> **The authority is `gh release view` / git tags.** semantic-release decides the version
|
|
213
|
-
> at merge from Conventional Commits. Never hand-maintain a `target_version` to "predict" it —
|
|
214
|
-
> that field drifts from reality every release. The specs only *mirror* the real tag for reference.
|
|
215
|
-
|
|
216
|
-
1. **Planning intent (codename only)** — `specs/release-plan.yaml` → `release.version`, `release.bump_hint`.
|
|
217
|
-
Treat `version` as a non-authoritative label; if you write a number, mark it "mirror, not the authority".
|
|
218
|
-
2. **Published version (authority)** — repo root `package.json`, git tag `vX.Y.Z`, `CHANGELOG.md` (CI semantic-release; not hand-edited in specs). Read with `gh release view`.
|
|
219
|
-
3. **Dashboard mirror** — `specs/state.yaml` → `release.last_tag`, `release.last_publish` (copied from `gh release view`; `target_version` is `null` — not tracked manually).
|
|
220
|
-
|
|
221
|
-
### Guardrails and other artifacts
|
|
222
|
-
|
|
223
|
-
| Document | Path |
|
|
224
|
-
|----------|------|
|
|
225
|
-
| Stack / architecture | `specs/tech-architecture/TECH_STACK_LATEST.md` |
|
|
226
|
-
| Security / test / design plans | `specs/tech-architecture/*_PLAN_LATEST.md` |
|
|
227
|
-
| Epic test plan (P0/P1 epics) | `specs/tech-architecture/eNN-TEST_PLAN_LATEST.md` — produced by `plan-tests` skill (e46s04); one per epic. |
|
|
228
|
-
| Domain context + ADRs | `specs/tech-architecture/TECH_STACK_LATEST.md` or legacy `specs/CONTEXT.md` + `specs/adr/` |
|
|
229
|
-
| Bug investigation | `specs/bugs/BUG-*.md` + `specs/bugs/registry.yaml` (generated) |
|
|
230
|
-
| Refactor / impact | `specs/tech-architecture/REFACTOR_LATEST.md`, `specs/tech-architecture/IMPACT_LATEST.md` |
|
|
231
|
-
| Legacy markdown | `specs/archive/` after `bash scripts/convert-legado.sh` |
|
|
232
|
-
|
|
233
|
-
Validate YAML layout: `bash scripts/validate-specs-yaml.sh`. Patch runtime keys: `bash scripts/bp-yaml-set.sh specs/state.yaml git.branch feat/foo`.
|
|
234
|
-
|
|
235
|
-
### Documentation Responsibilities (e45s36)
|
|
236
|
-
|
|
237
|
-
Each specs/ artifact owns specific facts. Update the owning file when the fact changes — do not duplicate across files.
|
|
238
|
-
|
|
239
|
-
| File / directory | Owns | Update when |
|
|
240
|
-
|------------------|------|-------------|
|
|
241
|
-
| `specs/state.yaml` | Active session, handoff, story timing, workflow mode | Every skill handoff; branch switch; story start/end |
|
|
242
|
-
| `specs/release-plan.yaml` | Epic ordering, WSJF, BCP baselines, release codename | New epic scoped; WSJF re-prioritized; BCP re-estimated |
|
|
243
|
-
| `specs/execution-status.yaml` | Story/epic done/todo status (sole SoT) | Story completes; gate-trace runs; manual status change |
|
|
244
|
-
| `specs/product/SCOPE_LATEST.yaml` | In/out of scope, initiative boundaries | scope-work; change-request Add mode |
|
|
245
|
-
| `specs/product/VISION_LATEST.yaml` | North star, strategic intent | Major product pivot; scope-work |
|
|
246
|
-
| `specs/product/GLOSSARY_LATEST.yaml` | Canonical domain terms | define-language; model-domain term crystallizes |
|
|
247
|
-
| `specs/epics/eNN-*/epic.yaml` | Epic manifest, story list, BCPs | slice-tasks; plan-work adds stories |
|
|
248
|
-
| `specs/epics/eNN-*/eNNsYY-*.md` | Story requirements (countable-story-format) | plan-work; section approval state changes |
|
|
249
|
-
| `specs/epics/eNN-*/eNNsYY-tasks.yaml` | Runnable implementation tasks + verify | plan-work; develop-tdd task completion |
|
|
250
|
-
| `specs/tech-architecture/tech-stack.md` | Stack, modules, gray areas | map-codebase; deepen-architecture; model-domain |
|
|
251
|
-
| `specs/tech-architecture/eNN-TEST_PLAN_LATEST.md` | P0/P1 test scenarios per epic | plan-tests |
|
|
252
|
-
| `specs/adr/ADR-*.md` | Architectural decisions | model-domain; deepen-architecture ADR offer accepted |
|
|
253
|
-
| `specs/bugs/BUG-*.md` | Bug RCA + fix plan | investigate-bug |
|
|
254
|
-
| `specs/bugs/registry.yaml` | Bug index (generated) | inspect-quality; sync-bugs-registry.sh |
|
|
255
|
-
| `specs/verifications/*` | Verify evidence, audit reports, eval reports | verify-work; audit-code; run-evals |
|
|
256
|
-
| `specs/security/REVIEW.md` | Latest security scan findings | security-review |
|
|
257
|
-
| `specs/metrics/cycle-times.yaml` | Delivery velocity ledger | release-branch lands story |
|
|
258
|
-
|
|
259
|
-
### Generated artifact targets
|
|
260
|
-
|
|
261
|
-
Skill content is edited in `skills/*/SKILL.md` and auto-propagated to these targets by `bash scripts/sync-skills.sh`:
|
|
262
|
-
- `.cursor/rules/` — Cursor IDE rules
|
|
263
|
-
- `.gemini/extensions/bigpowers/` — Gemini CLI extensions
|
|
264
|
-
- `.pi/skills/` + `.pi/prompts/` — pi agent
|
|
265
|
-
- `website/src/content/docs/` — Docs website (Astro Starlight, deployed to GitHub Pages)
|
|
266
|
-
|
|
267
|
-
**Never edit any of these targets directly.** Edit the SKILL.md sources and run rebuild scripts (`bash scripts/sync-skills.sh`, `npm run site:build`).
|
|
268
|
-
|
|
269
|
-
### Packaging boundary — dev-repo tooling vs. end-user CLI
|
|
270
|
-
|
|
271
|
-
bigpowers ships itself as an npm package (`bin/setup.js`) while also being a
|
|
272
|
-
self-hosting monorepo that dogfoods its own skills. `.npmignore` excludes
|
|
273
|
-
`specs/`, `docs/`, and `.git` from the published tarball — a real end-user
|
|
274
|
-
install has none of them.
|
|
275
|
-
|
|
276
|
-
**Any script invoked from `bin/*.js` (the end-user CLI surface) must not
|
|
277
|
-
assume dev-only files exist.** `scripts/sync-skills.sh` conflates two
|
|
278
|
-
concerns — skill distribution (render into `.cursor/rules/` etc., relevant
|
|
279
|
-
to every user) and dev-repo maintenance (`sync_post_run`: regenerate
|
|
280
|
-
`skills-lock.json`, `SKILL-INDEX.md`, `docs/references/model-profiles.md`,
|
|
281
|
-
`specs/epics-wiki/`, `specs/adr-wiki/` — relevant only to bigpowers
|
|
282
|
-
contributors). `bin/setup.js` calls it with `--distribute-only`, which skips
|
|
283
|
-
`sync_post_run` entirely; the no-flag form remains the contributor
|
|
284
|
-
dev-workflow. Before wiring any dev-maintenance script into an installer
|
|
285
|
-
path, verify with `command npm pack --pack-destination <dir>` + extract
|
|
286
|
-
what a real install actually contains, rather than assuming `specs/`/`docs/`
|
|
287
|
-
are present (see `BUG-2026-07-24-installer-runs-dev-maintenance-pipeline`).
|
|
288
|
-
|
|
289
|
-
### Legacy paths (migrate away)
|
|
290
|
-
|
|
291
|
-
| Old | New |
|
|
292
|
-
|-----|-----|
|
|
293
|
-
| `specs/STATE.md` | `specs/state.yaml` |
|
|
294
|
-
| `specs/RELEASE-PLAN.md` | `specs/release-plan.yaml` + `specs/epics/` |
|
|
295
|
-
| `specs/SCOPE.md` | `specs/product/SCOPE_LATEST.yaml` |
|
|
296
|
-
|
|
297
|
-
## Code Style
|
|
298
|
-
|
|
299
|
-
- Functions: 4–20 lines. Split if longer.
|
|
300
|
-
- Files: under 300 lines. Split by responsibility to ensure content fits within a single agent context window.
|
|
301
|
-
- One thing per function, one responsibility per module (SRP).
|
|
302
|
-
- Names: specific and unique. Avoid `data`, `handler`, `Manager`, `Service`. Prefer names whose grep returns < 5 hits in this codebase.
|
|
303
|
-
- Types: explicit. No `any`, no untyped public functions.
|
|
304
|
-
- No code duplication. Extract shared logic into a function/module.
|
|
305
|
-
- Early returns over nested ifs. Max 2 levels of indentation.
|
|
306
|
-
- Conditionals: expressed as positives (G29). Avoid negative flags or `unless` logic where possible.
|
|
307
|
-
- The Stepdown Rule (G34): functions should descend exactly one level of abstraction.
|
|
308
|
-
- Names describe side-effects (N7): if a function sends email, writes to disk, or mutates state, the name must say so (`sendWelcomeEmail`, not `processUser`).
|
|
309
|
-
- No magic strings or numbers (G25): every bare string literal or numeric literal used in logic must be extracted to a named constant.
|
|
310
|
-
- Boolean logic in named functions (G28): complex boolean expressions must be extracted into a named predicate function, not inlined.
|
|
311
|
-
- Prefer exceptions over error codes: throw/raise an exception rather than returning a numeric or boolean error sentinel.
|
|
312
|
-
- Remove dead code (G9/F4): unused functions, unreachable branches, and stale imports must be deleted — not commented out.
|
|
313
|
-
- Boy Scout Rule: leave every file you touch at least as clean as you found it. Fix the first broken window you see.
|
|
314
|
-
- **Law of Demeter:** A method should call only its immediate collaborators — not `a.getB().getC().doX()`. Chain violations need explicit justification in code review.
|
|
315
|
-
- **Verification mandate:** Every story must include runnable `verify:` commands (in epic shards or story files). No story is done until `verify-work` confirms it (or user explicitly waives with documented reason in `specs/state.yaml` handoff).
|
|
316
|
-
- Exception messages must include the offending value, expected shape, and an actionable remediation hint for the agent.
|
|
317
|
-
- SOLID beyond SRP: favor interfaces over concrete types (DIP) when injecting dependencies.
|
|
318
|
-
- **`grep -E` portability:** never use `\d` or `\D` in a `grep -E` pattern — they are PCRE-only escapes, not GNU grep extensions (unlike `\s`/`\S`/`\w`/`\W`, which GNU grep does support). Real GNU grep on Linux CI treats `\d` as a literal `d`, silently matching nothing; this only "works" on macOS if the local `grep` happens to be a permissive BSD/GNU-compatible variant. Use `[0-9]` instead. This exact defect broke the traceability gate codebase-wide (`scripts/lib/trace-stories.py`, `scripts/lib/trace-matrix.py`) while passing every local check.
|
|
319
|
-
|
|
320
|
-
## Comments
|
|
321
|
-
|
|
322
|
-
- Keep your own comments. Never strip them on refactor — they carry intent and provenance.
|
|
323
|
-
- Write WHY, not WHAT.
|
|
324
|
-
- Complex or non-obvious logic must include "Provenance" links (e.g., Jira issue, GitHub commit SHA, or ADR filename).
|
|
325
|
-
- Docstrings on public functions: intent + one usage example.
|
|
326
|
-
- Reference issue numbers / commit SHAs when a line exists because of a specific bug.
|
|
327
|
-
- No obvious comments that restate the code.
|
|
328
|
-
- No commented-out code (C5): dead code must be deleted, not commented out. Use git history to recover it.
|
|
329
|
-
|
|
330
|
-
## Tests (F.I.R.S.T — Uncle Bob Ch 9)
|
|
331
|
-
|
|
332
|
-
- Tests run headless with a single command (recorded in CLAUDE.md).
|
|
333
|
-
- Every new function gets a test. Every bug fix gets a regression test.
|
|
334
|
-
- Mocks for external I/O are named fake classes, not inline stubs.
|
|
335
|
-
- Tests are **F**ast, **I**ndependent, **R**epeatable, **S**elf-Validating, **T**imely.
|
|
336
|
-
- Never skip or @ignore a test without an explicit ambiguity note explaining what is unresolved (T4); silently ignored tests are prohibited.
|
|
337
|
-
- Test boundary conditions (T5): every suite must cover exact edge values — empty input, maximum, minimum, and off-by-one.
|
|
338
|
-
- Test through public interfaces only (T8): assert on observable outcomes (return values, API responses, UI state). Never assert on internal state or private methods.
|
|
339
|
-
- Every change must be verifiable with a single runnable command before it is marked done.
|
|
340
|
-
|
|
341
|
-
## Dependencies
|
|
342
|
-
|
|
343
|
-
- Inject dependencies through constructor/parameter, not global/import.
|
|
344
|
-
- Wrap third-party libs behind a thin project-owned interface.
|
|
345
|
-
|
|
346
|
-
## Structure
|
|
347
|
-
|
|
348
|
-
- Follow the framework convention (Rails, Django, Next.js, etc.).
|
|
349
|
-
- Predictable paths: controller/model/view, src/lib/test.
|
|
350
|
-
- Prefer small focused modules over god files.
|
|
351
|
-
|
|
352
|
-
## Formatting
|
|
353
|
-
|
|
354
|
-
- Use the language default formatter (cargo fmt, gofmt, prettier, black, rubocop -A).
|
|
355
|
-
- Configured in pre-commit and on-save. No style debates beyond that.
|
|
356
|
-
|
|
357
|
-
## Logging
|
|
358
|
-
|
|
359
|
-
- Structured JSON for debugging / observability.
|
|
360
|
-
- Plain text only for user-facing CLI output.
|
|
361
|
-
|
|
362
|
-
## Defensive Code
|
|
363
|
-
|
|
364
|
-
- Retry with backoff (for API/network calls in skill implementations)
|
|
365
|
-
- Timeout (for long-running operations)
|
|
366
|
-
- Graceful degradation (when external services/dependencies fail)
|
|
367
|
-
|
|
368
|
-
The agent implements defensive code only for categories explicitly listed here.
|
|
369
|
-
|
|
370
|
-
## Skill Naming — Conventions and Exceptions
|
|
371
|
-
|
|
372
|
-
All skill directories under `skills/` use a two-word `verb-noun` kebab-case pair (ADR-0001). Grep for any skill
|
|
373
|
-
name must return < 5 results across the repo.
|
|
374
|
-
|
|
375
|
-
**Documented exceptions** (adjective-noun retained for clarity; renaming would reduce usability):
|
|
376
|
-
|
|
377
|
-
| Skill | Convention deviation | Rationale |
|
|
378
|
-
|-------|----------------------|-----------|
|
|
379
|
-
| `terse-mode` | adjective-noun | `enable-terse` implies a toggle; `terse-mode` names a mode state |
|
|
380
|
-
| `visual-dashboard` | adjective-noun | `view-dashboard` implies read-only; `show-dashboard` collides with `show` verbs |
|
|
381
|
-
| `deploy` | single verb | Well-known DevOps single-word concept; renames like `deploy-app` or `deploy-service` are redundant since deploy always targets an application |
|
|
382
|
-
| `grill-with-docs` | three-word verb-prep-noun | Variant of `grill-me`; the `-with-docs` suffix is the distinguishing feature — collapsing it would hide the doc-grounded contract |
|
|
383
|
-
| `generate-allure-report` | three-word verb-noun-noun | `generate-report` is ambiguous across report types; `allure` names the specific output format consumers integrate with |
|
|
384
|
-
| `simple-english` | adjective-noun | Names the recognizable STE brand users search for (`simplify-english` / `write-plain` hide intent and break searchability for users coming from the upstream skill) |
|
|
385
|
-
|
|
386
|
-
Any new exception requires an entry in this table before the skill is published.
|
|
387
|
-
|
|
388
|
-
## Tombstone Aliases (e53s02)
|
|
389
|
-
|
|
390
|
-
Every skill rename or merge ships a tombstone alias for one release, so consumers
|
|
391
|
-
referencing the old name don't break immediately.
|
|
392
|
-
|
|
393
|
-
**Mechanism:**
|
|
394
|
-
|
|
395
|
-
1. Run `bash scripts/tombstone-skill.sh <old-name> <new-name-or-merge-target>` when
|
|
396
|
-
renaming or merging a skill. It replaces `skills/<old-name>/SKILL.md` with a stub
|
|
397
|
-
pointing at the new name/location, preserves the old skill's `# story: eNNsNN` tags
|
|
398
|
-
for traceability, and registers the mapping in `specs/tombstones.yaml` (old name,
|
|
399
|
-
new name/target, creation timestamp, and the `created_at_version` at creation time).
|
|
400
|
-
2. Run `bash scripts/validate-tombstones.sh` to confirm every registered tombstone's
|
|
401
|
-
stub still resolves, and to flag any tombstone whose `created_at_version` is in a
|
|
402
|
-
different minor/major release train (major.minor) than the current version — that
|
|
403
|
-
stub has served its one-release transition window and should be removed. Patch-only
|
|
404
|
-
bumps within the same minor version don't count as a new release: this repo ships
|
|
405
|
-
via semantic-release on every merge to main, so comparing full semver strings would
|
|
406
|
-
expire a tombstone within minutes of creation instead of giving consumers a real
|
|
407
|
-
migration window.
|
|
408
|
-
3. **Required alongside the first real use of `tombstone-skill.sh`:** update
|
|
409
|
-
`docs/references/model-profiles.md`'s skill-count annotations. A tombstone stub is
|
|
410
|
-
still a `skills/*/SKILL.md` file — it increments the live skill count the same as
|
|
411
|
-
any other skill, and the count doc must reflect that.
|
|
412
|
-
|
|
413
|
-
**Rejected names:** both the old and new name must be a bare kebab-case skill name
|
|
414
|
-
(`^[a-z][a-z0-9-]*$`) — `tombstone-skill.sh` refuses anything else before touching the
|
|
415
|
-
filesystem (path segments, absolute paths, etc.).
|
|
416
|
-
|
|
417
|
-
This story (e53s02) builds the mechanism only; it creates no real tombstone stub
|
|
418
|
-
itself, so the live skill count doesn't move yet. The first real use is expected in
|
|
419
|
-
e56 (skill reclassification/merges).
|
|
420
|
-
|
|
421
|
-
## Catalog Freeze (e54-e59 migration)
|
|
422
|
-
|
|
423
|
-
The 80-skill catalog is frozen as of `specs/tech-architecture/CATALOG-BASELINE-<date>.yaml`
|
|
424
|
-
(e54s01) so e56's reclassification work (80 skills → ~28 procedures) has a stable
|
|
425
|
-
starting point instead of a moving target. `bash scripts/check-catalog-drift.sh`
|
|
426
|
-
(e54s02) diffs the live catalog against that baseline on every Preflight run and
|
|
427
|
-
prints `WARNING:` lines for drift — it is advisory only (always exits 0) and never
|
|
428
|
-
blocks Preflight or CI.
|
|
429
|
-
|
|
430
|
-
**Frozen (triggers a drift warning):**
|
|
431
|
-
- Adding a new `skills/<name>/SKILL.md` directory
|
|
432
|
-
- Structural changes to an existing skill's `phase`, `effort`, or `model` frontmatter
|
|
433
|
-
fields
|
|
434
|
-
|
|
435
|
-
**Not frozen (no warning; proceed as normal):**
|
|
436
|
-
- Bug fixes within an existing skill's existing shape
|
|
437
|
-
- `description:` edits
|
|
438
|
-
- Any other content fix that doesn't touch `phase`/`effort`/`model`
|
|
439
|
-
|
|
440
|
-
**Exit criterion:** the freeze ends when e56 (reclassify-catalog) merges. e56's
|
|
441
|
-
completion is the unfreeze event itself — there is no calendar date, and no other
|
|
442
|
-
story or action lifts the freeze early.
|
|
443
|
-
|
|
444
|
-
**Exception marker:** a change that is genuinely unrelated to the migration (e.g. an
|
|
445
|
-
urgent fix that happens to touch a frozen field) can suppress its own drift warning
|
|
446
|
-
by adding a comment containing the literal string `freeze-exception` to the affected
|
|
447
|
-
`SKILL.md`, for example:
|
|
448
|
-
|
|
449
|
-
```
|
|
450
|
-
<!-- freeze-exception: urgent security fix, unrelated to the e54-e59 migration -->
|
|
451
|
-
```
|
|
452
|
-
|
|
453
|
-
`scripts/check-catalog-drift.sh` checks for this exact substring — it must remain
|
|
454
|
-
byte-identical between this document and the script, or the exception path silently
|
|
455
|
-
stops working. Use it sparingly: it should be a marker for something a human decided
|
|
456
|
-
was safe to change during the freeze, not a way to permanently silence the gate for a
|
|
457
|
-
skill that should just wait until e56.
|
|
458
|
-
|
|
459
|
-
## File-Size Exceptions
|
|
460
|
-
|
|
461
|
-
The 300-line file cap exists to ensure files fit in a single agent context
|
|
462
|
-
window. The following files are documented exceptions:
|
|
463
|
-
|
|
464
|
-
| File | Lines | Rationale | Review date |
|
|
465
|
-
|------|-------|-----------|-------------|
|
|
466
|
-
| `scripts/audit-compliance.sh` | 300 | Gherkin harness with embedded judge logic and waiver subsystem; splitting the judge loop from the reporting layer would require fragile state-passing. At the 300-line cap; monitor. | 2026-10-01 |
|
|
467
|
-
|
|
468
|
-
**Note:** `scripts/trace-stories.sh` was refactored from a 613-line monolith into a
|
|
469
|
-
69-line orchestrator delegating to `scripts/lib/trace-stories.py`. `scripts/lib/trace-matrix.py`
|
|
470
|
-
was split into `simple_yaml.py` + `trace_renderer.py` (252 lines); see
|
|
471
|
-
BUG-2026-07-06-gate-trace-matrix-oversized. Prior exception rows for trace-matrix.py
|
|
472
|
-
and trace-stories.py are removed — both are now under the 300-line cap.
|
|
473
|
-
|
|
474
|
-
Any new exception requires an entry in this table with rationale and a review date.
|
|
475
|
-
|
|
476
|
-
## docs/references SSOT Sync (e45s10)
|
|
477
|
-
|
|
478
|
-
Agent-guidance files under `docs/references/` are **distilled from upstream sources**, not hand-edited ad hoc. Canonical inputs live in `CLAUDE.md`, `docs/PRINCIPLES.md`, and `skills/*/SKILL.md`.
|
|
479
|
-
|
|
480
|
-
| Action | Command |
|
|
481
|
-
|--------|---------|
|
|
482
|
-
| Regenerate locally | `bash scripts/sync-references.sh` |
|
|
483
|
-
| Manifest | `scripts/references-manifest.yaml` |
|
|
484
|
-
| Scheduled CI | `.github/workflows/sync-references.yml` (weekly) |
|
|
485
|
-
|
|
486
|
-
After changing SKILL.md `model:` frontmatter or token-management prose in CLAUDE.md, run `sync-references.sh` to refresh reference docs and `.sync-stamp`.
|
|
78
|
+
Every skill writes written output to `specs/` at root. See [specs/README.md](specs/README.md) for full schema.
|
|
79
|
+
- **YAML cockpit:** `specs/state.yaml` (session & handoff), `specs/release-plan.yaml` (WSJF index), `specs/execution-status.yaml` (story done/todo SoT), `specs/metrics/cycle-times.yaml` (velocity ledger).
|
|
80
|
+
- **BCP accounting mandate:** BCP = Business Complexity Points (story size baseline via 6-step method before build; see [docs/references/bcp.md](docs/references/bcp.md)). Timestamps: `metrics.story_start` and `metrics.story_end` mandatory.
|
|
81
|
+
- **Generated targets:** Never edit `.cursor/rules/`, `.gemini/extensions/bigpowers/`, `.pi/`, or `website/src/content/docs/` directly — run `bash scripts/sync-skills.sh`.
|
|
82
|
+
|
|
83
|
+
## Code Style & Clean Architecture
|
|
84
|
+
|
|
85
|
+
- **Size limits:** Functions: 4–20 lines (split if longer). Source files: under 300 lines (SRP; fits single context window).
|
|
86
|
+
- **Quality heuristics:** One responsibility per function/module (SRP). Stepdown Rule (G34). Demeter's Law.
|
|
87
|
+
- **Names:** specific and unique (<5 hits in repo). Avoid `data`, `handler`, `Manager`, `Service`. Names describe side-effects (N7).
|
|
88
|
+
- **Types:** explicit typing mandatory — no `any`, no untyped public APIs. No magic numbers/strings (G25).
|
|
89
|
+
- **Errors & remediation:** Throw typed exceptions with offending value, expected shape, and actionable remediation hint.
|
|
90
|
+
- **Boy Scout Rule:** Leave every file touched at least as clean as found. Remove dead code (G9/F4; no commented-out code C5).
|
|
91
|
+
- **Portability:** `grep -E portability`: never use `\d` or `\D` (PCRE-only; breaks on GNU grep in Linux CI). Use `[0-9]`.
|
|
92
|
+
- **Comments:** Write WHY, not WHAT. Never strip comments on refactor. Complex logic must include provenance links (issue, SHA, ADR).
|
|
93
|
+
## Tests (F.I.R.S.T)
|
|
94
|
+
- Fast, Independent, Repeatable, Self-Validating, Timely. Headless single-command runs.
|
|
95
|
+
- Boundary conditions (T5): test exact edges (empty, min, max, off-by-one).
|
|
96
|
+
- Public interfaces only (T8): test observable behavior, never private state.
|
|
97
|
+
- No ignored tests without explicit ambiguity note (T4).
|
|
98
|
+
|
|
99
|
+
## Detailed References
|
|
100
|
+
|
|
101
|
+
- Skill Naming & Exceptions: [docs/references/skill-naming.md](docs/references/skill-naming.md)
|
|
102
|
+
- Tombstone Aliases: [docs/references/tombstones.md](docs/references/tombstones.md)
|
|
103
|
+
- Catalog Freeze: [docs/references/catalog-freeze.md](docs/references/catalog-freeze.md)
|
|
104
|
+
- File-Size Exceptions: [docs/references/file-size-exceptions.md](docs/references/file-size-exceptions.md)
|
|
105
|
+
- Reference SSOT Sync: [docs/references/ssot-sync.md](docs/references/ssot-sync.md)
|
|
106
|
+
- Toolchain (bts, sqz, RTK): [docs/references/agent-tooling.md](docs/references/agent-tooling.md)
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/CLAUDE.md
DELETED
|
@@ -1,400 +0,0 @@
|
|
|
1
|
-
# story: e38s08
|
|
2
|
-
# story: e51s05
|
|
3
|
-
# story: e45s22
|
|
4
|
-
# story: e45s23
|
|
5
|
-
# story: e55s03
|
|
6
|
-
|
|
7
|
-
# bigpowers — Claude Code
|
|
8
|
-
|
|
9
|
-
Read CONVENTIONS.md before any GitHub or git operation.
|
|
10
|
-
|
|
11
|
-
[`constitution.md`](constitution.md) is a consolidated entry point synthesizing
|
|
12
|
-
this project's doctrine (this file, CONVENTIONS.md, docs/PRINCIPLES.md,
|
|
13
|
-
docs/references/*.md) into bigspec's B0-B10 + Capstone blocks, with citations
|
|
14
|
-
back to the fuller text. It's a starting point for a reader, not a
|
|
15
|
-
replacement — this file remains fully authoritative for its own content today.
|
|
16
|
-
|
|
17
|
-
<!-- BEGIN bigpowers:context-routing -->
|
|
18
|
-
## Context Routing
|
|
19
|
-
|
|
20
|
-
Load subdirectory context **by file glob** — do not read the full doc tree up front.
|
|
21
|
-
|
|
22
|
-
| Glob / trigger | Load first | Fallback |
|
|
23
|
-
|----------------|------------|----------|
|
|
24
|
-
| `skills/**` | Active skill's `SKILL.md` + sibling `REFERENCE.md` if linked | `SKILL-INDEX.md` |
|
|
25
|
-
| `specs/epics/**` | Capsule `epic.yaml` + active story `-tasks.yaml` | `specs/release-plan.yaml` |
|
|
26
|
-
| `specs/product/**` | `SCOPE_LATEST.yaml`, `VISION_LATEST.yaml` | `specs/README.md` |
|
|
27
|
-
| `specs/tech-architecture/**` | `tech-stack.md` + epic `eNN-TEST_PLAN_LATEST.md` if present | `CONVENTIONS.md` |
|
|
28
|
-
| `scripts/**` | `CONVENTIONS.md` § Generated artifact targets | This file § Commands |
|
|
29
|
-
| `website/**` | `website/README.md` if present | Never edit `website/src/content/docs/` (generated) |
|
|
30
|
-
| `docs/**` | Matching doc under `docs/` | `docs/references/` |
|
|
31
|
-
| Default / session start | This file → `CONVENTIONS.md` → `specs/state.yaml` | `survey-context` |
|
|
32
|
-
|
|
33
|
-
Sub-AGENTS.md files (when present in consumer projects) override this table for their directory only.
|
|
34
|
-
<!-- END bigpowers:context-routing -->
|
|
35
|
-
|
|
36
|
-
<!-- BEGIN bigpowers:learned-preferences -->
|
|
37
|
-
## Learned User Preferences
|
|
38
|
-
|
|
39
|
-
_Durable preferences discovered across sessions. Update via `session-state` — do not infer from chat alone._
|
|
40
|
-
|
|
41
|
-
- Prefer `rtk`-prefixed shell commands for git, test, and build output (token savings).
|
|
42
|
-
- Run Preflight before forward work; never dismiss red gates as pre-existing.
|
|
43
|
-
- Edit `skills/*/SKILL.md` sources only — never `.cursor/rules/` or `.gemini/` artifacts.
|
|
44
|
-
|
|
45
|
-
## Workspace Facts
|
|
46
|
-
|
|
47
|
-
_Stable repo facts — prefer these over re-discovery._
|
|
48
|
-
|
|
49
|
-
- Stack: Markdown / Bash documentation project; skills sync via `bash scripts/sync-skills.sh`.
|
|
50
|
-
- Planning SoT: `specs/state.yaml`, `specs/release-plan.yaml`, `specs/execution-status.yaml`.
|
|
51
|
-
- Story traceability: `# story: eNNsNN` tags in implementing files; `bash scripts/trace-stories.sh --strict` in CI.
|
|
52
|
-
- Rule matrix: `bash scripts/compile-rule-matrix.sh` → `specs/rule-matrix.json` (P0–P3 tiers from CONVENTIONS.md).
|
|
53
|
-
<!-- END bigpowers:learned-preferences -->
|
|
54
|
-
|
|
55
|
-
## Project
|
|
56
|
-
|
|
57
|
-
bigpowers — agent skills for spec-driven, test-first software development by solo developers (skill count and catalog are auto-generated in `SKILL-INDEX.md`; never hardcode the count in docs).
|
|
58
|
-
Stack: Markdown / Bash (documentation-based; skills integrate with Claude Code, Cursor, Gemini CLI)
|
|
59
|
-
|
|
60
|
-
## Commands
|
|
61
|
-
|
|
62
|
-
| Action | Command |
|
|
63
|
-
|---------|---------|
|
|
64
|
-
| Install | `npm install -g bigpowers && bigpowers setup` |
|
|
65
|
-
| Run | `bash scripts/sync-skills.sh` |
|
|
66
|
-
| Test | N/A (documentation project) |
|
|
67
|
-
| Build | `bash scripts/install.sh` (from source) |
|
|
68
|
-
| Lint | `bash scripts/sync-skills.sh` (validates SKILL.md syntax) |
|
|
69
|
-
| Validate specs YAML | `bash scripts/validate-specs-yaml.sh` |
|
|
70
|
-
| Typecheck | N/A (Markdown / Bash project) |
|
|
71
|
-
| CI platform | GitHub Actions — one pipeline `.github/workflows/test-build-release.yml` (sync, verification-gates, skill-verify, story-verify → release, and → pages-build → pages-deploy when docs paths change); plus `publish-wiki.yml` |
|
|
72
|
-
| Compliance | `npm run compliance` |
|
|
73
|
-
| Verification Gates | `bash scripts/run-verification-gates.sh` |
|
|
74
|
-
| Traceability | `bash scripts/trace-stories.sh --strict` | grep for story tags (traceability check) |
|
|
75
|
-
| Preflight | `npm run compliance && bash scripts/run-verification-gates.sh && bash scripts/sync-skills.sh && bash scripts/trace-stories.sh --strict` | Full local green stack before forward work. Chain ends on `--strict` traceability — no trailing always-exit-0 step. |
|
|
76
|
-
| Catalog drift (advisory) | `bash scripts/check-catalog-drift.sh` | e54s02 Confirm gate during catalog freeze — always exits 0; run manually when changing skills, not part of Preflight. |
|
|
77
|
-
| CI | `gh pr checks` | Remote CI green when a PR is open |
|
|
78
|
-
|
|
79
|
-
### Pre-Merge Checklist
|
|
80
|
-
|
|
81
|
-
Before opening a PR or landing a branch, run:
|
|
82
|
-
|
|
83
|
-
```bash
|
|
84
|
-
npm run compliance && bash scripts/run-verification-gates.sh
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
If any gate fails, fix before merging. Run `--baseline` after any intentional increase in skill count or structure.
|
|
88
|
-
|
|
89
|
-
**BCP Plus:** For stories sized with the 13-dimension BCP Plus methodology, confirm the `bcp_plus_breakdown` is present in the epic YAML and carried into `state.yaml` as `epic_cycle.bcp_plus`. See `docs/references/bcp-plus.md` for the NFR Gate pattern.
|
|
90
|
-
|
|
91
|
-
## Architecture
|
|
92
|
-
|
|
93
|
-
Collection of verb-noun skills under `skills/`, each with a SKILL.md source file and supporting documentation. Runtime specs live in `specs/state.yaml`, `specs/release-plan.yaml`, and `specs/execution-status.yaml`; intent in `specs/product/`; epic shards in `specs/epics/`. The sync-skills.sh script auto-generates artifacts for Cursor (.cursor/rules) and Gemini CLI (.gemini/extensions/bigpowers/) from SKILL.md sources. All planning output goes to specs/ at the project root.
|
|
94
|
-
|
|
95
|
-
## Conventions
|
|
96
|
-
|
|
97
|
-
- Skill directories under `skills/` use verb-noun naming (two words, kebab-case)
|
|
98
|
-
- Every skill has a single SKILL.md file as its source of truth
|
|
99
|
-
- All planning/spec output goes to specs/ at project root
|
|
100
|
-
- Artifacts in .cursor/rules and .gemini/ are auto-generated; edit SKILL.md, not artifacts
|
|
101
|
-
- Run sync-skills.sh after any SKILL.md changes to regenerate artifacts
|
|
102
|
-
- Website content in website/src/content/docs/ is auto-generated by prebuild; edit repo sources, not site files
|
|
103
|
-
|
|
104
|
-
## Never
|
|
105
|
-
|
|
106
|
-
- Never edit .cursor/rules or .gemini/extensions/ directly — these are generated files
|
|
107
|
-
- Never edit website/src/content/docs/ directly — these are generated files; website/ is the fourth generated artifact target (alongside .cursor/, .gemini/, .pi/)
|
|
108
|
-
- Never create a skill without a SKILL.md file and proper verb-noun naming
|
|
109
|
-
- Never push changes without running sync-skills.sh first
|
|
110
|
-
|
|
111
|
-
## Token Management
|
|
112
|
-
|
|
113
|
-
**Mechanical backstop (e45s03):** `scripts/hooks/token-mgmt-pre-tool-use.sh` blocks oversized tool calls when prose rules are ignored. Wire as a `PreToolUse` hook for `Read`, `Grep`, and `Bash` (alongside `hooks/pre-tool-use.sh` for git safety). Thresholds: Read >100KB, Grep >200 matches without `head_limit`, Bash commands likely to exceed 500 output lines without `rtk`/`sqz compress`. Install snippet:
|
|
114
|
-
|
|
115
|
-
```json
|
|
116
|
-
{
|
|
117
|
-
"hooks": {
|
|
118
|
-
"PreToolUse": [
|
|
119
|
-
{ "matcher": "Read|Grep|Bash", "hooks": [{ "type": "command", "command": "bash scripts/hooks/token-mgmt-pre-tool-use.sh" }] }
|
|
120
|
-
]
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
Context engineering (write/select/compress/isolate — see `docs/references/context-engineering.md`):
|
|
126
|
-
|
|
127
|
-
- **Write (token-efficient content):** Short functions (4-20 lines), unique symbol names, headless tests. Don't restate code in comments.
|
|
128
|
-
- **Select (include only what's relevant):** Use `bts_map` for ranked file lists, `survey-context` for phase bootstrap. Don't read files you don't need.
|
|
129
|
-
- **Compress (reduce without losing structure):** Use `bts_compress` or pipe through `sqz compress`. Use `rtk` for build/test/git output (60-99% savings). Prefer `terse-mode` when context is heavy.
|
|
130
|
-
- **Isolate (partition work):** Use `kickoff-branch` for isolated worktrees, `dispatch-agents` for parallel tasks with disjoint scopes, `session-state` for cold-start handoff.
|
|
131
|
-
|
|
132
|
-
**Effort classification:** Skills carry an `effort:` frontmatter field (`light` | `standard` | `heavy`). Prefer `light` skills for bootstrap/status checks; reserve `heavy` for epic builds and multi-phase planning.
|
|
133
|
-
|
|
134
|
-
- **Auto-Terse**: When a session exceeds 20 turns or the context window feels "heavy" (latency increasing), you MUST switch to `terse-mode` to save tokens.
|
|
135
|
-
- **Context Compaction**: Every 10 turns, summarize the current session state and implementation decisions into a short, high-density note.
|
|
136
|
-
- **Minimal Output**: Prefer text-only output for simple status; use `web_fetch` or `run_shell_command` only for evidence.
|
|
137
|
-
- **Stream Stability**: When writing large files or long documents, output continuously in chunks of ~200 lines. Do not pause. If you need time to process, emit a placeholder comment rather than going silent.
|
|
138
|
-
|
|
139
|
-
## Session Start
|
|
140
|
-
|
|
141
|
-
Before any task, run this sequence — not optional:
|
|
142
|
-
|
|
143
|
-
1. Read `CLAUDE.md` (this file)
|
|
144
|
-
2. Read `CONVENTIONS.md`
|
|
145
|
-
3. Read `specs/state.yaml` if it exists — current session and active epic
|
|
146
|
-
4. Read `specs/release-plan.yaml` if it exists — active release context
|
|
147
|
-
|
|
148
|
-
## Agent Rules
|
|
149
|
-
|
|
150
|
-
- **Workflow Mandate:** You MUST use the bigpowers skills (e.g., `plan-work`, `develop-tdd`, `craft-skill`) to perform tasks. DO NOT write code directly in response to a user prompt like "build this feature".
|
|
151
|
-
- **Always Green / fix-or-log:** Preflight and CI must be green before forward work. Any reproducible gate failure during unrelated work requires **quick-fix** or **fix-bug** — see CONVENTIONS § Discovered Defects. Never dismiss failures as pre-existing or out of scope.
|
|
152
|
-
- Read specs/ and CONVENTIONS.md before writing code.
|
|
153
|
-
- Write the minimum code that solves the stated problem. Nothing extra.
|
|
154
|
-
- Run tests after every change. Show evidence before declaring done.
|
|
155
|
-
- One clarifying question beats a wrong assumption baked into 200 lines.
|
|
156
|
-
- All written output (plans, specs, investigations) goes in specs/.
|
|
157
|
-
|
|
158
|
-
## bts toolchain
|
|
159
|
-
|
|
160
|
-
`bts` is installed. Prefer its verbs over ad-hoc shell commands.
|
|
161
|
-
|
|
162
|
-
| Task | Command | Avoid |
|
|
163
|
-
|------|---------|-------|
|
|
164
|
-
| Search code | `bts find --print <pattern>` | grep / find / cat |
|
|
165
|
-
| Interactive search | `bts find <pattern>` | manual grep pipes |
|
|
166
|
-
| Compress for context | `bts compress <file>` or `cmd \| bts compress` | summarising by hand |
|
|
167
|
-
| Repo map | `bts map` | listing files by hand |
|
|
168
|
-
| Library docs | `bts docs <lib>` | guessing from training data |
|
|
169
|
-
| Package source | `bts src <pkg>` | git clone |
|
|
170
|
-
| Toolchain health | `bts doctor` | which / command -v |
|
|
171
|
-
|
|
172
|
-
**Rules**
|
|
173
|
-
- Search with `bts find` before opening files to locate a symbol or pattern.
|
|
174
|
-
- Pipe anything > 200 lines through `bts compress` before adding to context.
|
|
175
|
-
- Run `bts map` when asked for a repo overview.
|
|
176
|
-
- Use `bts docs <lib>` before answering questions about library APIs. Doc fetches use `scripts/lib/doc-fetch-cache.sh` (ETag-revalidated, 300s TTL).
|
|
177
|
-
- If a tool is missing, say so and run `bts doctor` — do not silently substitute.
|
|
178
|
-
|
|
179
|
-
<!-- BEGIN rtk-pretooluse-hook (e45s16 — mechanical PreToolUse backstop; remove block to disable) -->
|
|
180
|
-
|
|
181
|
-
**RTK hook (installed):** `scripts/hooks/rtk-rewrite.sh` is symlinked into `~/.claude/hooks/` by `bash scripts/install.sh` and registered as a Bash `PreToolUse` hook. It delegates to `rtk hook claude` — prose rules below are a fallback only when the hook is absent.
|
|
182
|
-
|
|
183
|
-
<!-- END rtk-pretooluse-hook -->
|
|
184
|
-
|
|
185
|
-
<!-- BEGIN sqz-claude-guidance (auto-installed by sqz init; remove this block to disable) -->
|
|
186
|
-
|
|
187
|
-
## sqz — Context Compression (READ FIRST)
|
|
188
|
-
|
|
189
|
-
sqz is installed in this project. It compresses tool output so large
|
|
190
|
-
files, long logs, and verbose command output cost far fewer tokens.
|
|
191
|
-
There are **two ways** sqz is wired in, and you should prefer each
|
|
192
|
-
one in the situations below.
|
|
193
|
-
|
|
194
|
-
### Preferred tools (MCP)
|
|
195
|
-
|
|
196
|
-
The `sqz-mcp` server is registered in this project's MCP config. It
|
|
197
|
-
exposes three read-only tools that compress their output through the
|
|
198
|
-
sqz pipeline:
|
|
199
|
-
|
|
200
|
-
- **`sqz_read_file`** — read a file from disk and return a compressed
|
|
201
|
-
view. **PREFER this over the built-in `Read` tool** for any file
|
|
202
|
-
larger than ~2KB or any file you might read more than once in the
|
|
203
|
-
same session. Repeat reads return a 13-token `§ref:HASH§` reference
|
|
204
|
-
instead of the full content.
|
|
205
|
-
|
|
206
|
-
- **`sqz_grep`** — search files for a literal string or regex.
|
|
207
|
-
**PREFER this over the built-in `Grep`** for anything that might
|
|
208
|
-
match more than a handful of lines. Caps at 200 matches by default;
|
|
209
|
-
raise with `max_matches` if needed.
|
|
210
|
-
|
|
211
|
-
- **`sqz_list_dir`** — list a directory. Skips `.git`, `node_modules`,
|
|
212
|
-
`target`, `dist`, `build`, `vendor`, `__pycache__` so the output
|
|
213
|
-
stays focused. **PREFER this over `ls -la` via Bash** when you want
|
|
214
|
-
to see a project layout.
|
|
215
|
-
|
|
216
|
-
The built-in `Read`, `Grep`, `Glob` tools remain available. Use them for:
|
|
217
|
-
- Tiny config files (<1KB) where compression can't help.
|
|
218
|
-
- Byte-exact reads you'll hash or diff (lockfiles, signatures).
|
|
219
|
-
- Globbing (sqz has no glob tool; `Glob` is still the right choice).
|
|
220
|
-
|
|
221
|
-
### Bash commands (hooked automatically)
|
|
222
|
-
|
|
223
|
-
When you run a shell command through the `Bash` tool, a PreToolUse hook
|
|
224
|
-
rewrites it to pipe output through `sqz compress`. This is transparent:
|
|
225
|
-
you don't need to remember to add anything, but it's useful to know
|
|
226
|
-
that these commands get compressed automatically:
|
|
227
|
-
|
|
228
|
-
```bash
|
|
229
|
-
git status # → git status 2>&1 | sqz compress --cmd git
|
|
230
|
-
cargo test # → cargo test 2>&1 | sqz compress --cmd cargo
|
|
231
|
-
docker ps # → docker ps 2>&1 | sqz compress --cmd docker
|
|
232
|
-
kubectl get pods # → kubectl get pods 2>&1 | sqz compress --cmd kubectl
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
The rewrite is skipped for interactive commands (`vim`, `ssh`,
|
|
236
|
-
`python`), compound commands (`a && b`, `a > file.txt`), and anything
|
|
237
|
-
already going through sqz.
|
|
238
|
-
|
|
239
|
-
### Escape hatch — when you see a `§ref:HASH§` token
|
|
240
|
-
|
|
241
|
-
If tool output contains a `§ref:a1b2c3d4§` token and you need the full
|
|
242
|
-
content it points at, resolve it. Three equivalent ways:
|
|
243
|
-
|
|
244
|
-
- Shell: `/Users/danielvm/.local/bin/sqz expand a1b2c3d4` (or paste the whole token
|
|
245
|
-
`/Users/danielvm/.local/bin/sqz expand §ref:a1b2c3d4§`).
|
|
246
|
-
- MCP tool: call `expand` with `{ "prefix": "a1b2c3d4" }`.
|
|
247
|
-
- To get uncompressed output for one command: prefix it with
|
|
248
|
-
`SQZ_NO_DEDUP=1` (e.g. `SQZ_NO_DEDUP=1 git log | sqz compress`).
|
|
249
|
-
|
|
250
|
-
If the compressed output is actively making the task harder (looping
|
|
251
|
-
on refs, small retries replacing one big read), call the `passthrough`
|
|
252
|
-
MCP tool to get raw text.
|
|
253
|
-
|
|
254
|
-
### When NOT to use sqz tools
|
|
255
|
-
|
|
256
|
-
- Writing or editing files — use the built-in `Write`/`Edit` tools.
|
|
257
|
-
sqz has no write tools (by design; see issue #5 follow-up).
|
|
258
|
-
- Running commands interactively or in watch mode.
|
|
259
|
-
- Reading very small files (<1KB) where compression can't help.
|
|
260
|
-
|
|
261
|
-
<!-- END sqz-claude-guidance -->
|
|
262
|
-
|
|
263
|
-
<!-- rtk-instructions v2 -->
|
|
264
|
-
# RTK (Rust Token Killer) - Token-Optimized Commands
|
|
265
|
-
|
|
266
|
-
## Golden Rule
|
|
267
|
-
|
|
268
|
-
**Always prefix commands with `rtk`**. If RTK has a dedicated filter, it uses it. If not, it passes through unchanged. This means RTK is always safe to use.
|
|
269
|
-
|
|
270
|
-
**Important**: Even in command chains with `&&`, use `rtk`:
|
|
271
|
-
```bash
|
|
272
|
-
# ❌ Wrong
|
|
273
|
-
git add . && git commit -m "msg" && git push
|
|
274
|
-
|
|
275
|
-
# ✅ Correct
|
|
276
|
-
rtk git add . && rtk git commit -m "msg" && rtk git push
|
|
277
|
-
```
|
|
278
|
-
|
|
279
|
-
## RTK Commands by Workflow
|
|
280
|
-
|
|
281
|
-
### Build & Compile (80-90% savings)
|
|
282
|
-
```bash
|
|
283
|
-
rtk cargo build # Cargo build output
|
|
284
|
-
rtk cargo check # Cargo check output
|
|
285
|
-
rtk cargo clippy # Clippy warnings grouped by file (80%)
|
|
286
|
-
rtk tsc # TypeScript errors grouped by file/code (83%)
|
|
287
|
-
rtk lint # ESLint/Biome violations grouped (84%)
|
|
288
|
-
rtk prettier --check # Files needing format only (70%)
|
|
289
|
-
rtk next build # Next.js build with route metrics (87%)
|
|
290
|
-
```
|
|
291
|
-
|
|
292
|
-
### Test (60-99% savings)
|
|
293
|
-
```bash
|
|
294
|
-
rtk cargo test # Cargo test failures only (90%)
|
|
295
|
-
rtk go test # Go test failures only (90%)
|
|
296
|
-
rtk jest # Jest failures only (99.5%)
|
|
297
|
-
rtk vitest # Vitest failures only (99.5%)
|
|
298
|
-
rtk playwright test # Playwright failures only (94%)
|
|
299
|
-
rtk pytest # Python test failures only (90%)
|
|
300
|
-
rtk rake test # Ruby test failures only (90%)
|
|
301
|
-
rtk rspec # RSpec test failures only (60%)
|
|
302
|
-
rtk test <cmd> # Generic test wrapper - failures only
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
### Git (59-80% savings)
|
|
306
|
-
```bash
|
|
307
|
-
rtk git status # Compact status
|
|
308
|
-
rtk git log # Compact log (works with all git flags)
|
|
309
|
-
rtk git diff # Compact diff (80%)
|
|
310
|
-
rtk git show # Compact show (80%)
|
|
311
|
-
rtk git add # Ultra-compact confirmations (59%)
|
|
312
|
-
rtk git commit # Ultra-compact confirmations (59%)
|
|
313
|
-
rtk git push # Ultra-compact confirmations
|
|
314
|
-
rtk git pull # Ultra-compact confirmations
|
|
315
|
-
rtk git branch # Compact branch list
|
|
316
|
-
rtk git fetch # Compact fetch
|
|
317
|
-
rtk git stash # Compact stash
|
|
318
|
-
rtk git worktree # Compact worktree
|
|
319
|
-
```
|
|
320
|
-
|
|
321
|
-
Note: Git passthrough works for ALL subcommands, even those not explicitly listed.
|
|
322
|
-
|
|
323
|
-
### GitHub (26-87% savings)
|
|
324
|
-
```bash
|
|
325
|
-
rtk gh pr view <num> # Compact PR view (87%)
|
|
326
|
-
rtk gh pr checks # Compact PR checks (79%)
|
|
327
|
-
rtk gh run list # Compact workflow runs (82%)
|
|
328
|
-
rtk gh issue list # Compact issue list (80%)
|
|
329
|
-
rtk gh api # Compact API responses (26%)
|
|
330
|
-
```
|
|
331
|
-
|
|
332
|
-
### JavaScript/TypeScript Tooling (70-90% savings)
|
|
333
|
-
```bash
|
|
334
|
-
rtk pnpm list # Compact dependency tree (70%)
|
|
335
|
-
rtk pnpm outdated # Compact outdated packages (80%)
|
|
336
|
-
rtk pnpm install # Compact install output (90%)
|
|
337
|
-
rtk npm run <script> # Compact npm script output
|
|
338
|
-
rtk npx <cmd> # Compact npx command output
|
|
339
|
-
rtk prisma # Prisma without ASCII art (88%)
|
|
340
|
-
```
|
|
341
|
-
|
|
342
|
-
### Files & Search (60-75% savings)
|
|
343
|
-
```bash
|
|
344
|
-
rtk ls <path> # Tree format, compact (65%)
|
|
345
|
-
rtk read <file> # Code reading with filtering (60%)
|
|
346
|
-
rtk grep <pattern> # Search grouped by file (75%). Format flags (-c, -l, -L, -o, -Z) run raw.
|
|
347
|
-
rtk find <pattern> # Find grouped by directory (70%)
|
|
348
|
-
```
|
|
349
|
-
|
|
350
|
-
### Analysis & Debug (70-90% savings)
|
|
351
|
-
```bash
|
|
352
|
-
rtk err <cmd> # Filter errors only from any command
|
|
353
|
-
rtk log <file> # Deduplicated logs with counts
|
|
354
|
-
rtk json <file> # JSON structure without values
|
|
355
|
-
rtk deps # Dependency overview
|
|
356
|
-
rtk env # Environment variables compact
|
|
357
|
-
rtk summary <cmd> # Smart summary of command output
|
|
358
|
-
rtk diff # Ultra-compact diffs
|
|
359
|
-
```
|
|
360
|
-
|
|
361
|
-
### Infrastructure (85% savings)
|
|
362
|
-
```bash
|
|
363
|
-
rtk docker ps # Compact container list
|
|
364
|
-
rtk docker images # Compact image list
|
|
365
|
-
rtk docker logs <c> # Deduplicated logs
|
|
366
|
-
rtk kubectl get # Compact resource list
|
|
367
|
-
rtk kubectl logs # Deduplicated pod logs
|
|
368
|
-
```
|
|
369
|
-
|
|
370
|
-
### Network (65-70% savings)
|
|
371
|
-
```bash
|
|
372
|
-
rtk curl <url> # Compact HTTP responses (70%)
|
|
373
|
-
rtk wget <url> # Compact download output (65%)
|
|
374
|
-
```
|
|
375
|
-
|
|
376
|
-
### Meta Commands
|
|
377
|
-
```bash
|
|
378
|
-
rtk gain # View token savings statistics
|
|
379
|
-
rtk gain --history # View command history with savings
|
|
380
|
-
rtk discover # Analyze Claude Code sessions for missed RTK usage
|
|
381
|
-
rtk proxy <cmd> # Run command without filtering (for debugging)
|
|
382
|
-
rtk init # Add RTK instructions to CLAUDE.md
|
|
383
|
-
rtk init --global # Add RTK to ~/.claude/CLAUDE.md
|
|
384
|
-
```
|
|
385
|
-
|
|
386
|
-
## Token Savings Overview
|
|
387
|
-
|
|
388
|
-
| Category | Commands | Typical Savings |
|
|
389
|
-
|----------|----------|-----------------|
|
|
390
|
-
| Tests | vitest, playwright, cargo test | 90-99% |
|
|
391
|
-
| Build | next, tsc, lint, prettier | 70-87% |
|
|
392
|
-
| Git | status, log, diff, add, commit | 59-80% |
|
|
393
|
-
| GitHub | gh pr, gh run, gh issue | 26-87% |
|
|
394
|
-
| Package Managers | pnpm, npm, npx | 70-90% |
|
|
395
|
-
| Files | ls, read, grep, find | 60-75% |
|
|
396
|
-
| Infrastructure | docker, kubectl | 85% |
|
|
397
|
-
| Network | curl, wget | 65-70% |
|
|
398
|
-
|
|
399
|
-
Overall average: **60-90% token reduction** on common development operations.
|
|
400
|
-
<!-- /rtk-instructions -->
|
package/GEMINI.md
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
# bigpowers — Gemini CLI
|
|
2
|
-
|
|
3
|
-
> **Auto-generated** by `sync-skills.sh` from `CLAUDE.md`. Edit CLAUDE.md, not this file.
|
|
4
|
-
|
|
5
|
-
Read CONVENTIONS.md before any GitHub or git operation.
|
|
6
|
-
|
|
7
|
-
## Project
|
|
8
|
-
|
|
9
|
-
bigpowers — 58 agent skills for spec-driven, test-first software development by solo developers.
|
|
10
|
-
Stack: Markdown / Bash (documentation-based; skills integrate with Claude Code, Cursor, Gemini CLI)
|
|
11
|
-
|
|
12
|
-
## Commands
|
|
13
|
-
|
|
14
|
-
| Action | Command |
|
|
15
|
-
|---------|---------|
|
|
16
|
-
| Install | `npm install -g bigpowers && bigpowers setup` |
|
|
17
|
-
| Run | `bash scripts/sync-skills.sh` |
|
|
18
|
-
| Test | N/A (documentation project) |
|
|
19
|
-
| Build | `bash scripts/install.sh` (from source) |
|
|
20
|
-
| Lint | `bash scripts/sync-skills.sh` (validates SKILL.md syntax) |
|
|
21
|
-
|
|
22
|
-
## Architecture
|
|
23
|
-
|
|
24
|
-
Collection of 58 verb-noun skills, each with a SKILL.md source file and supporting documentation. Includes Verify phase and profiles/. The sync-skills.sh script auto-generates artifacts for Cursor (.cursor/rules) and Gemini CLI (.gemini/extensions/bigpowers/) from SKILL.md sources. All planning and spec output goes to specs/ at the project root.
|
|
25
|
-
|
|
26
|
-
## Conventions
|
|
27
|
-
|
|
28
|
-
- Skill directories use verb-noun naming (two words, kebab-case)
|
|
29
|
-
- Every skill has a single SKILL.md file as its source of truth
|
|
30
|
-
- All planning/spec output goes to specs/ at project root
|
|
31
|
-
- Artifacts in .cursor/rules and .gemini/ are auto-generated; edit SKILL.md, not artifacts
|
|
32
|
-
- Run sync-skills.sh after any SKILL.md changes to regenerate artifacts
|
|
33
|
-
|
|
34
|
-
## Never
|
|
35
|
-
|
|
36
|
-
- Never edit .cursor/rules or .gemini/extensions/ directly — these are generated files
|
|
37
|
-
- Never create a skill without a SKILL.md file and proper verb-noun naming
|
|
38
|
-
- Never push changes without running sync-skills.sh first
|
|
39
|
-
|
|
40
|
-
## Token Management
|
|
41
|
-
|
|
42
|
-
- **Auto-Terse**: When a session exceeds 20 turns or the context window feels "heavy" (latency increasing), you MUST switch to `terse-mode` to save tokens.
|
|
43
|
-
- **Context Compaction**: Every 10 turns, summarize the current session state and implementation decisions into a short, high-density note.
|
|
44
|
-
- **Minimal Output**: Prefer text-only output for simple status; use `web_fetch` or `run_shell_command` only for evidence.
|
|
45
|
-
|
|
46
|
-
## Agent Rules
|
|
47
|
-
|
|
48
|
-
- **Workflow Mandate:** You MUST use the bigpowers skills (e.g., `plan-work`, `develop-tdd`, `craft-skill`) to perform tasks. DO NOT write code directly in response to a user prompt like "build this feature".
|
|
49
|
-
- Read specs/ and CONVENTIONS.md before writing code.
|
|
50
|
-
- Write the minimum code that solves the stated problem. Nothing extra.
|
|
51
|
-
- Never refactor, rename, or reorganize code outside the task scope.
|
|
52
|
-
- Run tests after every change. Show evidence before declaring done.
|
|
53
|
-
- One clarifying question beats a wrong assumption baked into 200 lines.
|
|
54
|
-
- All written output (plans, specs, investigations) goes in specs/.
|
|
55
|
-
|
|
56
|
-
## bts toolchain
|
|
57
|
-
|
|
58
|
-
`bts` is installed. Prefer its verbs over ad-hoc shell commands.
|
|
59
|
-
|
|
60
|
-
| Task | Command | Avoid |
|
|
61
|
-
|------|---------|-------|
|
|
62
|
-
| Search code | `bts find --print <pattern>` | grep / find / cat |
|
|
63
|
-
| Interactive search | `bts find <pattern>` | manual grep pipes |
|
|
64
|
-
| Compress for context | `bts compress <file>` or `cmd \| bts compress` | summarising by hand |
|
|
65
|
-
| Repo map | `bts map` | listing files by hand |
|
|
66
|
-
| Library docs | `bts docs <lib>` | guessing from training data |
|
|
67
|
-
| Package source | `bts src <pkg>` | git clone |
|
|
68
|
-
| Toolchain health | `bts doctor` | which / command -v |
|
|
69
|
-
|
|
70
|
-
**Rules**
|
|
71
|
-
- Search with `bts find` before opening files to locate a symbol or pattern.
|
|
72
|
-
- Pipe anything > 200 lines through `bts compress` before adding to context.
|
|
73
|
-
- Run `bts map` when asked for a repo overview.
|
|
74
|
-
- Use `bts docs <lib>` before answering questions about library APIs.
|
|
75
|
-
- If a tool is missing, say so and run `bts doctor` — do not silently substitute.
|