bigpowers 2.59.9 → 2.61.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/.mcp.json +9 -0
  2. package/.pi/package.json +2 -2
  3. package/.pi/prompts/develop-tdd.md +1 -0
  4. package/.pi/prompts/gate-trace.md +1 -0
  5. package/.pi/prompts/orchestrate-project.md +1 -1
  6. package/.pi/prompts/plan-tests.md +74 -0
  7. package/.pi/prompts/plan-work.md +14 -1
  8. package/.pi/prompts/verify-work.md +14 -5
  9. package/.pi/skills/develop-tdd/SKILL.md +1 -0
  10. package/.pi/skills/gate-trace/SKILL.md +1 -0
  11. package/.pi/skills/orchestrate-project/SKILL.md +1 -1
  12. package/.pi/skills/plan-tests/SKILL.md +76 -0
  13. package/.pi/skills/plan-work/SKILL.md +14 -1
  14. package/.pi/skills/verify-work/SKILL.md +14 -5
  15. package/CHANGELOG.md +14 -0
  16. package/CONVENTIONS.md +5 -1
  17. package/README.md +1 -1
  18. package/SKILL-INDEX.md +1 -1
  19. package/bigpowers-mcp/build/config.d.ts +7 -0
  20. package/bigpowers-mcp/build/config.js +35 -0
  21. package/bigpowers-mcp/build/config.js.map +1 -0
  22. package/bigpowers-mcp/build/index.d.ts +2 -0
  23. package/bigpowers-mcp/build/index.js +20 -0
  24. package/bigpowers-mcp/build/index.js.map +1 -0
  25. package/bigpowers-mcp/build/lib/git-context.d.ts +12 -0
  26. package/bigpowers-mcp/build/lib/git-context.js +91 -0
  27. package/bigpowers-mcp/build/lib/git-context.js.map +1 -0
  28. package/bigpowers-mcp/build/lib/graph/builder.d.ts +4 -0
  29. package/bigpowers-mcp/build/lib/graph/builder.js +85 -0
  30. package/bigpowers-mcp/build/lib/graph/builder.js.map +1 -0
  31. package/bigpowers-mcp/build/lib/graph/store.d.ts +11 -0
  32. package/bigpowers-mcp/build/lib/graph/store.js +77 -0
  33. package/bigpowers-mcp/build/lib/graph/store.js.map +1 -0
  34. package/bigpowers-mcp/build/lib/graph/types.d.ts +24 -0
  35. package/bigpowers-mcp/build/lib/graph/types.js +2 -0
  36. package/bigpowers-mcp/build/lib/graph/types.js.map +1 -0
  37. package/bigpowers-mcp/build/lib/paths.d.ts +8 -0
  38. package/bigpowers-mcp/build/lib/paths.js +40 -0
  39. package/bigpowers-mcp/build/lib/paths.js.map +1 -0
  40. package/bigpowers-mcp/build/lib/phase-map.d.ts +3 -0
  41. package/bigpowers-mcp/build/lib/phase-map.js +77 -0
  42. package/bigpowers-mcp/build/lib/phase-map.js.map +1 -0
  43. package/bigpowers-mcp/build/lib/skill-parser.d.ts +31 -0
  44. package/bigpowers-mcp/build/lib/skill-parser.js +159 -0
  45. package/bigpowers-mcp/build/lib/skill-parser.js.map +1 -0
  46. package/bigpowers-mcp/build/lib/validate-skill.d.ts +13 -0
  47. package/bigpowers-mcp/build/lib/validate-skill.js +62 -0
  48. package/bigpowers-mcp/build/lib/validate-skill.js.map +1 -0
  49. package/bigpowers-mcp/build/tools/index.d.ts +9 -0
  50. package/bigpowers-mcp/build/tools/index.js +172 -0
  51. package/bigpowers-mcp/build/tools/index.js.map +1 -0
  52. package/bigpowers-mcp/package-lock.json +3685 -0
  53. package/bigpowers-mcp/package.json +30 -0
  54. package/bigpowers-mcp/src/config.ts +44 -0
  55. package/bigpowers-mcp/src/index.ts +23 -0
  56. package/bigpowers-mcp/src/lib/git-context.ts +98 -0
  57. package/bigpowers-mcp/src/lib/graph/builder.ts +95 -0
  58. package/bigpowers-mcp/src/lib/graph/store.ts +87 -0
  59. package/bigpowers-mcp/src/lib/graph/types.ts +28 -0
  60. package/bigpowers-mcp/src/lib/paths.ts +47 -0
  61. package/bigpowers-mcp/src/lib/phase-map.ts +77 -0
  62. package/bigpowers-mcp/src/lib/skill-parser.ts +191 -0
  63. package/bigpowers-mcp/src/lib/validate-skill.ts +90 -0
  64. package/bigpowers-mcp/src/tools/index.ts +225 -0
  65. package/bigpowers-mcp/test/catalog.test.ts +121 -0
  66. package/bigpowers-mcp/test/fixtures/graph/test-graph.jsonl +5 -0
  67. package/bigpowers-mcp/test/fixtures/skills/broken-link/SKILL.md +11 -0
  68. package/bigpowers-mcp/test/fixtures/skills/missing-verify/SKILL.md +9 -0
  69. package/bigpowers-mcp/test/fixtures/skills/valid-skill/SKILL.md +14 -0
  70. package/bigpowers-mcp/tsconfig.json +16 -0
  71. package/bigpowers-mcp/vitest.config.ts +8 -0
  72. package/package.json +1 -1
  73. package/scripts/check-blind-spots.sh +5 -4
  74. package/scripts/lib/blind-spots.py +37 -1
  75. package/skills/develop-tdd/SKILL.md +1 -0
  76. package/skills/gate-trace/SKILL.md +1 -0
  77. package/skills/orchestrate-project/SKILL.md +1 -1
  78. package/skills/plan-tests/REFERENCE.md +31 -0
  79. package/skills/plan-tests/SKILL.md +42 -0
  80. package/skills/plan-work/REFERENCE.md +13 -0
  81. package/skills/plan-work/SKILL.md +1 -1
  82. package/skills/verify-work/SKILL.md +14 -5
  83. package/skills-lock.json +10 -5
