@punks/cli 1.0.7 → 2.0.0-beta.1
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/AGENTS.md +4 -5
- package/README.md +2 -2
- package/dist/data/catalog/hooks.ts +7 -0
- package/dist/data/catalog/lint.ts +7 -21
- package/dist/data/catalog/packs.ts +263 -21
- package/dist/data/catalog/skills.ts +352 -38
- package/dist/data/hooks/require-tests-for-pr.mjs +206 -0
- package/dist/data/hooks.test.ts +29 -0
- package/dist/data/scripts/sync-subagents.mjs +64 -6
- package/dist/data/subagents/manifest.mjs +15 -49
- package/dist/index.js +14368 -3445
- package/dist/skills/agnostic/debug/debugging-phase/SKILL.md +87 -0
- package/dist/skills/agnostic/docs/docs-ingest-phase/SKILL.md +87 -0
- package/dist/skills/agnostic/docs/docs-ingest-phase/agents/openai.yaml +4 -0
- package/dist/skills/agnostic/docs/{docs-maintenance → docs-ingest-phase}/references/concept-pages.md +1 -1
- package/dist/skills/agnostic/docs/{docs-maintenance → docs-ingest-phase}/references/flow-pages.md +1 -1
- package/dist/skills/agnostic/docs/docs-ingest-phase/references/fumadocs-routing.md +88 -0
- package/dist/skills/agnostic/docs/docs-ingest-phase/references/repo-docs.md +38 -0
- package/dist/skills/agnostic/docs/docs-ingest-phase/references/wiki-ingest.md +131 -0
- package/dist/skills/agnostic/planning/create-plan/SKILL.md +11 -9
- package/dist/skills/agnostic/planning/create-spec/SKILL.md +20 -18
- package/dist/skills/agnostic/planning/delivery-phase/SKILL.md +82 -0
- package/dist/skills/agnostic/planning/goalify/EXAMPLES.md +72 -0
- package/dist/skills/agnostic/planning/goalify/SKILL.md +97 -0
- package/dist/skills/agnostic/planning/implement-spec/SKILL.md +3 -3
- package/dist/skills/agnostic/planning/implement-spec/assets/IMPLEMENTATION-NOTES-TEMPLATE.md +6 -0
- package/dist/skills/agnostic/planning/implement-spec/references/lifecycle.md +23 -2
- package/dist/skills/agnostic/planning/resolve-debt-phase/SKILL.md +87 -0
- package/dist/skills/agnostic/requirements/requirements-grill/SKILL.md +4 -3
- package/dist/skills/agnostic/requirements/requirements-grill/references/artifact-output.md +56 -2
- package/dist/skills/agnostic/requirements/requirements-grill/references/grilling-flow.md +16 -4
- package/dist/skills/agnostic/requirements/requirements-grill/references/wiki-output.md +6 -2
- package/dist/skills/agnostic/requirements/requirements-phase/SKILL.md +67 -0
- package/dist/skills/agnostic/research/review-phase/SKILL.md +99 -0
- package/package.json +17 -7
- package/dist/skills/agnostic/docs/docs-maintenance/SKILL.md +0 -193
- package/dist/skills/agnostic/docs/docs-maintenance/agents/openai.yaml +0 -4
- package/docs/README.md +0 -35
- package/docs/harness-intelligence-grill-log.md +0 -39
- package/docs/harness-intelligence-grill-status.md +0 -25
- package/docs/reference/dp-requirements.md +0 -225
- package/docs/runbooks/dp-cli-scaffolding.md +0 -261
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: debugging-phase
|
|
3
|
+
description: >-
|
|
4
|
+
Runs a standalone runtime-evidence debugging phase, or a scoped debugging
|
|
5
|
+
phase inside delivery when validation or review finds runtime failure. Use
|
|
6
|
+
when the user reports broken behavior, failing smoke checks, logs,
|
|
7
|
+
recordings, runtime symptoms, or asks to debug a delivery-scoped failure.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Debugging Phase
|
|
11
|
+
|
|
12
|
+
## Contract
|
|
13
|
+
|
|
14
|
+
- **Role:** public runtime-evidence phase
|
|
15
|
+
- **Entrypoint type:** standalone public skill, or inner phase of `delivery-phase`
|
|
16
|
+
- **Standalone inputs:** user-reported broken behavior, failing smoke checks, logs, recordings, runtime symptoms
|
|
17
|
+
- **Delivery-internal inputs:** `implement-spec` validation failure or `review-phase` runtime failure
|
|
18
|
+
- **Wraps:** `$debug-agent`, optional readonly `$parallel-research`, bounded fixes, focused tests or scenario reruns, review
|
|
19
|
+
- **Owns:** evidence matrices, cited log references, hypothesis status, fix verification
|
|
20
|
+
- **Exit conditions:** bug fixed, concrete blocker proven, or scope proven to require a spec/delivery goal
|
|
21
|
+
|
|
22
|
+
## Use When
|
|
23
|
+
|
|
24
|
+
- Runtime behavior is broken, flaky, slow, or inconsistent.
|
|
25
|
+
- Smoke checks, browser checks, CLI checks, recordings, or logs show a failure.
|
|
26
|
+
- A delivery run hits a runtime failure during validation or review.
|
|
27
|
+
- The user asks for evidence-backed debugging instead of code-only inspection.
|
|
28
|
+
|
|
29
|
+
## Do Not Use When
|
|
30
|
+
|
|
31
|
+
- The work is pure planning, requirements discovery, or design.
|
|
32
|
+
- The failure is already proven and only needs implementation inside an active spec plan.
|
|
33
|
+
- The fix would require broad product scope, architecture, or acceptance changes; exit to `create-spec`, `create-plan`, or a delivery goal instead.
|
|
34
|
+
- The request is only static code review with no runtime symptom.
|
|
35
|
+
|
|
36
|
+
## Workflow
|
|
37
|
+
|
|
38
|
+
1. **Classify entry.**
|
|
39
|
+
- Standalone: record the broken behavior, artifact links/paths, reproduction command or manual scenario, expected behavior, and observed behavior.
|
|
40
|
+
- Delivery-internal: cite the validation or review failure that triggered debugging and the delivery scope it belongs to.
|
|
41
|
+
2. **Set bounds.**
|
|
42
|
+
- Define owned files, systems, and scenarios.
|
|
43
|
+
- For delivery-internal debugging, patch only inside the active delivery scope.
|
|
44
|
+
- If the evidence points outside that scope, record debt or open a separate debugging/debt goal.
|
|
45
|
+
3. **Run `$debug-agent`.**
|
|
46
|
+
- Build 3-5 hypotheses.
|
|
47
|
+
- Instrument or inspect with runtime evidence.
|
|
48
|
+
- Keep an evidence matrix with each hypothesis marked `confirmed`, `rejected`, or `inconclusive`.
|
|
49
|
+
- Cite log lines, recordings, commands, test output, or scenario evidence for every status.
|
|
50
|
+
4. **Optionally run readonly `$parallel-research`.**
|
|
51
|
+
- Use for independent hypotheses, unfamiliar subsystems, logs, docs, or prior-art inspection.
|
|
52
|
+
- Synthesize findings before fixing.
|
|
53
|
+
5. **Fix only proven causes.**
|
|
54
|
+
- Make the smallest bounded patch that addresses confirmed evidence.
|
|
55
|
+
- Remove speculative changes from rejected hypotheses.
|
|
56
|
+
- Keep debug instrumentation until post-fix evidence proves success, unless the user explicitly asks for cleanup.
|
|
57
|
+
6. **Verify.**
|
|
58
|
+
- Rerun the failing smoke check, focused test, browser path, CLI command, or manual scenario.
|
|
59
|
+
- Compare before/after evidence.
|
|
60
|
+
- Run review appropriate to the touched scope.
|
|
61
|
+
7. **Exit.**
|
|
62
|
+
- Fixed: report cause, patch, verification, and residual risk.
|
|
63
|
+
- Blocked: report the concrete blocker and the missing artifact/access/action.
|
|
64
|
+
- Out of scope: report why this needs a spec/delivery goal or debt issue.
|
|
65
|
+
|
|
66
|
+
## Parallel Rules
|
|
67
|
+
|
|
68
|
+
`debugging-phase` may run with `parallel: true` or `parallel: false`.
|
|
69
|
+
|
|
70
|
+
- `parallel: false`: one thread owns hypotheses, instrumentation, fix, verification, and review.
|
|
71
|
+
- `parallel: true`: fan out readonly research for independent hypotheses only.
|
|
72
|
+
- Disjoint worker fixes are allowed only after the cause is proven and file ownership is explicit.
|
|
73
|
+
- Never let parallel workers make speculative fixes against unproven hypotheses.
|
|
74
|
+
- Merge worker findings into one evidence matrix before deciding on a patch.
|
|
75
|
+
- In delivery-internal mode, parallel workers must stay inside the delivery scope unless assigned readonly investigation.
|
|
76
|
+
|
|
77
|
+
## Output Contract
|
|
78
|
+
|
|
79
|
+
Return a concise debugging report with:
|
|
80
|
+
|
|
81
|
+
- **Mode:** standalone or delivery-internal; `parallel: true|false`
|
|
82
|
+
- **Input artifacts:** reports, logs, recordings, checks, or symptoms used
|
|
83
|
+
- **Evidence matrix:** hypotheses, status, and cited evidence
|
|
84
|
+
- **Root cause:** confirmed cause or why none is proven
|
|
85
|
+
- **Changes:** bounded patch summary, or none if blocked/out of scope
|
|
86
|
+
- **Verification:** commands/scenarios rerun and result
|
|
87
|
+
- **Exit:** fixed, blocked, or escalated to spec/delivery/debt
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: docs-ingest-phase
|
|
3
|
+
description: Ingest specs into the wiki source layer, project wiki/project pages into Fumadocs routes, and keep repo docs accurate. Use when a spec is ready for domain capture, when apps/wiki content or Fumadocs navigation changes, or when code changes alter architecture, setup, contracts, or operator workflow.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Docs Ingest Phase
|
|
7
|
+
|
|
8
|
+
## Contract
|
|
9
|
+
|
|
10
|
+
- **Role:** higher-order ingest and repo-docs phase
|
|
11
|
+
- **Entrypoint type:** public phase entrypoint
|
|
12
|
+
- **Upstream:** reviewed or implemented spec folder, or concrete docs-affecting code changes
|
|
13
|
+
- **Delegates to:** internal flow-writing phase, internal concept-writing phase, Fumadocs projection
|
|
14
|
+
- **Downstream:** synced wiki indexes, ingest metadata, wiki log, routed Fumadocs pages/meta, and required `docs/` updates
|
|
15
|
+
- **Entry conditions:** resolved spec folder for ingest work, or a concrete docs-affecting code change
|
|
16
|
+
- **Stop conditions:** ingest bookkeeping complete, required docs updates complete, failures reported honestly
|
|
17
|
+
|
|
18
|
+
## Use When
|
|
19
|
+
|
|
20
|
+
- A reviewed or implemented spec folder should become durable domain knowledge.
|
|
21
|
+
- `apps/wiki` source content, Fumadocs navigation, `meta.json`, or routed pages change.
|
|
22
|
+
- Code changes alter architecture, setup, contracts, decisions, runbooks, or operator workflow.
|
|
23
|
+
- `delivery-phase` reaches `$docs-ingest-phase` and docs-affecting changes exist.
|
|
24
|
+
|
|
25
|
+
## Do Not Use When
|
|
26
|
+
|
|
27
|
+
- The work is still requirements discovery, planning, coding, or review.
|
|
28
|
+
- The target spec is already marked `ingested: true`; report a no-op.
|
|
29
|
+
- The requested docs would document speculative future behavior as current truth.
|
|
30
|
+
- The task would duplicate large specs/plans/source pages into routed MDX instead of summarizing and linking.
|
|
31
|
+
|
|
32
|
+
## Quick Start
|
|
33
|
+
|
|
34
|
+
1. Resolve `<wiki-root>`:
|
|
35
|
+
- monorepo: `apps/wiki`
|
|
36
|
+
- single-repo: `wiki`
|
|
37
|
+
2. Read `<wiki-root>/AGENTS.md` before touching wiki content.
|
|
38
|
+
3. If ingesting a spec, read [references/wiki-ingest.md](references/wiki-ingest.md).
|
|
39
|
+
4. If updating routed docs, read [references/fumadocs-routing.md](references/fumadocs-routing.md).
|
|
40
|
+
5. If updating root `docs/`, read [references/repo-docs.md](references/repo-docs.md).
|
|
41
|
+
6. Finish by reporting written pages, metadata changes, docs updates, validation run, and any no-op reason.
|
|
42
|
+
|
|
43
|
+
## Wiki Ingest Pipeline
|
|
44
|
+
|
|
45
|
+
Run this order exactly:
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
docs-ingest-phase
|
|
49
|
+
-> flow-writing phase
|
|
50
|
+
-> concept-writing phase
|
|
51
|
+
-> ingest bookkeeping
|
|
52
|
+
-> Fumadocs projection
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Why: concept pages can cross-link flow pages, so flows must exist first.
|
|
56
|
+
|
|
57
|
+
## Fumadocs Routing
|
|
58
|
+
|
|
59
|
+
Keep the private Fumadocs app discoverable:
|
|
60
|
+
|
|
61
|
+
- `/docs/wiki` renders product/domain knowledge: usage, concepts, theory, flows, glossary, and concept/flow ingest output.
|
|
62
|
+
- `/docs/project` renders internal project operations: specs, plans, implementation notes, maintenance logs, decisions, repo guidance, runbooks, and useful management context.
|
|
63
|
+
|
|
64
|
+
Do not create a second wiki or separate content-owner layer. `apps/wiki` owns canonical source content and rendered Fumadocs pages.
|
|
65
|
+
|
|
66
|
+
## Output Contract
|
|
67
|
+
|
|
68
|
+
Always report:
|
|
69
|
+
|
|
70
|
+
- source spec or docs-affecting change processed
|
|
71
|
+
- flows written or skipped
|
|
72
|
+
- concepts written or skipped
|
|
73
|
+
- source frontmatter/bookkeeping updates
|
|
74
|
+
- Fumadocs routed pages and `meta.json` updates
|
|
75
|
+
- root `docs/` updates, if any
|
|
76
|
+
- validation commands run
|
|
77
|
+
- no-op reasons or blockers
|
|
78
|
+
|
|
79
|
+
## Never Do
|
|
80
|
+
|
|
81
|
+
- Leave new or moved routed pages out of Fumadocs `meta.json`.
|
|
82
|
+
- Strip or omit `surface` / `permission` frontmatter from routed pages.
|
|
83
|
+
- Proceed to concept writing after a flow write fails.
|
|
84
|
+
- Create `docs/prd`, `docs/dev`, roadmap, sprint, or backlog-mirror folders.
|
|
85
|
+
- Put agent task instructions inside human-facing docs pages.
|
|
86
|
+
- Leave docs orphaned from `docs/README.md` after adding or renaming them.
|
|
87
|
+
- Duplicate content between `<wiki-root>/domains/` and `docs/reference/domains/`.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Docs Ingest Phase"
|
|
3
|
+
short_description: "Wiki ingest plus repo docs maintenance"
|
|
4
|
+
default_prompt: "Use $docs-ingest-phase to own the wiki ingest pipeline, then keep docs/ human-facing and implementation-grounded when code changes affect durable knowledge."
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Fumadocs Routing
|
|
2
|
+
|
|
3
|
+
Use this reference during Step 10 of `docs-ingest-phase`.
|
|
4
|
+
|
|
5
|
+
## Source And Projection
|
|
6
|
+
|
|
7
|
+
`apps/wiki` is both the private Fumadocs app and the canonical wiki source owner. Do not create another wiki, another content-owner layer, or a mirrored docs tree outside this app.
|
|
8
|
+
|
|
9
|
+
Canonical source content may remain in:
|
|
10
|
+
|
|
11
|
+
- `apps/wiki/domains`
|
|
12
|
+
- `apps/wiki/specs`
|
|
13
|
+
- `apps/wiki/raw`
|
|
14
|
+
- `apps/wiki/index.md`
|
|
15
|
+
- `apps/wiki/log.md`
|
|
16
|
+
|
|
17
|
+
Rendered/discoverable pages live under:
|
|
18
|
+
|
|
19
|
+
- `apps/wiki/content/docs/wiki`
|
|
20
|
+
- `apps/wiki/content/docs/project`
|
|
21
|
+
|
|
22
|
+
The routed pages are a projection layer. They may summarize, curate, and point back to canonical source files. They should not duplicate large specs, plans, implementation notes, runbooks, or source pages.
|
|
23
|
+
|
|
24
|
+
## Route Boundaries
|
|
25
|
+
|
|
26
|
+
Use `/docs/wiki` for product/domain knowledge:
|
|
27
|
+
|
|
28
|
+
- usage model
|
|
29
|
+
- concepts
|
|
30
|
+
- theory
|
|
31
|
+
- flows
|
|
32
|
+
- glossary
|
|
33
|
+
- docs-ingest-phase concept/flow ingest output
|
|
34
|
+
|
|
35
|
+
Use `/docs/project` for internal project operations:
|
|
36
|
+
|
|
37
|
+
- specs
|
|
38
|
+
- plans
|
|
39
|
+
- implementation notes
|
|
40
|
+
- maintenance logs
|
|
41
|
+
- decisions
|
|
42
|
+
- repo guidance
|
|
43
|
+
- operator/project runbooks
|
|
44
|
+
- useful Linear/grill-derived management context
|
|
45
|
+
|
|
46
|
+
Docs ingest concepts and flows are abstract/domain-theory outputs. The Fumadocs projection makes those outputs navigable.
|
|
47
|
+
|
|
48
|
+
## Fumadocs Mechanics
|
|
49
|
+
|
|
50
|
+
Fumadocs uses file paths to determine route slugs. Examples:
|
|
51
|
+
|
|
52
|
+
- `content/docs/wiki/index.mdx` -> `/docs/wiki`
|
|
53
|
+
- `content/docs/wiki/cli/index.mdx` -> `/docs/wiki/cli`
|
|
54
|
+
- `content/docs/project/specs/index.mdx` -> `/docs/project/specs`
|
|
55
|
+
|
|
56
|
+
Each folder with an explicit `meta.json` `pages` array must list every page or child folder that should appear in the page tree. Update `meta.json` whenever pages are added, moved, or removed.
|
|
57
|
+
|
|
58
|
+
Use root folders for the two main surfaces:
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"title": "Wiki",
|
|
63
|
+
"root": true
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
```json
|
|
68
|
+
{
|
|
69
|
+
"title": "Project",
|
|
70
|
+
"root": true
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Access Frontmatter
|
|
75
|
+
|
|
76
|
+
Preserve access-control frontmatter on routed pages:
|
|
77
|
+
|
|
78
|
+
```yaml
|
|
79
|
+
surface: wiki
|
|
80
|
+
permission: internal
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
```yaml
|
|
84
|
+
surface: project
|
|
85
|
+
permission: project
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Do not implement full auth unless the repo already has the required auth primitives. When auth exists, prefer a small Fumadocs loader-level filter so restricted files are removed from the input source before page tree/search generation.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Repo Docs
|
|
2
|
+
|
|
3
|
+
Use this reference when code or workflow changes require root `docs/` maintenance.
|
|
4
|
+
|
|
5
|
+
## Scope
|
|
6
|
+
|
|
7
|
+
Update root `docs/` when a change alters:
|
|
8
|
+
|
|
9
|
+
- architecture
|
|
10
|
+
- setup
|
|
11
|
+
- contracts
|
|
12
|
+
- decisions
|
|
13
|
+
- runbooks
|
|
14
|
+
- non-obvious operator-facing behavior
|
|
15
|
+
|
|
16
|
+
Do not let repo-doc work displace required wiki ingest. If both apply, complete ingest bookkeeping and then update root docs.
|
|
17
|
+
|
|
18
|
+
## Workflow
|
|
19
|
+
|
|
20
|
+
1. Read `docs/README.md`.
|
|
21
|
+
2. Read the nearest affected section README before editing.
|
|
22
|
+
3. Prefer editing an existing leaf doc over creating a new one.
|
|
23
|
+
4. When a doc is added, removed, or renamed, update `docs/README.md` and the nearest section README in the same task.
|
|
24
|
+
5. Record repo-wide behavior changes in `docs/architecture/decisions/` when that directory exists.
|
|
25
|
+
|
|
26
|
+
## Route By Owned Behavior
|
|
27
|
+
|
|
28
|
+
- Backend/runtime surface -> `docs/reference/domains/backend-effect-sql.md` or `docs/runbooks/`
|
|
29
|
+
- Auth/user-management -> `docs/reference/domains/user-management.md`
|
|
30
|
+
- Frontend/app structure -> `docs/reference/domains/frontend-application-structure.md`
|
|
31
|
+
- AI workflow/agent infrastructure -> `docs/runbooks/subagent-templates.md` or the relevant harness runbook
|
|
32
|
+
|
|
33
|
+
## Rules
|
|
34
|
+
|
|
35
|
+
- Document implemented reality, not speculative future state.
|
|
36
|
+
- Keep human docs human-facing; do not paste agent task instructions into them.
|
|
37
|
+
- Keep indexes current when adding, removing, or renaming docs.
|
|
38
|
+
- Link to source artifacts instead of duplicating large specs, plans, or implementation notes.
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# Wiki Ingest
|
|
2
|
+
|
|
3
|
+
Use this reference when `docs-ingest-phase` receives a spec folder, domain/spec pair, or explicit `SPEC.md`.
|
|
4
|
+
|
|
5
|
+
## Inputs
|
|
6
|
+
|
|
7
|
+
Accept any of:
|
|
8
|
+
|
|
9
|
+
- `<wiki-root>/specs/<domain>/<spec>/`
|
|
10
|
+
- a domain name plus spec name
|
|
11
|
+
- an explicit `SPEC.md` path
|
|
12
|
+
|
|
13
|
+
Resolve to a full spec folder before continuing. If ambiguous, ask only for the missing folder.
|
|
14
|
+
|
|
15
|
+
## Guard
|
|
16
|
+
|
|
17
|
+
1. Read `SPEC.md`. Stop if missing.
|
|
18
|
+
2. Check `SPEC.md` frontmatter for `ingested: true`; if set, exit with a clear no-op.
|
|
19
|
+
3. Verify `domain:` exists in frontmatter.
|
|
20
|
+
4. Verify `<wiki-root>/domains/<domain>/` exists with a `<domain>.md` index file. If missing, stop and scaffold the domain structure first.
|
|
21
|
+
|
|
22
|
+
## Source Read
|
|
23
|
+
|
|
24
|
+
Read in order:
|
|
25
|
+
|
|
26
|
+
1. `SPEC.md` — mandatory
|
|
27
|
+
2. `IMPLEMENTATION-NOTES.md` — optional
|
|
28
|
+
|
|
29
|
+
If implementation notes exist and lack frontmatter, add:
|
|
30
|
+
|
|
31
|
+
```yaml
|
|
32
|
+
---
|
|
33
|
+
domain: <domain from SPEC.md>
|
|
34
|
+
type: implementation-notes
|
|
35
|
+
spec: <spec id from SPEC.md>
|
|
36
|
+
links:
|
|
37
|
+
- "[[specs/<domain>/<spec>/SPEC]]"
|
|
38
|
+
ingested: false
|
|
39
|
+
last_ingested: null
|
|
40
|
+
created: <today>
|
|
41
|
+
updated: <today>
|
|
42
|
+
---
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
When notes exist, generated flows and concepts should be `status: implemented`. Without notes, they are `status: proposed`.
|
|
46
|
+
|
|
47
|
+
## Extract Flows
|
|
48
|
+
|
|
49
|
+
A flow exists when the spec describes a sequence of user or system actions with a defined start, steps, and end outcome.
|
|
50
|
+
|
|
51
|
+
Look for:
|
|
52
|
+
|
|
53
|
+
- multi-step acceptance criteria
|
|
54
|
+
- explicit journeys or process descriptions
|
|
55
|
+
- conditional chains across acceptance criteria
|
|
56
|
+
- sections titled Flow, Process, Journey, or similar
|
|
57
|
+
|
|
58
|
+
For each flow, extract:
|
|
59
|
+
|
|
60
|
+
- descriptive flow name
|
|
61
|
+
- trigger
|
|
62
|
+
- actors
|
|
63
|
+
- ordered steps and decision points
|
|
64
|
+
- terminal outcome
|
|
65
|
+
- implementation deviations, surprises, or blocked steps when notes exist
|
|
66
|
+
|
|
67
|
+
If no multi-step sequence exists, record the absence and skip flow writing.
|
|
68
|
+
|
|
69
|
+
## Write Flow Pages
|
|
70
|
+
|
|
71
|
+
Read [flow-pages.md](flow-pages.md) and apply it to every extracted flow.
|
|
72
|
+
|
|
73
|
+
Wait for all flow pages to complete before concept writing. If any flow write fails, stop and report the failure so the run can resume cleanly.
|
|
74
|
+
|
|
75
|
+
## Extract Concepts
|
|
76
|
+
|
|
77
|
+
A concept exists when the spec names a domain entity or term with defined attributes, invariants, or bounded scope.
|
|
78
|
+
|
|
79
|
+
Look for:
|
|
80
|
+
|
|
81
|
+
- fields listed in acceptance criteria
|
|
82
|
+
- explicit data model or entity sections
|
|
83
|
+
- recurring nouns with their own attributes or rules
|
|
84
|
+
- enum sets representing bounded domain state
|
|
85
|
+
- entities referenced through wikilinks
|
|
86
|
+
|
|
87
|
+
Group related fields under one owning entity. Do not create a concept per field when one domain entity owns them.
|
|
88
|
+
|
|
89
|
+
## Write Concept Pages
|
|
90
|
+
|
|
91
|
+
Read [concept-pages.md](concept-pages.md) and apply it to every extracted concept.
|
|
92
|
+
|
|
93
|
+
Concept pages may cross-link flow pages, which is why flow writing must complete first.
|
|
94
|
+
|
|
95
|
+
## Bookkeeping
|
|
96
|
+
|
|
97
|
+
Update `SPEC.md` frontmatter:
|
|
98
|
+
|
|
99
|
+
```yaml
|
|
100
|
+
ingested: true
|
|
101
|
+
last_ingested: YYYY-MM-DD
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
If `IMPLEMENTATION-NOTES.md` exists, update:
|
|
105
|
+
|
|
106
|
+
```yaml
|
|
107
|
+
ingested: true
|
|
108
|
+
last_ingested: YYYY-MM-DD
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Also populate its `links` array with the SPEC link plus every flow and concept page written in this ingest.
|
|
112
|
+
|
|
113
|
+
Append to `<wiki-root>/log.md` and cap the log at 50 entries:
|
|
114
|
+
|
|
115
|
+
```md
|
|
116
|
+
## [YYYY-MM-DD] ingest | <spec title>
|
|
117
|
+
|
|
118
|
+
- Source: [[specs/<domain>/<spec>/SPEC]]
|
|
119
|
+
- Flows written: <count>
|
|
120
|
+
- Concepts written: <count>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
If new pages were created, update Concepts and Flows counts in `<wiki-root>/index.md`.
|
|
124
|
+
|
|
125
|
+
## Resumability
|
|
126
|
+
|
|
127
|
+
Output pages are checkpoints:
|
|
128
|
+
|
|
129
|
+
- existing flow pages with `ingested: true` can be skipped
|
|
130
|
+
- missing expected flow pages should be rewritten before concepts
|
|
131
|
+
- existing concept pages with `ingested: true` can be skipped
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: create-plan
|
|
3
|
-
description: Creates execution-ready `PLAN.md` artifacts by explicitly wrapping `grill-me`, `swarm-planner`, and `tdd` into one planning run. Use when work must be decomposed before coding, especially for reviewed spec workflows, multi-agent execution, branch-scoped delivery, or any task that needs explicit dependencies, backlog items, review gates, and per-task RED targets.
|
|
3
|
+
description: Creates execution-ready `PLAN.md` artifacts by explicitly wrapping `grill-me`, `parallel-research`, `swarm-planner`, and `tdd` into one planning run. Use when work must be decomposed before coding, especially for reviewed spec workflows, multi-agent execution, branch-scoped delivery, or any task that needs explicit dependencies, backlog items, review gates, and per-task RED targets.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Create Plan
|
|
@@ -10,7 +10,7 @@ description: Creates execution-ready `PLAN.md` artifacts by explicitly wrapping
|
|
|
10
10
|
- **Role:** higher-order planning orchestrator
|
|
11
11
|
- **Entrypoint type:** public entrypoint
|
|
12
12
|
- **Upstream:** approved `SPEC.md` or explicit planning request
|
|
13
|
-
- **Delegates to:** `$grill-me`, `$swarm-planner`, `$tdd`
|
|
13
|
+
- **Delegates to:** `$grill-me`, `$parallel-research`, `$swarm-planner`, `$tdd`
|
|
14
14
|
- **Downstream:** execution-ready `PLAN.md` for `implement-spec`
|
|
15
15
|
- **Entry conditions:** scope is clear enough to plan; stop if required planning inputs or tools are missing
|
|
16
16
|
- **Stop conditions:** `PLAN.md` and backlog sync are complete; no implementation started
|
|
@@ -18,6 +18,7 @@ description: Creates execution-ready `PLAN.md` artifacts by explicitly wrapping
|
|
|
18
18
|
## Required Inner Skills
|
|
19
19
|
|
|
20
20
|
- MUST use `$grill-me`
|
|
21
|
+
- MUST consider `$parallel-research` for readonly planning discovery
|
|
21
22
|
- MUST use `$swarm-planner`
|
|
22
23
|
- MUST use `$tdd`
|
|
23
24
|
|
|
@@ -30,12 +31,13 @@ Create a plan first. Never implement code in this skill.
|
|
|
30
31
|
3. Read `references/grill-phase.md` and run `$grill-me` as an explicit inner phase.
|
|
31
32
|
4. Update a running decision ledger after every answer so the user never has to reconstruct state from memory.
|
|
32
33
|
5. Insert a synthesis checkpoint before the thread gets noisy, then continue only if more ambiguity reduction is still needed.
|
|
33
|
-
6.
|
|
34
|
-
7.
|
|
35
|
-
8.
|
|
36
|
-
9. Read `references/
|
|
37
|
-
10. Read `references/
|
|
38
|
-
11. Read `references/
|
|
34
|
+
6. If readonly discovery has independent code paths, specs, backlog items, external docs, or hypotheses, read and use `$parallel-research` before final task synthesis.
|
|
35
|
+
7. Research with `opensrc path <package>` or `opensrc path <owner>/<repo>` plus primary-source web docs when current behavior matters.
|
|
36
|
+
8. Locate scoped `AGENTS.md` files for every planned task path, extract `Primary skills here` lists, and load the relevant skill guidance before finalizing task design.
|
|
37
|
+
9. Read `references/planner-phase.md` and run `$swarm-planner` as an explicit inner phase.
|
|
38
|
+
10. Read `references/tdd-phase.md` and run `$tdd` as an explicit inner phase.
|
|
39
|
+
11. Read `references/backlog-sync.md` and sync backlog at epic/story level, not one item per plan task.
|
|
40
|
+
12. Read `references/stop-conditions.md` and stop exactly there.
|
|
39
41
|
|
|
40
42
|
## Workflows
|
|
41
43
|
|
|
@@ -44,7 +46,7 @@ Create a plan first. Never implement code in this skill.
|
|
|
44
46
|
1. Derive host, owner, tracker, and scope from repo state instead of assuming them.
|
|
45
47
|
2. Ask only for missing high-impact inputs such as scope, goal, or backlog target.
|
|
46
48
|
3. Every plan-shaping question must use the exact block: `Decision`, `Recommendation`, `Question`, `Why it matters`.
|
|
47
|
-
4. Keep `$grill-me`, `$swarm-planner`, and `$tdd` as visible
|
|
49
|
+
4. Keep `$grill-me`, `$parallel-research`, `$swarm-planner`, and `$tdd` as visible inner phases of one planning run; record when `$parallel-research` is used or intentionally skipped because the work is not split-friendly.
|
|
48
50
|
5. Resolve each task's scoped guidance from root `AGENTS.md` down to the nearest `AGENTS.md` for its `location`.
|
|
49
51
|
6. Use each task's required skill guidance while shaping its scope, dependencies, validation, RED target, and review mode; do not merely list skills after the plan is written.
|
|
50
52
|
7. Assign each task the exact existing skills required by those scoped `Primary skills here` lists, merging all scopes for cross-directory tasks.
|
|
@@ -10,7 +10,7 @@ description: Create a SPEC.md file for a new feature, product, or system using t
|
|
|
10
10
|
- **Role:** higher-order spec authoring skill
|
|
11
11
|
- **Entrypoint type:** public entrypoint
|
|
12
12
|
- **Upstream:** new idea, feature request, epic/capability issue, or problem statement
|
|
13
|
-
- **Delegates to:** `$requirements-grill` when discovery leaves meaningful spec-affecting unknowns; `$write-backlog` when grill outcomes change epic/story scope
|
|
13
|
+
- **Delegates to:** `$parallel-research` for split-friendly readonly discovery; `$requirements-grill` when discovery leaves meaningful spec-affecting unknowns; `$write-backlog` when grill outcomes change epic/story scope
|
|
14
14
|
- **Downstream:** reviewed `SPEC.md`, then usually `create-plan` or `implement-spec`
|
|
15
15
|
- **Entry conditions:** wiki domain can be resolved, or the user creates one first with `create-wiki-domain`
|
|
16
16
|
- **Stop conditions:** `SPEC.md`, wiki index, and wiki log are updated, then wait for user review
|
|
@@ -25,16 +25,17 @@ The output lives at `apps/wiki/specs/<domain>/<folder-name>/SPEC.md`.
|
|
|
25
25
|
|
|
26
26
|
1. Read `apps/wiki/AGENTS.md` first. Stop if the wiki is not bootstrapped.
|
|
27
27
|
2. Read `references/discovery.md` and orient yourself in the right wiki domain before asking questions.
|
|
28
|
-
3.
|
|
29
|
-
4. If
|
|
30
|
-
5.
|
|
31
|
-
6.
|
|
32
|
-
7. If
|
|
33
|
-
8.
|
|
34
|
-
9. Read `
|
|
35
|
-
10. Read `
|
|
36
|
-
11. Read `references/
|
|
37
|
-
12. Read `references/
|
|
28
|
+
3. When discovery spans independent code paths, docs, backlog items, prior specs, or hypotheses, read and use `$parallel-research` for readonly sidecar coverage before synthesizing.
|
|
29
|
+
4. If backlog context exists, read the parent epic and every child story before asking questions.
|
|
30
|
+
5. If the user did not provide a concrete request, ask for a rough description first.
|
|
31
|
+
6. Read `references/questioning.md` and ask only the lightweight clarifying questions needed to identify whether a grill phase is required.
|
|
32
|
+
7. If draft `Open Questions` would affect spec trust, read `references/grill-phase.md` and run a bounded `$requirements-grill` phase before writing.
|
|
33
|
+
8. If the grill changes accepted scope, child stories, deferred scope, or story order, read `references/backlog-sync.md` and run `$write-backlog` to sync the backlog automatically.
|
|
34
|
+
9. Read `references/folder-naming.md` to resolve the domain and spec folder path.
|
|
35
|
+
10. Read `assets/SPEC-TEMPLATE.md` and write the spec.
|
|
36
|
+
11. Read `references/spec-quality-bar.md` before saving.
|
|
37
|
+
12. Read `references/wiki-bookkeeping.md` to update `index.md`, `<domain>-specs.md`, and `log.md`.
|
|
38
|
+
13. Read `references/handoff.md` to choose the next-step recommendation and stop after user review.
|
|
38
39
|
|
|
39
40
|
## Workflow
|
|
40
41
|
|
|
@@ -42,13 +43,14 @@ The output lives at `apps/wiki/specs/<domain>/<folder-name>/SPEC.md`.
|
|
|
42
43
|
|
|
43
44
|
1. Build orientation first; do not jump straight into writing.
|
|
44
45
|
2. Ask only enough to make the spec crisp, testable, and bounded.
|
|
45
|
-
3.
|
|
46
|
-
4.
|
|
47
|
-
5.
|
|
48
|
-
6.
|
|
49
|
-
7.
|
|
50
|
-
8.
|
|
51
|
-
9.
|
|
46
|
+
3. Use `$parallel-research` when readonly orientation can be split cleanly across independent evidence sources; keep synthesis and spec decisions local.
|
|
47
|
+
4. When an epic has child stories, harvest and preserve each story's requirements before drafting.
|
|
48
|
+
5. Use `$requirements-grill` for meaningful spec-affecting unknowns; do not replace that phase with ad hoc `Open Questions` prompts.
|
|
49
|
+
6. After a grill phase, use `$write-backlog` automatically when accepted decisions imply backlog changes.
|
|
50
|
+
7. Keep the spec free of implementation detail.
|
|
51
|
+
8. Use the template structure exactly, then remove all template scaffolding.
|
|
52
|
+
9. Update wiki bookkeeping in the same run.
|
|
53
|
+
10. Stop after presenting the spec and the recommended next step.
|
|
52
54
|
|
|
53
55
|
## Advanced features
|
|
54
56
|
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: delivery-phase
|
|
3
|
+
description: Goal-compatible workhorse wrapper for scoped execution from specification through delivery closeout. Use when a user asks to deliver a scoped goal end to end, especially when work should flow through create-spec, create-plan, implement-spec, review, optional debugging, and docs-ingest-phase.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Delivery Phase
|
|
7
|
+
|
|
8
|
+
`delivery-phase` owns scoped execution until the goal is either done or honestly
|
|
9
|
+
blocked. It preserves the workflow chain instead of compressing implementation
|
|
10
|
+
into a single coding pass.
|
|
11
|
+
|
|
12
|
+
## Use When
|
|
13
|
+
|
|
14
|
+
- The user asks to deliver, execute, finish, close, or carry a scoped goal end to end.
|
|
15
|
+
- A goal needs spec, plan, implementation, review, validation, and docs handling in one wrapper.
|
|
16
|
+
- Existing `SPEC.md` or `PLAN.md` artifacts may be reused, but delivery still needs closeout.
|
|
17
|
+
- The user chooses `parallel: true` or `parallel: false` for implementation mode.
|
|
18
|
+
|
|
19
|
+
## Do Not Use When
|
|
20
|
+
|
|
21
|
+
- The request is only requirements discovery, planning, review, debugging, or docs ingest.
|
|
22
|
+
- The scope is too vague to name a goal, issue, spec folder, or bounded change.
|
|
23
|
+
- The user explicitly asks not to code or wants a plan/spec only.
|
|
24
|
+
- Runtime evidence points to a broad bug outside the active delivery scope; create a separate debugging or debt goal.
|
|
25
|
+
|
|
26
|
+
## Contract
|
|
27
|
+
|
|
28
|
+
- **Role:** public scoped-delivery orchestrator
|
|
29
|
+
- **Wraps:** `$create-spec` -> `$create-plan` -> `$implement-spec` -> `$review-phase` -> optional `$debugging-phase` -> `$docs-ingest-phase`
|
|
30
|
+
- **Owns:** goal bounds, mode choice, validation, review follow-through, docs ingest outcome, debt capture, blocker reporting
|
|
31
|
+
- **Stop condition:** implemented, reviewed, validated, docs ingest handled, debt captured, or concrete blocker reported
|
|
32
|
+
|
|
33
|
+
## Workflow
|
|
34
|
+
|
|
35
|
+
1. **Frame the delivery goal.**
|
|
36
|
+
- Identify the bounded goal, issue, spec folder, branch, and ownership constraints.
|
|
37
|
+
- State assumptions, known artifacts, and the validation surface.
|
|
38
|
+
- If scope is ambiguous, ask before entering the chain.
|
|
39
|
+
2. **Create or reuse the spec.**
|
|
40
|
+
- If no reviewed `SPEC.md` exists, run `$create-spec`.
|
|
41
|
+
- If a spec exists, verify it matches the requested scope before continuing.
|
|
42
|
+
3. **Create or reuse the plan.**
|
|
43
|
+
- If no execution-ready `PLAN.md` exists, run `$create-plan`.
|
|
44
|
+
- If a plan exists, verify dependencies, validation gates, assigned skills, and review mode.
|
|
45
|
+
4. **Implement the plan.**
|
|
46
|
+
- Run `$implement-spec` with the selected `parallel: true|false` mode.
|
|
47
|
+
- Keep implementation inside the delivery scope and update required notes/debt artifacts.
|
|
48
|
+
5. **Review every coding run.**
|
|
49
|
+
- Run `$review-phase` after `implement-spec` even when tests pass.
|
|
50
|
+
- Fix in-scope blocking findings before final closeout.
|
|
51
|
+
6. **Debug only runtime-evidence failures.**
|
|
52
|
+
- Run `$debugging-phase` only when validation or review produces runtime evidence of a bug.
|
|
53
|
+
- Patch only inside delivery scope.
|
|
54
|
+
- If the bug is broader, capture tech debt or open a separate debugging/debt goal.
|
|
55
|
+
7. **Run docs ingest.**
|
|
56
|
+
- Run `$docs-ingest-phase` when implementation changed product behavior, architecture, setup, operator workflow, docs contracts, or spec domain knowledge.
|
|
57
|
+
- If docs ingest is not needed, record the explicit no-op reason in the final report or delivery notes.
|
|
58
|
+
8. **Close out.**
|
|
59
|
+
- Report implementation, review result, validation, docs ingest outcome, debt captured, and remaining blockers.
|
|
60
|
+
|
|
61
|
+
## Mode And Parallel Rules
|
|
62
|
+
|
|
63
|
+
- Preserve `parallel: true|false` through `$implement-spec`.
|
|
64
|
+
- If the user chose a mode, honor it.
|
|
65
|
+
- If not, choose the smallest safe mode:
|
|
66
|
+
- `parallel: false` for tightly coupled work, unclear ownership, or small changes.
|
|
67
|
+
- `parallel: true` only when the plan has independent waves and disjoint write scopes.
|
|
68
|
+
- Do not let parallel workers expand the delivery scope.
|
|
69
|
+
- Optional `$debugging-phase` may use parallel readonly hypothesis research, but speculative parallel fixes are not allowed.
|
|
70
|
+
|
|
71
|
+
## Output Contract
|
|
72
|
+
|
|
73
|
+
Return a concise delivery report with:
|
|
74
|
+
|
|
75
|
+
- **Goal:** scoped outcome delivered or blocker encountered
|
|
76
|
+
- **Mode:** `parallel: true|false` and why
|
|
77
|
+
- **Artifacts:** spec, plan, implementation notes, debt, docs, or tracker links touched
|
|
78
|
+
- **Review:** mandatory `$review-phase` result and remaining findings
|
|
79
|
+
- **Debugging:** skipped with reason, or `$debugging-phase` evidence and result
|
|
80
|
+
- **Validation:** commands, browser checks, smoke tests, or manual scenarios run
|
|
81
|
+
- **Docs ingest:** `$docs-ingest-phase` run, or explicit no-op reason
|
|
82
|
+
- **Exit:** done, blocked, or split into follow-up debt/debugging goal
|