bigpowers 2.2.0 → 2.4.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/.pi/package.json +16 -0
- package/.pi/prompts/assess-impact.md +76 -0
- package/.pi/prompts/audit-code.md +156 -0
- package/.pi/prompts/build-epic.md +44 -0
- package/.pi/prompts/change-request.md +105 -0
- package/.pi/prompts/commit-message.md +135 -0
- package/.pi/prompts/compose-workflow.md +40 -0
- package/.pi/prompts/craft-skill.md +150 -0
- package/.pi/prompts/deepen-architecture.md +235 -0
- package/.pi/prompts/define-language.md +79 -0
- package/.pi/prompts/define-success.md +62 -0
- package/.pi/prompts/delegate-task.md +76 -0
- package/.pi/prompts/design-interface.md +96 -0
- package/.pi/prompts/develop-tdd.md +375 -0
- package/.pi/prompts/diagnose-root.md +23 -0
- package/.pi/prompts/dispatch-agents.md +83 -0
- package/.pi/prompts/edit-document.md +22 -0
- package/.pi/prompts/elaborate-spec.md +81 -0
- package/.pi/prompts/enforce-first.md +77 -0
- package/.pi/prompts/evolve-skill.md +38 -0
- package/.pi/prompts/execute-plan.md +54 -0
- package/.pi/prompts/fix-bug.md +36 -0
- package/.pi/prompts/grill-me.md +95 -0
- package/.pi/prompts/grill-with-docs.md +37 -0
- package/.pi/prompts/guard-git.md +212 -0
- package/.pi/prompts/hook-commits.md +93 -0
- package/.pi/prompts/inspect-quality.md +105 -0
- package/.pi/prompts/investigate-bug.md +117 -0
- package/.pi/prompts/kickoff-branch.md +99 -0
- package/.pi/prompts/map-codebase.md +70 -0
- package/.pi/prompts/migrate-spec.md +482 -0
- package/.pi/prompts/model-domain.md +227 -0
- package/.pi/prompts/orchestrate-project.md +161 -0
- package/.pi/prompts/organize-workspace.md +159 -0
- package/.pi/prompts/plan-refactor.md +77 -0
- package/.pi/prompts/plan-release.md +145 -0
- package/.pi/prompts/plan-work.md +161 -0
- package/.pi/prompts/release-branch.md +158 -0
- package/.pi/prompts/request-review.md +70 -0
- package/.pi/prompts/research-first.md +62 -0
- package/.pi/prompts/reset-baseline.md +20 -0
- package/.pi/prompts/respond-review.md +70 -0
- package/.pi/prompts/run-evals.md +56 -0
- package/.pi/prompts/run-planning.md +26 -0
- package/.pi/prompts/scope-work.md +23 -0
- package/.pi/prompts/search-skills.md +21 -0
- package/.pi/prompts/seed-conventions.md +132 -0
- package/.pi/prompts/session-state.md +146 -0
- package/.pi/prompts/setup-environment.md +23 -0
- package/.pi/prompts/simulate-agents.md +25 -0
- package/.pi/prompts/slice-tasks.md +23 -0
- package/.pi/prompts/spike-prototype.md +94 -0
- package/.pi/prompts/stocktake-skills.md +40 -0
- package/.pi/prompts/survey-context.md +129 -0
- package/.pi/prompts/terse-mode.md +37 -0
- package/.pi/prompts/trace-requirement.md +68 -0
- package/.pi/prompts/using-bigpowers.md +105 -0
- package/.pi/prompts/validate-fix.md +98 -0
- package/.pi/prompts/verify-work.md +125 -0
- package/.pi/prompts/visual-dashboard.md +51 -0
- package/.pi/prompts/wire-observability.md +92 -0
- package/.pi/prompts/write-document.md +244 -0
- package/.pi/skills/assess-impact/SKILL.md +77 -0
- package/.pi/skills/audit-code/SKILL.md +157 -0
- package/.pi/skills/build-epic/SKILL.md +45 -0
- package/.pi/skills/change-request/SKILL.md +106 -0
- package/.pi/skills/commit-message/SKILL.md +136 -0
- package/.pi/skills/compose-workflow/SKILL.md +41 -0
- package/.pi/skills/craft-skill/SKILL.md +151 -0
- package/.pi/skills/deepen-architecture/SKILL.md +236 -0
- package/.pi/skills/define-language/SKILL.md +80 -0
- package/.pi/skills/define-success/SKILL.md +63 -0
- package/.pi/skills/delegate-task/SKILL.md +77 -0
- package/.pi/skills/design-interface/SKILL.md +97 -0
- package/.pi/skills/develop-tdd/SKILL.md +376 -0
- package/.pi/skills/diagnose-root/SKILL.md +24 -0
- package/.pi/skills/dispatch-agents/SKILL.md +84 -0
- package/.pi/skills/edit-document/SKILL.md +23 -0
- package/.pi/skills/elaborate-spec/SKILL.md +82 -0
- package/.pi/skills/enforce-first/SKILL.md +78 -0
- package/.pi/skills/evolve-skill/SKILL.md +39 -0
- package/.pi/skills/execute-plan/SKILL.md +55 -0
- package/.pi/skills/fix-bug/SKILL.md +37 -0
- package/.pi/skills/grill-me/SKILL.md +96 -0
- package/.pi/skills/grill-with-docs/SKILL.md +38 -0
- package/.pi/skills/guard-git/SKILL.md +213 -0
- package/.pi/skills/hook-commits/SKILL.md +94 -0
- package/.pi/skills/inspect-quality/SKILL.md +106 -0
- package/.pi/skills/investigate-bug/SKILL.md +118 -0
- package/.pi/skills/kickoff-branch/SKILL.md +100 -0
- package/.pi/skills/map-codebase/SKILL.md +71 -0
- package/.pi/skills/migrate-spec/SKILL.md +483 -0
- package/.pi/skills/model-domain/SKILL.md +228 -0
- package/.pi/skills/orchestrate-project/SKILL.md +162 -0
- package/.pi/skills/organize-workspace/SKILL.md +160 -0
- package/.pi/skills/plan-refactor/SKILL.md +78 -0
- package/.pi/skills/plan-release/SKILL.md +146 -0
- package/.pi/skills/plan-work/SKILL.md +162 -0
- package/.pi/skills/release-branch/SKILL.md +159 -0
- package/.pi/skills/request-review/SKILL.md +71 -0
- package/.pi/skills/research-first/SKILL.md +63 -0
- package/.pi/skills/reset-baseline/SKILL.md +21 -0
- package/.pi/skills/respond-review/SKILL.md +71 -0
- package/.pi/skills/run-evals/SKILL.md +57 -0
- package/.pi/skills/run-planning/SKILL.md +27 -0
- package/.pi/skills/scope-work/SKILL.md +24 -0
- package/.pi/skills/search-skills/SKILL.md +22 -0
- package/.pi/skills/seed-conventions/SKILL.md +133 -0
- package/.pi/skills/session-state/SKILL.md +147 -0
- package/.pi/skills/setup-environment/SKILL.md +24 -0
- package/.pi/skills/simulate-agents/SKILL.md +26 -0
- package/.pi/skills/slice-tasks/SKILL.md +24 -0
- package/.pi/skills/spike-prototype/SKILL.md +95 -0
- package/.pi/skills/stocktake-skills/SKILL.md +41 -0
- package/.pi/skills/survey-context/SKILL.md +130 -0
- package/.pi/skills/terse-mode/SKILL.md +38 -0
- package/.pi/skills/trace-requirement/SKILL.md +69 -0
- package/.pi/skills/using-bigpowers/SKILL.md +106 -0
- package/.pi/skills/validate-fix/SKILL.md +99 -0
- package/.pi/skills/verify-work/SKILL.md +126 -0
- package/.pi/skills/visual-dashboard/SKILL.md +52 -0
- package/.pi/skills/wire-observability/SKILL.md +93 -0
- package/.pi/skills/write-document/SKILL.md +245 -0
- package/CHANGELOG.md +14 -0
- package/README.md +27 -1
- package/deepen-architecture/SKILL.md +2 -0
- package/define-language/SKILL.md +2 -0
- package/diagnose-root/SKILL.md +2 -0
- package/edit-document/SKILL.md +2 -0
- package/fix-bug/SKILL.md +3 -1
- package/grill-me/SKILL.md +3 -1
- package/grill-with-docs/SKILL.md +3 -1
- package/investigate-bug/SKILL.md +5 -11
- package/map-codebase/SKILL.md +3 -1
- package/model-domain/SKILL.md +2 -0
- package/package.json +11 -2
- package/plan-release/SKILL.md +1 -1
- package/plan-work/SKILL.md +3 -1
- package/release-branch/SKILL.md +4 -2
- package/run-planning/SKILL.md +3 -2
- package/scope-work/SKILL.md +3 -1
- package/scripts/sync-skills.sh +48 -3
- package/scripts/validate-doctrine.sh +24 -9
- package/seed-conventions/SKILL.md +2 -0
- package/slice-tasks/SKILL.md +3 -1
- package/survey-context/SKILL.md +3 -1
- package/write-document/SKILL.md +2 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: change-request
|
|
3
|
+
description: "Add a new requirement or reorder epics by WSJF against specs/release-plan.yaml and epic capsule directories. Modes Add and Reorder. Use when a new requirement arrives mid-release or the plan needs prioritization."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
# Change Request
|
|
8
|
+
|
|
9
|
+
> **HARD GATE** — `specs/release-plan.yaml` must exist before running either mode. If it doesn't, run `plan-release` first.
|
|
10
|
+
>
|
|
11
|
+
> → verify: `[ -f specs/release-plan.yaml ] && echo "ready" || echo "BLOCKED: run plan-release first"`
|
|
12
|
+
|
|
13
|
+
Two modes. State which one you want or the skill will ask.
|
|
14
|
+
|
|
15
|
+
## Mode A — Add
|
|
16
|
+
|
|
17
|
+
Intake a new requirement mid-flight without disrupting work in progress.
|
|
18
|
+
|
|
19
|
+
1. **Capture**: What is the change? What problem does it solve?
|
|
20
|
+
2. **Locate**: Which existing stories in `specs/epics/` does it affect or replace?
|
|
21
|
+
3. **Draft**: Add story + `tasks[]` with Gherkin-style AC in epic YAML (each task has `verify`).
|
|
22
|
+
4. **Place**: Append story under existing epic capsule, or create `specs/epics/eNN-slug.yaml` and register in `release-plan.yaml` `epics[]`.
|
|
23
|
+
5. **Score**: Compute WSJF; note if it outranks in-progress work.
|
|
24
|
+
|
|
25
|
+
→ verify: `grep -c 'stories:' specs/epics/*/epic.yaml`
|
|
26
|
+
|
|
27
|
+
## Mode B — Reorder
|
|
28
|
+
|
|
29
|
+
Value-engineering pass over the full release using WSJF.
|
|
30
|
+
|
|
31
|
+
See [REFERENCE.md](REFERENCE.md) for the full WSJF scoring rubric.
|
|
32
|
+
|
|
33
|
+
1. **Score** each epic/story: BV + TC + RR / Job Size.
|
|
34
|
+
2. **Re-sort** `release-plan.yaml` `epics[]` and per-epic `wsjf` fields.
|
|
35
|
+
3. **Flag cut candidates**: WSJF < 1.5.
|
|
36
|
+
4. **Update** `specs/release-plan.yaml` and epic `wsjf` keys with rationale.
|
|
37
|
+
5. **Report** the delta.
|
|
38
|
+
|
|
39
|
+
→ verify: `grep -c 'wsjf' specs/release-plan.yaml specs/epics/*/epic.yaml`
|
|
40
|
+
|
|
41
|
+
## After either mode
|
|
42
|
+
|
|
43
|
+
Run `bash scripts/sync-status-from-epics.sh`. Suggest `plan-work` or `build-epic` for the top-ranked unstarted story.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
# WSJF Scoring Reference
|
|
48
|
+
|
|
49
|
+
Weighted Shortest Job First: **WSJF = (Business Value + Time Criticality + Risk Reduction) / Job Size**
|
|
50
|
+
|
|
51
|
+
All dimensions scored 1–10 using a Fibonacci-like scale: 1, 2, 3, 5, 8, 10.
|
|
52
|
+
|
|
53
|
+
## Business Value
|
|
54
|
+
|
|
55
|
+
| Score | Meaning |
|
|
56
|
+
|-------|---------|
|
|
57
|
+
| 10 | Core revenue path, legal requirement, blocking launch |
|
|
58
|
+
| 8 | Significant user value, major pain point removed |
|
|
59
|
+
| 5 | Notable improvement, medium user segment affected |
|
|
60
|
+
| 3 | Nice-to-have, minor convenience |
|
|
61
|
+
| 1 | Cosmetic or speculative |
|
|
62
|
+
|
|
63
|
+
## Time Criticality
|
|
64
|
+
|
|
65
|
+
| Score | Meaning |
|
|
66
|
+
|-------|---------|
|
|
67
|
+
| 10 | Hard deadline (regulatory, contract, launch date) |
|
|
68
|
+
| 8 | Competitive window closing, partner dependency |
|
|
69
|
+
| 5 | Would delay next milestone if deferred |
|
|
70
|
+
| 3 | Flexible, can slip one sprint |
|
|
71
|
+
| 1 | No urgency |
|
|
72
|
+
|
|
73
|
+
## Risk Reduction (or Opportunity Enablement)
|
|
74
|
+
|
|
75
|
+
| Score | Meaning |
|
|
76
|
+
|-------|---------|
|
|
77
|
+
| 10 | Eliminates critical architectural risk or enables a new capability |
|
|
78
|
+
| 8 | Reduces a known failure mode or unblocks high-value work |
|
|
79
|
+
| 5 | Moderate risk mitigation or enablement |
|
|
80
|
+
| 3 | Low risk reduction |
|
|
81
|
+
| 1 | No risk relevance |
|
|
82
|
+
|
|
83
|
+
## Job Size (effort denominator — larger = lower WSJF)
|
|
84
|
+
|
|
85
|
+
| Score | Meaning |
|
|
86
|
+
|-------|---------|
|
|
87
|
+
| 1 | Hours |
|
|
88
|
+
| 2 | 1 day |
|
|
89
|
+
| 3 | 2–3 days |
|
|
90
|
+
| 5 | 1 week |
|
|
91
|
+
| 8 | 2 weeks |
|
|
92
|
+
| 10 | 1 month+ |
|
|
93
|
+
|
|
94
|
+
## Cut threshold
|
|
95
|
+
|
|
96
|
+
Stories with WSJF < 1.5 are cut candidates: high effort, low combined value.
|
|
97
|
+
|
|
98
|
+
## Example
|
|
99
|
+
|
|
100
|
+
Story: "Add OAuth login"
|
|
101
|
+
- Business Value: 8 (removes major sign-up friction)
|
|
102
|
+
- Time Criticality: 5 (Q3 launch nice, not hard)
|
|
103
|
+
- Risk Reduction: 3 (minor security improvement)
|
|
104
|
+
- Job Size: 5 (one week)
|
|
105
|
+
|
|
106
|
+
WSJF = (8 + 5 + 3) / 5 = **3.2** — healthy, implement early.
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: commit-message
|
|
3
|
+
description: "Reviews working-tree changes, then drafts a Conventional Commits title/body and states the semantic-release version bump a single such commit would imply. Also notes which defensive-code categories were touched. Use when the user wants to commit recent work, prepare a Conventional Commits message, or asks for semantic-release / semver-consistent messaging before git commit."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
# Commit Message
|
|
8
|
+
> **HARD GATE** — **HARD GATE** — Commits must follow Conventional Commits spec (type(scope): description). Do NOT use vague messages like 'fix' or 'updates.' The message must explain the 'why,' not the 'what.'
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## Modes
|
|
12
|
+
|
|
13
|
+
- Default: standard Conventional Commits message
|
|
14
|
+
- --fix-type: Forces type=fix. Use when commit type is unambiguous.
|
|
15
|
+
|
|
16
|
+
## What "last chat" means
|
|
17
|
+
|
|
18
|
+
- **Primary source of truth:** `git status`, `git diff` (unstaged), and `git diff --cached` (staged). Run these in the repo root (or the paths the user changed).
|
|
19
|
+
- **Context:** use the current conversation to summarize *intent* and to spot **breaking** API/behavior changes that diff alone may not show.
|
|
20
|
+
- If the user tracks a session baseline (e.g. branch, tag, or `git stash create` at start), you may `git diff <baseline>..HEAD` plus uncommitted diffs; otherwise use only the index and working tree.
|
|
21
|
+
|
|
22
|
+
## Quick workflow
|
|
23
|
+
|
|
24
|
+
1. **Inventory** — List changed paths; group by feature vs chore vs docs vs test-only.
|
|
25
|
+
2. **Decide commit shape** — One atomic commit is ideal. If the diff mixes unrelated concerns, recommend **multiple commits** (each with its own type/scope) before suggesting one message.
|
|
26
|
+
3. **Classify for semantic release** — `fix` → patch, `feat` → minor, **breaking** → major.
|
|
27
|
+
4. **Write the message** — `type(optional-scope)!: description` (see [REFERENCE.md](REFERENCE.md#message-format)). Use `!` or a `BREAKING CHANGE:` footer when behavior contracts change.
|
|
28
|
+
5. **Note defensive-code categories touched** — from CONVENTIONS.md: Rate limit | Retry with backoff | Circuit breaker | Timeout | Graceful degradation
|
|
29
|
+
6. **Deliver** — Output:
|
|
30
|
+
- Proposed **full commit message** (title + optional body + footers).
|
|
31
|
+
- **Release bump** this commit would drive: `patch` | `minor` | `major` | `none`.
|
|
32
|
+
- Optional `git add …` and `git commit -m` instructions; do **not** run destructive git commands unless the user asked.
|
|
33
|
+
|
|
34
|
+
## Checklist before finalizing
|
|
35
|
+
|
|
36
|
+
- [ ] Type matches the **dominant** user-visible outcome (`feat` vs `fix` vs `perf`, etc.).
|
|
37
|
+
- [ ] **Scope** is a short noun in parentheses if it helps (e.g. `fix(api): …`).
|
|
38
|
+
- [ ] Breaking changes are explicit (`!` and/or `BREAKING CHANGE:` in the body/footer).
|
|
39
|
+
- [ ] Description is imperative, lowercase start after the prefix, no trailing period in the title line.
|
|
40
|
+
|
|
41
|
+
## When not to invent a bump
|
|
42
|
+
|
|
43
|
+
If the repo uses a custom `@semantic-release/commit-analyzer` preset, note that your bump is **heuristic** and they should match `.releaserc` / `release.config.*`. See [REFERENCE.md](REFERENCE.md#custom-repositories).
|
|
44
|
+
|
|
45
|
+
## Further reading
|
|
46
|
+
|
|
47
|
+
- [REFERENCE.md](REFERENCE.md) — Message shape, footers, release mapping, squashing notes.
|
|
48
|
+
|
|
49
|
+
## Handoff
|
|
50
|
+
|
|
51
|
+
Gate: READY -> next: release-branch
|
|
52
|
+
Writes: state.yaml handoff.next_skill = release-branch
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
# Conventional Commits + semantic-style release (reference)
|
|
57
|
+
|
|
58
|
+
## Message format
|
|
59
|
+
|
|
60
|
+
From [Conventional Commits 1.0.0](https://www.conventionalcommits.org/en/v1.0.0/#specification):
|
|
61
|
+
|
|
62
|
+
```text
|
|
63
|
+
<type>[optional scope][optional !]: <description>
|
|
64
|
+
|
|
65
|
+
[optional body]
|
|
66
|
+
|
|
67
|
+
[optional footer(s)]
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
- **Scope:** parenthesized noun, e.g. `feat(parser): …`.
|
|
71
|
+
- **Breaking:** `!` before `:` (e.g. `feat(api)!: …`) and/or footer `BREAKING CHANGE: description` (token must be uppercase per spec for that footer name).
|
|
72
|
+
- **Description:** short summary; body explains *why* or migration steps.
|
|
73
|
+
|
|
74
|
+
Common **types** (not exhaustive): `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore` — as in [Angular / commitlint conventions](https://github.com/conventional-changelog/commitlint).
|
|
75
|
+
|
|
76
|
+
## Advanced Specification Patterns
|
|
77
|
+
|
|
78
|
+
### Reverts
|
|
79
|
+
If the commit reverts a previous commit, it should begin with `revert:`, followed by the header of the reverted commit. In the body, it should say: `This reverts commit <hash>.`.
|
|
80
|
+
|
|
81
|
+
```text
|
|
82
|
+
revert: feat(api): add user endpoint
|
|
83
|
+
|
|
84
|
+
This reverts commit 676104e.
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Breaking Changes
|
|
88
|
+
A breaking change can be signaled by:
|
|
89
|
+
1. A **`BREAKING CHANGE:`** footer (must be uppercase, at the start of the footer). This is the **most compatible** way to trigger a Major release in `semantic-release` (Angular preset).
|
|
90
|
+
2. A **`!`** after the type/scope: `feat(api)!: change user response shape`.
|
|
91
|
+
|
|
92
|
+
**Pro-tip:** For maximum compatibility with all tooling (older and newer), use BOTH the `!` and the `BREAKING CHANGE:` footer.
|
|
93
|
+
|
|
94
|
+
### Footers (Tokens & Values)
|
|
95
|
+
Footers follow the same `Token: value` pattern as Git Trailers. Common tokens:
|
|
96
|
+
- `Refs: #123`
|
|
97
|
+
- `See-also: docs/ADR-001.md`
|
|
98
|
+
- `Signed-off-by: Name <email>`
|
|
99
|
+
|
|
100
|
+
**Multi-line footers:** If a footer value spans multiple lines, each subsequent line must be indented.
|
|
101
|
+
|
|
102
|
+
### Squashing & History
|
|
103
|
+
When using `gh pr merge --squash`, the PR title is usually used as the commit subject.
|
|
104
|
+
- **PR Title:** MUST follow `<type>(<scope>): <description>`
|
|
105
|
+
- **PR Body:** Content will be moved to the commit body.
|
|
106
|
+
|
|
107
|
+
## Release Type Mapping (Default Angular Preset)
|
|
108
|
+
|
|
109
|
+
This table reflects the **out-of-the-box** behavior of `semantic-release` using the `@semantic-release/commit-analyzer` default (Angular) rules.
|
|
110
|
+
|
|
111
|
+
| Commit pattern | Release | Notes |
|
|
112
|
+
|----------------|---------|-------|
|
|
113
|
+
| `fix:` | **Patch** | Bug fixes |
|
|
114
|
+
| `feat:` | **Minor** | New features |
|
|
115
|
+
| `perf:` | **Patch** | Performance improvements |
|
|
116
|
+
| `any type` + `BREAKING CHANGE:` footer | **Major** | **Mandatory** for Major version bumps in default configs. |
|
|
117
|
+
| `any type!:` (exclamation mark) | **Major** | Supported by modern CC parsers, but use footer for max safety. |
|
|
118
|
+
| `docs:`, `chore:`, `test:`, `ci:`, `refactor:`, `style:` | **None** | Does not trigger a new release by default. |
|
|
119
|
+
|
|
120
|
+
> **Warning:** While `refactor:` and `style:` improve code, they do NOT trigger a release in the default Angular preset. Use `fix:` if a refactor also fixes a bug, or `feat:` if it adds new behavior.
|
|
121
|
+
|
|
122
|
+
## Custom Repositories
|
|
123
|
+
|
|
124
|
+
- Read `release.config.js`, `.releaserc`, or `package.json` → `release` / `semantic-release` config.
|
|
125
|
+
- The **@semantic-release/commit-analyzer** preset may map types differently; prefer **their** rules when they conflict with this reference.
|
|
126
|
+
|
|
127
|
+
## Squash and PR titles
|
|
128
|
+
|
|
129
|
+
- If the team squashes on merge, the **PR title** often becomes the single squashed commit subject — it should still follow `type(scope): description` for tooling.
|
|
130
|
+
- `revert:` type and `Refs:` footers are valid patterns; revert handling varies by [tooling](https://www.conventionalcommits.org/en/v1.0.0/#specification).
|
|
131
|
+
|
|
132
|
+
## Links
|
|
133
|
+
|
|
134
|
+
- [Conventional Commits — specification](https://www.conventionalcommits.org/en/v1.0.0/#specification)
|
|
135
|
+
- [semantic-release — README (commit format & flow)](https://github.com/semantic-release/semantic-release#commit-message-format)
|
|
136
|
+
- Fork pointer: [semantic-release-baby](https://github.com/danielvm-git/semantic-release-baby) (automation and docs align with upstream semantic-release)
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: compose-workflow
|
|
3
|
+
description: "Chain multiple bigpowers skills into a custom workflow recipe saved in specs/. Use when a project repeats a non-standard skill sequence, or user wants a documented playbook beyond orchestrate-project modes.model: sonnet"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
# Compose Workflow
|
|
8
|
+
> **HARD GATE** — **HARD GATE** — Workflows are orchestration, not automation. Do NOT create workflows for tasks that should be single skills. Workflow complexity must be justified.
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## Process
|
|
12
|
+
|
|
13
|
+
1. Interview: goal, phases, which skills, gates between steps.
|
|
14
|
+
2. Write `specs/WORKFLOW-<name>.md`:
|
|
15
|
+
- Trigger ("Use when...")
|
|
16
|
+
- Ordered steps: `skill → artefact → verify`
|
|
17
|
+
- HARD GATEs between phases
|
|
18
|
+
3. Register in state.yaml Active Decisions.
|
|
19
|
+
4. Optional: reference from `orchestrate-project` Ad-Hoc mode.
|
|
20
|
+
|
|
21
|
+
## Verify
|
|
22
|
+
|
|
23
|
+
→ verify: `test -f specs/WORKFLOW-*.md && grep -c "verify:" specs/WORKFLOW-*.md | awk '{if($1>0) print "OK"}'`
|
|
24
|
+
|
|
25
|
+
See [REFERENCE.md](REFERENCE.md) for template.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
# Workflow template
|
|
30
|
+
|
|
31
|
+
```markdown
|
|
32
|
+
# WORKFLOW: <name>
|
|
33
|
+
|
|
34
|
+
**Trigger:** Use when ...
|
|
35
|
+
|
|
36
|
+
| Step | Skill | Output | verify |
|
|
37
|
+
|------|-------|--------|--------|
|
|
38
|
+
| 1 | survey-context | state.yaml handoff | ... |
|
|
39
|
+
| 2 | research-first | Prior Art in SCOPE_LATEST.yaml | ... |
|
|
40
|
+
| 3 | plan-work | epics/eNN-*.yaml tasks | ... |
|
|
41
|
+
```
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: craft-skill
|
|
3
|
+
description: "Create new bigpowers skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, or build a new skill for the bigpowers lifecycle."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
# Craft Skill
|
|
8
|
+
|
|
9
|
+
> **HARD GATE** — Do NOT name a skill without a two-word verb-noun pair. Do NOT merge a new skill without running `sync-skills.sh` — the generated `.cursor/rules/` and `.gemini/` artifacts must match the source SKILL.md.
|
|
10
|
+
|
|
11
|
+
## Process
|
|
12
|
+
|
|
13
|
+
1. **Gather requirements** — ask user about:
|
|
14
|
+
- What task/domain does the skill cover?
|
|
15
|
+
- What specific use cases should it handle?
|
|
16
|
+
- Does it need executable scripts or just instructions?
|
|
17
|
+
- Any reference materials to include?
|
|
18
|
+
- What specs/ output does it produce (if any)?
|
|
19
|
+
|
|
20
|
+
2. **Verify Principles** — Ensure the skill aligns with [PRINCIPLES.md](../docs/PRINCIPLES.md):
|
|
21
|
+
- Is it atomic (verb-noun)?
|
|
22
|
+
- Is it "deep" (simple interface, complex internal logic)?
|
|
23
|
+
- Does it include Hard Gates?
|
|
24
|
+
- Is it verifiable with a `.feature` file?
|
|
25
|
+
|
|
26
|
+
3. **Draft the skill** — create:
|
|
27
|
+
- SKILL.md with concise instructions (see [REFERENCE.md](REFERENCE.md) for template)
|
|
28
|
+
- Additional reference files if content exceeds 100 lines
|
|
29
|
+
- Utility scripts if deterministic operations needed
|
|
30
|
+
|
|
31
|
+
**Auto-skill from library README:** When user provides a library README or API docs URL, extract: triggers, HARD GATEs, verify commands, specs/ output — draft SKILL.md without inventing APIs not in the source.
|
|
32
|
+
|
|
33
|
+
4. Add `model:` frontmatter (`haiku` | `sonnet` | `opus`) per [model-profiles.md](../docs/references/model-profiles.md).
|
|
34
|
+
|
|
35
|
+
> **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.
|
|
36
|
+
|
|
37
|
+
5. **Review with user** — present draft and ask:
|
|
38
|
+
- Does this cover your use cases?
|
|
39
|
+
- Anything missing or unclear?
|
|
40
|
+
- Should any section be more/less detailed?
|
|
41
|
+
|
|
42
|
+
## Naming Rules
|
|
43
|
+
|
|
44
|
+
Every skill name must be a **two-word verb-noun pair**. See [REFERENCE.md](REFERENCE.md) for full rules, examples, and documented exceptions.
|
|
45
|
+
|
|
46
|
+
## specs/ Output
|
|
47
|
+
|
|
48
|
+
If the skill produces written output, it goes in `specs/` at the project root. Document the output file path in the skill body and in CONVENTIONS.md's output files table.
|
|
49
|
+
|
|
50
|
+
## Review Checklist
|
|
51
|
+
|
|
52
|
+
After drafting, verify:
|
|
53
|
+
|
|
54
|
+
- [ ] Name is a two-word verb-noun pair (or follows grill-me exception)
|
|
55
|
+
- [ ] Description includes triggers ("Use when...")
|
|
56
|
+
- [ ] SKILL.md under 100 lines
|
|
57
|
+
- [ ] No time-sensitive info
|
|
58
|
+
- [ ] Consistent terminology with CONVENTIONS.md
|
|
59
|
+
- [ ] specs/ output documented if applicable
|
|
60
|
+
- [ ] `sync-skills.sh` run to propagate to Cursor/Gemini
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
# Craft Skill — Reference
|
|
65
|
+
|
|
66
|
+
## Naming Rules (full)
|
|
67
|
+
|
|
68
|
+
Every skill name must be a **two-word verb-noun pair**:
|
|
69
|
+
- First word: a verb (survey, model, define, develop, audit…)
|
|
70
|
+
- Second word: a noun from PMBOK 6 / Agile vocabulary (context, domain, language, tdd, code…)
|
|
71
|
+
- Pronounceable in any language, searchable, no noise words, no encodings
|
|
72
|
+
- Exception precedent: `grill-me` — kept for recognizability
|
|
73
|
+
|
|
74
|
+
Good: `survey-context`, `audit-code`, `validate-fix`
|
|
75
|
+
Bad: `context-surveyor`, `code-auditing-skill`, `fix-validator`
|
|
76
|
+
|
|
77
|
+
Any new naming exception requires an entry in CONVENTIONS.md before the skill is published.
|
|
78
|
+
|
|
79
|
+
## Skill Structure
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
skill-name/
|
|
83
|
+
├── SKILL.md # Main instructions (required)
|
|
84
|
+
├── REFERENCE.md # Detailed docs (if needed)
|
|
85
|
+
├── EXAMPLES.md # Usage examples (if needed)
|
|
86
|
+
└── scripts/ # Utility scripts (if needed)
|
|
87
|
+
└── helper.sh
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## SKILL.md Template
|
|
91
|
+
|
|
92
|
+
```md
|
|
93
|
+
---
|
|
94
|
+
name: skill-name
|
|
95
|
+
description: Brief description of capability. Use when [specific triggers].
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
# Skill Name
|
|
99
|
+
|
|
100
|
+
## Quick start
|
|
101
|
+
|
|
102
|
+
[Minimal working example]
|
|
103
|
+
|
|
104
|
+
## Workflows
|
|
105
|
+
|
|
106
|
+
[Step-by-step processes with checklists for complex tasks]
|
|
107
|
+
|
|
108
|
+
## Advanced features
|
|
109
|
+
|
|
110
|
+
[Link to separate files: See [REFERENCE.md](REFERENCE.md)]
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Description Requirements
|
|
114
|
+
|
|
115
|
+
The description is **the only thing your agent sees** when deciding which skill to load.
|
|
116
|
+
|
|
117
|
+
**Format**:
|
|
118
|
+
- Max 1024 chars
|
|
119
|
+
- Write in third person
|
|
120
|
+
- First sentence: what it does
|
|
121
|
+
- Second sentence: "Use when [specific triggers]"
|
|
122
|
+
|
|
123
|
+
**Good example**:
|
|
124
|
+
```
|
|
125
|
+
Investigate a bug by exploring the codebase to find root cause, then write a TDD-based fix plan to specs/bugs/BUG-*.md. Use when user reports a bug, wants to investigate a problem, or mentions "triage".
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## When to Add Scripts
|
|
129
|
+
|
|
130
|
+
Add utility scripts when:
|
|
131
|
+
- Operation is deterministic (validation, formatting)
|
|
132
|
+
- Same code would be generated repeatedly
|
|
133
|
+
- Errors need explicit handling
|
|
134
|
+
|
|
135
|
+
## When to Split Files
|
|
136
|
+
|
|
137
|
+
Split into separate files when:
|
|
138
|
+
- SKILL.md exceeds 100 lines
|
|
139
|
+
- Content has distinct domains
|
|
140
|
+
- Advanced features are rarely needed
|
|
141
|
+
|
|
142
|
+
## sync-skills.sh Propagation
|
|
143
|
+
|
|
144
|
+
After adding a new skill directory with SKILL.md, run `scripts/sync-skills.sh` from the bigpowers repo root. This automatically generates:
|
|
145
|
+
- `.cursor/rules/<name>.mdc` — for Cursor
|
|
146
|
+
- `.gemini/extensions/bigpowers/skills/<name>/SKILL.md` — Agent Skill
|
|
147
|
+
- `.gemini/extensions/bigpowers/commands/<name>.toml` — Slash Command
|
|
148
|
+
- `.gemini/extensions/bigpowers/commands/prompts/<name>.md` — Command Prompt
|
|
149
|
+
- Updated `gemini-extension.json`
|
|
150
|
+
|
|
151
|
+
verify: `bash scripts/sync-skills.sh 2>&1 | grep "skills synced"`
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: deepen-architecture
|
|
3
|
+
description: "Find deepening opportunities in a codebase, informed by the domain language in specs/tech-architecture/tech-stack.md and the decisions in specs/adr/. Use when the user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more testable and AI-navigable."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
# Deepen Architecture
|
|
8
|
+
|
|
9
|
+
Surface architectural friction and propose **deepening opportunities** — refactors that turn shallow modules into deep ones. The aim is testability and AI-navigability.
|
|
10
|
+
|
|
11
|
+
**Distinct from `define-language` and `model-domain`:** Use this skill to find module-level refactoring opportunities in the codebase. Use `define-language` to produce a canonical glossary of terms. Use `model-domain` to stress-test a plan through a domain-model interview.
|
|
12
|
+
|
|
13
|
+
> **HARD GATE** — Deep modules must solve a forcing function, not just be "nice abstractions." If you cannot articulate why the abstraction exists, it is premature.
|
|
14
|
+
|
|
15
|
+
## Glossary
|
|
16
|
+
|
|
17
|
+
Use these terms exactly in every suggestion. Consistent language is the point — don't drift into "component," "service," "API," or "boundary." Full definitions in [LANGUAGE.md](LANGUAGE.md).
|
|
18
|
+
|
|
19
|
+
- **Module** — anything with an interface and an implementation (function, class, package, slice).
|
|
20
|
+
- **Interface** — everything a caller must know to use the module: types, invariants, error modes, ordering, config. Not just the type signature.
|
|
21
|
+
- **Implementation** — the code inside.
|
|
22
|
+
- **Depth** — leverage at the interface: a lot of behaviour behind a small interface. **Deep** = high leverage. **Shallow** = interface nearly as complex as the implementation.
|
|
23
|
+
- **Seam** — where an interface lives; a place behaviour can be altered without editing in place. (Use this, not "boundary.")
|
|
24
|
+
- **Adapter** — a concrete thing satisfying an interface at a seam.
|
|
25
|
+
- **Leverage** — what callers get from depth.
|
|
26
|
+
- **Locality** — what maintainers get from depth: change, bugs, knowledge concentrated in one place.
|
|
27
|
+
|
|
28
|
+
Key principles (see [LANGUAGE.md](LANGUAGE.md) for the full list):
|
|
29
|
+
|
|
30
|
+
- **Deletion test**: imagine deleting the module. If complexity vanishes, it was a pass-through. If complexity reappears across N callers, it was earning its keep.
|
|
31
|
+
- **The interface is the test surface.**
|
|
32
|
+
- **One adapter = hypothetical seam. Two adapters = real seam.**
|
|
33
|
+
|
|
34
|
+
This skill is _informed_ by the project's domain model — `specs/tech-architecture/tech-stack.md` and any `specs/adr/`. The domain language gives names to good seams; ADRs record decisions the skill should not re-litigate. See [CONTEXT-FORMAT.md](../model-domain/CONTEXT-FORMAT.md) and [ADR-FORMAT.md](../model-domain/ADR-FORMAT.md).
|
|
35
|
+
|
|
36
|
+
## Process
|
|
37
|
+
|
|
38
|
+
### 1. Explore
|
|
39
|
+
|
|
40
|
+
Read existing documentation first:
|
|
41
|
+
|
|
42
|
+
- `specs/tech-architecture/tech-stack.md` (or `specs/tech-architecture/tech-stack.md` + each `specs/tech-architecture/tech-stack.md` in a multi-context repo)
|
|
43
|
+
- Relevant ADRs in `specs/adr/`
|
|
44
|
+
|
|
45
|
+
If any of these files don't exist, proceed silently — don't flag their absence or suggest creating them upfront.
|
|
46
|
+
|
|
47
|
+
Then use the Agent tool with `subagent_type=Explore` to walk the codebase. Don't follow rigid heuristics — explore organically and note where you experience friction:
|
|
48
|
+
|
|
49
|
+
- Where does understanding one concept require bouncing between many small modules?
|
|
50
|
+
- Where are modules **shallow** — interface nearly as complex as the implementation?
|
|
51
|
+
- Where have pure functions been extracted just for testability, but the real bugs hide in how they're called?
|
|
52
|
+
- Where do tightly-coupled modules leak across their seams?
|
|
53
|
+
- Which parts of the codebase are untested, or hard to test through their current interface?
|
|
54
|
+
|
|
55
|
+
Apply the **deletion test** to anything you suspect is shallow.
|
|
56
|
+
|
|
57
|
+
### 2. Module Depth score
|
|
58
|
+
|
|
59
|
+
For each candidate module, assign a **Module Depth score** (1–5, Ousterhout):
|
|
60
|
+
|
|
61
|
+
| Score | Meaning |
|
|
62
|
+
|-------|---------|
|
|
63
|
+
| 1 | Shallow — interface complexity ≈ implementation |
|
|
64
|
+
| 3 | Balanced |
|
|
65
|
+
| 5 | Deep — small interface, substantial hidden behavior |
|
|
66
|
+
|
|
67
|
+
Include the score in each candidate row. Prioritize score ≤ 2 for deepening.
|
|
68
|
+
|
|
69
|
+
### 3. Present candidates
|
|
70
|
+
|
|
71
|
+
Present a numbered list of deepening opportunities. For each candidate:
|
|
72
|
+
|
|
73
|
+
- **Files** — which files/modules are involved
|
|
74
|
+
- **Problem** — why the current architecture is causing friction
|
|
75
|
+
- **Solution** — plain English description of what would change
|
|
76
|
+
- **Benefits** — explained in terms of locality and leverage, and how tests would improve
|
|
77
|
+
|
|
78
|
+
**Use `specs/tech-architecture/tech-stack.md` vocabulary for the domain, and [LANGUAGE.md](LANGUAGE.md) vocabulary for the architecture.**
|
|
79
|
+
|
|
80
|
+
**ADR conflicts**: if a candidate contradicts an existing ADR, only surface it when the friction is real enough to warrant revisiting the ADR. Mark it clearly. Don't list every theoretical refactor an ADR forbids.
|
|
81
|
+
|
|
82
|
+
Do NOT propose interfaces yet. Ask the user: "Which of these would you like to explore?"
|
|
83
|
+
|
|
84
|
+
### 4. Grilling loop
|
|
85
|
+
|
|
86
|
+
Once the user picks a candidate, drop into a grilling conversation. Walk the design tree with them — constraints, dependencies, the shape of the deepened module, what sits behind the seam, what tests survive.
|
|
87
|
+
|
|
88
|
+
Side effects happen inline as decisions crystallize:
|
|
89
|
+
|
|
90
|
+
- **Naming a deepened module after a concept not in `specs/tech-architecture/tech-stack.md`?** Add the term to `specs/tech-architecture/tech-stack.md` — same discipline as `model-domain` (see [CONTEXT-FORMAT.md](../model-domain/CONTEXT-FORMAT.md)). Create the file lazily if it doesn't exist.
|
|
91
|
+
- **Sharpening a fuzzy term during the conversation?** Update `specs/tech-architecture/tech-stack.md` right there.
|
|
92
|
+
- **User rejects the candidate with a load-bearing reason?** Offer an ADR, framed as: _"Want me to record this as an ADR so future architecture reviews don't re-suggest it?"_ Only offer when the reason would actually be needed by a future explorer. See [ADR-FORMAT.md](../model-domain/ADR-FORMAT.md).
|
|
93
|
+
- **Want to explore alternative interfaces for the deepened module?** See [INTERFACE-DESIGN.md](INTERFACE-DESIGN.md).
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
# Deepening
|
|
98
|
+
|
|
99
|
+
How to deepen a cluster of shallow modules safely, given its dependencies. Assumes the vocabulary in [LANGUAGE.md](LANGUAGE.md) — **module**, **interface**, **seam**, **adapter**.
|
|
100
|
+
|
|
101
|
+
## Dependency categories
|
|
102
|
+
|
|
103
|
+
When assessing a candidate for deepening, classify its dependencies. The category determines how the deepened module is tested across its seam.
|
|
104
|
+
|
|
105
|
+
### 1. In-process
|
|
106
|
+
|
|
107
|
+
Pure computation, in-memory state, no I/O. Always deepenable — merge the modules and test through the new interface directly. No adapter needed.
|
|
108
|
+
|
|
109
|
+
### 2. Local-substitutable
|
|
110
|
+
|
|
111
|
+
Dependencies that have local test stand-ins (PGLite for Postgres, in-memory filesystem). Deepenable if the stand-in exists. The deepened module is tested with the stand-in running in the test suite. The seam is internal; no port at the module's external interface.
|
|
112
|
+
|
|
113
|
+
### 3. Remote but owned (Ports & Adapters)
|
|
114
|
+
|
|
115
|
+
Your own services across a network boundary (microservices, internal APIs). Define a **port** (interface) at the seam. The deep module owns the logic; the transport is injected as an **adapter**. Tests use an in-memory adapter. Production uses an HTTP/gRPC/queue adapter.
|
|
116
|
+
|
|
117
|
+
Recommendation shape: *"Define a port at the seam, implement an HTTP adapter for production and an in-memory adapter for testing, so the logic sits in one deep module even though it's deployed across a network."*
|
|
118
|
+
|
|
119
|
+
### 4. True external (Mock)
|
|
120
|
+
|
|
121
|
+
Third-party services (Stripe, Twilio, etc.) you don't control. The deepened module takes the external dependency as an injected port; tests provide a mock adapter.
|
|
122
|
+
|
|
123
|
+
## Seam discipline
|
|
124
|
+
|
|
125
|
+
- **One adapter means a hypothetical seam. Two adapters means a real one.** Don't introduce a port unless at least two adapters are justified (typically production + test). A single-adapter seam is just indirection.
|
|
126
|
+
- **Internal seams vs external seams.** A deep module can have internal seams (private to its implementation, used by its own tests) as well as the external seam at its interface. Don't expose internal seams through the interface just because tests use them.
|
|
127
|
+
|
|
128
|
+
## Testing strategy: replace, don't layer
|
|
129
|
+
|
|
130
|
+
- Old unit tests on shallow modules become waste once tests at the deepened module's interface exist — delete them.
|
|
131
|
+
- Write new tests at the deepened module's interface. The **interface is the test surface**.
|
|
132
|
+
- Tests assert on observable outcomes through the interface, not internal state.
|
|
133
|
+
- Tests should survive internal refactors — they describe behaviour, not implementation. If a test has to change when the implementation changes, it's testing past the interface.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
# Interface Design
|
|
138
|
+
|
|
139
|
+
When the user wants to explore alternative interfaces for a chosen deepening candidate, use this parallel sub-agent pattern. Based on "Design It Twice" (Ousterhout) — your first idea is unlikely to be the best.
|
|
140
|
+
|
|
141
|
+
Uses the vocabulary in [LANGUAGE.md](LANGUAGE.md) — **module**, **interface**, **seam**, **adapter**, **leverage**.
|
|
142
|
+
|
|
143
|
+
## Process
|
|
144
|
+
|
|
145
|
+
### 1. Frame the problem space
|
|
146
|
+
|
|
147
|
+
Before spawning sub-agents, write a user-facing explanation of the problem space for the chosen candidate:
|
|
148
|
+
|
|
149
|
+
- The constraints any new interface would need to satisfy
|
|
150
|
+
- The dependencies it would rely on, and which category they fall into (see [DEEPENING.md](DEEPENING.md))
|
|
151
|
+
- A rough illustrative code sketch to ground the constraints — not a proposal, just a way to make the constraints concrete
|
|
152
|
+
|
|
153
|
+
Show this to the user, then immediately proceed to Step 2. The user reads and thinks while the sub-agents work in parallel.
|
|
154
|
+
|
|
155
|
+
### 2. Spawn sub-agents
|
|
156
|
+
|
|
157
|
+
Spawn 3+ sub-agents in parallel using the Agent tool. Each must produce a **radically different** interface for the deepened module.
|
|
158
|
+
|
|
159
|
+
Prompt each sub-agent with a separate technical brief (file paths, coupling details, dependency category from [DEEPENING.md](DEEPENING.md), what sits behind the seam). The brief is independent of the user-facing problem-space explanation in Step 1. Give each agent a different design constraint:
|
|
160
|
+
|
|
161
|
+
- Agent 1: "Minimize the interface — aim for 1–3 entry points max. Maximise leverage per entry point."
|
|
162
|
+
- Agent 2: "Maximise flexibility — support many use cases and extension."
|
|
163
|
+
- Agent 3: "Optimise for the most common caller — make the default case trivial."
|
|
164
|
+
- Agent 4 (if applicable): "Design around ports & adapters for cross-seam dependencies."
|
|
165
|
+
|
|
166
|
+
Include both [LANGUAGE.md](LANGUAGE.md) vocabulary and CONTEXT.md vocabulary in the brief so each sub-agent names things consistently with the architecture language and the project's domain language.
|
|
167
|
+
|
|
168
|
+
Each sub-agent outputs:
|
|
169
|
+
|
|
170
|
+
1. Interface (types, methods, params — plus invariants, ordering, error modes)
|
|
171
|
+
2. Usage example showing how callers use it
|
|
172
|
+
3. What the implementation hides behind the seam
|
|
173
|
+
4. Dependency strategy and adapters (see [DEEPENING.md](DEEPENING.md))
|
|
174
|
+
5. Trade-offs — where leverage is high, where it's thin
|
|
175
|
+
|
|
176
|
+
### 3. Present and compare
|
|
177
|
+
|
|
178
|
+
Present designs sequentially so the user can absorb each one, then compare them in prose. Contrast by **depth** (leverage at the interface), **locality** (where change concentrates), and **seam placement**.
|
|
179
|
+
|
|
180
|
+
After comparing, give your own recommendation: which design you think is strongest and why. If elements from different designs would combine well, propose a hybrid. Be opinionated — the user wants a strong read, not a menu.
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
# Language
|
|
185
|
+
|
|
186
|
+
Shared vocabulary for every suggestion this skill makes. Use these terms exactly — don't substitute "component," "service," "API," or "boundary." Consistent language is the whole point.
|
|
187
|
+
|
|
188
|
+
## Terms
|
|
189
|
+
|
|
190
|
+
**Module**
|
|
191
|
+
Anything with an interface and an implementation. Deliberately scale-agnostic — applies equally to a function, class, package, or tier-spanning slice.
|
|
192
|
+
_Avoid_: unit, component, service.
|
|
193
|
+
|
|
194
|
+
**Interface**
|
|
195
|
+
Everything a caller must know to use the module correctly. Includes the type signature, but also invariants, ordering constraints, error modes, required configuration, and performance characteristics.
|
|
196
|
+
_Avoid_: API, signature (too narrow — those refer only to the type-level surface).
|
|
197
|
+
|
|
198
|
+
**Implementation**
|
|
199
|
+
What's inside a module — its body of code. Distinct from **Adapter**: a thing can be a small adapter with a large implementation (a Postgres repo) or a large adapter with a small implementation (an in-memory fake). Reach for "adapter" when the seam is the topic; "implementation" otherwise.
|
|
200
|
+
|
|
201
|
+
**Depth**
|
|
202
|
+
Leverage at the interface — the amount of behaviour a caller (or test) can exercise per unit of interface they have to learn. A module is **deep** when a large amount of behaviour sits behind a small interface. A module is **shallow** when the interface is nearly as complex as the implementation.
|
|
203
|
+
|
|
204
|
+
**Seam** _(from Michael Feathers)_
|
|
205
|
+
A place where you can alter behaviour without editing in that place. The *location* at which a module's interface lives. Choosing where to put the seam is its own design decision, distinct from what goes behind it.
|
|
206
|
+
_Avoid_: boundary (overloaded with DDD's bounded context).
|
|
207
|
+
|
|
208
|
+
**Adapter**
|
|
209
|
+
A concrete thing that satisfies an interface at a seam. Describes *role* (what slot it fills), not substance (what's inside).
|
|
210
|
+
|
|
211
|
+
**Leverage**
|
|
212
|
+
What callers get from depth. More capability per unit of interface they have to learn. One implementation pays back across N call sites and M tests.
|
|
213
|
+
|
|
214
|
+
**Locality**
|
|
215
|
+
What maintainers get from depth. Change, bugs, knowledge, and verification concentrate at one place rather than spreading across callers. Fix once, fixed everywhere.
|
|
216
|
+
|
|
217
|
+
## Principles
|
|
218
|
+
|
|
219
|
+
- **Depth is a property of the interface, not the implementation.** A deep module can be internally composed of small, mockable, swappable parts — they just aren't part of the interface. A module can have **internal seams** (private to its implementation, used by its own tests) as well as the **external seam** at its interface.
|
|
220
|
+
- **The deletion test.** Imagine deleting the module. If complexity vanishes, the module wasn't hiding anything (it was a pass-through). If complexity reappears across N callers, the module was earning its keep.
|
|
221
|
+
- **The interface is the test surface.** Callers and tests cross the same seam. If you want to test *past* the interface, the module is probably the wrong shape.
|
|
222
|
+
- **One adapter means a hypothetical seam. Two adapters means a real one.** Don't introduce a seam unless something actually varies across it.
|
|
223
|
+
|
|
224
|
+
## Relationships
|
|
225
|
+
|
|
226
|
+
- A **Module** has exactly one **Interface** (the surface it presents to callers and tests).
|
|
227
|
+
- **Depth** is a property of a **Module**, measured against its **Interface**.
|
|
228
|
+
- A **Seam** is where a **Module**'s **Interface** lives.
|
|
229
|
+
- An **Adapter** sits at a **Seam** and satisfies the **Interface**.
|
|
230
|
+
- **Depth** produces **Leverage** for callers and **Locality** for maintainers.
|
|
231
|
+
|
|
232
|
+
## Rejected framings
|
|
233
|
+
|
|
234
|
+
- **Depth as ratio of implementation-lines to interface-lines** (Ousterhout): rewards padding the implementation. We use depth-as-leverage instead.
|
|
235
|
+
- **"Interface" as the TypeScript `interface` keyword or a class's public methods**: too narrow — interface here includes every fact a caller must know.
|
|
236
|
+
- **"Boundary"**: overloaded with DDD's bounded context. Say **seam** or **interface**.
|