package/.mcp.json ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "mcpServers": {
3
+ "bigpowers-mcp": {
4
+ "command": "node",
5
+ "args": ["bigpowers-mcp/build/index.js"],
6
+ "cwd": "${workspaceFolder}"
7
+ }
8
+ }
9
+ }
package/.pi/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bigpowers",
3
- "version": "2.59.9",
4
- "description": "73 skills — 73 agent skills synthesizing 17 years of software engineering discipline into a prescriptive methodology for solo developers",
3
+ "version": "2.61.0",
4
+ "description": "74 skills — 73 agent skills synthesizing 17 years of software engineering discipline into a prescriptive methodology for solo developers",
5
5
  "keywords": [
6
6
  "pi-package"
7
7
  ],
@@ -35,6 +35,7 @@ If you catch yourself thinking these, stop and reconsider — you are likely dev
35
35
  ### 1. Planning
36
36
 
37
37
  - [ ] Read active `specs/epics/*/epic.yaml` story tasks or `specs/bugs/BUG-*.md` — understand verify steps
38
+ - [ ] If `specs/tech-architecture/eNN-TEST_PLAN_LATEST.md` exists for the active epic, read it before writing the first test. Implement P0 scenarios (`SC-*-P0-*`) before P1. P2/P3 scenarios are optional per time budget.
38
39
  - [ ] Confirm interface changes and behaviors to test (prioritize)
39
40
  - [ ] Design interfaces for testability — identify [deep modules](deep-modules.md) opportunities
40
41
  - [ ] Get user approval on the plan
@@ -15,6 +15,7 @@ Deterministic quality gate that combines traceability coverage and blind-spot da
15
15
  | R2 | Any story done but no verify evidence | CONCERNS |
16
16
  | R3 | P0 story (top WSJF quartile) with 0% coverage | FAIL |
17
17
  | R4 | Overall coverage < 60% | CONCERNS |
18
+ | R6 | P0 story + eNN-TEST_PLAN_LATEST.md exists + zero SC-eNNsYY-P0-* in test files | CONCERNS |
18
19
  | R5 | Overall ≥ 80% + no critical gaps + all verify → PASS | PASS |
19
20
 
20
21
  ## Oracle Confidence Downgrade
@@ -45,7 +45,7 @@ See [REFERENCE.md](REFERENCE.md) for detailed phase specifications and gate type
45
45
 
46
46
  1. **Maintains state.yaml** — Tracks current phase, `active_epic`, `active_flow`, decisions, risks.
47
47
  2. **Spawns appropriate skills** — Routes by `model:` frontmatter. Decisions pass only via `specs/state.yaml` `handoff` between spawns.
48
- 3. **Methodology lenses** — If `specs/tech-architecture/TEST_PLAN_LATEST.md` or ADRs exist, apply at phase gates.
48
+ 3. **Methodology lenses** — If `specs/tech-architecture/e*-TEST_PLAN_LATEST.md` or ADRs exist, apply at phase gates.
49
49
  4. **Enforces gates** — Hard stops if success criteria not met.
50
50
  5. **The Gatekeeper** — Between stories in BUILD: read `specs/execution-status.yaml`; previous story must be `done` before starting the next; use `build-epic` for the 8-step epic cycle.
51
51
  6. **Pauses for confirmation** — After each phase, asks "Ready to proceed?".
