@punks/cli 2.0.0-beta.3 → 2.0.0-beta.4

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.
Files changed (2) hide show
  1. package/dist/index.js +24 -10
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -52435,7 +52435,7 @@ var toolCatalog = [
52435
52435
 
52436
52436
  // package.json
52437
52437
  var name = "@punks/cli";
52438
- var version = "2.0.0-beta.3";
52438
+ var version = "2.0.0-beta.4";
52439
52439
  // src/baseline/bundled.ts
52440
52440
  var bundledBaseline = {
52441
52441
  summary: {
@@ -54086,6 +54086,7 @@ var formatAgentHandoffSummary = (result) => [
54086
54086
  result.monorepo ? " 2. Repo is in monorepo mode. Generate final prompt files for root, docs, and each relevant app/package scope." : " 2. Repo is in single-repo mode. Stitch scoped guidance into one root prompt, plus docs guidance when present.",
54087
54087
  " 3. Read `.devpunks/required-tools.json` and verify `skills`, `portless`, `opensrc`, and `agent-browser` are actually available when listed. If any are missing, install/fix that first.",
54088
54088
  " 4. Keep the final prompt house style tight: `## ... Guidance`, `Primary skills here`, one short scope-boundary paragraph, optional `opensrc` guidance only when needed, then the docs-update rule.",
54089
+ " 4a. Never put phase skills in scoped `AGENTS.md` primary-skill lines. Keep `requirements-phase`, `delivery-phase`, `debugging-phase`, `review-phase`, `resolve-debt-phase`, and `docs-ingest-phase` as global orchestration entrypoints only.",
54089
54090
  " 5. Treat every authored root/docs/workspace `AGENTS.md` file as the neutral scoped prompt source and create a sibling `CLAUDE.md` symlink mirror beside each one.",
54090
54091
  " 6. Keep `.agents/AGENTS.md` as the shared global prompt source behind the scoped prompt tree; `.claude/CLAUDE.md` should mirror that neutral file.",
54091
54092
  " 7. Keep `.agents/hooks/` as the neutral hook source, `.agents/skills/` as the main skill directory, and `.agents/scripts/sync-subagents.mjs` as the harness sync entrypoint. Only `.claude/skills` should mirror `.agents/skills`.",
@@ -54475,7 +54476,17 @@ import {
54475
54476
  import path8 from "path";
54476
54477
 
54477
54478
  // src/content/prompts.ts
54478
- var renderPrimarySkills = (skills) => skills.map((skill) => `\`${skill}\``).join(", ");
54479
+ var phaseSkillIds = [
54480
+ "debugging-phase",
54481
+ "delivery-phase",
54482
+ "docs-ingest-phase",
54483
+ "requirements-phase",
54484
+ "resolve-debt-phase",
54485
+ "review-phase"
54486
+ ];
54487
+ var phaseSkillSet = new Set(phaseSkillIds);
54488
+ var scopedPrimarySkills = (skills) => skills.filter((skill) => !phaseSkillSet.has(skill));
54489
+ var renderPrimarySkills = (skills) => (scopedPrimarySkills(skills).length === 0 ? ["simplify"] : scopedPrimarySkills(skills)).map((skill) => `\`${skill}\``).join(", ");
54479
54490
  var titleFromSegment = (value6) => value6.split(/[-_]/u).filter((segment) => segment.length > 0).map((segment) => segment[0].toUpperCase() + segment.slice(1)).join(" ");
54480
54491
  var sharedAgentsPromptTemplate = readDataFile("AGENTS.md");
54481
54492
  var rootPromptTemplate = `## Root Guidance
@@ -54502,10 +54513,10 @@ Use \`portless\` for local development URLs instead of baking raw \`localhost:<p
54502
54513
  If work here changes setup, workflow, AI scaffold surfaces, or other non-obvious behavior, update \`docs/README.md\` and the relevant runbook in \`docs/runbooks/\` in the same task.`;
54503
54514
  var docsPromptTemplate = `## Docs Guidance
54504
54515
 
54505
- Primary skills here: \`docs-ingest-phase\`, \`simplify\`.
54516
+ Primary skills here: \`simplify\`.
54506
54517
 
54507
54518
  \`docs/\` is the repo's durable, human-facing knowledge base for implemented reality.
54508
- Use \`docs-ingest-phase\` before adding, editing, moving, or deleting docs, and when code changes may require updates to \`docs/README.md\`, a domain doc, a runbook, or an ADR.
54519
+ Phase skills such as \`docs-ingest-phase\` are global orchestration entrypoints, not scoped primary skills. Invoke them from the parent goal/handoff flow when needed; do not list them in scoped \`AGENTS.md\` primary-skill lines.
54509
54520
 
54510
54521
  Keep agent workflow in prompt files, not in the docs themselves.`;
54511
54522
  var includesPack = (packs, packId) => packs.includes(packId);
@@ -54641,6 +54652,7 @@ var renderPromptSpecMarkdown = (spec) => [
54641
54652
  "",
54642
54653
  "- Start with one `## <Scope> Guidance` heading.",
54643
54654
  "- Put one `Primary skills here: ...` line near the top.",
54655
+ "- Never put phase skills in scoped `AGENTS.md` primary-skill lines. Keep `requirements-phase`, `delivery-phase`, `debugging-phase`, `review-phase`, `resolve-debt-phase`, and `docs-ingest-phase` as global orchestration entrypoints only.",
54644
54656
  "- Follow with one short paragraph defining the scope boundary: what belongs here vs elsewhere.",
54645
54657
  "- Treat every authored `AGENTS.md` file as the neutral source of truth and create a sibling `CLAUDE.md` symlink mirror that points to it.",
54646
54658
  "- Add `opensrc` / source-inspection guidance only when this scope actually needs it.",
@@ -54666,9 +54678,10 @@ var renderPromptSpecMarkdown = (spec) => [
54666
54678
  "- Keep the final prompt concise, imperative, and scope-first.",
54667
54679
  "- Match the existing repo house style used by the detected workspace prompt files.",
54668
54680
  "- Preserve this order: heading, `Primary skills here`, scope boundary, optional `opensrc`, docs update rule.",
54681
+ "- Keep phase skills out of every scoped `AGENTS.md`; invoke phases from the parent goal/handoff flow instead.",
54669
54682
  "- Route broader monorepo concerns back to the root prompt instead of repeating them in every scope.",
54670
54683
  "- If a seed prompt exists in the source repo, preserve repo-specific constraints while reconciling them with the detected pack set.",
54671
- "- Keep docs-ingest-phase workflow in prompt files, not in generated docs pages."
54684
+ "- Keep docs ingest workflow in prompt files, not in generated docs pages."
54672
54685
  ].join(`
54673
54686
  `);
54674
54687
  var renderAgentHandoffMarkdown = ({
@@ -54717,6 +54730,7 @@ var renderAgentHandoffMarkdown = ({
54717
54730
  "2. Use the prompt spec files to author final prompt files. Do not treat the spec files as final prompt bodies.",
54718
54731
  "3. Match the existing prompt house style from this repo: one `## ... Guidance` heading, `Primary skills here`, one short scope paragraph, optional `opensrc` guidance only when needed, then the docs-update rule.",
54719
54732
  "3a. Read the required tools manifest and confirm `skills`, `portless`, `opensrc`, and `agent-browser` are actually available before deeper repo work.",
54733
+ "3b. Never put phase skills in scoped `AGENTS.md` primary-skill lines. Keep `requirements-phase`, `delivery-phase`, `debugging-phase`, `review-phase`, `resolve-debt-phase`, and `docs-ingest-phase` as global orchestration entrypoints invoked from the parent goal/handoff flow.",
54720
54734
  monorepo ? "4. Because this repo is in monorepo mode, create scoped prompt files for the root, docs scope when present, and each relevant app/package scope." : "4. Because this repo is in single-repo mode, stitch scope guidance into a single root prompt plus docs guidance when present.",
54721
54735
  "5. Author every root/docs/workspace `AGENTS.md` file as the neutral prompt source of truth and create a sibling `CLAUDE.md` symlink mirror beside each one instead of maintaining duplicated prompt bodies.",
54722
54736
  "6. Keep `.agents/AGENTS.md` as the shared global guidance source behind the scoped prompt tree; `.claude/CLAUDE.md` should stay a symlink mirror of that neutral file.",
@@ -55140,7 +55154,7 @@ var primarySkillsForWorkspace = ({
55140
55154
  baseline
55141
55155
  });
55142
55156
  const skills = workspacePacks.flatMap((packId) => skillsForPack(packId, baseline));
55143
- return uniqueSorted(skills);
55157
+ return uniqueSorted(relativeWorkspacePath === ".agents" ? skills : scopedPrimarySkills(skills));
55144
55158
  };
55145
55159
  var buildPromptSpec = ({
55146
55160
  scanDirectory,
@@ -56031,12 +56045,11 @@ This file defines how any agent operates within \`${wikiRoot}/\`. Read it before
56031
56045
 
56032
56046
  ## Skill Routing
56033
56047
 
56034
- Primary skills here: \`create-spec\`, \`create-plan\`, \`implement-spec\`, \`docs-ingest-phase\`, \`simplify\`.
56048
+ Primary skills here: \`create-spec\`, \`create-plan\`, \`implement-spec\`, \`simplify\`.
56035
56049
 
56036
- - Use \`docs-ingest-phase\` to ingest a spec folder into the wiki domain layer and create missing domain scaffolding when needed.
56050
+ - Phase skills such as \`docs-ingest-phase\` are global orchestration entrypoints, not scoped primary skills. Invoke them from the parent goal/handoff flow when needed; do not list them in scoped \`AGENTS.md\` primary-skill lines.
56037
56051
  - Use \`create-plan\` to turn an approved spec into an execution-ready \`PLAN.md\`.
56038
56052
  - Use \`implement-spec\` to execute an approved spec folder. Choose the execution mode inside the skill: \`sequential\` or \`parallel\`.
56039
- - \`docs-ingest-phase\` owns the full ingest pipeline. It creates or updates the domain map/contract when needed, then writes flow pages first, then concept pages.
56040
56053
  - Do not hand-write \`domains/<domain>/flows/\` or \`domains/<domain>/concepts/\` pages when that ingest workflow applies.
56041
56054
  - \`SPEC.md\` and \`IMPLEMENTATION-NOTES.md\` remain the source material, but the ingest orchestrator may update their frontmatter/link bookkeeping (\`ingested\`, \`last_ingested\`, backlinks) as part of the pipeline.
56042
56055
 
@@ -57632,7 +57645,8 @@ var runUpdate = ({
57632
57645
  shouldApply ? "Managed scaffold files updated." : "No files were written.",
57633
57646
  `Changed files: ${changes2.length}`,
57634
57647
  `Stale files: ${staleFiles.length}`,
57635
- `Manifests scanned: ${manifestPaths(detection).join(", ") || "\u2205"}`
57648
+ `Manifests scanned: ${manifestPaths(detection).join(", ") || "\u2205"}`,
57649
+ "Guidance: keep phase skills out of scoped `AGENTS.md` primary-skill lines; invoke them from the parent goal/handoff flow."
57636
57650
  ].join(`
57637
57651
  `)));
57638
57652
  if (emitJson) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@punks/cli",
3
- "version": "2.0.0-beta.3",
3
+ "version": "2.0.0-beta.4",
4
4
  "description": "Devpunks AI scaffolding CLI",
5
5
  "bin": {
6
6
  "devpunks": "dist/index.js",