@punks/cli 1.0.7 → 2.0.0-beta.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/AGENTS.md +4 -5
- package/README.md +1 -1
- 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 +14302 -3443
- 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 +16 -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,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review-phase
|
|
3
|
+
description: Run a findings-first readonly review phase with explicit entry gates, delegated lenses, artifacts, and validation. Use for review-only goals, manual reviews, PRs, merged branches, external edits, suspicious code, or as the mandatory review wrapper inside delivery-phase.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Review Phase
|
|
7
|
+
|
|
8
|
+
A phase is a wrapper skill: it defines when to enter, when to stop, which inner
|
|
9
|
+
skills to delegate to, what artifacts to produce, and which gates must pass.
|
|
10
|
+
`review-phase` is standalone and readonly by default. Inside `delivery-phase`, it
|
|
11
|
+
is mandatory and may hand findings back to delivery for fixes, debugging, docs,
|
|
12
|
+
or validation because delivery owns completion.
|
|
13
|
+
|
|
14
|
+
## Use When
|
|
15
|
+
|
|
16
|
+
- The user asks for a review, audit, second pass, PR review, suspicious-code check, or review-only goal.
|
|
17
|
+
- Code changed outside this session and needs independent inspection.
|
|
18
|
+
- A branch was merged, rebased, generated, or edited externally and needs confirmation.
|
|
19
|
+
- `delivery-phase` reaches its mandatory review gate.
|
|
20
|
+
- The desired output is findings, risks, missing tests, or recommended next actions.
|
|
21
|
+
|
|
22
|
+
## Do Not Use When
|
|
23
|
+
|
|
24
|
+
- The user asks directly for implementation with no review gate.
|
|
25
|
+
- The task is pure planning, requirements grilling, or docs writing with no artifact to review.
|
|
26
|
+
- You need to edit code immediately; ask for or enter an owning delivery/debug/fix phase instead.
|
|
27
|
+
- The review target is undefined and cannot be inferred from branch, diff, issue, PR, or user prompt.
|
|
28
|
+
|
|
29
|
+
## Entry Contract
|
|
30
|
+
|
|
31
|
+
1. Identify the review target: diff, PR, branch range, files, spec, plan, docs, or runtime evidence.
|
|
32
|
+
2. State scope and readonly posture. If scope is ambiguous, ask one clarifying question.
|
|
33
|
+
3. Read local guidance in checked directories, especially relevant `AGENTS.md` files under apps, packages, docs, or nested ownership boundaries.
|
|
34
|
+
4. Choose review lenses and say which are active.
|
|
35
|
+
|
|
36
|
+
## Review Lenses
|
|
37
|
+
|
|
38
|
+
- `parallel-research`: fan out independent readonly checks when scope can split by subsystem, risk, or hypothesis.
|
|
39
|
+
- `simplify`: inspect clarity, overcomplexity, unnecessary abstraction, derivable state, naming, and scope creep.
|
|
40
|
+
- `improve-codebase-architecture`: surface architectural friction, shallow modules, poor boundaries, and module-depth opportunities.
|
|
41
|
+
- Scoped local guidance: apply applicable directory instructions, stack skills, runbooks, and ownership rules discovered in checked paths.
|
|
42
|
+
|
|
43
|
+
Use only the lenses that fit the target. Do not perform ceremonial delegation when a local pass is faster and equally reliable.
|
|
44
|
+
|
|
45
|
+
## Workflow
|
|
46
|
+
|
|
47
|
+
1. Gather evidence:
|
|
48
|
+
- inspect status, diff/range/PR metadata, tests, docs, and relevant local instructions
|
|
49
|
+
- prefer primary artifacts over tracker summaries
|
|
50
|
+
- record exact files and commands consulted
|
|
51
|
+
2. Split if useful:
|
|
52
|
+
- use `parallel-research` for independent readonly checks
|
|
53
|
+
- synthesize before reporting; disagreements need evidence, not vote counting
|
|
54
|
+
3. Review findings-first:
|
|
55
|
+
- prioritize bugs, regressions, broken contracts, missing validation, unsafe assumptions, and user-facing risks
|
|
56
|
+
- include file and line references when available
|
|
57
|
+
- separate blocking findings from improvements and optional cleanup
|
|
58
|
+
4. Apply clarity and architecture lenses:
|
|
59
|
+
- use `simplify` to flag unnecessary concepts or complexity
|
|
60
|
+
- use `improve-codebase-architecture` to flag deeper boundary opportunities, usually as follow-up RFC candidates
|
|
61
|
+
5. Validate:
|
|
62
|
+
- run readonly checks that match the target when safe: tests, typecheck, lint, build, docs link checks, or focused smoke commands
|
|
63
|
+
- if a check cannot run, state why and the residual risk
|
|
64
|
+
6. Stop:
|
|
65
|
+
- standalone mode stops after findings and recommended next actions
|
|
66
|
+
- delivery mode returns findings to `delivery-phase`; delivery decides and performs fixes/debug/docs/validation
|
|
67
|
+
|
|
68
|
+
## Output Contract
|
|
69
|
+
|
|
70
|
+
Lead with findings, ordered by severity. For each finding include:
|
|
71
|
+
|
|
72
|
+
- severity
|
|
73
|
+
- file/line or artifact reference
|
|
74
|
+
- issue and impact
|
|
75
|
+
- evidence
|
|
76
|
+
- recommended action
|
|
77
|
+
|
|
78
|
+
Then include:
|
|
79
|
+
|
|
80
|
+
- open questions or assumptions
|
|
81
|
+
- validation run and result
|
|
82
|
+
- short summary only after findings
|
|
83
|
+
- whether this was standalone readonly review or delivery-owned review
|
|
84
|
+
|
|
85
|
+
If there are no findings, say so clearly and still report validation coverage and residual risk.
|
|
86
|
+
|
|
87
|
+
## Expected Outputs
|
|
88
|
+
|
|
89
|
+
- Review report in conversation, issue, PR comment, or handoff artifact as requested.
|
|
90
|
+
- Optional follow-up issue/RFC candidates for architectural opportunities.
|
|
91
|
+
- In delivery mode only: fix/debug/docs tasks handed back to the owning phase.
|
|
92
|
+
|
|
93
|
+
## Gotchas
|
|
94
|
+
|
|
95
|
+
- Findings-first means do not bury issues under summary prose.
|
|
96
|
+
- Do not edit code in standalone mode unless the user explicitly asks after seeing the review scope.
|
|
97
|
+
- Do not use `simplify` as permission to refactor; report simplification opportunities unless delivery owns fixes.
|
|
98
|
+
- Do not flatten scoped `AGENTS.md` guidance into generic advice; quote the concrete constraint that matters.
|
|
99
|
+
- Do not let `delivery-phase` skip this phase just because tests passed.
|
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@punks/cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-beta.0",
|
|
4
4
|
"description": "Devpunks AI scaffolding CLI",
|
|
5
|
-
"type": "module",
|
|
6
5
|
"bin": {
|
|
7
6
|
"devpunks": "dist/index.js",
|
|
8
7
|
"dp": "dist/index.js",
|
|
@@ -10,9 +9,10 @@
|
|
|
10
9
|
},
|
|
11
10
|
"files": [
|
|
12
11
|
"dist",
|
|
13
|
-
"
|
|
12
|
+
"README.md",
|
|
14
13
|
"AGENTS.md"
|
|
15
14
|
],
|
|
15
|
+
"type": "module",
|
|
16
16
|
"scripts": {
|
|
17
17
|
"build": "node ./scripts/build-dist.mjs",
|
|
18
18
|
"baseline:build": "bun ./scripts/build-baseline.mjs",
|
|
@@ -25,13 +25,22 @@
|
|
|
25
25
|
"test": "vitest run --config vitest.config.ts"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
+
"@effect/cli": "catalog:",
|
|
29
|
+
"@effect/platform": "catalog:",
|
|
30
|
+
"@effect/platform-bun": "catalog:",
|
|
31
|
+
"@effect/printer": "catalog:",
|
|
32
|
+
"@effect/printer-ansi": "catalog:",
|
|
33
|
+
"@punks/contract": "workspace:*",
|
|
34
|
+
"@punks/scaffold": "workspace:*",
|
|
35
|
+
"diff": "catalog:",
|
|
36
|
+
"effect": "catalog:",
|
|
28
37
|
"react-devtools-core": "^6.1.5"
|
|
29
38
|
},
|
|
30
39
|
"devDependencies": {
|
|
31
|
-
"@effect/vitest": "
|
|
32
|
-
"@types/node": "
|
|
33
|
-
"typescript": "
|
|
34
|
-
"vitest": "
|
|
40
|
+
"@effect/vitest": "catalog:",
|
|
41
|
+
"@types/node": "catalog:",
|
|
42
|
+
"typescript": "catalog:",
|
|
43
|
+
"vitest": "catalog:"
|
|
35
44
|
},
|
|
36
45
|
"packageManager": "bun@1.3.5"
|
|
37
46
|
}
|
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: docs-maintenance
|
|
3
|
-
description: "Ingest a spec folder into the wiki domain layer by extracting and writing flow pages first, then concept pages, then syncing ingest metadata. Secondary: update docs/ when code changes alter architecture, setup, contracts, or operator workflow. Use when a spec is ready to be captured as domain knowledge after review or implementation, or when a code task changes non-obvious behavior that docs/ should reflect."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Docs Maintenance
|
|
7
|
-
|
|
8
|
-
## Contract
|
|
9
|
-
|
|
10
|
-
- **Role:** higher-order ingest and repo-docs orchestrator
|
|
11
|
-
- **Entrypoint type:** public entrypoint
|
|
12
|
-
- **Upstream:** reviewed or implemented spec folder, or code changes that may require `docs/` updates
|
|
13
|
-
- **Delegates to:** internal flow-writing phase, then internal concept-writing phase
|
|
14
|
-
- **Downstream:** synced wiki indexes, ingest metadata, wiki log, and any 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
|
-
## Overview
|
|
19
|
-
|
|
20
|
-
**Primary purpose:** synthesize `<wiki-root>/specs/<domain>/<spec>/SPEC.md` (and optionally `IMPLEMENTATION-NOTES.md`) into the wiki domain knowledge layer. Write flow pages first, then concept pages, then sync ingest bookkeeping.
|
|
21
|
-
|
|
22
|
-
**Secondary purpose:** keep `docs/` accurate when code changes alter architecture, setup, contracts, decisions, or operator-facing behavior.
|
|
23
|
-
|
|
24
|
-
Read `<wiki-root>/AGENTS.md` before touching any wiki content.
|
|
25
|
-
|
|
26
|
-
`<wiki-root>` is repo-shape dependent:
|
|
27
|
-
- monorepo: `apps/wiki`
|
|
28
|
-
- single-repo: `wiki`
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
## Primary: Wiki Ingest Orchestration
|
|
33
|
-
|
|
34
|
-
### Pipeline
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
docs-maintenance (orchestrator)
|
|
38
|
-
└─ 1. flow-writing phase — writes flows/, updates domain index
|
|
39
|
-
└─ 2. concept-writing phase — reads flows/ for cross-linking, writes concepts/, updates domain index
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
**Why this order is required:** concept writing reads existing flow pages to cross-link concepts. Flow pages must exist before concept pages are written.
|
|
43
|
-
|
|
44
|
-
### Inputs
|
|
45
|
-
|
|
46
|
-
Accept any of:
|
|
47
|
-
- A spec folder path: `<wiki-root>/specs/<domain>/<spec>/`
|
|
48
|
-
- A domain name + spec name
|
|
49
|
-
- An explicit `SPEC.md` path
|
|
50
|
-
|
|
51
|
-
Resolve all inputs to a full spec folder path before continuing. If the target is still ambiguous, ask only for the missing folder.
|
|
52
|
-
|
|
53
|
-
### Step 1: Guard
|
|
54
|
-
|
|
55
|
-
Check `SPEC.md` frontmatter for `ingested: true`. If set, exit with a clear no-op message.
|
|
56
|
-
|
|
57
|
-
Verify the spec has `domain:` in frontmatter. Error if absent.
|
|
58
|
-
|
|
59
|
-
### Step 2: Read the source
|
|
60
|
-
|
|
61
|
-
Read in order:
|
|
62
|
-
1. `SPEC.md` — mandatory. If missing, stop and report.
|
|
63
|
-
2. `IMPLEMENTATION-NOTES.md` — optional. If present, flows and concepts become `status: implemented`. If absent, status is `proposed`.
|
|
64
|
-
- Check its frontmatter. If it lacks frontmatter (no YAML block), add it now before continuing:
|
|
65
|
-
```yaml
|
|
66
|
-
---
|
|
67
|
-
domain: <domain from SPEC.md>
|
|
68
|
-
type: implementation-notes
|
|
69
|
-
spec: <spec id from SPEC.md>
|
|
70
|
-
links:
|
|
71
|
-
- "[[specs/<domain>/<spec>/SPEC]]"
|
|
72
|
-
ingested: false
|
|
73
|
-
last_ingested: null
|
|
74
|
-
created: <today>
|
|
75
|
-
updated: <today>
|
|
76
|
-
---
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
Verify `<wiki-root>/domains/<domain>/` exists with a `<domain>.md` index file. If the domain is missing, stop and scaffold the wiki/domain structure first.
|
|
80
|
-
|
|
81
|
-
### Step 3: Extract flows
|
|
82
|
-
|
|
83
|
-
A flow exists when the spec describes a **sequence of user or system actions with a defined start, steps, and end outcome**.
|
|
84
|
-
|
|
85
|
-
Look for flows in:
|
|
86
|
-
- Multi-step acceptance criteria (e.g. "On save, the system runs duplicate detection → blocks if exact match → redirects operator on success")
|
|
87
|
-
- Explicit user journeys or process descriptions in the Context section
|
|
88
|
-
- "When X, then Y" conditional chains across multiple acceptance criteria
|
|
89
|
-
- Any section titled Flow, Process, Journey, or similar
|
|
90
|
-
|
|
91
|
-
For each flow found:
|
|
92
|
-
- Assign a descriptive `flow_name` (e.g., "Create Patient", "Document Upload", "Duplicate Check")
|
|
93
|
-
- Extract `flow_content`: triggering event, actors involved, ordered steps with decision points, terminal outcome
|
|
94
|
-
- When `IMPLEMENTATION-NOTES.md` is present: note deviations, surprises, or blocked steps inline
|
|
95
|
-
|
|
96
|
-
If no multi-step sequence is discernible (e.g., a purely data-model spec), record the absence and skip flow delegation.
|
|
97
|
-
|
|
98
|
-
### Step 4: Write flow pages
|
|
99
|
-
|
|
100
|
-
Read [references/flow-pages.md](references/flow-pages.md) and apply that contract to every extracted flow.
|
|
101
|
-
|
|
102
|
-
Wait for all flow pages to complete before proceeding.
|
|
103
|
-
|
|
104
|
-
If any flow write fails, stop immediately. Do not proceed to concept writing. Report the failure so the run can be resumed cleanly.
|
|
105
|
-
|
|
106
|
-
### Step 5: Extract concepts
|
|
107
|
-
|
|
108
|
-
A concept exists when the spec **names a domain entity or term with defined attributes, invariants, or bounded scope**.
|
|
109
|
-
|
|
110
|
-
Look for concepts in:
|
|
111
|
-
- Fields listed in acceptance criteria (e.g., `first_name`, `email`, `acquisition_channel`, `nin`)
|
|
112
|
-
- Explicit data model or entity sections
|
|
113
|
-
- Nouns that recur across multiple acceptance criteria with their own distinct attributes or rules
|
|
114
|
-
- Enum sets representing a bounded domain state (e.g., `acquisition_channel` values)
|
|
115
|
-
- Entities referenced via `[[wikilinks]]` to other specs or domain pages
|
|
116
|
-
|
|
117
|
-
**Grouping rule:** collect related fields under one owning entity rather than creating a concept per field. All patient registry fields → one "Patient" concept. All acquisition channel variants → one "Acquisition Channel" concept.
|
|
118
|
-
|
|
119
|
-
If no distinct domain entity is identifiable, record the absence and skip concept delegation.
|
|
120
|
-
|
|
121
|
-
### Step 6: Write concept pages
|
|
122
|
-
|
|
123
|
-
Read [references/concept-pages.md](references/concept-pages.md) and apply that contract to every extracted concept.
|
|
124
|
-
|
|
125
|
-
Wait for all concept pages to complete.
|
|
126
|
-
|
|
127
|
-
### Step 7: Mark sources as ingested
|
|
128
|
-
|
|
129
|
-
Update `SPEC.md` frontmatter:
|
|
130
|
-
```yaml
|
|
131
|
-
ingested: true
|
|
132
|
-
last_ingested: YYYY-MM-DD
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
If `IMPLEMENTATION-NOTES.md` is present, update its frontmatter:
|
|
136
|
-
```yaml
|
|
137
|
-
ingested: true
|
|
138
|
-
last_ingested: YYYY-MM-DD
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
Also populate its `links` array with every flow and concept page written in Steps 4 and 6 (in addition to the SPEC link that was set in Step 2). This is the only moment where IMPLEMENTATION-NOTES links are updated — do not leave them pointing only at the SPEC.
|
|
142
|
-
|
|
143
|
-
### Step 8: Log entry
|
|
144
|
-
|
|
145
|
-
Append to `<wiki-root>/log.md` (cap at 50 entries; drop oldest when over):
|
|
146
|
-
```md
|
|
147
|
-
## [YYYY-MM-DD] ingest | <spec title>
|
|
148
|
-
- Source: [[specs/<domain>/<spec>/SPEC]]
|
|
149
|
-
- Flows written: <count>
|
|
150
|
-
- Concepts written: <count>
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
### Step 9: Update wiki index
|
|
154
|
-
|
|
155
|
-
If new pages were created, update the Concepts and Flows counts in the relevant Domains table row in `<wiki-root>/index.md`.
|
|
156
|
-
|
|
157
|
-
### Resumability
|
|
158
|
-
|
|
159
|
-
Output pages are the checkpoints. On re-invocation of the same source:
|
|
160
|
-
|
|
161
|
-
- Flow pages with `ingested: true` → skip Step 4 for those flows
|
|
162
|
-
- Any expected flow page missing → re-run Step 4 for it before Step 6
|
|
163
|
-
- Concept pages with `ingested: true` → skip Step 6 for those concepts
|
|
164
|
-
|
|
165
|
-
---
|
|
166
|
-
|
|
167
|
-
## Secondary: docs/ Maintenance
|
|
168
|
-
|
|
169
|
-
Update `docs/` when a code task changes **architecture, setup, contracts, decisions, or non-obvious operator-facing behavior**. Do not let docs/ work displace or delay wiki ingest.
|
|
170
|
-
|
|
171
|
-
1. Read `docs/README.md` and the nearest affected section README before editing.
|
|
172
|
-
2. Prefer editing an existing leaf doc over creating a new one.
|
|
173
|
-
3. When a doc is added, removed, or renamed: update `docs/README.md` and the nearest section README in the same task.
|
|
174
|
-
4. Record repo-wide behavior changes in `docs/architecture/decisions/`.
|
|
175
|
-
|
|
176
|
-
**Route by owned behavior:**
|
|
177
|
-
- Backend/runtime surface → `docs/reference/domains/backend-effect-sql.md` or `docs/runbooks/`
|
|
178
|
-
- Auth/user-management → `docs/reference/domains/user-management.md`
|
|
179
|
-
- Frontend/app structure → `docs/reference/domains/frontend-application-structure.md`
|
|
180
|
-
- AI workflow/agent infrastructure → `docs/runbooks/subagent-templates.md` or `docs/runbooks/claude-code-hooks.md`
|
|
181
|
-
|
|
182
|
-
---
|
|
183
|
-
|
|
184
|
-
## Never Do
|
|
185
|
-
|
|
186
|
-
- Ingest a spec with `ingested: true` — exit early instead
|
|
187
|
-
- Ingest an `IMPLEMENTATION-NOTES.md` with `ingested: true` — treat it as already reflected in domain pages
|
|
188
|
-
- Proceed to concept writing when a flow write has failed
|
|
189
|
-
- Create `docs/prd`, `docs/dev`, roadmap, sprint, or backlog-mirror folders
|
|
190
|
-
- Document speculative or future-state features as current truth
|
|
191
|
-
- Put agent task instructions inside human-facing docs pages
|
|
192
|
-
- Leave docs orphaned from `docs/README.md` after adding or renaming them
|
|
193
|
-
- Duplicate content between `<wiki-root>/domains/` (the "what") and `docs/reference/domains/` (the "how")
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
interface:
|
|
2
|
-
display_name: "Docs Maintenance"
|
|
3
|
-
short_description: "Wiki ingest plus repo docs maintenance"
|
|
4
|
-
default_prompt: "Use $docs-maintenance to own the wiki ingest pipeline, then keep docs/ human-facing and implementation-grounded when code changes affect durable knowledge."
|
package/docs/README.md
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# CLI Docs
|
|
2
|
-
|
|
3
|
-
- [Requirements](./reference/dp-requirements.md)
|
|
4
|
-
- [Scaffolding runbook](./runbooks/dp-cli-scaffolding.md)
|
|
5
|
-
|
|
6
|
-
Domain knowledge:
|
|
7
|
-
|
|
8
|
-
- [Wiki index](../wiki/index.md)
|
|
9
|
-
|
|
10
|
-
The wiki is the durable domain layer for specs, raw inputs, flows, and concepts. Keep operator runbooks and implementation reference in `docs/`; keep stable product/domain knowledge in `wiki/`.
|
|
11
|
-
|
|
12
|
-
Implementation notes:
|
|
13
|
-
|
|
14
|
-
- canonical bundled scaffold metadata and shared assets live in `src/data/`
|
|
15
|
-
- runtime scaffold content resolves from a `Baseline`: latest remote stable by default, bundled fallback when offline or forced with `--baseline bundled`
|
|
16
|
-
- pack-owned lint asset metadata lives in `src/data/catalog/lint.ts`
|
|
17
|
-
- distributed skill assets live in `skills/`
|
|
18
|
-
- runtime projection/writing logic lives in `src/scaffold/`
|
|
19
|
-
- `punks update` refreshes scaffold-managed assets from `.devpunks/scaffold-manifest.json`
|
|
20
|
-
- CLI startup checks run in a detached advisory worker at most once per 12 hours by default. They check npm's `latest` dist-tag and whether the named `dp-cli` skill is present, but startup never installs or updates packages/skills while another CLI command is starting. Set `DP_NO_UPDATE_CHECK=1` or `DP_NO_SKILL_UPDATE_CHECK=1` to skip those checks, `DP_UPDATE_TAG=next` to compare against another dist-tag, and `DP_STARTUP_CHECK_INTERVAL_MS=0` to force the worker during local testing.
|
|
21
|
-
- baseline releases use `baseline/stable/*` GitHub release tags, separate from npm executable tags such as `v1.0.1`
|
|
22
|
-
- shared neutral hook and sync assets live in `src/data/hooks/` and `src/data/scripts/`; hook commands infer the target repo package manager from `packageManager` and lockfiles
|
|
23
|
-
- scaffolded required tools always include `portless` and `skills` so generated guidance can standardize local dev origins and keep skill entrypoints up to date
|
|
24
|
-
- `punks scaffold setup` checks the base required tools (`portless`, `skills`) before repo detection and checks selected-pack tools after pack confirmation.
|
|
25
|
-
- Oxlint specs/starter config are scaffolded only when scanned manifests already declare `oxlint`; the auto format/lint hook is scaffolded only when manifests declare `oxfmt`. PR creation is not gated by a scaffolded test-suite hook. Other lint/format stacks are intentionally left untouched for now.
|
|
26
|
-
- the default debug pack scaffolds the local `debug-agent` skill and installs/verifies the `debug-agent` CLI without running its agent-install wizard
|
|
27
|
-
- scaffolded repos keep project-local skills in `.agents/skills/`; only `.claude/skills` is a compatibility symlink mirror
|
|
28
|
-
- React scaffold surfaces include `async-react-patterns` alongside the existing React composition, structure, and Vercel guidance so agents avoid outdated manual async state patterns.
|
|
29
|
-
- Next.js detection implies the React pack even when `react` / `react-dom` are not directly listed in scanned manifests.
|
|
30
|
-
- Frontend surface detection scaffolds `frontend-domain-structure` with the frontend pack when React or Next.js is detected.
|
|
31
|
-
- Backend surface detection scaffolds `backend-domain-structure`, `backend-recoverable-actions`, and `logging-best-practices` when backend framework/data/auth packages are detected, or when workspace names/paths clearly identify API, backend, server, or service packages. Workspace prompt specs apply backend packs only to backend-looking workspaces, not frontend workspaces that happen to share repo-level backend/data detections.
|
|
32
|
-
- Drizzle detection selects the `drizzle` pack for data-layer prompt/lint metadata, but does not imply Effect skills or Effect opensrc references unless `effect` / `@effect/*` is also detected.
|
|
33
|
-
- Scaffold no longer preselects concrete opensrc repositories. Post-scaffold agents must choose and clone the core detected libraries whose source behavior matters before authoring final prompts or plans.
|
|
34
|
-
- The default subagent manifest includes a read-only `code-review` template that uses `simplify` and `improve-codebase-architecture`; root prompt guidance routes review requests to findings-first review before broad refactor planning.
|
|
35
|
-
- Non-surface agnostic skill groups are mandatory scaffold packs (`debug`, `docs`, `planning`, `quality`, `research`, `requirements`, `subagents`); `frontend` and `backend` remain detection-driven.
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
# Harness Intelligence Grill Log
|
|
2
|
-
|
|
3
|
-
This log records locked requirements decisions for rethinking this repo as the Harness Intelligence project.
|
|
4
|
-
|
|
5
|
-
## Initial Situation
|
|
6
|
-
|
|
7
|
-
The repo currently provides real value as the `punks`/`dp` scaffolding CLI plus canonical scaffold baseline data. It has battle-tested workflow assets, repo-aware setup behavior, baseline publishing, and a local wiki-shaped knowledge tree.
|
|
8
|
-
|
|
9
|
-
The repo does not yet provide the full product/distribution surface needed for wider colleague adoption or public company communication:
|
|
10
|
-
|
|
11
|
-
- no Turborepo application layout
|
|
12
|
-
- no public Fumadocs wiki/docs app
|
|
13
|
-
- no public landing page
|
|
14
|
-
- no Effect backend for scaffold distribution, validation, or future orchestration
|
|
15
|
-
- no settled CLI-vs-backend boundary
|
|
16
|
-
- no durable explanation of harness theory, criteria, trust model, and sales/marketing narrative
|
|
17
|
-
|
|
18
|
-
## Branches
|
|
19
|
-
|
|
20
|
-
### Branch A: Product Boundary
|
|
21
|
-
|
|
22
|
-
Purpose: define what "Harness Intelligence" is as a product/system, and what this repo must own.
|
|
23
|
-
|
|
24
|
-
### Branch B: Distribution Architecture
|
|
25
|
-
|
|
26
|
-
Purpose: define Turborepo shape, app/package boundaries, backend role, CLI role, baseline/data flow, and public surfaces.
|
|
27
|
-
|
|
28
|
-
### Branch C: Wiki and Theory
|
|
29
|
-
|
|
30
|
-
Purpose: define the docs knowledge model, Fumadocs information architecture, and the harness engineering criteria currently living in the user's head.
|
|
31
|
-
|
|
32
|
-
### Branch D: Trust and Adoption
|
|
33
|
-
|
|
34
|
-
Purpose: define what colleagues need to trust the AI harness setup, how validation works, and what proof material must exist.
|
|
35
|
-
|
|
36
|
-
### Branch E: Company Communication
|
|
37
|
-
|
|
38
|
-
Purpose: define landing-page and sales narrative for how Devpunks engineers are AI-superpowered without becoming vague marketing copy.
|
|
39
|
-
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# Harness Intelligence Grill Status
|
|
2
|
-
|
|
3
|
-
Current grill artifacts:
|
|
4
|
-
|
|
5
|
-
- Log: `docs/harness-intelligence-grill-log.md`
|
|
6
|
-
- Status: `docs/harness-intelligence-grill-status.md`
|
|
7
|
-
|
|
8
|
-
## Branch Dashboard
|
|
9
|
-
|
|
10
|
-
| Branch | Completion | Locked direction | Still open |
|
|
11
|
-
| --- | ---: | --- | --- |
|
|
12
|
-
| Product Boundary | 10% | Repo is being reconsidered as the Harness Intelligence project, not only a CLI package. | Canonical product definition, audience split, repo ownership boundary. |
|
|
13
|
-
| Distribution Architecture | 10% | Target mentions Turborepo, public docs app, landing page, Effect backend, and CLI. | App/package boundaries, backend-vs-CLI responsibilities, data/source-of-truth flow. |
|
|
14
|
-
| Wiki and Theory | 10% | Existing wiki shape exists locally; missing public Fumadocs app and full theory/criteria content. | IA, criteria taxonomy, private vs public knowledge split, docs ownership. |
|
|
15
|
-
| Trust and Adoption | 10% | Colleague recognition/validation is a primary requirement. | Trust evidence, onboarding path, validation gates, adoption metrics. |
|
|
16
|
-
| Company Communication | 10% | Public explanation must support sales/marketing around AI-superpowered developers. | Landing page promise, proof points, tone, relationship to devpunks.com. |
|
|
17
|
-
|
|
18
|
-
## Parked Branches
|
|
19
|
-
|
|
20
|
-
- None yet.
|
|
21
|
-
|
|
22
|
-
## Current Question
|
|
23
|
-
|
|
24
|
-
Q1: Product Boundary.
|
|
25
|
-
|
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
# `punks` Requirements
|
|
2
|
-
|
|
3
|
-
This document captures the durable requirements agreed for the `punks` CLI so the implementation can evolve without losing the product contract.
|
|
4
|
-
|
|
5
|
-
## Goal
|
|
6
|
-
|
|
7
|
-
`punks` is an AI-first scaffolding CLI for agent-ready projects.
|
|
8
|
-
|
|
9
|
-
It should:
|
|
10
|
-
|
|
11
|
-
- scaffold the right AI operating context for the current project phase
|
|
12
|
-
- keep pre-boilerplate flows lightweight and language-agnostic
|
|
13
|
-
- keep repo-aware setup deterministic once a repo and stack exist
|
|
14
|
-
- emit operator prompts that guide the next agent through the current gate
|
|
15
|
-
|
|
16
|
-
## Core Principles
|
|
17
|
-
|
|
18
|
-
- The lifecycle is explicit.
|
|
19
|
-
- Pre-boilerplate scaffolding is stage-driven.
|
|
20
|
-
- Repo-aware setup is pack-driven.
|
|
21
|
-
- Skill selection is curated by the CLI, not exposed as a raw chooser.
|
|
22
|
-
- Shared bundled assets come from this repo, not network fetches at runtime.
|
|
23
|
-
|
|
24
|
-
## Command Contract
|
|
25
|
-
|
|
26
|
-
`punks scaffold` is the lifecycle index. It explains the available scaffold phases and is no longer an alias for repo setup.
|
|
27
|
-
|
|
28
|
-
The current scaffold namespace is:
|
|
29
|
-
|
|
30
|
-
- `punks scaffold init`
|
|
31
|
-
requirements gate; scaffolds `requirements-grill`, `write-backlog`, and seeds the wiki tree
|
|
32
|
-
- `punks scaffold backlog`
|
|
33
|
-
backlog gate; currently prints guidance only
|
|
34
|
-
- `punks scaffold setup`
|
|
35
|
-
repo-aware setup; detects technologies, resolves packs, and emits prompts/manifests/hooks
|
|
36
|
-
|
|
37
|
-
## Pre-Boilerplate Contract
|
|
38
|
-
|
|
39
|
-
`punks scaffold init` and `punks scaffold backlog` assume the operator is already inside the target workspace or repository folder.
|
|
40
|
-
|
|
41
|
-
They should:
|
|
42
|
-
|
|
43
|
-
- copy only their exact stage-owned skills into `.agents/skills/`
|
|
44
|
-
- overwrite those scaffolded files on rerun for idempotency
|
|
45
|
-
- let `init` seed the dedicated wiki tree early so later planning/docs skills have a concrete schema root
|
|
46
|
-
- avoid pack detection, stack evaluation, or other side effects beyond the minimal repo-shape sniff needed to choose `apps/wiki` vs `wiki`
|
|
47
|
-
- print a fixed operator prompt to stdout that explains how to use the newly scaffolded skills
|
|
48
|
-
- make the requirements grill the canonical gate before backlog creation, with `write-backlog` available after the grill handoff closes
|
|
49
|
-
|
|
50
|
-
They should not:
|
|
51
|
-
|
|
52
|
-
- write a root `AGENTS.md`
|
|
53
|
-
- scan for PRDs yet
|
|
54
|
-
- create issues, call external services, or mutate anything beyond the bundled scaffold files they own
|
|
55
|
-
|
|
56
|
-
The dedicated wiki tree is part of that bundled stage output:
|
|
57
|
-
|
|
58
|
-
- monorepo-shaped target => `apps/wiki/`
|
|
59
|
-
- single-repo target => `wiki/`
|
|
60
|
-
|
|
61
|
-
That wiki tree is not the same thing as `docs/`. It owns specs, raw inputs, and synthesized domain knowledge.
|
|
62
|
-
|
|
63
|
-
## Repo-Aware Setup Contract
|
|
64
|
-
|
|
65
|
-
`punks scaffold setup` remains the deterministic repo-aware scaffold flow.
|
|
66
|
-
|
|
67
|
-
It should:
|
|
68
|
-
|
|
69
|
-
- detect repo facts, not ask the agent to invent them
|
|
70
|
-
- resolve those facts to predefined Devpunks packs
|
|
71
|
-
- scaffold the shared AI setup
|
|
72
|
-
- emit instructions/specs the next agent can use to generate repo-scoped prompts and subagent config
|
|
73
|
-
|
|
74
|
-
The CLI must stay deterministic at the detection/mapping layer and flexible at the final repo-reconciliation layer.
|
|
75
|
-
|
|
76
|
-
## Repository Model
|
|
77
|
-
|
|
78
|
-
`punks scaffold setup` must support both:
|
|
79
|
-
|
|
80
|
-
- monorepos
|
|
81
|
-
- single-repo package layouts
|
|
82
|
-
|
|
83
|
-
Repo shape remains an invariant used during scaffold generation and must stay overrideable with:
|
|
84
|
-
|
|
85
|
-
- `auto`
|
|
86
|
-
- `monorepo`
|
|
87
|
-
- `single`
|
|
88
|
-
|
|
89
|
-
## Detection Contract
|
|
90
|
-
|
|
91
|
-
Initial setup detection is JS/TS manifest based.
|
|
92
|
-
|
|
93
|
-
Primary sources:
|
|
94
|
-
|
|
95
|
-
- repo `package.json` files discovered recursively, with ignore rules for generated/non-source trees
|
|
96
|
-
|
|
97
|
-
Initial technology mapping:
|
|
98
|
-
|
|
99
|
-
- `next` -> `nextjs`, `react`
|
|
100
|
-
- `react`, `react-dom` -> `react`
|
|
101
|
-
- `@tanstack/react-query` and related query packages -> `tanstack-query`
|
|
102
|
-
- `elysia` -> `elysia`
|
|
103
|
-
- `@trpc/*` -> `trpc`
|
|
104
|
-
- `drizzle-orm`, `drizzle-kit` -> `drizzle`
|
|
105
|
-
- `better-auth` -> `better-auth`
|
|
106
|
-
- `turbo` -> `turborepo`
|
|
107
|
-
- `effect`, `@effect/*` -> `effect`
|
|
108
|
-
|
|
109
|
-
`drizzle` is data-layer detection only. It must not imply Effect skills or Effect source references unless the `effect` pack is selected independently.
|
|
110
|
-
|
|
111
|
-
## Pack Contract
|
|
112
|
-
|
|
113
|
-
Pack resolution happens at pack level only during `punks scaffold setup`.
|
|
114
|
-
|
|
115
|
-
The CLI must never ask the user or agent to choose raw skills in the repo-aware setup flow.
|
|
116
|
-
|
|
117
|
-
### Default packs
|
|
118
|
-
|
|
119
|
-
Default packs are always preselected and visually distinguished. They are not removable.
|
|
120
|
-
|
|
121
|
-
Current default packs:
|
|
122
|
-
|
|
123
|
-
- `docs`
|
|
124
|
-
`docs-maintenance`
|
|
125
|
-
- `planning`
|
|
126
|
-
`grill-me`, `create-spec`, `create-plan`, `implement-spec`
|
|
127
|
-
- `subagents`
|
|
128
|
-
`domain-plan`, `domain-execute`, `parallel-task`, `swarm-planner`
|
|
129
|
-
- `quality`
|
|
130
|
-
`tdd`, `simplify`
|
|
131
|
-
- `research`
|
|
132
|
-
`parallel-research`
|
|
133
|
-
- `requirements`
|
|
134
|
-
`requirements-grill`, `write-backlog`
|
|
135
|
-
|
|
136
|
-
### Surface packs
|
|
137
|
-
|
|
138
|
-
Frontend-oriented skills should be grouped into a single detected frontend surface pack:
|
|
139
|
-
|
|
140
|
-
- `frontend`
|
|
141
|
-
`agent-browser`, `frontend-design`, `web-design-guidelines`
|
|
142
|
-
|
|
143
|
-
Framework/data packs may layer on top of that surface:
|
|
144
|
-
|
|
145
|
-
- `react`
|
|
146
|
-
`async-react-patterns`, `react-domain-structure`, `vercel-composition-patterns`, `vercel-react-best-practices`
|
|
147
|
-
- `nextjs`
|
|
148
|
-
`next-best-practices`, `next-cache-components`
|
|
149
|
-
- `tanstack-query`
|
|
150
|
-
`tanstack-query`
|
|
151
|
-
|
|
152
|
-
Backend-oriented agnostic skills should be grouped into a single detected backend surface pack:
|
|
153
|
-
|
|
154
|
-
- `backend`
|
|
155
|
-
`backend-domain-structure`, `backend-recoverable-actions`, `logging-best-practices`
|
|
156
|
-
|
|
157
|
-
## Prompt Contract
|
|
158
|
-
|
|
159
|
-
Pre-boilerplate commands use fixed stdout operator prompts.
|
|
160
|
-
|
|
161
|
-
`punks scaffold setup` must not hardcode all final repo-scoped prompts as static bundled prompt bodies. Instead it should:
|
|
162
|
-
|
|
163
|
-
- directly scaffold only shared global harness prompts
|
|
164
|
-
- emit prompt specs for root/docs/workspace scopes
|
|
165
|
-
- instruct the next agent how to turn those specs into final scoped `AGENTS.md` files
|
|
166
|
-
|
|
167
|
-
## Subagent Manifest Contract
|
|
168
|
-
|
|
169
|
-
`punks scaffold setup` must emit structured guidance for `.agents/subagents/manifest.mjs`.
|
|
170
|
-
|
|
171
|
-
That guidance must let the next agent derive:
|
|
172
|
-
|
|
173
|
-
- which specialists should exist
|
|
174
|
-
- owned paths
|
|
175
|
-
- guidance files
|
|
176
|
-
- packs
|
|
177
|
-
- explicit skills
|
|
178
|
-
- scope boundaries
|
|
179
|
-
|
|
180
|
-
It should also scaffold the neutral harness-sync layer around that manifest:
|
|
181
|
-
|
|
182
|
-
- shared hooks under `.agents/hooks/`
|
|
183
|
-
- harness sync entrypoint under `.agents/scripts/sync-subagents.mjs`
|
|
184
|
-
- generated harness-native agent/config/mirror surfaces for `.claude`, `.codex`, `.cursor`, and `.opencode`
|
|
185
|
-
|
|
186
|
-
## Tool Bootstrap Contract
|
|
187
|
-
|
|
188
|
-
If a bundled skill or scaffold baseline depends on a global external tool, the CLI should model that dependency explicitly and ensure the tool is installed during `punks scaffold setup`.
|
|
189
|
-
|
|
190
|
-
Current examples:
|
|
191
|
-
|
|
192
|
-
- `agent-browser`
|
|
193
|
-
- `opensrc`
|
|
194
|
-
- `portless`
|
|
195
|
-
|
|
196
|
-
The scaffold output should also record the resolved tool requirements in a machine-readable manifest.
|
|
197
|
-
|
|
198
|
-
`punks scaffold setup` should check base required tools before repo detection so missing `skills` or `portless` is surfaced immediately. Tools required only by selected packs can be checked after pack confirmation.
|
|
199
|
-
|
|
200
|
-
Scaffold output should not preselect concrete opensrc repositories. The generated post-scaffold instructions should require the next agent to identify the core detected libraries whose source behavior matters, ask the user when that set is ambiguous, and run `opensrc path <package>` or `opensrc path owner/repo` for only that focused set.
|
|
201
|
-
|
|
202
|
-
## Lint Scaffold Contract
|
|
203
|
-
|
|
204
|
-
The shipped starter/root lint baseline should exclude generated and non-source surfaces by default, including:
|
|
205
|
-
|
|
206
|
-
- all lock files
|
|
207
|
-
- all dot-directories
|
|
208
|
-
- generated agent/harness folders unless a target repo explicitly opts them back into lint scope
|
|
209
|
-
|
|
210
|
-
When scaffold guidance leads an agent to adopt Oxlint or Oxfmt, it must tell the agent to replace existing lint/format entrypoints deliberately: package scripts, task pipelines, CI, editor/docs references, and agent hooks should agree on the new tools.
|
|
211
|
-
|
|
212
|
-
Until additional lint/format stacks are supported, repo-aware setup should emit Oxlint specs/starter config only when `oxlint` is declared in scanned package manifests and emit the Oxfmt/Oxlint format hook only when `oxfmt` is declared. Repos without those packages should get no lint/format scaffold surfaces.
|
|
213
|
-
|
|
214
|
-
## Dedicated CLI Repo Contract
|
|
215
|
-
|
|
216
|
-
The standalone private `wearedevpunks/cli` repo remains the source of truth for:
|
|
217
|
-
|
|
218
|
-
- pack registry
|
|
219
|
-
- stage-owned scaffold prompts
|
|
220
|
-
- subagent templates
|
|
221
|
-
- hook base files
|
|
222
|
-
- root/shared prompt assets
|
|
223
|
-
- examples
|
|
224
|
-
|
|
225
|
-
The public `wearedevpunks/skills` repo remains the source of truth for the shareable skill directories. This private CLI syncs that public tree into local `skills/` through a local cache clone and scaffolds from the local copy. Runtime scaffold behavior must not depend on network fetches.
|