@@ -0,0 +1,74 @@
1
+ ---
2
+ description: "Design a risk-scaled test architecture for an epic before implementation begins. Produces prioritized scenarios, test level distribution, and fixture plans based on TEA and bigpowers principles."
3
+ ---
4
+
5
+
6
+ # Plan Tests
7
+
8
+ > **Spine position:** Between `slice-tasks` and `plan-work` for epics with `risk: P0|P1`. Optional (can be waived in `state.yaml`) for P2/P3.
9
+
10
+ Bridges the gap between slicing and planning by systematically designing the test suite as a first-class system. Produces `specs/tech-architecture/eNN-TEST_PLAN_LATEST.md`.
11
+
12
+ ## Pre-flight
13
+ - Read `specs/epics/eNN-*/` story list.
14
+
15
+ ## Core Workflow
16
+ 1. **Analyze Epic**: Read sliced stories in the active epic capsule.
17
+ 2. **Risk Assessment**: Map behaviors to P0–P3 risk tiers.
18
+ 3. **Level Strategy**: Classify each scenario (Unit, Integration, E2E).
19
+ 4. **Fixture Design**: Plan factories, network intercepts, mocks (see REFERENCE.md).
20
+ 5. **NFR Plan**: Define verifiable commands for Non-Functional Requirements. Skip if `--lite`.
21
+ 6. **Publish**: Generate `specs/tech-architecture/eNN-TEST_PLAN_LATEST.md`.
22
+
23
+ ## Hard Gates & Guardrails
24
+ - **DO NOT** write test code or production code during this skill.
25
+ - Scenario ID format MUST be: `SC-eNNsYY-P{0|1|2|3}-NN`.
26
+ - `plan-work` MUST reference these scenario IDs in its §17 Gherkin acceptance criteria.
27
+ - Default to pushing tests to the lowest possible level.
28
+
29
+ ## Execution Modes
30
+ - `$bmad plan-tests`: Standard execution.
31
+ - `$bmad plan-tests --lite`: Skips NFRs and complex fixture planning.
32
+
33
+ ## Verify
34
+
35
+ → verify: `test -f specs/tech-architecture/$(echo $EPIC | sed "s|.*/||")-TEST_PLAN_LATEST.md && echo OK`
36
+
37
+ ## Handoff
38
+
39
+ Gate: READY -> next: plan-work
40
+ Writes: state.yaml handoff.next_skill = plan-work
41
+
42
+ ---
43
+
44
+ # Plan Tests — Reference
45
+
46
+ ## Test Plan Template (`specs/tech-architecture/eNN-TEST_PLAN_LATEST.md`)
47
+
48
+ ```markdown
49
+ # Test Design: [eNN-slug]
50
+
51
+ ## 1. Risk Matrix & Scenarios
52
+ | Scenario ID | Behavior Description | Risk | Test Level | Target File/Module |
53
+ |-------------|----------------------|------|------------|--------------------|
54
+ | SC-P0-01 | Primary checkout | P0 | Integration | checkout.spec.ts |
55
+
56
+ ## 2. Fixture Architecture & Isolation
57
+ - Data Factories: (e.g. UserFactory)
58
+ - Network Intercepts: (e.g. MSW handlers)
59
+ - Database State: (e.g. in-memory SQLite)
60
+
61
+ ## 3. NFR Verification
62
+ | NFR Type | Requirement | Verification Command |
63
+ |----------|-------------|----------------------|
64
+ | Perf | < 200ms | `npm run test:perf` |
65
+
66
+ ## 4. Out of Scope
67
+ - [Explicitly excluded testing areas]
68
+ ```
69
+
70
+ ## Fixture Planning Guidance
71
+
72
+ - **Data Factories**: Prefer factory functions over manual object construction.
73
+ - **Network Intercepts**: For frontend integration tests, use tools like Mock Service Worker (MSW) to intercept and mock HTTP requests.
74
+ - **Database State**: For backend tests, use a clean database state per test or an in-memory database to ensure isolation.
@@ -42,7 +42,7 @@ If this plan touches an existing module, run `assess-impact` first to understand
42
42
 
43
43
  2. **Draft steps** — Break implementation into the smallest possible steps where each step leaves the codebase working, has one observable outcome, and can be verified with a single command. Red-flag check: name any rationalization you caught before moving to step 3.
44
44
 
45
- 3. **Write capsule story spec + tasks** — Output two files inside the active epic capsule. See [REFERENCE.md](REFERENCE.md) for file formats and the plan-template. Each task optionally includes a `security:` field (`none` / `low` / `medium` / `high`) sourced from the epic's `specs/security/epics/<id>/THREAT_MODEL.md`. Tasks with `security: medium` or `security: high` MUST include "no new security findings in affected paths" in their verify steps.
45
+ 3. **Write capsule story spec + tasks** — Output two files inside the active epic capsule. See [REFERENCE.md](REFERENCE.md) for file formats and the plan-template. Each task MUST include a `risk:` field (`P0` | `P1` | `P2` | `P3`) based on BCP + story type heuristics (see REFERENCE.md). If a test plan artifact (`specs/tech-architecture/eNN-TEST_PLAN_LATEST.md`) exists, read it and inherit its P0/P1 risk classifications and scenario IDs (`SC-eNNsYY-P0-NN`). Each task optionally includes a `security:` field (`none` / `low` / `medium` / `high`) sourced from the epic's `specs/security/epics/<id>/THREAT_MODEL.md`. Tasks with `security: medium` or `security: high` MUST include "no new security findings in affected paths" in their verify steps.
46
46
 
47
47
  4. **Verify step format** — Every step MUST follow: `N. <What to do> → verify: <runnable command>`. See [REFERENCE.md](REFERENCE.md) for good/bad examples.
48
48
 
@@ -80,6 +80,7 @@ tasks:
80
80
  - id: 1
81
81
  description: "Add login form component tests"
82
82
  verify: "npm test -- login-form.test.tsx"
83
+ risk: P1
83
84
  status: todo
