bigpowers 2.1.2 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [2.2.0](https://github.com/danielvm-git/bigpowers/compare/v2.1.3...v2.2.0) (2026-06-13)
2
+
3
+
4
+ ### Features
5
+
6
+ * **skills:** enforce tiered SKILL.md size cap (Epic 4) ([5b66257](https://github.com/danielvm-git/bigpowers/commit/5b66257bcb7c5c01246e8cbf02e6cb701120eae0))
7
+
8
+ ## [2.1.3](https://github.com/danielvm-git/bigpowers/compare/v2.1.2...v2.1.3) (2026-06-12)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **dashboard:** resolve wrong folder targeting and update TUI metrics ([bc8d84a](https://github.com/danielvm-git/bigpowers/commit/bc8d84af6221aa59aa131bf3fdd03f25bc67ac33))
14
+
1
15
  ## [2.1.2](https://github.com/danielvm-git/bigpowers/compare/v2.1.1...v2.1.2) (2026-06-12)
2
16
 
3
17
 
package/CLAUDE.md CHANGED
@@ -21,7 +21,7 @@ Stack: Markdown / Bash (documentation-based; skills integrate with Claude Code,
21
21
 
22
22
  ## Architecture
23
23
 
24
- Collection of 61 verb-noun 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/requirements/`; 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.
24
+ Collection of 61 verb-noun 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.
25
25
 
26
26
  ## Conventions
27
27
 
package/CONVENTIONS.md CHANGED
@@ -59,7 +59,13 @@ Every skill that produces written output writes to `specs/` at the project root.
59
59
 
60
60
  ### BCP accounting mandate (v2.0.0)
61
61
 
62
- Every task written by `plan-work` MUST be labeled `[BCP N]` where N is the estimated Build Commit Points for that task. The story total is summed and written to `state.yaml` as `epic_cycle.story_bcps`. The BCP baseline for each story MUST appear in `specs/release-plan.yaml` before implementation begins. `release-branch` automatically appends a row to `specs/metrics/cycle-times.yaml` with the final BCP/hr after the story lands.
62
+ **BCP = Business Complexity Points** a pre-build story size, not a per-task annotation. Canonical method: [`docs/references/bcp.md`](docs/references/bcp.md) (sourced from `flow-ciandt/bcp-agent`).
63
+
64
+ - **Sizing (plan-release):** Every story in `specs/release-plan.yaml` MUST have a `bcps:` field set via the 6-step BCP sizing method before implementation begins. No story enters the build queue without a BCP baseline.
65
+ - **Session state:** `plan-work` confirms the BCP size and writes it to `specs/state.yaml` as `epic_cycle.story_bcps`.
66
+ - **Velocity (release-branch):** After landing, `release-branch` appends a row to `specs/metrics/cycle-times.yaml` with `bcp_per_hour = story_bcps / cycle_minutes * 60`.
67
+
68
+ BCP is a **story-level** size. Per-task `[BCP N]` annotations are not part of the canonical method.
63
69
 
64
70
  ### Timestamp mandate (v2.0.0)
65
71
 
@@ -76,9 +82,9 @@ Every critical-path skill (survey-context, plan-work, kickoff-branch, develop-td
76
82
 
77
83
  | Question | File | Format |
78
84
  |----------|------|--------|
79
- | What should the product do? | `specs/requirements/SCOPE_LATEST.yaml` | YAML |
80
- | North star / initiative | `specs/requirements/VISION_LATEST.yaml` | YAML |
81
- | Glossary | `specs/requirements/GLOSSARY_LATEST.yaml` | YAML |
85
+ | What should the product do? | `specs/product/SCOPE_LATEST.yaml` | YAML |
86
+ | North star / initiative | `specs/product/VISION_LATEST.yaml` | YAML |
87
+ | Glossary | `specs/product/GLOSSARY_LATEST.yaml` | YAML |
82
88
  | What ships in this release, in what order? | `specs/release-plan.yaml` | YAML |
83
89
  | How to implement an epic/story? | `specs/epics/eNN-*.yaml` or `specs/epics/eNN-*/stories/` | YAML + MD |
84
90
  | Where are we in the session? | `specs/state.yaml` | YAML |
@@ -87,7 +93,7 @@ Epic IDs: `e01`, `e30`. Story IDs: `e01s01`. One FR in SCOPE may span multiple e
87
93
 
88
94
  ### Frozen release (ex-baseline)
89
95
 
90
- When planning closes, copy to `specs/requirements/snapshots/release-<version>/` (`release-plan.yaml`, `SCOPE_LATEST.yaml`, `VISION_LATEST.yaml`). No separate `baselines/` folder.
96
+ When planning closes, copy to `specs/product/snapshots/release-<version>/` (`release-plan.yaml`, `SCOPE_LATEST.yaml`, `VISION_LATEST.yaml`). No separate `baselines/` folder.
91
97
 
92
98
  ### Semantic-release — three places
93
99
 
@@ -99,11 +105,11 @@ When planning closes, copy to `specs/requirements/snapshots/release-<version>/`
99
105
 
100
106
  | Document | Path |
101
107
  |----------|------|
102
- | Stack / architecture | `specs/plans/TECH_STACK_LATEST.md` |
103
- | Security / test / design plans | `specs/plans/*_PLAN_LATEST.md` |
104
- | Domain context + ADRs | `specs/plans/TECH_STACK_LATEST.md` or legacy `specs/CONTEXT.md` + `specs/adr/` |
108
+ | Stack / architecture | `specs/tech-architecture/TECH_STACK_LATEST.md` |
109
+ | Security / test / design plans | `specs/tech-architecture/*_PLAN_LATEST.md` |
110
+ | Domain context + ADRs | `specs/tech-architecture/TECH_STACK_LATEST.md` or legacy `specs/CONTEXT.md` + `specs/adr/` |
105
111
  | Bug investigation | `specs/bugs/BUG-*.md` + `specs/bugs/registry.yaml` (generated) |
106
- | Refactor / impact | `specs/plans/REFACTOR_LATEST.md`, `specs/plans/IMPACT_LATEST.md` |
112
+ | Refactor / impact | `specs/tech-architecture/REFACTOR_LATEST.md`, `specs/tech-architecture/IMPACT_LATEST.md` |
107
113
  | Legacy markdown | `specs/archive/` after `bash scripts/convert-legado.sh` |
108
114
 
109
115
  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`.
@@ -114,7 +120,7 @@ Validate YAML layout: `bash scripts/validate-specs-yaml.sh`. Patch runtime keys:
114
120
  |-----|-----|
115
121
  | `specs/STATE.md` | `specs/state.yaml` |
116
122
  | `specs/RELEASE-PLAN.md` | `specs/release-plan.yaml` + `specs/epics/` |
117
- | `specs/SCOPE.md` | `specs/requirements/SCOPE_LATEST.yaml` |
123
+ | `specs/SCOPE.md` | `specs/product/SCOPE_LATEST.yaml` |
118
124
 
119
125
  ## Code Style
120
126
 
package/README.md CHANGED
@@ -137,9 +137,9 @@ ONCE/PROJECT orchestrate-project
137
137
  | Level | Document | Responsibility |
138
138
  | :--- | :--- | :--- |
139
139
  | **Vision** | `docs/PRINCIPLES.md` | Philosophical foundations and evolution. |
140
- | **Context** | `specs/plans/TECH_STACK_LATEST.md` | Tech stack, architecture, and domain notes. |
141
- | **Scope** | `specs/requirements/SCOPE_LATEST.yaml` | In-scope / out-of-scope and success criteria. |
142
- | **Vision** | `specs/requirements/VISION_LATEST.yaml` | North star and initiative success criteria. |
140
+ | **Context** | `specs/tech-architecture/TECH_STACK_LATEST.md` | Tech stack, architecture, and domain notes. |
141
+ | **Scope** | `specs/product/SCOPE_LATEST.yaml` | In-scope / out-of-scope and success criteria. |
142
+ | **Vision** | `specs/product/VISION_LATEST.yaml` | North star and initiative success criteria. |
143
143
  | **Decisions** | `specs/adr/` | Architectural Decision Records (irreversible choices). |
144
144
  | **Roadmap** | `specs/release-plan.yaml` + `specs/epics/` | WSJF-prioritized epics and stories with BCP baseline. |
145
145
  | **Current** | `specs/state.yaml` | Session flow, active epic, `handoff.next_skill`, timestamps. |
@@ -30,7 +30,7 @@ Orchestrates the **build** flow for a single epic: survey → plan tasks → kic
30
30
  ## Process
31
31
 
32
32
  1. Read `specs/state.yaml`, `specs/execution-status.yaml`, `specs/release-plan.yaml`, active `specs/epics/eNN-slug/epic.yaml`.
33
- 2. **BCP Tracking (Step 2):** After `plan-work` completes, read the `bcps:` count from the epic capsule and carry it into `state.yaml` as `epic_cycle.story_bcps = N`.
33
+ 2. **BCP Tracking (Step 2):** After `plan-work` completes, read the `bcps:` count (Business Complexity Points story size) from the epic capsule and carry it into `state.yaml` as `epic_cycle.story_bcps = N`.
34
34
  3. If `epic_cycle.step` missing, set to `1`.
35
35
  4. Run **only the current step** (resume mode) unless user asked for full auto-run.
36
36
  5. After step verify passes, increment `epic_cycle.step` in `state.yaml` (or `bash scripts/bp-yaml-set.sh` if available).
@@ -66,14 +66,31 @@ function readEpicShards(projectRoot) {
66
66
  if (!fs.existsSync(epicsDir)) {
67
67
  return null;
68
68
  }
69
- const files = fs.readdirSync(epicsDir)
70
- .filter(f => f.endsWith('.yaml'))
71
- .sort();
72
-
73
69
  const epics = [];
74
- for (const file of files) {
75
- const filePath = path.join(epicsDir, file);
76
- const content = fs.readFileSync(filePath, 'utf8');
70
+
71
+ function scanDir(dirPath) {
72
+ if (!fs.existsSync(dirPath)) return;
73
+ const entries = fs.readdirSync(dirPath);
74
+ for (const entry of entries) {
75
+ const entryPath = path.join(dirPath, entry);
76
+ const stat = fs.statSync(entryPath);
77
+ if (stat.isDirectory()) {
78
+ if (entry === 'archive') {
79
+ scanDir(entryPath);
80
+ } else {
81
+ const possibleYaml = path.join(entryPath, 'epic.yaml');
82
+ if (fs.existsSync(possibleYaml)) {
83
+ loadYaml(possibleYaml);
84
+ }
85
+ }
86
+ } else if (stat.isFile() && entry.endsWith('.yaml')) {
87
+ loadYaml(entryPath);
88
+ }
89
+ }
90
+ }
91
+
92
+ function loadYaml(yamlPath) {
93
+ const content = fs.readFileSync(yamlPath, 'utf8');
77
94
  const data = yaml.load(content);
78
95
  epics.push({
79
96
  id: data.id || data.epic || null,
@@ -81,6 +98,16 @@ function readEpicShards(projectRoot) {
81
98
  stories: data.stories || []
82
99
  });
83
100
  }
101
+
102
+ scanDir(epicsDir);
103
+
104
+ // Sort epics by ID numerically/alphabetically
105
+ epics.sort((a, b) => {
106
+ const idA = a.id || '';
107
+ const idB = b.id || '';
108
+ return idA.localeCompare(idB, undefined, { numeric: true, sensitivity: 'base' });
109
+ });
110
+
84
111
  return epics.length > 0 ? epics : null;
85
112
  } catch (err) {
86
113
  return null;
@@ -156,7 +156,7 @@ function start(projectRoot) {
156
156
  // Title bar: fixed project identity
157
157
  titleBar.setContent(' {bold}{cyan-fg}⚙ bigpowers factory{/cyan-fg}{/bold} {gray-fg}v2 — seed {cyan-fg}→{/cyan-fg} epics {cyan-fg}→{/cyan-fg} mvp{/gray-fg}');
158
158
 
159
- renderMetricsBar(metricsBar, metrics, stateData, epics, cycleTimes);
159
+ renderMetricsBar(metricsBar, metrics, stateData, epics, cycleTimes, executionStatus);
160
160
  renderPipeline(pipeline, stateData);
161
161
  renderEpicQueue(epicQueue, epics, executionStatus);
162
162
  renderStateYaml(actionLog, stateData);
@@ -1,29 +1,40 @@
1
- function renderMetricsBar(box, projectMetrics, stateData, epics, cycleTimes) {
1
+ function renderMetricsBar(box, projectMetrics, stateData, epics, cycleTimes, executionStatus) {
2
2
  if (!box || typeof box.setContent !== 'function') {
3
3
  return;
4
4
  }
5
5
 
6
- const ct = cycleTimes || [];
7
6
  const epicList = epics && Array.isArray(epics) ? epics : [];
7
+ const statusMap = executionStatus?.epics || new Map();
8
8
 
9
- // Compute totals
9
+ // Compute totals and completed counts dynamically from execution-status.yaml
10
10
  let totalStories = 0;
11
11
  let targetBcps = 0;
12
+ let doneStories = 0;
13
+ let deliveredBcps = 0;
14
+ let doneEpics = 0;
15
+
12
16
  epicList.forEach(epic => {
17
+ let epicDone = true;
18
+ let hasStories = false;
13
19
  if (epic.stories && Array.isArray(epic.stories)) {
14
- totalStories += epic.stories.length;
15
- epic.stories.forEach(s => { targetBcps += s.bcps || 0; });
20
+ epic.stories.forEach(s => {
21
+ hasStories = true;
22
+ totalStories++;
23
+ targetBcps += s.bcps || 0;
24
+ if (statusMap.get(s.id) === 'done') {
25
+ doneStories++;
26
+ deliveredBcps += s.bcps || 0;
27
+ } else {
28
+ epicDone = false;
29
+ }
30
+ });
31
+ }
32
+ if (hasStories && epicDone) {
33
+ doneEpics++;
16
34
  }
17
35
  });
18
36
 
19
- const doneStories = ct.length;
20
37
  const totalEpics = epicList.length;
21
- const doneStoryIds = new Set(ct.map(c => c.id));
22
- const doneEpics = epicList.filter(e =>
23
- e.stories && e.stories.length > 0 && e.stories.every(s => doneStoryIds.has(s.id))
24
- ).length;
25
-
26
- const deliveredBcps = projectMetrics?.totalBcps ?? 0;
27
38
  const totalMin = projectMetrics?.totalMin ?? 0;
28
39
  const avgBcpPerHour = projectMetrics?.avgBcpPerHour;
29
40
  const version = stateData?.release?.target_version ?? '—';
@@ -0,0 +1,61 @@
1
+ # Develop TDD — Reference
2
+
3
+ ## Anti-Pattern: Horizontal Slices
4
+
5
+ **DO NOT write all tests first, then all implementation.** This is "horizontal slicing" — treating RED as "write all tests" and GREEN as "write all code."
6
+
7
+ This produces **crap tests**:
8
+ - Tests written in bulk test _imagined_ behavior, not _actual_ behavior
9
+ - You end up testing the _shape_ of things rather than user-facing behavior
10
+ - Tests become insensitive to real changes
11
+
12
+ **Correct approach**: Vertical slices via tracer bullets. One test → one implementation → repeat.
13
+
14
+ ```
15
+ WRONG (horizontal):
16
+ RED: test1, test2, test3, test4, test5
17
+ GREEN: impl1, impl2, impl3, impl4, impl5
18
+
19
+ RIGHT (vertical):
20
+ RED→GREEN: test1→impl1
21
+ RED→GREEN: test2→impl2
22
+ RED→GREEN: test3→impl3
23
+ ...
24
+ ```
25
+
26
+ > The Red Flags table lives in [SKILL.md](SKILL.md#red-flags) — it is core behavioral guidance, not reference detail.
27
+
28
+ ## TDD Phases (Detail)
29
+
30
+ ### Red Phase
31
+
32
+ Write a failing test first:
33
+ - Test describes the desired observable behavior through the public interface
34
+ - Run the test to confirm it fails for the right reason (not a syntax error, not a typo)
35
+ - Commit: `git commit -m "test(<scope>): <description>"`
36
+
37
+ ### Green Phase
38
+
39
+ Write the minimum code to make the test pass:
40
+ - No extra logic, no anticipated future cases, no premature optimization
41
+ - Focus only on making the current test pass
42
+ - Commit: `git commit -m "feat(<scope>): <description>"` or `"fix(<scope>): <description>"`
43
+
44
+ ### Refactor Phase
45
+
46
+ Improve structure without changing behavior:
47
+ - Extract duplication, apply SOLID principles where natural, deepen modules
48
+ - Run tests after each refactor step to ensure behavior is preserved
49
+ - Commit: `git commit -m "refactor(<scope>): <description>"`
50
+ - Apply the Boy Scout Rule: leave the code cleaner than you found it
51
+
52
+ ## Visual Slices (UI Alternate Workflow)
53
+
54
+ For UI components (SwiftUI, React, Flutter) where behavioral unit testing is brittle or low-signal:
55
+
56
+ 1. **Test-First Logic**: Extract logic (state transitions, formatting, validation) into a Controller, ViewModel, or Hook. This logic MUST follow pure TDD.
57
+ 2. **Visual Verification**: For the View/Component itself:
58
+ - **RED**: Write the component signature and a basic preview/snapshot that fails (or displays placeholder).
59
+ - **GREEN**: Implement the UI and verify visually via manual run, preview, or snapshot test.
60
+ - **REFINE**: Adjust styling and layout until it matches the design.
61
+ 3. **COMMIT**: `git commit -m "feat(ui): <component name> visual slice verified"`
@@ -10,51 +10,21 @@ description: Test-driven development with red-green-refactor loop using vertical
10
10
  >
11
11
  > **HARD GATE** — Do NOT write code before you have a plan. New feature: `plan-work` → epic capsule tasks. Bug: `investigate-bug` → `specs/bugs/BUG-*.md` (or use `fix-bug` orchestrator).
12
12
  >
13
- > **RECURSIVE DISCIPLINE** — This lifecycle apply to EVERY task, including updating these skills. Never skip planning because a task is "meta" or "just documentation."
13
+ > **RECURSIVE DISCIPLINE** — This lifecycle applies to EVERY task, including updating these skills. Never skip planning because a task is "meta" or "just documentation."
14
14
 
15
15
  ## Philosophy
16
16
 
17
- **Core principle**: Tests should verify behavior through public interfaces, not implementation details. Code can change entirely; tests shouldn't.
18
-
19
- **Good tests** are integration-style: they exercise real code paths through public APIs. They describe _what_ the system does, not _how_ it does it. A good test reads like a specification — "user can checkout with valid cart" tells you exactly what capability exists. These tests survive refactors because they don't care about internal structure.
20
-
21
- **Bad tests** are coupled to implementation. They mock internal collaborators, test private methods, or verify through external means. The warning sign: your test breaks when you refactor, but behavior hasn't changed.
22
-
23
- See [tests.md](tests.md) for examples and [mocking.md](mocking.md) for mocking guidelines.
24
-
25
- ## Anti-Pattern: Horizontal Slices
26
-
27
- **DO NOT write all tests first, then all implementation.** This is "horizontal slicing" — treating RED as "write all tests" and GREEN as "write all code."
28
-
29
- This produces **crap tests**:
30
-
31
- - Tests written in bulk test _imagined_ behavior, not _actual_ behavior
32
- - You end up testing the _shape_ of things rather than user-facing behavior
33
- - Tests become insensitive to real changes
34
-
35
- **Correct approach**: Vertical slices via tracer bullets. One test → one implementation → repeat.
36
-
37
- ```
38
- WRONG (horizontal):
39
- RED: test1, test2, test3, test4, test5
40
- GREEN: impl1, impl2, impl3, impl4, impl5
41
-
42
- RIGHT (vertical):
43
- RED→GREEN: test1→impl1
44
- RED→GREEN: test2→impl2
45
- RED→GREEN: test3→impl3
46
- ...
47
- ```
17
+ Tests verify behavior through public interfaces, not implementation details. A good test reads like a specification. See [REFERENCE.md](REFERENCE.md) for the horizontal-slice anti-pattern and TDD phase detail.
48
18
 
49
19
  ## Red Flags
50
20
 
51
- If you find yourself thinking these things, you are likely deviating from production-grade craft. Stop and reconsider.
21
+ If you catch yourself thinking these, stop and reconsider — you are likely deviating from production-grade craft.
52
22
 
53
23
  | Red Flag | Reality |
54
24
  | :--- | :--- |
55
25
  | "This is too simple to need tests." | Simple code is where bugs hide. If it's simple, the test is cheap. |
56
- | "I'll refactor this later." | "Later" is when technical debt becomes a bankruptcy. Refactor while Green. |
57
- | "The tests are already comprehensive." | If you're adding behavior, you need a new test. Coverage != Correctness. |
26
+ | "I'll refactor this later." | "Later" is when technical debt becomes bankruptcy. Refactor while Green. |
27
+ | "The tests are already comprehensive." | If you're adding behavior, you need a new test. Coverage Correctness. |
58
28
  | "I'm just fixing a small bug." | Small bugs often indicate deep interface flaws. Investigate root cause. |
59
29
  | "I need to mock this internal class." | Mocking internals couples tests to implementation. Mock only I/O. |
60
30
  | "This refactor is out of scope." | Leave the code cleaner than you found it (Boy Scout Rule). |
@@ -63,114 +33,44 @@ If you find yourself thinking these things, you are likely deviating from produc
63
33
 
64
34
  ### 1. Planning
65
35
 
66
- Before writing any code:
67
-
68
36
  - [ ] Read active `specs/epics/*/epic.yaml` story tasks or `specs/bugs/BUG-*.md` — understand verify steps
69
- - [ ] Confirm with user what interface changes are needed
70
- - [ ] Confirm with user which behaviors to test (prioritize)
71
- - [ ] Identify opportunities for [deep modules](deep-modules.md) (small interface, deep implementation)
72
- - [ ] Design interfaces for [testability](interface-design.md)
73
- - [ ] List the behaviors to test (not implementation steps)
37
+ - [ ] Confirm interface changes and behaviors to test (prioritize)
38
+ - [ ] Design interfaces for testability identify [deep modules](deep-modules.md) opportunities
74
39
  - [ ] Get user approval on the plan
75
40
 
76
- Ask: "What should the public interface look like? Which behaviors are most important to test?"
77
-
78
- **You can't test everything.** Confirm with the user exactly which behaviors matter most. Focus testing effort on critical paths and complex logic.
79
-
80
- Apply the **enforce-first** F.I.R.S.T rubric when writing tests: Fast, Independent, Repeatable, Self-Validating, Timely.
41
+ Apply the **enforce-first** F.I.R.S.T rubric: Fast, Independent, Repeatable, Self-Validating, Timely.
81
42
 
82
43
  ### 2. Tracer Bullet
83
44
 
84
45
  Write ONE test that confirms ONE thing about the system:
85
46
 
86
47
  ```
87
- RED: Write test for first behavior → test fails → commit via commit-message: test(<scope>): ...
88
- GREEN: Write minimal code to pass → test passes → commit: feat(<scope>): ... or fix(<scope>): ...
48
+ RED: Write test for first behavior → test fails → commit: test(<scope>): ...
49
+ GREEN: Write minimal code to pass → test passes → commit: feat(<scope>): ...
89
50
  REFACTOR (optional): clean up → commit: refactor(<scope>): ...
90
51
  ```
91
52
 
92
- This is your tracer bullet — proves the path works end-to-end.
93
-
94
53
  ### 3. Incremental Loop
95
54
 
96
- > **STREAM CONTINUITY** — When writing file content, output in continuous chunks of ~200 lines. Do not pause. Continue immediately until complete. If you need time, emit a placeholder comment rather than going silent.
55
+ > **STREAM CONTINUITY** — When writing file content, output in continuous chunks of ~200 lines. Do not pause. Emit a placeholder comment rather than going silent.
97
56
 
98
- For each remaining behavior:
57
+ For each remaining behavior: RED → GREEN → REFACTOR (optional). One test at a time. Commit after every GREEN phase.
99
58
 
100
- ```
101
- RED: Write next test → fails → commit: test(<scope>): ...
102
- GREEN: Minimal code to pass → passes → commit: feat|fix(<scope>): ...
103
- REFACTOR (optional): → commit: refactor(<scope>): ... (use commit-message skill for title/body)
104
- ```
59
+ ### 4. Visual Slices (UI alternate workflow)
105
60
 
106
- Rules:
107
-
108
- - One test at a time
109
- - Only enough code to pass current test
110
- - Don't anticipate future tests
111
- - Keep tests focused on observable behavior
112
- - **Atomic Commits**: Commit after every GREEN phase to record progress and prevent large diffs.
113
-
114
- ### 4. Visual Slices (UI Alternate Workflow)
115
-
116
- For UI components (SwiftUI, React, Flutter) where behavioral unit testing is brittle or low-signal:
117
-
118
- 1. **Test-First Logic**: Extract logic (state transitions, formatting, validation) into a separate Controller, ViewModel, or Hook. This logic MUST follow pure TDD (Red-Green-Refactor).
119
- 2. **Visual Verification**: For the View/Component itself, use "Visual Slices":
120
- - **RED**: Write the component signature and a basic preview/test snapshot that fails (or displays placeholder).
121
- - **GREEN**: Implement the UI and verify visually via manual run, preview, or snapshot test.
122
- - **REFINE**: Adjust styling and layout until it matches the "rich aesthetics" requirement.
123
- 3. **COMMIT**: git commit -m "feat(ui): <component name> visual slice verified"
61
+ For UI components where behavioral unit testing is brittle: extract logic into a Controller/ViewModel/Hook (pure TDD), then use Visual Slices for the View layer. See [REFERENCE.md](REFERENCE.md) for the full Visual Slices procedure.
124
62
 
125
63
  ### 5. Refactor
126
64
 
127
- After all tests pass, look for [refactor candidates](refactoring.md):
128
-
129
- - [ ] Extract duplication
130
- - [ ] Deepen modules (move complexity behind simple interfaces)
131
- - [ ] Apply SOLID principles where natural
132
- - [ ] Consider what new code reveals about existing code
133
- - [ ] Run tests after each refactor step
134
-
135
- **Never refactor while RED.** Get to GREEN first.
136
-
137
- ### 5. Verify step
138
-
139
- After every behavior cycle, run the verify command from the active epic task if one exists. Show evidence before declaring the step done.
140
-
141
- ### 6. Manual Verification Handover
142
-
143
- Once the story is complete and all tests pass:
144
- 1. Locate the **Verification Script** in the active epic capsule (`specs/epics/`) for this story.
145
- 2. Present the script to the user as a step-by-step guide.
146
- 3. Wait for the user to confirm the behavioral correctness before moving to the next story or declaring the task done.
147
-
148
- ## TDD phases
149
-
150
- ### Red Phase
151
-
152
- Write a failing test first that confirms the behavior you want to implement:
153
-
154
- - Test describes the desired observable behavior through the public interface
155
- - Run the test to confirm it fails for the right reason (not a syntax error, not a typo)
156
- - Commit the failing test: `git commit -m "test(<scope>): <description>"`
157
-
158
- ### Green Phase
159
-
160
- Write the minimum amount of code to make the test pass:
65
+ After all tests pass: extract duplication, deepen modules, apply SOLID principles. **Never refactor while RED.**
161
66
 
162
- - No extra logic, no anticipated future cases, no premature optimization
163
- - Focus only on making the current test pass
164
- - Commit the passing code: `git commit -m "feat(<scope>): <description>" or "fix(<scope>): <description>"`
67
+ ### 6. Verify
165
68
 
166
- ### Refactor Phase
69
+ After every behavior cycle, run the verify command from the active epic task. Show evidence before declaring the step done.
167
70
 
168
- Improve the code structure, naming, and clarity without changing behavior:
71
+ ### 7. Manual Verification Handover
169
72
 
170
- - Extract duplication, apply SOLID principles where natural, deepen modules
171
- - Run tests after each refactor step to ensure behavior is preserved
172
- - Commit refactoring: `git commit -m "refactor(<scope>): <description>"`
173
- - Apply the Boy Scout Rule: leave the code cleaner than you found it
73
+ Once all tests pass: locate the Verification Script in the active epic capsule, present it to the user step-by-step, and wait for confirmation of behavioral correctness.
174
74
 
175
75
  ## Checklist Per Cycle
176
76
 
@@ -43,7 +43,7 @@ Transform:
43
43
 
44
44
  ---
45
45
 
46
- ### `.planning/REQUIREMENTS.md` → `specs/requirements/SCOPE_LATEST.yaml`
46
+ ### `.planning/REQUIREMENTS.md` → `specs/product/SCOPE_LATEST.yaml`
47
47
 
48
48
  GSD REQUIREMENTS has: REQ-XX IDs, Validated/Active/Out-of-Scope categories, traceability.
49
49
 
@@ -55,7 +55,7 @@ Transform:
55
55
 
56
56
  ---
57
57
 
58
- ### `.planning/phases/XX-name/XX-CONTEXT.md` → `specs/plans/TECH_STACK_LATEST.md` + `specs/adr/`
58
+ ### `.planning/phases/XX-name/XX-CONTEXT.md` → `specs/tech-architecture/TECH_STACK_LATEST.md` + `specs/adr/`
59
59
 
60
60
  GSD CONTEXT.md has 6 sections: domain, decisions, canonical_refs, code_context, specifics, deferred.
61
61
 
@@ -80,12 +80,12 @@ Transform:
80
80
 
81
81
  ---
82
82
 
83
- ### `.planning/METHODOLOGY.md` → `specs/plans/METHODOLOGY_LATEST.md`
83
+ ### `.planning/METHODOLOGY.md` → `specs/tech-architecture/METHODOLOGY_LATEST.md`
84
84
 
85
85
  GSD METHODOLOGY.md is a standing reference for analytical lenses (Bayesian updating, STRIDE, cost-of-delay).
86
86
 
87
87
  Transform:
88
- - Copy each lens as a section in `specs/plans/METHODOLOGY_LATEST.md`
88
+ - Copy each lens as a section in `specs/tech-architecture/METHODOLOGY_LATEST.md`
89
89
  - Note: "These lenses should inform `plan-work` and `audit-code` sessions."
90
90
 
91
91
  ---
@@ -22,7 +22,7 @@ project-root/
22
22
  └── log.jsonl
23
23
  ```
24
24
 
25
- ### `spec.md` → `specs/requirements/SCOPE_LATEST.yaml` + `specs/plans/TECH_STACK_LATEST.md`
25
+ ### `spec.md` → `specs/product/SCOPE_LATEST.yaml` + `specs/tech-architecture/TECH_STACK_LATEST.md`
26
26
 
27
27
  spec-kit `spec.md` focuses on: who uses it, user journeys, success criteria, what's in/out of scope.
28
28
 
@@ -32,7 +32,7 @@ Transform:
32
32
  - Domain terms / glossary → `requirements/GLOSSARY_LATEST.yaml`
33
33
  - Problem statement / vision → `requirements/VISION_LATEST.yaml`
34
34
 
35
- ### `plan.md` → `specs/plans/TECH_STACK_LATEST.md` + `specs/release-plan.yaml` + `specs/epics/`
35
+ ### `plan.md` → `specs/tech-architecture/TECH_STACK_LATEST.md` + `specs/release-plan.yaml` + `specs/epics/`
36
36
 
37
37
  spec-kit `plan.md` covers: technology stack, architectural patterns, implementation constraints.
38
38
 
@@ -79,14 +79,14 @@ project-root/
79
79
  └── story-{slug}.md
80
80
  ```
81
81
 
82
- ### `product-brief.md` / `prfaq-{project}.md` → `specs/requirements/VISION_LATEST.yaml`
82
+ ### `product-brief.md` / `prfaq-{project}.md` → `specs/product/VISION_LATEST.yaml`
83
83
 
84
84
  Transform:
85
85
  - Vision + core value → `VISION_LATEST.yaml` north_star / success_criteria
86
86
  - Target users → notes in VISION or SCOPE
87
87
  - prfaq customer FAQ → can inform success criteria in SCOPE
88
88
 
89
- ### `prd.md` → `specs/requirements/SCOPE_LATEST.yaml` + `GLOSSARY_LATEST.yaml`
89
+ ### `prd.md` → `specs/product/SCOPE_LATEST.yaml` + `GLOSSARY_LATEST.yaml`
90
90
 
91
91
  BMAD `prd.md` has: Glossary, FR-XX functional requirements, UJ-XX user journeys, NFRs, assumptions.
92
92
 
@@ -105,7 +105,7 @@ Transform:
105
105
  - Lightweight decisions → `specs/DECISION-LOG.md` (date | decision | rationale)
106
106
  - `addendum.md` change signals → note in `SCOPE_LATEST.yaml` metadata
107
107
 
108
- ### `architecture.md` → `specs/plans/TECH_STACK_LATEST.md` + `specs/adr/`
108
+ ### `architecture.md` → `specs/tech-architecture/TECH_STACK_LATEST.md` + `specs/adr/`
109
109
 
110
110
  Transform:
111
111
  - ADR sections → individual `specs/adr/NNNN-{slug}.md` files
@@ -132,7 +132,7 @@ Optional enhancements to offer the user after migration. Present as checkboxes.
132
132
 
133
133
  ### From GSD
134
134
 
135
- - [ ] **`specs/plans/METHODOLOGY_LATEST.md`** — Standing analytical lenses. Agents read before planning.
135
+ - [ ] **`specs/tech-architecture/METHODOLOGY_LATEST.md`** — Standing analytical lenses. Agents read before planning.
136
136
  - [ ] **`handoff` block in state.yaml** — Last skill, last step, required reading for next session.
137
137
  - [ ] **ID tracking in SCOPE_LATEST.yaml** — FR/UJ IDs for spec → plan → verification traceability.
138
138
 
@@ -183,3 +183,30 @@ For lightweight decisions that don't warrant a full ADR:
183
183
  |------|----------|-----------|--------------|
184
184
  | 2026-05-19 | Use Postgres | Existing ops expertise | SQLite (limited), DynamoDB (no local dev) |
185
185
  ```
186
+
187
+ ### `specs/state.yaml` template format
188
+
189
+ Generated during Step 4 of migration. Regenerate from scratch in bigpowers format:
190
+
191
+ ```markdown
192
+ # Session State: <project name>
193
+
194
+ ## Current Milestone
195
+
196
+ Migrated from <framework> on <date>. Next: review generated specs and run plan-work.
197
+
198
+ ## Git Metadata
199
+
200
+ - **Branch**: <current branch>
201
+ - **Hash**: <git rev-parse HEAD>
202
+
203
+ ## Completed Releases
204
+
205
+ (none — migration starting point)
206
+
207
+ ## Pending Releases
208
+
209
+ - [ ] Review migrated specs
210
+ - [ ] Run elaborate-spec to validate scope
211
+ - [ ] Run plan-work to produce first release plan
212
+ ```
@@ -82,26 +82,13 @@ Apply the mapping from [REFERENCE.md](./REFERENCE.md) and [REFERENCE-GSD.md](./R
82
82
 
83
83
  ### Step 4 — Generate state.yaml
84
84
 
85
- Always regenerate `specs/state.yaml` from scratch in bigpowers format:
85
+ Always regenerate `specs/state.yaml` from scratch in bigpowers format (see REFERENCE.md for template):
86
86
 
87
87
  ```markdown
88
88
  # Session State: <project name>
89
-
90
89
  ## Current Milestone
91
-
92
90
  Migrated from <framework> on <date>. Next: review generated specs and run plan-work.
93
-
94
- ## Git Metadata
95
-
96
- - **Branch**: <current branch>
97
- - **Hash**: <git rev-parse HEAD>
98
-
99
- ## Completed Releases
100
-
101
- (none — migration starting point)
102
-
103
91
  ## Pending Releases
104
-
105
92
  - [ ] Review migrated specs
106
93
  - [ ] Run elaborate-spec to validate scope
107
94
  - [ ] Run plan-work to produce first release plan
@@ -26,7 +26,7 @@ Detailed documentation for the `orchestrate-project` meta-skill.
26
26
  - **Goal**: Execute the plan story-by-story using the 8-step `build-epic` cycle with TDD and vertical slices.
27
27
  - **Deliverables**: Code; `execution-status.yaml` updated per story; `specs/metrics/cycle-times.yaml` row per story.
28
28
  - **Skills**: `build-epic` (conductor) → per-story: `survey-context`, `plan-work`, `kickoff-branch`, `develop-tdd`, `verify-work`, `audit-code`, `commit-message`, `release-branch`.
29
- - **BCP tracking**: `plan-work` labels every task `[BCP N]`; total written to `state.yaml` as `epic_cycle.story_bcps`. BCP baseline must exist in `release-plan.yaml` before starting.
29
+ - **BCP tracking**: `plan-release` sizes each story in Business Complexity Points (BCP) before the build queue; `plan-work` confirms and writes the size to `state.yaml` as `epic_cycle.story_bcps`. See `docs/references/bcp.md` for the canonical sizing method.
30
30
  - **Timestamps**: `survey-context` stamps `metrics.story_start`; `release-branch` stamps `metrics.story_end` and writes BCP/hr to `specs/metrics/cycle-times.yaml`.
31
31
  - **next_skill**: Each critical-path skill writes `handoff.next_skill` to `state.yaml`. Agents resume by reading `state.yaml` — no guessing.
32
32
  - **Dashboard**: `npm run dashboard` (TUI) or `npm run dashboard:web` (browser, port 7742) shows live pipeline, epic queue, BCP metrics, and cycle-time ledger.