@punks/cli 2.1.9 → 2.1.10
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/README.md +1 -1
- package/dist/data/catalog/hooks.ts +8 -0
- package/dist/data/catalog/packs.ts +4 -3
- package/dist/data/catalog/skills.ts +40 -0
- package/dist/data/catalog/tools.ts +9 -1
- package/dist/data/hooks/scaffold-update-check.mjs +181 -0
- package/dist/data/hooks.test.ts +17 -0
- package/dist/data/scripts/sync-subagents.mjs +70 -31
- package/dist/data/subagents/manifest.mjs +120 -0
- package/dist/index.js +455 -49
- package/dist/skills/agnostic/cli/dp-cli/SKILL.md +3 -3
- package/dist/skills/agnostic/cli/dp-cli/references/commands.md +1 -1
- package/dist/skills/agnostic/cli/dp-cli/references/post-command-flow.md +1 -1
- package/dist/skills/agnostic/docs/docs-onboarding/SKILL.md +46 -0
- package/dist/skills/agnostic/docs/docs-onboarding/agents/openai.yaml +4 -0
- package/dist/skills/agnostic/docs/docs-onboarding/references/artifact-contract.md +67 -0
- package/dist/skills/agnostic/docs/upstream/mattpocock-writing-skills.md +41 -0
- package/dist/skills/agnostic/docs/writing-beats/SKILL.md +69 -0
- package/dist/skills/agnostic/docs/writing-fragments/SKILL.md +76 -0
- package/dist/skills/agnostic/docs/writing-shape/SKILL.md +75 -0
- package/dist/skills/agnostic/planning/create-plan/SKILL.md +17 -2
- package/dist/skills/agnostic/planning/create-plan/references/planner-phase.md +1 -1
- package/dist/skills/agnostic/planning/create-spec/SKILL.md +55 -10
- package/dist/skills/agnostic/planning/create-spec/references/discovery.md +24 -16
- package/dist/skills/agnostic/planning/create-spec/references/folder-naming.md +6 -2
- package/dist/skills/agnostic/planning/create-spec/references/wiki-bookkeeping.md +29 -5
- package/dist/skills/agnostic/planning/implement-spec/SKILL.md +18 -0
- package/dist/skills/agnostic/planning/stack/SKILL.md +89 -0
- package/dist/skills/agnostic/requirements/write-backlog/SKILL.md +7 -5
- package/dist/skills/frameworks/tanstack-query/tanstack-query/SKILL.md +621 -830
- package/dist/skills/frameworks/tanstack-start/tanstack-start/SKILL.md +250 -0
- package/dist/skills/phases/delivery-phase/SKILL.md +6 -1
- package/dist/skills/phases/docs-ingest-phase/SKILL.md +28 -20
- package/dist/skills/phases/docs-ingest-phase/references/fumadocs-routing.md +8 -5
- package/dist/skills/phases/docs-ingest-phase/references/public-docs.md +82 -0
- package/dist/skills/phases/requirements-phase/SKILL.md +2 -0
- package/dist/skills/phases/review-phase/SKILL.md +3 -0
- package/package.json +1 -1
|
@@ -4,8 +4,12 @@ Use this reference after questioning and before writing the file.
|
|
|
4
4
|
|
|
5
5
|
## Domain resolution
|
|
6
6
|
|
|
7
|
-
- The spec path is
|
|
8
|
-
-
|
|
7
|
+
- The spec path is `<resolved-specs-root>/<domain>/<folder-name>/SPEC.md`.
|
|
8
|
+
- Resolve `<resolved-specs-root>` during discovery:
|
|
9
|
+
- `apps/wiki/content/docs/project/specs` for routed project wiki repos
|
|
10
|
+
- `apps/wiki/specs` for legacy source-wiki repos
|
|
11
|
+
- `docs/specs` when no wiki planning surface exists
|
|
12
|
+
- Use the exact existing domain directory name from `<resolved-specs-root>/` when one clearly applies.
|
|
9
13
|
- If no existing spec domain applies, create a concise kebab-case domain from the request or backlog area.
|
|
10
14
|
- If multiple domains are touched, choose the primary owner and describe the cross-domain aspect in the spec body.
|
|
11
15
|
- Do not create `apps/wiki/domains/` as part of spec authoring.
|
|
@@ -1,8 +1,22 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Planning Surface Bookkeeping
|
|
2
2
|
|
|
3
3
|
Use this reference after writing `SPEC.md`.
|
|
4
4
|
|
|
5
|
-
## Required updates
|
|
5
|
+
## Required updates by surface
|
|
6
|
+
|
|
7
|
+
### Routed project wiki
|
|
8
|
+
|
|
9
|
+
When using `apps/wiki/content/docs/project/specs`:
|
|
10
|
+
|
|
11
|
+
1. Create or update `<resolved-specs-root>/<domain>/<domain>-specs.md` with:
|
|
12
|
+
- the spec name
|
|
13
|
+
- a one-line summary
|
|
14
|
+
2. Update `meta.json` files only when needed for the new spec to appear in the routed tree.
|
|
15
|
+
3. Update any existing project specs index page that already tracks specs.
|
|
16
|
+
|
|
17
|
+
### Legacy source wiki
|
|
18
|
+
|
|
19
|
+
When using `apps/wiki/specs`:
|
|
6
20
|
|
|
7
21
|
1. Add a row to the **Specs** table in `apps/wiki/index.md`:
|
|
8
22
|
|
|
@@ -13,8 +27,7 @@ Use this reference after writing `SPEC.md`.
|
|
|
13
27
|
2. Create or update `apps/wiki/specs/<domain>/<domain>-specs.md` with:
|
|
14
28
|
- the spec name
|
|
15
29
|
- a one-line summary
|
|
16
|
-
|
|
17
|
-
3. Append to `apps/wiki/log.md`:
|
|
30
|
+
3. Append to `apps/wiki/log.md` when it exists:
|
|
18
31
|
|
|
19
32
|
```md
|
|
20
33
|
## [YYYY-MM-DD] spec | <spec title>
|
|
@@ -23,4 +36,15 @@ Use this reference after writing `SPEC.md`.
|
|
|
23
36
|
- Status: Draft
|
|
24
37
|
```
|
|
25
38
|
|
|
26
|
-
|
|
39
|
+
### Docs fallback
|
|
40
|
+
|
|
41
|
+
When using `docs/specs`:
|
|
42
|
+
|
|
43
|
+
1. Create or update `docs/specs/index.md` with:
|
|
44
|
+
- the domain
|
|
45
|
+
- the spec path
|
|
46
|
+
- status `Draft`
|
|
47
|
+
2. Create or update `docs/specs/<domain>/<domain>-specs.md` with:
|
|
48
|
+
- the spec name
|
|
49
|
+
- a one-line summary
|
|
50
|
+
3. Do not invent wiki logs or routed metadata for a repo that has not bootstrapped them.
|
|
@@ -55,6 +55,24 @@ That means `implement-spec` itself owns all of the following in parallel mode:
|
|
|
55
55
|
9. If backlog sync is in scope, keep epic/story bodies product-facing and use native metadata or comments instead of execution handoff rewrites.
|
|
56
56
|
10. Finish with the shared acceptance audit, manual review checklist, and spec finalization contract.
|
|
57
57
|
|
|
58
|
+
## Stack-aware branch gate
|
|
59
|
+
|
|
60
|
+
Before coding, inspect `PLAN.md` for `Branch/Base Intent`.
|
|
61
|
+
|
|
62
|
+
- If no `Branch/Base Intent` exists, continue with the normal execution flow.
|
|
63
|
+
- If it exists, verify the current branch is the intended child branch based on
|
|
64
|
+
the intended parent branch, or create/switch to the intended child branch from
|
|
65
|
+
the intended parent branch before implementation starts.
|
|
66
|
+
- Do not reinterpret intra-epic task dependencies as separate PRs.
|
|
67
|
+
- Default to PR-after-implementation: implement, commit, push, create or update
|
|
68
|
+
the PR with the recorded base, then run `stack sync --dry-run`.
|
|
69
|
+
- If the dry-run preview is correct and reports pending stack changes, run
|
|
70
|
+
`stack sync`.
|
|
71
|
+
- Early draft PRs are opt-in only when the user explicitly asks for them.
|
|
72
|
+
- If `stack` is unavailable and `Branch/Base Intent` exists, block the
|
|
73
|
+
stack-dependent workflow. Missing `stack` does not block independent
|
|
74
|
+
trunk-based work.
|
|
75
|
+
|
|
58
76
|
## Mode selection
|
|
59
77
|
|
|
60
78
|
Choose `sequential` when:
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: stack
|
|
3
|
+
description: Use the local squash-safe `stack` CLI for stacked PR inspection, sync, merge, and undo workflows when backlog-dependent work is represented by open parent PRs.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Stack
|
|
7
|
+
|
|
8
|
+
Use the local `stack` CLI for squash-safe stacked PR workflows. It is for repos
|
|
9
|
+
where dependent PRs may be open at the same time and GitHub squash-merges parent
|
|
10
|
+
PRs.
|
|
11
|
+
|
|
12
|
+
Keep ordinary editing and commits on plain `git`. Use `stack` only for stack
|
|
13
|
+
intent, stack inspection, sync, merge, and undo workflows.
|
|
14
|
+
|
|
15
|
+
## Mental Model
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
main
|
|
19
|
+
└─ parent-branch #101
|
|
20
|
+
└─ child-branch #102
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The GitHub PR base is the source of truth for ordinary stack inference. A child
|
|
24
|
+
PR should use its parent PR branch as its base. Independent PRs stay based on
|
|
25
|
+
trunk and do not need fake stack tracking.
|
|
26
|
+
|
|
27
|
+
## Core Commands
|
|
28
|
+
|
|
29
|
+
- `stack status`: inspect the current tracked or inferred stack.
|
|
30
|
+
- `stack sync --dry-run`: required inspection gate before stack mutation.
|
|
31
|
+
- `stack sync`: approved mutation gate after the dry-run preview is correct.
|
|
32
|
+
- `stack merge --auto`: merge the current stack root with GitHub auto-merge,
|
|
33
|
+
wait for it to land, and repair descendants.
|
|
34
|
+
- `stack undo --apply`: restore the previous applied stack mutation when a
|
|
35
|
+
repair or merge needs to be rolled back.
|
|
36
|
+
|
|
37
|
+
## Harness Workflow Rules
|
|
38
|
+
|
|
39
|
+
- Missing `stack` blocks stack-dependent workflows only. It does not block
|
|
40
|
+
independent trunk-based work.
|
|
41
|
+
- `create-spec` records stack intent through `Dependency Readiness` and
|
|
42
|
+
`Branch/Base Intent`; it does not mutate git state.
|
|
43
|
+
- `create-plan` preserves and validates those sections; it does not decide stack
|
|
44
|
+
topology.
|
|
45
|
+
- `implement-spec` executes recorded branch/base intent before coding and runs
|
|
46
|
+
stack sync only after PR base metadata exists.
|
|
47
|
+
- `delivery-phase` owns stack mutation and cleanliness.
|
|
48
|
+
- `review-phase` stays readonly and reports stack evidence.
|
|
49
|
+
|
|
50
|
+
## Normal Stacked PR Flow
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
git checkout -b team/name/child team/name/parent
|
|
54
|
+
# implement, commit, push
|
|
55
|
+
gh pr create --base team/name/parent --head team/name/child
|
|
56
|
+
stack sync --dry-run
|
|
57
|
+
stack sync
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Use `stack track <branch> --onto <parent>` only when GitHub PR bases cannot
|
|
61
|
+
encode the stack clearly. Prefer PR bases over hand-maintained metadata.
|
|
62
|
+
|
|
63
|
+
## Delivery Closeout
|
|
64
|
+
|
|
65
|
+
When a PR exists, run:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
stack status
|
|
69
|
+
stack sync --dry-run
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
If the PR is stack-dependent and the dry-run reports pending changes, run:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
stack sync
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Then rerun `stack status` if the final report needs evidence.
|
|
79
|
+
|
|
80
|
+
## Recovery
|
|
81
|
+
|
|
82
|
+
For the most recent applied stack mutation:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
stack undo
|
|
86
|
+
stack undo --apply
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Run the dry-run form first unless the user explicitly asks for immediate restore.
|
|
@@ -9,11 +9,13 @@ description: Turns a large requirements discussion into a canonical backlog hier
|
|
|
9
9
|
|
|
10
10
|
1. Read [REFERENCE.md](REFERENCE.md) and [assets/concepts/backlog-model.md](assets/concepts/backlog-model.md).
|
|
11
11
|
2. If `requirements-grill` artifacts exist, read `*-grill-status.md` first and `*-grill-log.md` second.
|
|
12
|
-
3.
|
|
13
|
-
4.
|
|
14
|
-
5.
|
|
15
|
-
6.
|
|
16
|
-
7.
|
|
12
|
+
3. If subagents are available and the source material is large, use `requirements-synthesizer` to compress accepted, rejected, superseded, parked, and unresolved decisions.
|
|
13
|
+
4. If subagents are available, use `backlog-shaper` for a draft module/epic/story hierarchy; keep final backlog judgment in the parent thread.
|
|
14
|
+
5. Derive modules first, then epics, then stories.
|
|
15
|
+
6. Make story ordering explicit with native dependency primitives when the provider supports them.
|
|
16
|
+
7. Keep epic and story bodies product-facing.
|
|
17
|
+
8. Read the matching provider payload asset before generating or syncing create payloads.
|
|
18
|
+
9. Stop after the backlog structure and create payload guidance are complete.
|
|
17
19
|
|
|
18
20
|
## Workflows
|
|
19
21
|
|