84
85
  ```
85
86
 
@@ -91,6 +92,7 @@ Update `specs/epics/<capsule>/epic.yaml` manifest to list the story and its BCPs
91
92
  ### Story [X.Y]: [title] — Implementation Steps
92
93
 
93
94
  **type:** feat | fix | refactor
95
+ **risk:** P0 | P1 | P2 | P3
94
96
  **context:** domain | infra
95
97
  **Context**: [One paragraph: what this story implements and why]
96
98
 
@@ -139,6 +141,17 @@ N. <What to do> → verify: <runnable command that proves it worked>
139
141
 
140
142
  ## Sub-operations
141
143
 
144
+ ### Risk Assignment Heuristics
145
+
146
+ Every task and story MUST be assigned a `risk:` level (P0, P1, P2, P3). When `specs/tech-architecture/eNN-TEST_PLAN_LATEST.md` exists for the epic, defer to its scenario risk mapping (`SC-eNNsYY-P0-NN`). Otherwise, apply these heuristics based on BCP and story type:
147
+
148
+ - **P0**: Critical path, data loss risk, auth/security boundary, external integration, or high BCP (≥ 5).
149
+ - **P1**: Core feature logic, state mutations, standard business value (BCP 3-4).
150
+ - **P2**: Utility functions, UI layout changes, display-only data, low risk (BCP 2).
151
+ - **P3**: Documentation, cosmetic tweaks, CSS variables, zero behavioral change (BCP 1).
152
+
153
+ `verify-work` scales its UAT depth based on this field.
154
+
142
155
  ### Define Success
143
156
 
144
157
  Before planning, convert task statements into observable "step → verify: <cmd>" pairs:
@@ -17,25 +17,34 @@ Review answers "is the code good?"; Verify answers "does the built thing do what
17
17
  - --smoke: Cold-start only plus one happy-path flow. Use for hotfixes.
18
18
  - --cli: CLI tool verification — replaces cold-start with binary smoke checklist. Use for CLI tools with no server process.
19
19
 
20
+ ## Risk-Scaled Depth
21
+
22
+ `verify-work` reads the `risk:` field from the story template (defaults to `P1` if absent) to scale verification rigor:
23
+ - **P0**: Full verify-work multi-phase + `security-review` (step 5) + NFR evidence gate (step 5b).
24
+ - **P1**: Standard verify-work (build, test, lint, step-by-step manual).
25
+ - **P2**: Smoke, typecheck, lint only. Skip tests, security scan, and step-by-step manual UAT.
26
+ - **P3**: Typecheck and lint only. Skip smoke, tests, security scan, and step-by-step manual UAT.
27
+
20
28
  ## Process
21
29
 
22
30
  > **Timing:** `bash scripts/bp-timing.sh start verify-work` at invocation; `bash scripts/bp-timing.sh end verify-work` before handoff.
23
31
 
24
32
  0. **Branch check** — must not be `main`/`master`.
25
33
 
26
- 1. Read active story tasks from `specs/epics/<capsule>/eNNsYY-tasks.yaml` and story spec from `specs/epics/<capsule>/eNNsYY-<slug>.md` (countable-story-format, Gherkin in §17).
34
+ 1. Read active story tasks from `specs/epics/<capsule>/eNNsYY-tasks.yaml` and story spec from `specs/epics/<capsule>/eNNsYY-<slug>.md` (countable-story-format, Gherkin in §17). Note the `risk:` level (`P0`–`P3`).
27
35
  1a. **Pre-UAT verify validation** — for each task's `verify:` command, run it and detect pattern mismatches before UAT begins. If a grep/awk/jq command fails, check whether the pattern is wrong vs. a genuine failure:
28
36
  ```bash
29
37
  # For a failing grep -q 'PATTERN' FILE, check what is actually in FILE
30
38
  grep 'PATTERN' FILE || grep -n '' FILE | head -20 # show nearest lines
