@punks/cli 2.0.0-beta.4 → 2.0.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 -0
- package/dist/data/catalog/hooks.ts +0 -7
- package/dist/data/catalog/packs.ts +34 -4
- package/dist/data/catalog/skills.ts +31 -7
- package/dist/data/catalog/tools.ts +6 -0
- package/dist/data/hooks/format-edited-file.mjs +26 -5
- package/dist/data/hooks.test.ts +0 -29
- package/dist/data/scripts/sync-subagents.mjs +29 -87
- package/dist/data/subagents/manifest.mjs +9 -9
- package/dist/data/subagents/manifest.test.ts +40 -0
- package/dist/index.js +3275 -1764
- package/dist/skills/agnostic/planning/create-spec/references/discovery.md +3 -3
- package/dist/skills/agnostic/requirements/requirements-grill/SKILL.md +1 -1
- package/dist/skills/agnostic/requirements/requirements-grill/references/wiki-output.md +1 -1
- package/dist/skills/phases/bug-discovery-phase/REFERENCE.md +124 -0
- package/dist/skills/phases/bug-discovery-phase/SKILL.md +76 -0
- package/dist/skills/phases/bug-resolution-phase/REFERENCE.md +154 -0
- package/dist/skills/phases/bug-resolution-phase/SKILL.md +62 -0
- package/dist/skills/{agnostic/docs → phases}/docs-ingest-phase/SKILL.md +16 -16
- package/dist/skills/phases/docs-ingest-phase/references/concept-pages.md +70 -0
- package/dist/skills/phases/docs-ingest-phase/references/flow-pages.md +56 -0
- package/dist/skills/phases/docs-ingest-phase/references/fumadocs-routing.md +76 -0
- package/dist/skills/{agnostic/docs → phases}/docs-ingest-phase/references/wiki-ingest.md +5 -5
- package/dist/skills/{agnostic/planning → phases}/resolve-debt-phase/SKILL.md +4 -4
- package/package.json +12 -3
- package/dist/skills/agnostic/docs/docs-ingest-phase/references/concept-pages.md +0 -48
- package/dist/skills/agnostic/docs/docs-ingest-phase/references/flow-pages.md +0 -41
- package/dist/skills/agnostic/docs/docs-ingest-phase/references/fumadocs-routing.md +0 -88
- /package/dist/skills/{agnostic/debug → phases}/debugging-phase/SKILL.md +0 -0
- /package/dist/skills/{agnostic/planning → phases}/delivery-phase/SKILL.md +0 -0
- /package/dist/skills/{agnostic/docs → phases}/docs-ingest-phase/agents/openai.yaml +0 -0
- /package/dist/skills/{agnostic/docs → phases}/docs-ingest-phase/references/repo-docs.md +0 -0
- /package/dist/skills/{agnostic/planning → phases}/goalify/EXAMPLES.md +0 -0
- /package/dist/skills/{agnostic/planning → phases}/goalify/SKILL.md +0 -0
- /package/dist/skills/{agnostic/requirements → phases}/requirements-phase/SKILL.md +0 -0
- /package/dist/skills/{agnostic/research → phases}/review-phase/SKILL.md +0 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Fumadocs Routing
|
|
2
|
+
|
|
3
|
+
Use this reference when `docs-ingest-phase` updates routed wiki or project docs.
|
|
4
|
+
|
|
5
|
+
## Canonical Routed Content
|
|
6
|
+
|
|
7
|
+
`apps/wiki` owns the wiki application and its documentation content. The default scaffolded routed docs surface is:
|
|
8
|
+
|
|
9
|
+
- `<wiki-root>/content/docs/project`
|
|
10
|
+
|
|
11
|
+
Product/domain routes are repository-owned. Add them only when that project deliberately defines them.
|
|
12
|
+
|
|
13
|
+
Do not create or maintain a separate canonical `domains/` tree for concepts and flows. That split creates drift because one article then has two homes.
|
|
14
|
+
|
|
15
|
+
`<wiki-root>/specs`, `<wiki-root>/raw`, `<wiki-root>/index.md`, and `<wiki-root>/log.md` may remain source/input/bookkeeping surfaces. They are not duplicate article trees.
|
|
16
|
+
|
|
17
|
+
## Route Boundaries
|
|
18
|
+
|
|
19
|
+
Use `/docs/project` for internal project operations:
|
|
20
|
+
|
|
21
|
+
- specs
|
|
22
|
+
- plans
|
|
23
|
+
- implementation notes
|
|
24
|
+
- maintenance logs
|
|
25
|
+
- decisions
|
|
26
|
+
- repo guidance
|
|
27
|
+
- operator/project runbooks
|
|
28
|
+
- useful Linear/grill-derived management context
|
|
29
|
+
|
|
30
|
+
Keep implementation specs and notes linked or summarized. Do not paste large source artifacts into routed pages.
|
|
31
|
+
|
|
32
|
+
## Fumadocs Mechanics
|
|
33
|
+
|
|
34
|
+
Fumadocs uses file paths to determine route slugs. Examples:
|
|
35
|
+
|
|
36
|
+
- `content/docs/project/index.mdx` -> `/docs/project`
|
|
37
|
+
- `content/docs/project/specs/index.mdx` -> `/docs/project/specs`
|
|
38
|
+
|
|
39
|
+
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.
|
|
40
|
+
|
|
41
|
+
Use the project folder as the default scaffolded surface:
|
|
42
|
+
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"title": "Project"
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Default scaffold output should keep project internals exploded without adding a redundant Project parent section. Product/domain routes are added later only when a repository explicitly defines them.
|
|
50
|
+
|
|
51
|
+
## Routed Page Frontmatter
|
|
52
|
+
|
|
53
|
+
Preserve access-control frontmatter on routed pages:
|
|
54
|
+
|
|
55
|
+
```yaml
|
|
56
|
+
surface: wiki
|
|
57
|
+
permission: internal
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
```yaml
|
|
61
|
+
surface: project
|
|
62
|
+
permission: project
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Routed ingest pages should also carry durable metadata when useful:
|
|
66
|
+
|
|
67
|
+
```yaml
|
|
68
|
+
domain: <domain>
|
|
69
|
+
type: concept | flow
|
|
70
|
+
status: proposed | implemented
|
|
71
|
+
source:
|
|
72
|
+
- apps/wiki/specs/<domain>/<spec>/SPEC.md
|
|
73
|
+
updated: YYYY-MM-DD
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
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.
|
|
@@ -17,7 +17,7 @@ Resolve to a full spec folder before continuing. If ambiguous, ask only for the
|
|
|
17
17
|
1. Read `SPEC.md`. Stop if missing.
|
|
18
18
|
2. Check `SPEC.md` frontmatter for `ingested: true`; if set, exit with a clear no-op.
|
|
19
19
|
3. Verify `domain:` exists in frontmatter.
|
|
20
|
-
4. Verify `<wiki-root>/
|
|
20
|
+
4. Verify the routed domain root exists under `<wiki-root>/content/docs/<domain>/` with an `index.mdx` file and `meta.json`. If missing, stop and scaffold the routed domain structure first.
|
|
21
21
|
|
|
22
22
|
## Source Read
|
|
23
23
|
|
|
@@ -108,7 +108,7 @@ ingested: true
|
|
|
108
108
|
last_ingested: YYYY-MM-DD
|
|
109
109
|
```
|
|
110
110
|
|
|
111
|
-
Also populate its `links` array with the SPEC link plus every flow and concept page written in this ingest.
|
|
111
|
+
Also populate its `links` array with the SPEC link plus every routed flow and concept page written in this ingest.
|
|
112
112
|
|
|
113
113
|
Append to `<wiki-root>/log.md` and cap the log at 50 entries:
|
|
114
114
|
|
|
@@ -120,12 +120,12 @@ Append to `<wiki-root>/log.md` and cap the log at 50 entries:
|
|
|
120
120
|
- Concepts written: <count>
|
|
121
121
|
```
|
|
122
122
|
|
|
123
|
-
If new pages were created, update Concepts and Flows counts in `<wiki-root>/index.md
|
|
123
|
+
If new pages were created, update Concepts and Flows counts in `<wiki-root>/index.md` when that index tracks counts.
|
|
124
124
|
|
|
125
125
|
## Resumability
|
|
126
126
|
|
|
127
127
|
Output pages are checkpoints:
|
|
128
128
|
|
|
129
|
-
- existing flow pages with
|
|
129
|
+
- existing routed flow pages with matching source metadata can be skipped
|
|
130
130
|
- missing expected flow pages should be rewritten before concepts
|
|
131
|
-
- existing concept pages with
|
|
131
|
+
- existing routed concept pages with matching source metadata can be skipped
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: resolve-debt-phase
|
|
3
|
-
description: Resolves one candidate or accepted tech debt item through validation, resolution spec creation, delivery, and closeout. Use when the user asks to resolve a tech debt entry, process a debt candidate, or continue from a canonical `docs/
|
|
3
|
+
description: Resolves one candidate or accepted tech debt item through validation, resolution spec creation, delivery, and closeout. Use when the user asks to resolve a tech debt entry, process a debt candidate, or continue from a canonical routed `apps/wiki/content/docs/project/tech-debt/<domain>/<spec>/<debt-slug>.md` artifact.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Resolve Debt Phase
|
|
@@ -9,14 +9,14 @@ description: Resolves one candidate or accepted tech debt item through validatio
|
|
|
9
9
|
|
|
10
10
|
- **Role:** public lifecycle entrypoint for one tech debt phase item
|
|
11
11
|
- **Scope:** one candidate or accepted debt item, never generic debt management
|
|
12
|
-
- **Canonical input:** `docs/
|
|
12
|
+
- **Canonical input:** `apps/wiki/content/docs/project/tech-debt/<domain>/<spec>/<debt-slug>.md`
|
|
13
13
|
- **Source of truth:** debt file; backlog mirrors are secondary and may be stale
|
|
14
14
|
- **Delegates to:** `$parallel-research` for independent readonly checks; `$create-spec` or equivalent spec workflow for accepted debt; `$delivery-phase` for implementation
|
|
15
15
|
- **Stop conditions:** draft decision requested, accepted item handed to delivery, resolved item no-oped, or completed item marked resolved with links
|
|
16
16
|
|
|
17
17
|
## Use When
|
|
18
18
|
|
|
19
|
-
- The user provides or points to one tech debt artifact under `docs/
|
|
19
|
+
- The user provides or points to one tech debt artifact under `apps/wiki/content/docs/project/tech-debt/`.
|
|
20
20
|
- The user asks to validate, accept, delete, or resolve one debt candidate.
|
|
21
21
|
- The user asks to continue an accepted tech debt item into implementation.
|
|
22
22
|
|
|
@@ -28,7 +28,7 @@ description: Resolves one candidate or accepted tech debt item through validatio
|
|
|
28
28
|
|
|
29
29
|
## Workflow
|
|
30
30
|
|
|
31
|
-
1. Locate the debt file at `docs/
|
|
31
|
+
1. Locate the debt file at `apps/wiki/content/docs/project/tech-debt/<domain>/<spec>/<debt-slug>.md`; stop if multiple items are implied.
|
|
32
32
|
2. Read the debt file first and extract status, domain, originating spec, linked backlog mirror, evidence, and proposed resolution.
|
|
33
33
|
3. Treat the debt file as canonical. Use backlog mirrors only to sync status or discover context.
|
|
34
34
|
4. Branch by status: `draft`, `accepted`, or `resolved`. If missing or ambiguous, inspect context and ask before changing state.
|
package/package.json
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@punks/cli",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
|
+
"description": "Harness Intelligence scaffolding CLI",
|
|
5
5
|
"bin": {
|
|
6
6
|
"devpunks": "dist/index.js",
|
|
7
7
|
"dp": "dist/index.js",
|
|
8
8
|
"punks": "dist/index.js"
|
|
9
9
|
},
|
|
10
|
-
"type": "module"
|
|
10
|
+
"type": "module",
|
|
11
|
+
"homepage": "https://github.com/wearedevpunks/harness-intelligence/tree/main/apps/cli#readme",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/wearedevpunks/harness-intelligence.git",
|
|
15
|
+
"directory": "apps/cli"
|
|
16
|
+
},
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/wearedevpunks/harness-intelligence/issues"
|
|
19
|
+
}
|
|
11
20
|
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
# Concept Pages
|
|
2
|
-
|
|
3
|
-
Use this reference during Step 6 of `docs-ingest-phase`.
|
|
4
|
-
|
|
5
|
-
## Input expansion
|
|
6
|
-
|
|
7
|
-
For each extracted concept:
|
|
8
|
-
|
|
9
|
-
1. Read existing flow pages under `<wiki-root>/domains/<domain>/flows/` for cross-linking.
|
|
10
|
-
2. Scan `<wiki-root>/raw/` recursively and collect files where frontmatter `ingested: false` or `ingested` is absent.
|
|
11
|
-
3. Use relevant raw content only as supplementary material. Do not mark raw files as ingested here.
|
|
12
|
-
|
|
13
|
-
## Output contract
|
|
14
|
-
|
|
15
|
-
4. Synthesize concept content in this precedence order:
|
|
16
|
-
- `IMPLEMENTATION-NOTES.md` deviations, surprises, and judgment calls
|
|
17
|
-
- `SPEC.md` acceptance criteria, data model, and technical notes
|
|
18
|
-
- relevant sections from flow pages
|
|
19
|
-
- relevant raw file content
|
|
20
|
-
5. Determine status:
|
|
21
|
-
- `proposed` when only `SPEC.md` is present
|
|
22
|
-
- `implemented` when `IMPLEMENTATION-NOTES.md` is present
|
|
23
|
-
6. Derive the output path:
|
|
24
|
-
- slugify the concept name to kebab-case
|
|
25
|
-
- write to `<wiki-root>/domains/<domain>/concepts/<concept-name>.md`
|
|
26
|
-
7. Write or merge the concept page:
|
|
27
|
-
- preserve established facts
|
|
28
|
-
- append new information under `## [Source: <origin>]`
|
|
29
|
-
- flag contradictions inline: `> [!warning] CONTRADICTS [[source]]`
|
|
30
|
-
8. Every concept page must include:
|
|
31
|
-
- frontmatter:
|
|
32
|
-
```yaml
|
|
33
|
-
---
|
|
34
|
-
domain: <domain>
|
|
35
|
-
type: concept
|
|
36
|
-
status: proposed | implemented
|
|
37
|
-
ingested: true
|
|
38
|
-
last_ingested: YYYY-MM-DD
|
|
39
|
-
links: []
|
|
40
|
-
created: YYYY-MM-DD
|
|
41
|
-
updated: YYYY-MM-DD
|
|
42
|
-
---
|
|
43
|
-
```
|
|
44
|
-
- `Definition`
|
|
45
|
-
- `Attributes` table
|
|
46
|
-
- `Related flows`
|
|
47
|
-
- `## [Source: <origin>]`
|
|
48
|
-
9. Update `<wiki-root>/domains/<domain>/<domain>.md` to link the concept page if not already present
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# Flow Pages
|
|
2
|
-
|
|
3
|
-
Use this reference during Step 4 of `docs-ingest-phase`.
|
|
4
|
-
|
|
5
|
-
## Output contract
|
|
6
|
-
|
|
7
|
-
For each extracted flow:
|
|
8
|
-
|
|
9
|
-
1. Derive the output path:
|
|
10
|
-
- slugify `flow_name` to kebab-case
|
|
11
|
-
- write to `<wiki-root>/domains/<domain>/flows/<flow-name>.md`
|
|
12
|
-
2. Determine status:
|
|
13
|
-
- `proposed` when only `SPEC.md` is present
|
|
14
|
-
- `implemented` when `IMPLEMENTATION-NOTES.md` is present
|
|
15
|
-
3. Reconcile implementation notes when present:
|
|
16
|
-
- use `SPEC.md` acceptance criteria as the skeleton
|
|
17
|
-
- override or annotate steps where `IMPLEMENTATION-NOTES.md` records a deviation, surprise, or judgment call
|
|
18
|
-
- mark blocked or unmet steps: `⚠ blocked — <reason>`
|
|
19
|
-
4. Write or merge the flow page:
|
|
20
|
-
- preserve established facts
|
|
21
|
-
- append new information under `## [Source: <origin>]`
|
|
22
|
-
- flag contradictions inline: `> [!warning] CONTRADICTS [[source]]`
|
|
23
|
-
5. Every flow page must include:
|
|
24
|
-
- frontmatter:
|
|
25
|
-
```yaml
|
|
26
|
-
---
|
|
27
|
-
domain: <domain>
|
|
28
|
-
type: flow
|
|
29
|
-
status: proposed | implemented
|
|
30
|
-
ingested: true
|
|
31
|
-
last_ingested: YYYY-MM-DD
|
|
32
|
-
links:
|
|
33
|
-
- "[[specs/<domain>/<spec>/SPEC]]"
|
|
34
|
-
- "[[specs/<domain>/<spec>/IMPLEMENTATION-NOTES]]" # only when notes exist
|
|
35
|
-
created: YYYY-MM-DD
|
|
36
|
-
updated: YYYY-MM-DD
|
|
37
|
-
---
|
|
38
|
-
```
|
|
39
|
-
- a Mermaid diagram
|
|
40
|
-
- a numbered step list aligned to the diagram nodes
|
|
41
|
-
6. Update `<wiki-root>/domains/<domain>/<domain>.md` to link the flow page if not already present
|
|
@@ -1,88 +0,0 @@
|
|
|
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.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|