@punks/cli 2.0.1 → 2.1.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/README.md +7 -7
- package/dist/index.js +64 -36
- package/dist/skills/agnostic/cli/dp-cli/SKILL.md +18 -2
- package/dist/skills/agnostic/cli/dp-cli/references/commands.md +8 -6
- package/dist/skills/agnostic/cli/dp-cli/references/post-command-flow.md +7 -0
- 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 +21 -5
- package/dist/skills/phases/bug-discovery-phase/SKILL.md +3 -1
- package/dist/skills/phases/bug-resolution-phase/REFERENCE.md +11 -5
- package/dist/skills/phases/bug-resolution-phase/SKILL.md +3 -1
- package/dist/skills/phases/docs-ingest-phase/SKILL.md +2 -1
- package/dist/skills/phases/docs-ingest-phase/references/concept-pages.md +2 -2
- package/dist/skills/phases/docs-ingest-phase/references/flow-pages.md +1 -1
- package/dist/skills/phases/docs-ingest-phase/references/fumadocs-routing.md +22 -7
- package/dist/skills/phases/docs-ingest-phase/references/wiki-ingest.md +1 -1
- package/dist/skills/phases/goalify/EXAMPLES.md +6 -0
- package/dist/skills/phases/goalify/SKILL.md +22 -1
- package/dist/skills/phases/resolve-debt-phase/SKILL.md +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,33 +11,33 @@ At runtime, scaffold content resolves from the latest stable GitHub release base
|
|
|
11
11
|
- `punks scaffold`
|
|
12
12
|
show the scaffold lifecycle index
|
|
13
13
|
- `punks scaffold init`
|
|
14
|
-
scaffold
|
|
15
|
-
- `punks scaffold backlog`
|
|
16
|
-
print the backlog-stage operator prompt; no backlog-stage packs are scaffolded today
|
|
14
|
+
scaffold requirements/backlog skills and seed the initial wiki tree
|
|
17
15
|
- `punks scaffold setup`
|
|
18
16
|
detect the target repo, confirm pack selection, and write repo-aware scaffold output
|
|
17
|
+
- `punks report`
|
|
18
|
+
submit structured Harness friction for maintainer triage
|
|
19
19
|
|
|
20
20
|
## Usage
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
23
|
punks scaffold
|
|
24
24
|
punks scaffold init
|
|
25
|
-
punks scaffold backlog
|
|
26
25
|
punks scaffold setup
|
|
27
26
|
punks scaffold setup -i /path/to/repo
|
|
28
27
|
punks scaffold setup -i /path/to/repo -o /path/to/output
|
|
28
|
+
punks report --help
|
|
29
29
|
bun run sync:skills
|
|
30
30
|
bun run baseline:build
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
`bun run sync:skills` updates a local cache clone of `wearedevpunks/skills` and then replaces only `skills/`, overwriting any local changes there.
|
|
34
34
|
|
|
35
|
-
`punks scaffold init` copies `.agents/skills/grill-
|
|
36
|
-
|
|
37
|
-
`punks scaffold backlog` does not currently copy any stage-specific packs. It prints the fixed operator prompt for the backlog gate so the lifecycle stays explicit.
|
|
35
|
+
`punks scaffold init` copies `.agents/skills/requirements-grill` and `.agents/skills/write-backlog`, seeds an initial wiki tree at `apps/wiki` for monorepos or `wiki` for single-repo layouts, and then prints the fixed operator prompt for the requirements gate. Agents should activate `$dp-cli` and reconcile that wiki root with the real repo layout before writing durable docs.
|
|
38
36
|
|
|
39
37
|
`punks scaffold setup` scans the target repo from `cwd` or `-i`, resolves the active scaffold baseline, writes scaffold output into the scan root or `-o`, copies the selected baseline skills, resolves pack-owned lint assets into `.devpunks/specs/lint/`, and ensures required global tool prerequisites for those skills.
|
|
40
38
|
|
|
39
|
+
`punks report` submits reusable Harness docs, workflow, tooling, or bug friction when the control plane and auth are configured.
|
|
40
|
+
|
|
41
41
|
Use `--baseline bundled` to force the npm-shipped baseline, or `--refresh-baseline` to refetch the stable remote baseline.
|
|
42
42
|
|
|
43
43
|
Language packs are detected separately from framework packs. TypeScript is selected when scanned manifests depend on `typescript` or when nested source files include `.ts` / `.tsx`; Python is selected from nested `.py` files. Root-level config files and vendor, virtualenv, generated, scaffold, docs, examples, `scripts`, `opensrc`, cache, and build output directories are ignored.
|
package/dist/index.js
CHANGED
|
@@ -52252,6 +52252,34 @@ class OperatorIdentity extends exports_Schema.Class("OperatorIdentity")({
|
|
|
52252
52252
|
emailVerified: exports_Schema.optional(exports_Schema.Boolean)
|
|
52253
52253
|
}) {
|
|
52254
52254
|
}
|
|
52255
|
+
var BackofficeAccessRole = exports_Schema.Literal("admin", "member");
|
|
52256
|
+
var BackofficeAccessStatus = exports_Schema.Literal("invited", "active", "revoked");
|
|
52257
|
+
|
|
52258
|
+
class BackofficeAccessSummary extends exports_Schema.Class("BackofficeAccessSummary")({
|
|
52259
|
+
email: exports_Schema.String,
|
|
52260
|
+
role: BackofficeAccessRole,
|
|
52261
|
+
status: BackofficeAccessStatus,
|
|
52262
|
+
userId: exports_Schema.optional(exports_Schema.String),
|
|
52263
|
+
invitedBy: exports_Schema.optional(exports_Schema.String),
|
|
52264
|
+
revokedBy: exports_Schema.optional(exports_Schema.String),
|
|
52265
|
+
invitedAt: exports_Schema.optional(exports_Schema.String),
|
|
52266
|
+
activatedAt: exports_Schema.optional(exports_Schema.String),
|
|
52267
|
+
revokedAt: exports_Schema.optional(exports_Schema.String),
|
|
52268
|
+
createdAt: exports_Schema.String,
|
|
52269
|
+
updatedAt: exports_Schema.String
|
|
52270
|
+
}) {
|
|
52271
|
+
}
|
|
52272
|
+
|
|
52273
|
+
class BackofficeAccessList extends exports_Schema.Class("BackofficeAccessList")({
|
|
52274
|
+
users: exports_Schema.Array(BackofficeAccessSummary)
|
|
52275
|
+
}) {
|
|
52276
|
+
}
|
|
52277
|
+
|
|
52278
|
+
class BackofficeAccessInviteRequest extends exports_Schema.Class("BackofficeAccessInviteRequest")({
|
|
52279
|
+
email: exports_Schema.String,
|
|
52280
|
+
role: BackofficeAccessRole
|
|
52281
|
+
}) {
|
|
52282
|
+
}
|
|
52255
52283
|
var ProductTelemetryEventName = exports_Schema.Literal("cli.auth.login.completed", "cli.artifact.pull.completed", "cli.scaffold.setup.completed", "cli.scaffold.update.applied", "cli.harness.report.submitted");
|
|
52256
52284
|
var TelemetrySource = exports_Schema.Literal("normal", "local-dev", "ci", "debug", "test");
|
|
52257
52285
|
var isoDateTimePattern = /^(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})T(?<hour>\d{2}):(?<minute>\d{2}):(?<second>\d{2})(?:\.(?<fraction>\d{1,9}))?(?:Z|[+-]\d{2}:\d{2})$/u;
|
|
@@ -52459,7 +52487,7 @@ class TelemetryApi extends exports_HttpApiGroup.make("telemetry").add(exports_Ht
|
|
|
52459
52487
|
class ReportsApi extends exports_HttpApiGroup.make("reports").add(exports_HttpApiEndpoint.post("submit")`/`.setPayload(HarnessReportInput).addSuccess(HarnessReportCreated).addError(HarnessReportRejected).addError(HarnessReportPersistenceUnavailable)).middleware(CliBearerAuth).prefix("/reports").annotateContext(exports_OpenApi.annotations({ title: "Harness reports" })) {
|
|
52460
52488
|
}
|
|
52461
52489
|
|
|
52462
|
-
class BackofficeApi extends exports_HttpApiGroup.make("backoffice").add(exports_HttpApiEndpoint.get("projectUsageList")`/project-usages`.addSuccess(ProjectUsageList).addError(BackofficePersistenceUnavailable)).add(exports_HttpApiEndpoint.get("projectUsageDetail")`/project-usages/${exports_HttpApiSchema.param("projectUsageId", exports_Schema.String)}`.addSuccess(ProjectUsageDetail).addError(BackofficeRequestRejected).addError(BackofficePersistenceUnavailable)).add(exports_HttpApiEndpoint.post("mapRepository")`/project-usages/${exports_HttpApiSchema.param("projectUsageId", exports_Schema.String)}/repositories`.setPayload(BackofficeRepositoryMappingRequest).addSuccess(ObservedRepositorySummary).addError(BackofficeRequestRejected).addError(BackofficePersistenceUnavailable)).add(exports_HttpApiEndpoint.patch("updateReport")`/reports/${exports_HttpApiSchema.param("reportId", exports_Schema.String)}`.setPayload(BackofficeReportUpdateRequest).addSuccess(HarnessReportSummary).addError(BackofficeRequestRejected).addError(BackofficePersistenceUnavailable)).middleware(CliBearerAuth).prefix("/backoffice").annotateContext(exports_OpenApi.annotations({ title: "Backoffice project usage" })) {
|
|
52490
|
+
class BackofficeApi extends exports_HttpApiGroup.make("backoffice").add(exports_HttpApiEndpoint.get("currentAccess")`/access/current`.addSuccess(BackofficeAccessSummary).addError(BackofficeRequestRejected).addError(BackofficePersistenceUnavailable)).add(exports_HttpApiEndpoint.get("accessList")`/access-users`.addSuccess(BackofficeAccessList).addError(BackofficePersistenceUnavailable)).add(exports_HttpApiEndpoint.post("inviteAccess")`/access-users`.setPayload(BackofficeAccessInviteRequest).addSuccess(BackofficeAccessSummary).addError(BackofficeRequestRejected).addError(BackofficePersistenceUnavailable)).add(exports_HttpApiEndpoint.post("revokeAccess")`/access-users/${exports_HttpApiSchema.param("email", exports_Schema.String)}/revoke`.addSuccess(BackofficeAccessSummary).addError(BackofficeRequestRejected).addError(BackofficePersistenceUnavailable)).add(exports_HttpApiEndpoint.get("projectUsageList")`/project-usages`.addSuccess(ProjectUsageList).addError(BackofficePersistenceUnavailable)).add(exports_HttpApiEndpoint.get("projectUsageDetail")`/project-usages/${exports_HttpApiSchema.param("projectUsageId", exports_Schema.String)}`.addSuccess(ProjectUsageDetail).addError(BackofficeRequestRejected).addError(BackofficePersistenceUnavailable)).add(exports_HttpApiEndpoint.post("mapRepository")`/project-usages/${exports_HttpApiSchema.param("projectUsageId", exports_Schema.String)}/repositories`.setPayload(BackofficeRepositoryMappingRequest).addSuccess(ObservedRepositorySummary).addError(BackofficeRequestRejected).addError(BackofficePersistenceUnavailable)).add(exports_HttpApiEndpoint.patch("updateReport")`/reports/${exports_HttpApiSchema.param("reportId", exports_Schema.String)}`.setPayload(BackofficeReportUpdateRequest).addSuccess(HarnessReportSummary).addError(BackofficeRequestRejected).addError(BackofficePersistenceUnavailable)).middleware(CliBearerAuth).prefix("/backoffice").annotateContext(exports_OpenApi.annotations({ title: "Backoffice project usage" })) {
|
|
52463
52491
|
}
|
|
52464
52492
|
|
|
52465
52493
|
class HarnessApi extends exports_HttpApi.make("harness").add(HealthApi).add(BaselineApi).add(TelemetryApi).add(ReportsApi).add(BackofficeApi).addError(Forbidden2).prefix("/api").annotateContext(exports_OpenApi.annotations({
|
|
@@ -52503,7 +52531,7 @@ var submitHarnessReport = (options9) => exports_Effect.gen(function* () {
|
|
|
52503
52531
|
|
|
52504
52532
|
// package.json
|
|
52505
52533
|
var name = "@punks/cli";
|
|
52506
|
-
var version = "2.0
|
|
52534
|
+
var version = "2.1.0";
|
|
52507
52535
|
// src/telemetry/product.ts
|
|
52508
52536
|
var git = (cwd, args2) => {
|
|
52509
52537
|
try {
|
|
@@ -52762,21 +52790,25 @@ var renderCommandGuide = () => [
|
|
|
52762
52790
|
"commands:",
|
|
52763
52791
|
" \u203A punks auth",
|
|
52764
52792
|
" \u2514 manage CLI credentials for authenticated internal baseline access",
|
|
52793
|
+
" \u203A punks report",
|
|
52794
|
+
" \u2514 submit structured Harness friction for maintainer triage",
|
|
52765
52795
|
" \u203A punks scaffold",
|
|
52766
|
-
" \u2514 show the scaffold lifecycle index and available setup
|
|
52796
|
+
" \u2514 show the scaffold lifecycle index and available setup commands",
|
|
52767
52797
|
" \u203A punks update",
|
|
52768
52798
|
" \u2514 refresh managed scaffold assets from `.devpunks/scaffold-manifest.json`",
|
|
52769
52799
|
"",
|
|
52770
52800
|
"usage:",
|
|
52801
|
+
" \u2022 agents should activate `$dp-cli` before acting on `.devpunks` output",
|
|
52771
52802
|
" \u2022 start with `punks scaffold` to inspect the lifecycle",
|
|
52772
52803
|
" \u2022 use `punks scaffold init` for requirements grilling, backlog authoring, and wiki schema seeding",
|
|
52773
|
-
" \u2022
|
|
52774
|
-
" \u2022 use `punks scaffold setup` after repo boilerplate is ready",
|
|
52804
|
+
" \u2022 reconcile the seeded wiki into the real repo layout before writing durable docs",
|
|
52805
|
+
" \u2022 use `punks scaffold setup` for repo-aware pack detection after repo boilerplate is ready",
|
|
52775
52806
|
" \u2022 use `punks update` after setup to pull newer scaffolded skills/prompts/manifests/hooks",
|
|
52807
|
+
" \u2022 use `punks report` when reusable Harness friction should enter the support loop",
|
|
52776
52808
|
" \u2022 use `punks auth login` before pulling authenticated internal baselines",
|
|
52777
52809
|
"",
|
|
52778
52810
|
"operator notes:",
|
|
52779
|
-
" \u2022
|
|
52811
|
+
" \u2022 init copies only requirements/backlog skills and the initial wiki structure",
|
|
52780
52812
|
" \u2022 `setup` remains the repo-aware pack-driven scaffold flow",
|
|
52781
52813
|
" \u2022 each command prints an operator-facing next-step prompt"
|
|
52782
52814
|
].join(`
|
|
@@ -52796,9 +52828,11 @@ var renderStageIntro = ({
|
|
|
52796
52828
|
body,
|
|
52797
52829
|
"",
|
|
52798
52830
|
"usage:",
|
|
52799
|
-
|
|
52831
|
+
" \u2022 agents should activate `$dp-cli` before following generated output",
|
|
52832
|
+
" \u2022 use this to scaffold requirements grill/backlog skills and seed the initial wiki tree",
|
|
52833
|
+
" \u2022 reconcile the wiki into the real repo layout, such as `apps/wiki` in a monorepo",
|
|
52800
52834
|
" \u2022 rerunning this command overwrites only the files for this stage",
|
|
52801
|
-
" \u2022 read the generated prompt/output and follow it before
|
|
52835
|
+
" \u2022 read the generated prompt/output and follow it before running repo-aware setup"
|
|
52802
52836
|
].join(`
|
|
52803
52837
|
`)
|
|
52804
52838
|
});
|
|
@@ -52809,8 +52843,10 @@ var renderSetupIntro = () => renderCommandIntro({
|
|
|
52809
52843
|
"Detect repo stack, resolve scaffold packs, and prepare prompt/manifest output.",
|
|
52810
52844
|
"",
|
|
52811
52845
|
"usage:",
|
|
52846
|
+
" \u2022 agents should activate `$dp-cli` before following `.devpunks` handoff artifacts",
|
|
52812
52847
|
" \u2022 run this from the outer repo root so docs/wiki and nested app/package workspaces stay in one scan",
|
|
52813
52848
|
" \u2022 review detected manifests, technologies, and packs before confirming",
|
|
52849
|
+
" \u2022 reconcile generic scaffold output with the real repo layout before committing final guidance",
|
|
52814
52850
|
" \u2022 if detection looks incomplete or suspicious, answer `n` and edit the pack selection before accepting",
|
|
52815
52851
|
" \u2022 after scaffold completes, use the generated next-agent prompt instead of relying on the terminal summary alone"
|
|
52816
52852
|
].join(`
|
|
@@ -52828,15 +52864,15 @@ var renderScaffoldGuide = () => [
|
|
|
52828
52864
|
"commands:",
|
|
52829
52865
|
" \u203A punks scaffold init",
|
|
52830
52866
|
" \u2514 requirements gate: scaffold `requirements-grill`, `write-backlog`, and seed the wiki tree",
|
|
52831
|
-
" \u203A punks scaffold backlog",
|
|
52832
|
-
" \u2514 backlog gate: no scaffolded packs right now; print the operator handoff",
|
|
52833
52867
|
" \u203A punks scaffold setup",
|
|
52834
52868
|
" \u2514 repo-aware setup: detect packs, scaffold prompts/manifests/hooks",
|
|
52835
52869
|
"",
|
|
52836
52870
|
"operator notes:",
|
|
52837
|
-
" \u2022
|
|
52871
|
+
" \u2022 agents should activate `$dp-cli` before acting on generated scaffold output",
|
|
52872
|
+
" \u2022 `init` overwrites only its scaffolded skill files on rerun",
|
|
52873
|
+
" \u2022 `init` seeds a wiki root that agents must reconcile with the real repo layout",
|
|
52838
52874
|
" \u2022 `setup` is the first repo-aware command in the lifecycle",
|
|
52839
|
-
" \u2022
|
|
52875
|
+
" \u2022 setup output must be followed from `.devpunks`, not summarized from terminal text alone"
|
|
52840
52876
|
].join(`
|
|
52841
52877
|
`)
|
|
52842
52878
|
})
|
|
@@ -53034,7 +53070,7 @@ var reportCommand = exports_Command.make("report", {
|
|
|
53034
53070
|
`)));
|
|
53035
53071
|
},
|
|
53036
53072
|
catch: (cause3) => cause3 instanceof Error ? cause3 : new Error("Harness report submission failed.")
|
|
53037
|
-
})).pipe(exports_Command.withDescription("Submit structured Harness
|
|
53073
|
+
})).pipe(exports_Command.withDescription("Submit structured Harness friction for maintainer triage. Agents: use after $dp-cli evidence gathering."));
|
|
53038
53074
|
|
|
53039
53075
|
// src/cli/scaffold-command.ts
|
|
53040
53076
|
import path13 from "path";
|
|
@@ -57647,31 +57683,24 @@ Required skills:
|
|
|
57647
57683
|
- \`write-backlog\`
|
|
57648
57684
|
|
|
57649
57685
|
Scaffolded wiki base:
|
|
57650
|
-
- treat \`${wikiRoot
|
|
57686
|
+
- treat \`${wikiRoot}\` as the dedicated wiki root for specs, raw inputs, routed wiki/project docs, and ingest bookkeeping
|
|
57651
57687
|
- this is not the same thing as \`docs/\`
|
|
57652
|
-
- if the repo is monorepo-shaped, the wiki
|
|
57653
|
-
-
|
|
57688
|
+
- if the repo is monorepo-shaped, reconcile the scaffolded wiki into the real app layout, usually \`apps/wiki\`
|
|
57689
|
+
- if the CLI guessed the wrong root, move or refactor the scaffolded wiki before creating specs, plans, or ingesting domain knowledge
|
|
57690
|
+
- keep using the reconciled wiki root when later steps create specs, plans, or ingest domain knowledge
|
|
57654
57691
|
|
|
57655
57692
|
Execution order:
|
|
57656
57693
|
1. Start with \`requirements-grill\` and run the requirements grill session.
|
|
57657
57694
|
2. Follow the skill's artifact and wiki-synthesis guidance.
|
|
57658
57695
|
3. Run \`write-backlog\` only after the grill gate is closed.
|
|
57659
|
-
4. Use \`punks scaffold
|
|
57696
|
+
4. Use \`punks scaffold setup\` only after the repo shape is ready for repo-aware AI setup.
|
|
57660
57697
|
|
|
57661
57698
|
Gate:
|
|
57662
57699
|
- do not create backlog items while active requirement branches remain unresolved
|
|
57663
57700
|
- treat this as the canonical step before backlog creation
|
|
57664
57701
|
|
|
57665
57702
|
When this gate is complete, the next CLI step is:
|
|
57666
|
-
- \`punks scaffold
|
|
57667
|
-
},
|
|
57668
|
-
{
|
|
57669
|
-
id: "backlog",
|
|
57670
|
-
summary: "Backlog scaffolding is currently unavailable.",
|
|
57671
|
-
skills: [],
|
|
57672
|
-
renderPrompt: () => `You are the operator agent continuing a \`punks scaffold backlog\` run.
|
|
57673
|
-
|
|
57674
|
-
No scaffolded backlog packs are currently available.`
|
|
57703
|
+
- \`punks scaffold setup\``
|
|
57675
57704
|
}
|
|
57676
57705
|
];
|
|
57677
57706
|
var stageScaffoldById = Object.fromEntries(stageScaffoldCatalog.map((stage) => [stage.id, stage]));
|
|
@@ -57788,23 +57817,23 @@ var runStageScaffold = ({
|
|
|
57788
57817
|
baseline = bundledBaseline
|
|
57789
57818
|
}) => exports_Effect.gen(function* () {
|
|
57790
57819
|
const stage = stageScaffoldById[commandId];
|
|
57791
|
-
const detection =
|
|
57792
|
-
const wikiRoot =
|
|
57820
|
+
const detection = yield* detectRepository(outputDirectory).pipe(exports_Effect.catchAll(() => exports_Effect.succeed(null)));
|
|
57821
|
+
const wikiRoot = detection?.monorepo === true ? "apps/wiki" : "wiki";
|
|
57793
57822
|
const skillFiles = stage.skills.map((skillId) => copySkillDirectory({
|
|
57794
57823
|
outputDirectory,
|
|
57795
57824
|
skillId,
|
|
57796
57825
|
baseline
|
|
57797
57826
|
}));
|
|
57798
|
-
const wikiFiles =
|
|
57827
|
+
const wikiFiles = scaffoldWiki({
|
|
57799
57828
|
outputDirectory,
|
|
57800
57829
|
wikiRoot
|
|
57801
|
-
})
|
|
57830
|
+
});
|
|
57802
57831
|
const operatorPrompt = stage.renderPrompt({ wikiRoot });
|
|
57803
57832
|
yield* prompt4.writeLine(renderScaffoldTitle());
|
|
57804
57833
|
yield* prompt4.writeLine("");
|
|
57805
57834
|
yield* prompt4.writeLine(renderStageIntro({
|
|
57806
57835
|
commandId,
|
|
57807
|
-
title:
|
|
57836
|
+
title: "Requirements",
|
|
57808
57837
|
body: stage.summary
|
|
57809
57838
|
}));
|
|
57810
57839
|
yield* prompt4.writeLine("");
|
|
@@ -57878,10 +57907,9 @@ var setupCommand = exports_Command.make("setup", {
|
|
|
57878
57907
|
}) : exports_Effect.fail(new CliPromptError({
|
|
57879
57908
|
cause: error4.cause,
|
|
57880
57909
|
message: error4.message
|
|
57881
|
-
})))))).pipe(exports_Command.withDescription("
|
|
57882
|
-
var scaffoldCommand = exports_Command.make("scaffold", {}, () => exports_Effect.sync(() => console.log(renderScaffoldGuide()))).pipe(exports_Command.withDescription("Scaffold
|
|
57883
|
-
stageCommand("init", "
|
|
57884
|
-
stageCommand("backlog", "Print the backlog-stage operator prompt even though no backlog-stage packs are currently scaffolded."),
|
|
57910
|
+
})))))).pipe(exports_Command.withDescription("Repo-aware AI setup. Agents: activate $dp-cli, then reconcile .devpunks output with the real repo layout."));
|
|
57911
|
+
var scaffoldCommand = exports_Command.make("scaffold", {}, () => exports_Effect.sync(() => console.log(renderScaffoldGuide()))).pipe(exports_Command.withDescription("Scaffold init or setup. Agents: activate $dp-cli before following generated handoffs."), exports_Command.withSubcommands([
|
|
57912
|
+
stageCommand("init", "Seed requirements/backlog skills and wiki structure. Agents: activate $dp-cli and reconcile wiki layout."),
|
|
57885
57913
|
setupCommand
|
|
57886
57914
|
]));
|
|
57887
57915
|
|
|
@@ -59454,7 +59482,7 @@ var startupCheckCliEnv = "DP_STARTUP_CHECK_CLI";
|
|
|
59454
59482
|
var startupCheckSkillEnv = "DP_STARTUP_CHECK_SKILL";
|
|
59455
59483
|
var startupCheckIntervalMs = Number.parseInt(process.env.DP_STARTUP_CHECK_INTERVAL_MS ?? String(12 * 60 * 60 * 1000), 10);
|
|
59456
59484
|
var startupCheckCacheFile = path16.join(homedir4(), ".cache", "punks", "startup-check.json");
|
|
59457
|
-
var app = exports_Command.make("punks", {}, () => exports_Effect.sync(() => console.log(renderCommandGuide()))).pipe(exports_Command.withDescription("Harness Intelligence
|
|
59485
|
+
var app = exports_Command.make("punks", {}, () => exports_Effect.sync(() => console.log(renderCommandGuide()))).pipe(exports_Command.withDescription("Harness Intelligence CLI. Agents: activate $dp-cli before acting on generated .devpunks output."), exports_Command.withSubcommands([authCommand, reportCommand, scaffoldCommand, updateCommand]));
|
|
59458
59486
|
var cli = exports_Command.run(app, {
|
|
59459
59487
|
name: "punks",
|
|
59460
59488
|
version
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: dp-cli
|
|
3
|
-
description: Operates the Devpunks `dp` CLI and interactively follows scaffold,
|
|
3
|
+
description: Operates the Devpunks `dp` CLI and interactively follows scaffold, update, report, and post-command handoff artifacts through to completion. Use when a repo contains `.devpunks/` output, when the user mentions `dp scaffold`, `dp update`, `dp report`, Devpunks CLI setup, or asks what to do after running a `dp` command.
|
|
4
4
|
metadata: {"Devpunks":{"entrypoint":true}}
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -13,9 +13,9 @@ The `dp` CLI scaffolds Devpunks agent assets and writes follow-up instructions f
|
|
|
13
13
|
```bash
|
|
14
14
|
dp scaffold setup
|
|
15
15
|
dp scaffold init
|
|
16
|
-
dp scaffold backlog
|
|
17
16
|
dp update --check
|
|
18
17
|
dp update --write
|
|
18
|
+
dp report --help
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
After any command, read the command output and generated artifacts before acting.
|
|
@@ -46,6 +46,14 @@ See [references/commands.md](references/commands.md) for command intent and when
|
|
|
46
46
|
|
|
47
47
|
See [references/post-command-flow.md](references/post-command-flow.md) for the required agent flow after `dp scaffold` or `dp update`.
|
|
48
48
|
|
|
49
|
+
The former backlog scaffold subcommand is not part of current guidance. `dp scaffold init` provides the requirements/backlog skills and initial wiki structure; `dp scaffold setup` provides repo-aware managed scaffold output.
|
|
50
|
+
|
|
51
|
+
## Scaffold Init
|
|
52
|
+
|
|
53
|
+
After `dp scaffold init`, expect `.agents/skills/requirements-grill`, `.agents/skills/write-backlog`, and an initial wiki root.
|
|
54
|
+
|
|
55
|
+
Run the requirements grill before backlog authoring. If the generated wiki root does not match the real repository layout, move or refactor it before creating durable specs, plans, or routed docs. Monorepos usually use `apps/wiki`; single-repo layouts usually use `wiki`.
|
|
56
|
+
|
|
49
57
|
## Scaffold Setup
|
|
50
58
|
|
|
51
59
|
After `dp scaffold setup`, expect artifacts such as:
|
|
@@ -62,6 +70,8 @@ Read `.devpunks/AGENT-SYSTEM-PROMPT.md` first when present.
|
|
|
62
70
|
|
|
63
71
|
Then author or reconcile the final repo files requested by the specs, including prompt files, harness mirrors, lint configuration, and subagent manifests.
|
|
64
72
|
|
|
73
|
+
Reconcile generated wiki guidance with the real repository layout. Do not assume a newly seeded wiki root is canonical until it matches the project boundary.
|
|
74
|
+
|
|
65
75
|
Before authoring prompts or plans, identify the detected core libraries whose source behavior matters. Ask the user which ones to prioritize if the choice is not obvious, then run `opensrc path <package>` or `opensrc path owner/repo` only for that focused set.
|
|
66
76
|
|
|
67
77
|
When lint specs suggest Oxlint or hooks suggest Oxfmt, treat migration as a repo-policy change. Ask before replacing existing ESLint/Prettier/Biome scripts or CI, then update package scripts, task pipelines, editor/docs references, and hooks together.
|
|
@@ -74,6 +84,12 @@ After `dp update`, inspect `.devpunks/scaffold-manifest.json` and the update sum
|
|
|
74
84
|
- `--write` refreshes scaffold-managed assets.
|
|
75
85
|
- pack drift is a setup decision point, not a silent auto-fix.
|
|
76
86
|
|
|
87
|
+
## Report
|
|
88
|
+
|
|
89
|
+
Use `dp report` when reusable Harness friction should enter maintainer triage: stale generated guidance, confusing CLI output, missing docs, broken setup, or shared tooling issues.
|
|
90
|
+
|
|
91
|
+
Do not use reports as the default destination for project product backlog. Report submission requires control-plane configuration and auth.
|
|
92
|
+
|
|
77
93
|
## Completion Checklist
|
|
78
94
|
|
|
79
95
|
- `.devpunks/AGENT-SYSTEM-PROMPT.md` was followed or consciously superseded.
|
|
@@ -12,13 +12,9 @@ It does not finish all repo-specific authoring. The next agent must use `.devpun
|
|
|
12
12
|
|
|
13
13
|
Use before boilerplate exists.
|
|
14
14
|
|
|
15
|
-
It scaffolds requirements-
|
|
15
|
+
It scaffolds `requirements-grill`, `write-backlog`, and the initial wiki tree, then prints an operator prompt. Follow that prompt before moving to repo-aware setup.
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
Use to inspect or enter the backlog stage.
|
|
20
|
-
|
|
21
|
-
When no backlog-stage packs are available, the command still prints the operator prompt so the stage boundary is explicit.
|
|
17
|
+
If the generated wiki root does not match the repository layout, move or refactor it before writing specs, plans, or routed docs. Monorepos usually use `apps/wiki`; single-repo layouts usually use `wiki`.
|
|
22
18
|
|
|
23
19
|
## `dp update --check`
|
|
24
20
|
|
|
@@ -31,3 +27,9 @@ Report missing, changed, or pack-drift findings. Do not write files.
|
|
|
31
27
|
Use to refresh scaffold-managed files recorded in `.devpunks/scaffold-manifest.json`.
|
|
32
28
|
|
|
33
29
|
After writing, verify the refreshed files still fit the repo shape and any pack drift is handled intentionally.
|
|
30
|
+
|
|
31
|
+
## `dp report`
|
|
32
|
+
|
|
33
|
+
Use to submit reusable Harness friction for maintainer triage when the control plane and auth are configured.
|
|
34
|
+
|
|
35
|
+
Reports are for shared Harness/docs/tooling/workflow issues, not the default path for project product backlog.
|
|
@@ -27,6 +27,7 @@ If a file is missing, continue with the next available artifact and say what was
|
|
|
27
27
|
After `dp scaffold setup`:
|
|
28
28
|
|
|
29
29
|
- Generate final root/docs/workspace `AGENTS.md` files from prompt specs.
|
|
30
|
+
- Reconcile any scaffolded wiki root with the real repo layout before writing durable docs.
|
|
30
31
|
- Create sibling `CLAUDE.md` symlink mirrors for those neutral prompt files.
|
|
31
32
|
- Keep `.agents/AGENTS.md` as the shared global prompt source.
|
|
32
33
|
- Keep `.agents/skills/` as the main skill directory; only `.claude/skills` mirrors it.
|
|
@@ -37,6 +38,12 @@ After `dp scaffold setup`:
|
|
|
37
38
|
|
|
38
39
|
Do not stop after saying the files exist.
|
|
39
40
|
|
|
41
|
+
After `dp scaffold init`:
|
|
42
|
+
|
|
43
|
+
- Run `requirements-grill` before `write-backlog`.
|
|
44
|
+
- Treat the seeded wiki root as provisional until it matches the repo layout.
|
|
45
|
+
- Use `dp scaffold setup` only after the repo is ready for repo-aware setup.
|
|
46
|
+
|
|
40
47
|
## Reporting
|
|
41
48
|
|
|
42
49
|
Final reports should say:
|
|
@@ -12,9 +12,9 @@ Use this reference before asking clarifying questions.
|
|
|
12
12
|
- Prefer the domain whose contract most clearly owns the request.
|
|
13
13
|
- If multiple domains are involved, pick the primary owner and note cross-domain scope in the spec.
|
|
14
14
|
- If no domain matches, stop and tell the user to run `/create-wiki-domain <name>` first.
|
|
15
|
-
4. Read the relevant
|
|
16
|
-
- `apps/wiki/
|
|
17
|
-
5. Optionally read related
|
|
15
|
+
4. Read the relevant domain contract:
|
|
16
|
+
- `apps/wiki/domains/<domain>/<domain>-contract.md`
|
|
17
|
+
5. Optionally read related domain concepts or flows when they are obviously relevant.
|
|
18
18
|
6. Check for existing overlapping specs in:
|
|
19
19
|
- `apps/wiki/specs/<domain>/<domain>-specs.md`
|
|
20
20
|
7. If backlog context exists, inspect the parent epic/capability and every child story beneath it.
|
|
@@ -22,7 +22,7 @@ Use wiki synthesis when the user asks to persist closed grill decisions into `ap
|
|
|
22
22
|
Both workflows can happen in one long session, but keep the responsibilities distinct:
|
|
23
23
|
|
|
24
24
|
- `docs/<topic>-grill-log.md` and `docs/<topic>-grill-status.md` are the detailed requirements and glossary record
|
|
25
|
-
- `apps/wiki/
|
|
25
|
+
- `apps/wiki/domains/` is synthesized domain knowledge
|
|
26
26
|
- backlog/user-story creation is the next phase after the grill gate, outside this skill's scope
|
|
27
27
|
|
|
28
28
|
## Core Behavior
|
|
@@ -80,7 +80,7 @@ Create or update decision pages only when:
|
|
|
80
80
|
|
|
81
81
|
Keep `docs/` as the detailed design record.
|
|
82
82
|
|
|
83
|
-
Use `apps/wiki/
|
|
83
|
+
Use `apps/wiki/domains/` for synthesized domain knowledge.
|
|
84
84
|
|
|
85
85
|
Do not duplicate the full grill log in wiki pages.
|
|
86
86
|
Summarize stable meaning, glossary, and axioms; link back to source docs when useful.
|
|
@@ -13,9 +13,9 @@ model: <model name or unset>
|
|
|
13
13
|
limit: <number or unset>
|
|
14
14
|
jobs: <number or unset>
|
|
15
15
|
state dir: <repo>/.clawpatch/
|
|
16
|
-
report path: <repo>/.clawpatch/reports/<name>.md
|
|
16
|
+
report path: <repo>/.clawpatch/reports/<name>.md
|
|
17
17
|
dirty posture: include dirty changes? <yes|no>
|
|
18
|
-
output format:
|
|
18
|
+
output format: markdown file | markdown stdout | json stdout redirected to file
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
This record is part of the phase contract. Do it before launching any long AFK
|
|
@@ -69,11 +69,26 @@ Use `--include-dirty` only when the user wants current uncommitted work included
|
|
|
69
69
|
in discovery. If omitted, say dirty work was excluded or left to ClawPatch
|
|
70
70
|
defaults.
|
|
71
71
|
|
|
72
|
-
For report and ledger inspection
|
|
72
|
+
For report and ledger inspection, use `clawpatch report` after `review` or `ci`
|
|
73
|
+
has produced finding state. It renders the current findings ledger. With
|
|
74
|
+
`--output <path>` it writes Markdown to that path. With global `--json` it
|
|
75
|
+
emits machine-readable JSON to stdout; do not pair `--json` with `--output
|
|
76
|
+
<json-file>` expecting JSON to be written there, because `--output` is the
|
|
77
|
+
Markdown report file.
|
|
73
78
|
|
|
74
79
|
```sh
|
|
80
|
+
# Write a durable Markdown report and print a short completion summary.
|
|
75
81
|
clawpatch report --root "$REPO" --state-dir "$REPO/.clawpatch" --output "$REPORT" --plain
|
|
76
|
-
|
|
82
|
+
|
|
83
|
+
# Emit the Markdown report to stdout when no file is needed.
|
|
84
|
+
clawpatch report --root "$REPO" --state-dir "$REPO/.clawpatch"
|
|
85
|
+
|
|
86
|
+
# Save machine-readable JSON by redirecting stdout.
|
|
87
|
+
clawpatch report --root "$REPO" --state-dir "$REPO/.clawpatch" --json > "$REPORT_JSON"
|
|
88
|
+
|
|
89
|
+
# Narrow the report when triaging a queue.
|
|
90
|
+
clawpatch report --root "$REPO" --state-dir "$REPO/.clawpatch" --status open --severity high --plain
|
|
91
|
+
|
|
77
92
|
clawpatch next --root "$REPO" --state-dir "$REPO/.clawpatch" --plain
|
|
78
93
|
clawpatch show --root "$REPO" --state-dir "$REPO/.clawpatch" --finding "$FINDING_ID" --plain
|
|
79
94
|
clawpatch status --root "$REPO" --state-dir "$REPO/.clawpatch" --plain
|
|
@@ -110,7 +125,8 @@ discovery itself does not create tech-debt docs.
|
|
|
110
125
|
|
|
111
126
|
The final report must include:
|
|
112
127
|
|
|
113
|
-
- report path, usually `.clawpatch/reports/<run>.md
|
|
128
|
+
- report path, usually `.clawpatch/reports/<run>.md`; if JSON was requested,
|
|
129
|
+
include the redirected JSON artifact path separately
|
|
114
130
|
- durable ledger/state path, usually `.clawpatch/`
|
|
115
131
|
- provider, model, scope, `--limit`, `--jobs`, report path, and dirty posture
|
|
116
132
|
- command list and whether each command completed
|
|
@@ -57,7 +57,9 @@ and the full output checklist.
|
|
|
57
57
|
then `review` or `ci` with explicit provider, model, limit, jobs, state dir,
|
|
58
58
|
scope, and output.
|
|
59
59
|
6. **Report and triage.** Generate a report under `.clawpatch/reports/` unless
|
|
60
|
-
the user supplied another path. Use `
|
|
60
|
+
the user supplied another path. Use `clawpatch report --output <path>` for
|
|
61
|
+
Markdown reports; for JSON, run `clawpatch report --json > <path>` because
|
|
62
|
+
`--output` writes Markdown. Use `show`, `next`, `triage`, `status`, or
|
|
61
63
|
`revalidate` only for inspection and classification.
|
|
62
64
|
7. **Stop before mutation.** Do not run `fix --finding` or `open-pr` unless the
|
|
63
65
|
user gives a new explicit resolution request.
|
|
@@ -18,13 +18,19 @@ Do not turn a broad report into an automatic repair campaign. If the request is
|
|
|
18
18
|
Use commands like these for context and state:
|
|
19
19
|
|
|
20
20
|
```sh
|
|
21
|
-
clawpatch show --finding
|
|
22
|
-
clawpatch report
|
|
23
|
-
clawpatch
|
|
24
|
-
clawpatch
|
|
25
|
-
clawpatch
|
|
21
|
+
clawpatch show --root "$REPO" --state-dir "$REPO/.clawpatch" --finding "$FINDING_ID"
|
|
22
|
+
clawpatch report --root "$REPO" --state-dir "$REPO/.clawpatch" --status open
|
|
23
|
+
clawpatch report --root "$REPO" --state-dir "$REPO/.clawpatch" --json > "$REPORT_JSON"
|
|
24
|
+
clawpatch triage --root "$REPO" --state-dir "$REPO/.clawpatch" --finding "$FINDING_ID" --status "$STATUS" --note "$REASON"
|
|
25
|
+
clawpatch revalidate --root "$REPO" --state-dir "$REPO/.clawpatch" --finding "$FINDING_ID"
|
|
26
|
+
clawpatch fix --root "$REPO" --state-dir "$REPO/.clawpatch" --finding "$FINDING_ID" --dry-run
|
|
26
27
|
```
|
|
27
28
|
|
|
29
|
+
`clawpatch report` renders the current finding ledger for context. Use it to
|
|
30
|
+
recover report context when a resolution goal starts from only a finding ID or
|
|
31
|
+
state directory. `--output <path>` writes Markdown. `--json` writes JSON to
|
|
32
|
+
stdout, so redirect stdout when a JSON artifact is needed.
|
|
33
|
+
|
|
28
34
|
`clawpatch fix --finding <id> --dry-run` is allowed for inspection when it clarifies the proposed patch, but do not apply it by default. `clawpatch fix --finding <id>` and `clawpatch open-pr --patch <patchAttemptId>` are explicit mutation paths and require a clear user request.
|
|
29
35
|
|
|
30
36
|
Preserve report linkage in notes and final output: finding ID, report path if known, `.clawpatch/` state path when relevant, and command outputs used for decisions.
|
|
@@ -35,7 +35,9 @@ description: >-
|
|
|
35
35
|
|
|
36
36
|
## Quick Start
|
|
37
37
|
|
|
38
|
-
1. Read the selected finding with `clawpatch show --finding <id>` and, when
|
|
38
|
+
1. Read the selected finding with `clawpatch show --finding <id>` and, when
|
|
39
|
+
useful, `clawpatch report`. Use `report --output <path>` for Markdown or
|
|
40
|
+
`report --json > <path>` for JSON.
|
|
39
41
|
2. Capture finding ID, report path, source evidence, affected files, claimed behavior, and current ClawPatch status.
|
|
40
42
|
3. Classify each finding as `resolve-now`, `needs-runtime-debugging`, `tech-debt`, `false-positive`, or `blocked`.
|
|
41
43
|
4. Execute the classification route:
|
|
@@ -58,6 +58,7 @@ Why: concept pages can cross-link flow pages, so flows must exist first.
|
|
|
58
58
|
|
|
59
59
|
Keep the private Fumadocs app discoverable:
|
|
60
60
|
|
|
61
|
+
- `/docs/wiki` is the canonical routed surface for product/domain knowledge: usage, concepts, theory, flows, glossary, and concept/flow ingest output.
|
|
61
62
|
- `/docs/project` is the canonical routed surface for internal project operations: specs, plans, implementation notes, maintenance logs, decisions, repo guidance, runbooks, and useful management context.
|
|
62
63
|
|
|
63
64
|
Do not create a second wiki or a separate `domains/` content-owner layer. Routed MDX pages under `content/docs` are the durable human-facing wiki/project pages.
|
|
@@ -80,7 +81,7 @@ Always report:
|
|
|
80
81
|
- Leave new or moved routed pages out of Fumadocs `meta.json`.
|
|
81
82
|
- Strip or omit `surface` / `permission` frontmatter from routed pages.
|
|
82
83
|
- Proceed to concept writing after a flow write fails.
|
|
83
|
-
- Write canonical concept or flow content
|
|
84
|
+
- Write canonical concept or flow content under `<wiki-root>/domains/`.
|
|
84
85
|
- Create `docs/prd`, `docs/dev`, roadmap, sprint, or backlog-mirror folders.
|
|
85
86
|
- Put agent task instructions inside human-facing docs pages.
|
|
86
87
|
- Leave docs orphaned from `docs/README.md` after adding or renaming them.
|
|
@@ -6,7 +6,7 @@ Use this reference when `docs-ingest-phase` writes concepts into routed wiki doc
|
|
|
6
6
|
|
|
7
7
|
For each extracted concept:
|
|
8
8
|
|
|
9
|
-
1. Read related routed flow pages under `<wiki-root>/content/docs/<domain>/`.
|
|
9
|
+
1. Read related routed flow pages under `<wiki-root>/content/docs/wiki/<domain>/`.
|
|
10
10
|
2. Scan `<wiki-root>/raw/` recursively and collect files where frontmatter `ingested: false` or `ingested` is absent.
|
|
11
11
|
3. Use relevant raw content only as supplementary material. Do not mark raw files as ingested here.
|
|
12
12
|
|
|
@@ -27,7 +27,7 @@ Determine status:
|
|
|
27
27
|
Derive the routed output path:
|
|
28
28
|
|
|
29
29
|
1. Use the domain's existing route section if the concept clearly belongs there.
|
|
30
|
-
2. Otherwise write to `<wiki-root>/content/docs/<domain>/<concept-name>.mdx`.
|
|
30
|
+
2. Otherwise write to `<wiki-root>/content/docs/wiki/<domain>/<concept-name>.mdx`.
|
|
31
31
|
3. Slugify the concept name to kebab-case.
|
|
32
32
|
|
|
33
33
|
For Harness-style domains, prefer existing topical sections such as `foundations`, `prompt-surfaces`, `skills-and-packs`, `execution-modes`, `validation-and-tools`, and `lifecycle-flows` when they already exist.
|
|
@@ -8,7 +8,7 @@ For each extracted flow:
|
|
|
8
8
|
|
|
9
9
|
1. Derive the routed output path:
|
|
10
10
|
- use the domain's existing flow section when one exists
|
|
11
|
-
- otherwise write to `<wiki-root>/content/docs/<domain>/<flow-name>.mdx`
|
|
11
|
+
- otherwise write to `<wiki-root>/content/docs/wiki/<domain>/<flow-name>.mdx`
|
|
12
12
|
- slugify the flow name to kebab-case
|
|
13
13
|
2. Determine status:
|
|
14
14
|
- `proposed` when only `SPEC.md` is present
|
|
@@ -4,18 +4,26 @@ Use this reference when `docs-ingest-phase` updates routed wiki or project docs.
|
|
|
4
4
|
|
|
5
5
|
## Canonical Routed Content
|
|
6
6
|
|
|
7
|
-
`apps/wiki` owns the wiki application and its documentation content.
|
|
7
|
+
`apps/wiki` owns the wiki application and its documentation content. Routed MDX pages are the canonical human-facing docs surface:
|
|
8
8
|
|
|
9
|
+
- `<wiki-root>/content/docs/wiki`
|
|
9
10
|
- `<wiki-root>/content/docs/project`
|
|
10
11
|
|
|
11
|
-
Product/domain routes are repository-owned. Add them only when that project deliberately defines them.
|
|
12
|
-
|
|
13
12
|
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
13
|
|
|
15
14
|
`<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
15
|
|
|
17
16
|
## Route Boundaries
|
|
18
17
|
|
|
18
|
+
Use `/docs/wiki` for product/domain knowledge:
|
|
19
|
+
|
|
20
|
+
- usage model
|
|
21
|
+
- concepts
|
|
22
|
+
- theory
|
|
23
|
+
- flows
|
|
24
|
+
- glossary
|
|
25
|
+
- docs-ingest-phase concept/flow output
|
|
26
|
+
|
|
19
27
|
Use `/docs/project` for internal project operations:
|
|
20
28
|
|
|
21
29
|
- specs
|
|
@@ -33,20 +41,27 @@ Keep implementation specs and notes linked or summarized. Do not paste large sou
|
|
|
33
41
|
|
|
34
42
|
Fumadocs uses file paths to determine route slugs. Examples:
|
|
35
43
|
|
|
36
|
-
- `content/docs/
|
|
44
|
+
- `content/docs/wiki/index.mdx` -> `/docs/wiki`
|
|
45
|
+
- `content/docs/wiki/cli/index.mdx` -> `/docs/wiki/cli`
|
|
37
46
|
- `content/docs/project/specs/index.mdx` -> `/docs/project/specs`
|
|
38
47
|
|
|
39
48
|
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
49
|
|
|
41
|
-
Use
|
|
50
|
+
Use root folders for the two main surfaces:
|
|
42
51
|
|
|
43
52
|
```json
|
|
44
53
|
{
|
|
45
|
-
"title": "
|
|
54
|
+
"title": "Wiki",
|
|
55
|
+
"root": true
|
|
46
56
|
}
|
|
47
57
|
```
|
|
48
58
|
|
|
49
|
-
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"title": "Project",
|
|
62
|
+
"root": true
|
|
63
|
+
}
|
|
64
|
+
```
|
|
50
65
|
|
|
51
66
|
## Routed Page Frontmatter
|
|
52
67
|
|
|
@@ -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 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.
|
|
20
|
+
4. Verify the routed domain root exists under `<wiki-root>/content/docs/wiki/<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
|
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Use these as structure, not fixed templates. Keep the generated goal prompt matched to the user context.
|
|
4
4
|
|
|
5
|
+
Every `/goal` block must be non-empty and at most 4,000 characters. If the
|
|
6
|
+
details cannot fit, make the goal point at a separate file that contains the
|
|
7
|
+
expanded contract.
|
|
8
|
+
|
|
5
9
|
## Delivery-Style Goal
|
|
6
10
|
|
|
7
11
|
```text
|
|
@@ -44,6 +48,8 @@ Final report:
|
|
|
44
48
|
- Changed files, validation evidence, unresolved questions, and follow-up goals if split.
|
|
45
49
|
```
|
|
46
50
|
|
|
51
|
+
After returning the fenced block, include its character count.
|
|
52
|
+
|
|
47
53
|
## Debugging-Style Goal
|
|
48
54
|
|
|
49
55
|
```text
|
|
@@ -8,6 +8,10 @@ description: Compile messy intent, handoffs, issues, logs, specs, or notes into
|
|
|
8
8
|
`goalify` is a prompt compiler. It produces a `/goal` prompt; it does not run the
|
|
9
9
|
goal unless the user explicitly asks.
|
|
10
10
|
|
|
11
|
+
Codex goal objectives have a hard platform limit: the text after `/goal` must be
|
|
12
|
+
non-empty and at most 4,000 characters. Longer instructions belong in a file
|
|
13
|
+
that the goal points to; do not emit an over-limit `/goal` block.
|
|
14
|
+
|
|
11
15
|
## Use When
|
|
12
16
|
|
|
13
17
|
- The user asks to "goalify", "write the goal prompt", "prepare a goal", or "turn this into a goal".
|
|
@@ -40,6 +44,15 @@ Every generated goal prompt must include:
|
|
|
40
44
|
- progress-report expectations
|
|
41
45
|
- final-report expectations
|
|
42
46
|
|
|
47
|
+
Within the 4,000-character hard limit, prefer the official goal-shape fields:
|
|
48
|
+
|
|
49
|
+
- outcome
|
|
50
|
+
- verification surface
|
|
51
|
+
- constraints
|
|
52
|
+
- boundaries
|
|
53
|
+
- iteration policy
|
|
54
|
+
- blocked stop condition
|
|
55
|
+
|
|
43
56
|
## Workflow
|
|
44
57
|
|
|
45
58
|
1. **Collect context.**
|
|
@@ -58,18 +71,23 @@ Every generated goal prompt must include:
|
|
|
58
71
|
- Use [EXAMPLES.md](EXAMPLES.md) for structure.
|
|
59
72
|
- Include only context the future goal runner needs.
|
|
60
73
|
- Make the prompt self-contained enough to survive compaction.
|
|
74
|
+
- Keep the full `/goal ...` text at or below 4,000 characters.
|
|
75
|
+
- Be as descriptive as possible within the 4,000-character limit: preserve concrete paths, constraints, proof, and stop conditions before trimming style or repetition.
|
|
76
|
+
- Compress only when needed to fit: group files by area, collapse repeated commands, and remove non-execution-critical background before dropping useful detail.
|
|
77
|
+
- If the real operating contract cannot fit, produce a short `/goal` that points at an existing or user-requested goal file instead of pasting the full contract.
|
|
61
78
|
5. **Review before returning.**
|
|
62
79
|
- Confirm the prompt has one objective and one stopping condition.
|
|
63
80
|
- Confirm it says what to read first.
|
|
64
81
|
- Confirm it tells Codex when to stop early.
|
|
65
82
|
- Confirm validation is explicit, not "make sure it works".
|
|
83
|
+
- Confirm the fenced `/goal` text is non-empty and no more than 4,000 characters.
|
|
66
84
|
|
|
67
85
|
## Output Contract
|
|
68
86
|
|
|
69
87
|
Return:
|
|
70
88
|
|
|
71
89
|
1. A ready-to-paste `/goal ...` prompt in a fenced `text` block.
|
|
72
|
-
2. A short note
|
|
90
|
+
2. A short note with the character count for the `/goal` text and any assumptions or missing inputs.
|
|
73
91
|
3. No execution, no file edits, no tracker updates, and no commits unless separately requested.
|
|
74
92
|
|
|
75
93
|
## Prompt Sections
|
|
@@ -90,6 +108,9 @@ Use these headings when they fit:
|
|
|
90
108
|
|
|
91
109
|
## Gotchas
|
|
92
110
|
|
|
111
|
+
- HARD LIMIT: never output a `/goal` prompt longer than 4,000 characters.
|
|
112
|
+
- Do not treat `/goal` as a spec dump. It is a compact operating contract.
|
|
113
|
+
- If a user asks for a giant goal, preserve the richest useful contract that fits, then point at a file for overflow detail.
|
|
93
114
|
- Do not hardcode project-specific phase families; use the skills/phases named by the context.
|
|
94
115
|
- Do not turn a backlog grab bag into one goal. Split or ask.
|
|
95
116
|
- Do not bury the stopping condition near the end in vague prose.
|
|
@@ -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
|
|
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/reference/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:** `
|
|
12
|
+
- **Canonical input:** `docs/reference/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 `
|
|
19
|
+
- The user provides or points to one tech debt artifact under `docs/reference/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 `
|
|
31
|
+
1. Locate the debt file at `docs/reference/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.
|