31
39
  ```
32
40
  Report: `"Pattern 'X' not found. Nearest match: 'Y' at line N"` and ask `"Update verify command? [Y/n]"`. Fix before proceeding — a mismatched verify command produces false failures during UAT.
33
- 2. **Cold-start smoke** (if app): stop server, clear caches, boot from scratch.
41
+ 2. **Cold-start smoke** (if app; skip if P3): stop server, clear caches, boot from scratch.
34
42
  3. **AGENTS.md preflight** — before running default checks, call `bash scripts/bp-read-agents.sh` to detect project-specific commands. If `BP_PREFLIGHT` is set, run it instead of the default mechanical gates (or in addition to them if the project requires both). Output: `"Using preflight from AGENTS.md: <cmd>"`. Fall back to `CLAUDE.md` commands if AGENTS.md is absent.
35
- 4. Mechanical gates: build → typecheck → lint → tests (from `CLAUDE.md` or AGENTS.md).
36
- 5. **Security scan** — run `security-review` against the git diff (working tree vs merge-base). Parse findings report. If any HIGH findings with confidence ≥ 8 exist → **block the gate**. Write findings to `specs/security/REVIEW.md`. Allow documented exceptions via `specs/security/EXCEPTIONS.md`. MEDIUM/LOW findings warn but don't block.
43
+ 4. Mechanical gates: build → typecheck → lint → tests (from `CLAUDE.md` or AGENTS.md). Skip tests if P2/P3.
44
+ 5. **Security scan** (skip if P2/P3) — run `security-review` against the git diff (working tree vs merge-base). Parse findings report. If any HIGH findings with confidence ≥ 8 exist → **block the gate**. Write findings to `specs/security/REVIEW.md`. Allow documented exceptions via `specs/security/EXCEPTIONS.md`. MEDIUM/LOW findings warn but don't block.
37
45
  5a. **Blind-spot check** — run `bash scripts/check-blind-spots.sh`. This detects structural quality gaps (verify-gap, test-gap, stale-tag, etc.) beyond percentage coverage. If any HIGH-severity findings exist → **block the verify-work PASS gate**. Findings are written to `specs/blind-spots.json`. MEDIUM/LOW findings warn but don't block.
38
- 6. **Step-by-step UAT** — one user-observable action at a time.
46
+ 5b. **NFR Evidence Gate** (P0 only) — Produces go/no-go output on three dimensions: Performance (response time, throughput), Reliability (error rate, recovery), and Operability (logging, health checks). Reads thresholds from `specs/tech-architecture/eNN-TEST_PLAN_LATEST.md` and writes evidence as OKF verification-report bundles to `specs/verifications/NFR-eNNsYY.json`. FAIL on any dimension blocks the gate.
47
+ 6. **Step-by-step UAT** (skip if P2/P3) — one user-observable action at a time.
39
48
  7. **Gaps loop** — failures → log → `plan-work` → re-verify. Unaddressed HIGH findings from step 5 feed into this loop alongside other quality gaps.
40
49
 
41
50
  ## Verify sub-operations
@@ -37,6 +37,7 @@ If you catch yourself thinking these, stop and reconsider — you are likely dev
37
37
  ### 1. Planning
38
38
 
39
39
  - [ ] Read active `specs/epics/*/epic.yaml` story tasks or `specs/bugs/BUG-*.md` — understand verify steps
40
+ - [ ] If `specs/tech-architecture/eNN-TEST_PLAN_LATEST.md` exists for the active epic, read it before writing the first test. Implement P0 scenarios (`SC-*-P0-*`) before P1. P2/P3 scenarios are optional per time budget.
40
41
  - [ ] Confirm interface changes and behaviors to test (prioritize)
41
42
  - [ ] Design interfaces for testability — identify [deep modules](deep-modules.md) opportunities
42
43
  - [ ] Get user approval on the plan
@@ -17,6 +17,7 @@ Deterministic quality gate that combines traceability coverage and blind-spot da
17
17
  | R2 | Any story done but no verify evidence | CONCERNS |
18
18
  | R3 | P0 story (top WSJF quartile) with 0% coverage | FAIL |
19
19
  | R4 | Overall coverage < 60% | CONCERNS |
20
+ | R6 | P0 story + eNN-TEST_PLAN_LATEST.md exists + zero SC-eNNsYY-P0-* in test files | CONCERNS |
20
21
  | R5 | Overall ≥ 80% + no critical gaps + all verify → PASS | PASS |
21
22
 
22
23
  ## Oracle Confidence Downgrade
@@ -47,7 +47,7 @@ See [REFERENCE.md](REFERENCE.md) for detailed phase specifications and gate type
47
47
 
48
48
  1. **Maintains state.yaml** — Tracks current phase, `active_epic`, `active_flow`, decisions, risks.
49
49
  2. **Spawns appropriate skills** — Routes by `model:` frontmatter. Decisions pass only via `specs/state.yaml` `handoff` between spawns.
50
- 3. **Methodology lenses** — If `specs/tech-architecture/TEST_PLAN_LATEST.md` or ADRs exist, apply at phase gates.
50
+ 3. **Methodology lenses** — If `specs/tech-architecture/e*-TEST_PLAN_LATEST.md` or ADRs exist, apply at phase gates.
51
51
  4. **Enforces gates** — Hard stops if success criteria not met.
52
52
  5. **The Gatekeeper** — Between stories in BUILD: read `specs/execution-status.yaml`; previous story must be `done` before starting the next; use `build-epic` for the 8-step epic cycle.
53
53
  6. **Pauses for confirmation** — After each phase, asks "Ready to proceed?".
@@ -0,0 +1,76 @@
1
+ ---
2
+ name: plan-tests
3
+ description: "\"Design a risk-scaled test architecture for an epic before implementation begins. Produces prioritized scenarios, test level distribution, and fixture plans based on TEA and bigpowers principles.\""
4
+ model: opus
5
+ ---
6
+
7
+
8
+ # Plan Tests
9
+
10
+ > **Spine position:** Between `slice-tasks` and `plan-work` for epics with `risk: P0|P1`. Optional (can be waived in `state.yaml`) for P2/P3.
11
+
12
+ Bridges the gap between slicing and planning by systematically designing the test suite as a first-class system. Produces `specs/tech-architecture/eNN-TEST_PLAN_LATEST.md`.
13
+
14
+ ## Pre-flight
15
+ - Read `specs/epics/eNN-*/` story list.
16
+
17
+ ## Core Workflow
18
+ 1. **Analyze Epic**: Read sliced stories in the active epic capsule.
19
+ 2. **Risk Assessment**: Map behaviors to P0–P3 risk tiers.
20
+ 3. **Level Strategy**: Classify each scenario (Unit, Integration, E2E).
21
+ 4. **Fixture Design**: Plan factories, network intercepts, mocks (see REFERENCE.md).
22
+ 5. **NFR Plan**: Define verifiable commands for Non-Functional Requirements. Skip if `--lite`.
23
+ 6. **Publish**: Generate `specs/tech-architecture/eNN-TEST_PLAN_LATEST.md`.
24
+
25
+ ## Hard Gates & Guardrails
26
+ - **DO NOT** write test code or production code during this skill.
27
+ - Scenario ID format MUST be: `SC-eNNsYY-P{0|1|2|3}-NN`.
28
+ - `plan-work` MUST reference these scenario IDs in its §17 Gherkin acceptance criteria.
29
+ - Default to pushing tests to the lowest possible level.
30
+
31
+ ## Execution Modes
32
+ - `$bmad plan-tests`: Standard execution.
33
+ - `$bmad plan-tests --lite`: Skips NFRs and complex fixture planning.
34
+
35
+ ## Verify
36
+
37
+ → verify: `test -f specs/tech-architecture/$(echo $EPIC | sed "s|.*/||")-TEST_PLAN_LATEST.md && echo OK`
38
+
39
+ ## Handoff
40
+
41
+ Gate: READY -> next: plan-work
42
+ Writes: state.yaml handoff.next_skill = plan-work
43
+
44
+ ---
45
+
46
+ # Plan Tests — Reference
47
+
48
+ ## Test Plan Template (`specs/tech-architecture/eNN-TEST_PLAN_LATEST.md`)
49
+
50
+ ```markdown
51
+ # Test Design: [eNN-slug]
52
+
53
+ ## 1. Risk Matrix & Scenarios
54
+ | Scenario ID | Behavior Description | Risk | Test Level | Target File/Module |
55
+ |-------------|----------------------|------|------------|--------------------|
56
+ | SC-P0-01 | Primary checkout | P0 | Integration | checkout.spec.ts |
57
+
58
+ ## 2. Fixture Architecture & Isolation
59
+ - Data Factories: (e.g. UserFactory)
60
+ - Network Intercepts: (e.g. MSW handlers)
61
+ - Database State: (e.g. in-memory SQLite)
62
+
63
+ ## 3. NFR Verification
64
+ | NFR Type | Requirement | Verification Command |
65
+ |----------|-------------|----------------------|
66
+ | Perf | < 200ms | `npm run test:perf` |
67
+
68
+ ## 4. Out of Scope
69
+ - [Explicitly excluded testing areas]
70
+ ```
71
+
72
+ ## Fixture Planning Guidance
73
+
74
+ - **Data Factories**: Prefer factory functions over manual object construction.
75
+ - **Network Intercepts**: For frontend integration tests, use tools like Mock Service Worker (MSW) to intercept and mock HTTP requests.
76
+ - **Database State**: For backend tests, use a clean database state per test or an in-memory database to ensure isolation.
@@ -44,7 +44,7 @@ If this plan touches an existing module, run `assess-impact` first to understand
44
44
 
45
45
  2. **Draft steps** — Break implementation into the smallest possible steps where each step leaves the codebase working, has one observable outcome, and can be verified with a single command. Red-flag check: name any rationalization you caught before moving to step 3.
46
46
 
47
- 3. **Write capsule story spec + tasks** — Output two files inside the active epic capsule. See [REFERENCE.md](REFERENCE.md) for file formats and the plan-template. Each task optionally includes a `security:` field (`none` / `low` / `medium` / `high`) sourced from the epic's `specs/security/epics/<id>/THREAT_MODEL.md`. Tasks with `security: medium` or `security: high` MUST include "no new security findings in affected paths" in their verify steps.
47
+ 3. **Write capsule story spec + tasks** — Output two files inside the active epic capsule. See [REFERENCE.md](REFERENCE.md) for file formats and the plan-template. Each task MUST include a `risk:` field (`P0` | `P1` | `P2` | `P3`) based on BCP + story type heuristics (see REFERENCE.md). If a test plan artifact (`specs/tech-architecture/eNN-TEST_PLAN_LATEST.md`) exists, read it and inherit its P0/P1 risk classifications and scenario IDs (`SC-eNNsYY-P0-NN`). Each task optionally includes a `security:` field (`none` / `low` / `medium` / `high`) sourced from the epic's `specs/security/epics/<id>/THREAT_MODEL.md`. Tasks with `security: medium` or `security: high` MUST include "no new security findings in affected paths" in their verify steps.
48
48
 
49
49
  4. **Verify step format** — Every step MUST follow: `N. <What to do> → verify: <runnable command>`. See [REFERENCE.md](REFERENCE.md) for good/bad examples.
50
50
 
@@ -82,6 +82,7 @@ tasks:
82
82
  - id: 1
83
83
  description: "Add login form component tests"
84
84
  verify: "npm test -- login-form.test.tsx"
85
+ risk: P1
85
86
  status: todo
86
87
  ```
87
88
 
@@ -93,6 +94,7 @@ Update `specs/epics/<capsule>/epic.yaml` manifest to list the story and its BCPs
93
94
  ### Story [X.Y]: [title] — Implementation Steps
94
95
 
95
96
  **type:** feat | fix | refactor
97
+ **risk:** P0 | P1 | P2 | P3
96
98
  **context:** domain | infra
97
99
  **Context**: [One paragraph: what this story implements and why]
98
100
 
@@ -141,6 +143,17 @@ N. <What to do> → verify: <runnable command that proves it worked>
141
143
 
142
144
  ## Sub-operations
143
145
 
146
+ ### Risk Assignment Heuristics
147
+
148
+ Every task and story MUST be assigned a `risk:` level (P0, P1, P2, P3). When `specs/tech-architecture/eNN-TEST_PLAN_LATEST.md` exists for the epic, defer to its scenario risk mapping (`SC-eNNsYY-P0-NN`). Otherwise, apply these heuristics based on BCP and story type:
149
+
150
+ - **P0**: Critical path, data loss risk, auth/security boundary, external integration, or high BCP (≥ 5).
151
+ - **P1**: Core feature logic, state mutations, standard business value (BCP 3-4).
152
+ - **P2**: Utility functions, UI layout changes, display-only data, low risk (BCP 2).
153
+ - **P3**: Documentation, cosmetic tweaks, CSS variables, zero behavioral change (BCP 1).
154
+
155
+ `verify-work` scales its UAT depth based on this field.
156
+
144
157
  ### Define Success
145
158
 
146
159
  Before planning, convert task statements into observable "step → verify: <cmd>" pairs:
@@ -19,25 +19,34 @@ Review answers "is the code good?"; Verify answers "does the built thing do what
19
19
  - --smoke: Cold-start only plus one happy-path flow. Use for hotfixes.
20
20
  - --cli: CLI tool verification — replaces cold-start with binary smoke checklist. Use for CLI tools with no server process.
21
21
 
22
+ ## Risk-Scaled Depth
23
+
24
+ `verify-work` reads the `risk:` field from the story template (defaults to `P1` if absent) to scale verification rigor:
25
+ - **P0**: Full verify-work multi-phase + `security-review` (step 5) + NFR evidence gate (step 5b).
26
+ - **P1**: Standard verify-work (build, test, lint, step-by-step manual).
27
+ - **P2**: Smoke, typecheck, lint only. Skip tests, security scan, and step-by-step manual UAT.
28
+ - **P3**: Typecheck and lint only. Skip smoke, tests, security scan, and step-by-step manual UAT.
29
+
22
30
  ## Process
23
31
 
24
32
  > **Timing:** `bash scripts/bp-timing.sh start verify-work` at invocation; `bash scripts/bp-timing.sh end verify-work` before handoff.
25
33
 
26
34
  0. **Branch check** — must not be `main`/`master`.
27
35
 
28
- 1. Read active story tasks from `specs/epics/<capsule>/eNNsYY-tasks.yaml` and story spec from `specs/epics/<capsule>/eNNsYY-<slug>.md` (countable-story-format, Gherkin in §17).
36
+ 1. Read active story tasks from `specs/epics/<capsule>/eNNsYY-tasks.yaml` and story spec from `specs/epics/<capsule>/eNNsYY-<slug>.md` (countable-story-format, Gherkin in §17). Note the `risk:` level (`P0`–`P3`).
29
37
  1a. **Pre-UAT verify validation** — for each task's `verify:` command, run it and detect pattern mismatches before UAT begins. If a grep/awk/jq command fails, check whether the pattern is wrong vs. a genuine failure:
30
38
  ```bash
31
39
  # For a failing grep -q 'PATTERN' FILE, check what is actually in FILE
32
40
  grep 'PATTERN' FILE || grep -n '' FILE | head -20 # show nearest lines
33
41
  ```
34
42
  Report: `"Pattern 'X' not found. Nearest match: 'Y' at line N"` and ask `"Update verify command? [Y/n]"`. Fix before proceeding — a mismatched verify command produces false failures during UAT.
35
- 2. **Cold-start smoke** (if app): stop server, clear caches, boot from scratch.
43
+ 2. **Cold-start smoke** (if app; skip if P3): stop server, clear caches, boot from scratch.
36
44
  3. **AGENTS.md preflight** — before running default checks, call `bash scripts/bp-read-agents.sh` to detect project-specific commands. If `BP_PREFLIGHT` is set, run it instead of the default mechanical gates (or in addition to them if the project requires both). Output: `"Using preflight from AGENTS.md: <cmd>"`. Fall back to `CLAUDE.md` commands if AGENTS.md is absent.
37
- 4. Mechanical gates: build → typecheck → lint → tests (from `CLAUDE.md` or AGENTS.md).
38
- 5. **Security scan** — run `security-review` against the git diff (working tree vs merge-base). Parse findings report. If any HIGH findings with confidence ≥ 8 exist → **block the gate**. Write findings to `specs/security/REVIEW.md`. Allow documented exceptions via `specs/security/EXCEPTIONS.md`. MEDIUM/LOW findings warn but don't block.
45
+ 4. Mechanical gates: build → typecheck → lint → tests (from `CLAUDE.md` or AGENTS.md). Skip tests if P2/P3.
46
+ 5. **Security scan** (skip if P2/P3) — run `security-review` against the git diff (working tree vs merge-base). Parse findings report. If any HIGH findings with confidence ≥ 8 exist → **block the gate**. Write findings to `specs/security/REVIEW.md`. Allow documented exceptions via `specs/security/EXCEPTIONS.md`. MEDIUM/LOW findings warn but don't block.
39
47
  5a. **Blind-spot check** — run `bash scripts/check-blind-spots.sh`. This detects structural quality gaps (verify-gap, test-gap, stale-tag, etc.) beyond percentage coverage. If any HIGH-severity findings exist → **block the verify-work PASS gate**. Findings are written to `specs/blind-spots.json`. MEDIUM/LOW findings warn but don't block.
40
- 6. **Step-by-step UAT** — one user-observable action at a time.
48
+ 5b. **NFR Evidence Gate** (P0 only) — Produces go/no-go output on three dimensions: Performance (response time, throughput), Reliability (error rate, recovery), and Operability (logging, health checks). Reads thresholds from `specs/tech-architecture/eNN-TEST_PLAN_LATEST.md` and writes evidence as OKF verification-report bundles to `specs/verifications/NFR-eNNsYY.json`. FAIL on any dimension blocks the gate.
49
+ 6. **Step-by-step UAT** (skip if P2/P3) — one user-observable action at a time.
41
50
  7. **Gaps loop** — failures → log → `plan-work` → re-verify. Unaddressed HIGH findings from step 5 feed into this loop alongside other quality gaps.
42
51
 
43
52
  ## Verify sub-operations
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [2.61.0](https://github.com/danielvm-git/bigpowers/compare/v2.60.0...v2.61.0) (2026-07-04)
2
+
3
+
4
+ ### Features
5
+
6
+ * **e32:** add bigpowers-mcp semantic context server ([f0f95b7](https://github.com/danielvm-git/bigpowers/commit/f0f95b7a790d7b4a5e056fb88fa6a771717ce29f))
7
+
8
+ # [2.60.0](https://github.com/danielvm-git/bigpowers/compare/v2.59.9...v2.60.0) (2026-07-04)
9
+
10
+
11
+ ### Features
12
+
13
+ * **e46:** add plan-tests skill, NFR gate, and SC scenario IDs ([6c19b8e](https://github.com/danielvm-git/bigpowers/commit/6c19b8eb2d21e4b862a5a00e1df570a2277728b8))
14
+
1
15
  ## [2.59.9](https://github.com/danielvm-git/bigpowers/compare/v2.59.8...v2.59.9) (2026-07-04)
2
16
 
3
17
 
package/CONVENTIONS.md CHANGED
@@ -56,6 +56,7 @@ You are operating within the `bigpowers` spec-driven development methodology.
56
56
  - **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.
57
57
  - **Verification:** You MUST verify every change with tests. Code generation without a corresponding plan in `specs/` is strictly forbidden.
58
58
  - **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.
59
+ - **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.
59
60
  - **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.
60
61
 
61
62
  ## specs/ — All Planning Output Goes Here
@@ -93,7 +94,9 @@ Missing timestamps are a gate violation — do not advance past `release-branch`
93
94
 
94
95
  ### next_skill signaling mandate (v2.0.0)
95
96
 
96
- Every critical-path skill (survey-context, 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?".
97
+ 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?".
98
+
99
+ `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.
97
100
 
98
101
  ### Intent vs delivery vs execution
99
102
 
@@ -129,6 +132,7 @@ When planning closes, copy to `specs/product/snapshots/release-<version>/` (`rel
129
132
  |----------|------|
130
133
  | Stack / architecture | `specs/tech-architecture/TECH_STACK_LATEST.md` |
131
134
  | Security / test / design plans | `specs/tech-architecture/*_PLAN_LATEST.md` |
135
+ | Epic test plan (P0/P1 epics) | `specs/tech-architecture/eNN-TEST_PLAN_LATEST.md` — produced by `plan-tests` skill (e46s04); one per epic. |
132
136
  | Domain context + ADRs | `specs/tech-architecture/TECH_STACK_LATEST.md` or legacy `specs/CONTEXT.md` + `specs/adr/` |
133
137
  | Bug investigation | `specs/bugs/BUG-*.md` + `specs/bugs/registry.yaml` (generated) |
134
138
  | Refactor / impact | `specs/tech-architecture/REFACTOR_LATEST.md`, `specs/tech-architecture/IMPACT_LATEST.md` |
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)
4
4
  ![npm version](https://img.shields.io/npm/v/bigpowers.svg)
5
- ![Skills](https://img.shields.io/badge/skills-73-brightgreen.svg)
5
+ ![Skills](https://img.shields.io/badge/skills-74-brightgreen.svg)
6
6
 
7
7
  **Agent skills synthesizing 17 years of software engineering discipline — from Clean Code to AI-native architecture — into a single, prescriptive methodology for solo developers.**
8
8
 
package/SKILL-INDEX.md CHANGED
@@ -3,7 +3,7 @@
3
3
  > **DO NOT EDIT** — This file is auto-generated by `scripts/generate-skill-index.sh`.
4
4
  > Edit `SKILL.md` source files or `skills-lock.json` instead. Run `bash scripts/sync-skills.sh` to regenerate.
5
5
 
6
- **Skills:** 73
6
+ **Skills:** 74
7
7
 
8
8
  ---
9
9
 
@@ -0,0 +1,7 @@
1
+ /** Repo root: cwd when launched from workspace, else parent of bigpowers-mcp. */
2
+ export declare function getRepoRoot(): string;
3
+ export declare function getSkillsDir(repoRoot: string): string;
4
+ export declare function getGraphPath(repoRoot: string): string;
5
+ export declare const MAX_READ_SKILL_BYTES: number;
6
+ export declare const SECRET_DENYLIST: RegExp[];
7
+ export declare const GIT_SCOPE_DIRS: string[];
@@ -0,0 +1,35 @@
1
+ import fs from "node:fs";
2
+ import path from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+ const packageDir = path.dirname(fileURLToPath(import.meta.url));
5
+ /** Repo root: cwd when launched from workspace, else parent of bigpowers-mcp. */
6
+ export function getRepoRoot() {
7
+ const fromEnv = process.env.BIGPOWERS_ROOT;
8
+ if (fromEnv)
9
+ return path.resolve(fromEnv);
10
+ const cwd = process.cwd();
11
+ if (isRepoRoot(cwd))
12
+ return cwd;
13
+ const parentOfPackage = path.resolve(packageDir, "../..");
14
+ if (isRepoRoot(parentOfPackage))
15
+ return parentOfPackage;
16
+ return cwd;
17
+ }
18
+ function isRepoRoot(dir) {
19
+ return (fs.existsSync(path.join(dir, "skills")) && fs.existsSync(path.join(dir, "specs")));
20
+ }
21
+ export function getSkillsDir(repoRoot) {
22
+ return path.join(repoRoot, "skills");
23
+ }
24
+ export function getGraphPath(repoRoot) {
25
+ return path.join(repoRoot, "bigpowers-mcp", "graph.jsonl");
26
+ }
27
+ export const MAX_READ_SKILL_BYTES = 512 * 1024;
28
+ export const SECRET_DENYLIST = [
29
+ /\.env/i,
30
+ /\.pem$/i,
31
+ /secret/i,
32
+ /credentials/i,
33
+ ];
34
+ export const GIT_SCOPE_DIRS = ["skills", "specs"];
35
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAEhE,iFAAiF;AACjF,MAAM,UAAU,WAAW;IACzB,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;IAC3C,IAAI,OAAO;QAAE,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAE1C,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAC1B,IAAI,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,GAAG,CAAC;IAEhC,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAC1D,IAAI,UAAU,CAAC,eAAe,CAAC;QAAE,OAAO,eAAe,CAAC;IAExD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,UAAU,CAAC,GAAW;IAC7B,OAAO,CACL,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAClF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,QAAgB;IAC3C,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACvC,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,QAAgB;IAC3C,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,eAAe,EAAE,aAAa,CAAC,CAAC;AAC7D,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,GAAG,IAAI,CAAC;AAE/C,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,QAAQ;IACR,SAAS;IACT,SAAS;IACT,cAAc;CACf,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
+ import { createContext, registerTools } from "./tools/index.js";
5
+ async function main() {
6
+ const ctx = createContext();
7
+ const server = new McpServer({
8
+ name: "bigpowers-mcp",
9
+ version: "0.1.0",
10
+ });
11
+ registerTools(server, ctx);
12
+ const transport = new StdioServerTransport();
13
+ await server.connect(transport);
14
+ console.error("bigpowers-mcp started");
15
+ }
16
+ main().catch((err) => {
17
+ console.error("Fatal error:", err);
18
+ process.exit(1);
19
+ });
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEhE,KAAK,UAAU,IAAI;IACjB,MAAM,GAAG,GAAG,aAAa,EAAE,CAAC;IAC5B,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;QAC3B,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE,OAAO;KACjB,CAAC,CAAC;IAEH,aAAa,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAE3B,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;AACzC,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;IACnC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,12 @@
1
+ export interface GitContextResult {
2
+ action: string;
3
+ changed_files: Record<string, string[]>;
4
+ commits?: Array<{
5
+ hash: string;
6
+ subject: string;
7
+ files: string[];
8
+ }>;
9
+ diffs?: Record<string, string>;
10
+ }
11
+ export declare function getGitContext(repoRoot: string, action: "status" | "log" | "diff"): GitContextResult;
12
+ export declare function isGitRepo(repoRoot: string): boolean;