@punks/cli 2.0.0-beta.0 → 2.0.0-beta.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/README.md CHANGED
@@ -42,7 +42,7 @@ Use `--baseline bundled` to force the npm-shipped baseline, or `--refresh-baseli
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.
44
44
 
45
- The default subagent manifest includes Python templates that combine the language skills into `python-app`, `python-async`, and `python-testing` specialists.
45
+ The generated subagent manifest is repo-shaped from selected packs and prompt specs. Python specialists are generated only when the Python language pack is selected.
46
46
 
47
47
  To install only the local `dp-cli` operator skill from the public skills repo checkout:
48
48
 
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.0";
52438
+ var version = "2.0.0-beta.1";
52439
52439
  // src/baseline/bundled.ts
52440
52440
  var bundledBaseline = {
52441
52441
  summary: {
@@ -54883,6 +54883,66 @@ var renderSubagentManifestPrompt = ({
54883
54883
  "- Use explicit skill lists when runtime inheritance differs across harnesses."
54884
54884
  ].join(`
54885
54885
  `);
54886
+ var renderSubagentManifestModule = ({
54887
+ spec,
54888
+ baseline,
54889
+ fallback
54890
+ }) => {
54891
+ if (spec.specialists.length === 0) {
54892
+ return fallback;
54893
+ }
54894
+ const baseSpecialists = spec.finalPacks.includes("research") && !spec.specialists.some((specialist) => specialist.id === "code-review") ? [
54895
+ {
54896
+ id: "code-review",
54897
+ ownedPaths: ["."],
54898
+ guidanceFiles: ["AGENTS.md"],
54899
+ packs: ["research"],
54900
+ skills: ["simplify", "improve-codebase-architecture"],
54901
+ notes: "Use for findings-first review across changed code, simplification opportunities, and grounded architecture-friction findings."
54902
+ }
54903
+ ] : [];
54904
+ const specialists = [...baseSpecialists, ...spec.specialists];
54905
+ const selectedPacks = [...new Set(specialists.flatMap((specialist) => specialist.packs))];
54906
+ const packDescriptions = new Map(baseline.packs.map((pack2) => [pack2.id, pack2.description]));
54907
+ const capabilityPacks = Object.fromEntries(selectedPacks.map((packId) => [
54908
+ packId,
54909
+ {
54910
+ description: packDescriptions.get(packId) ?? `${packId} guidance pack.`,
54911
+ skills: skillsForPack(packId, baseline)
54912
+ }
54913
+ ]));
54914
+ const agents = specialists.map((specialist) => ({
54915
+ name: specialist.id,
54916
+ description: specialist.notes,
54917
+ ownedPaths: specialist.ownedPaths.flatMap((ownedPath) => ownedPath === "." ? ["**/*"] : [ownedPath, `${ownedPath}/**`]),
54918
+ guidanceFiles: specialist.guidanceFiles,
54919
+ activationInstructions: [
54920
+ "Before planning or editing, read every file in `guidanceFiles` for this role.",
54921
+ "In those scoped AGENTS.md files, find the `Primary skills here` list and treat each named skill as mandatory for matching work.",
54922
+ "Activate a skill by opening its SKILL.md, reading the workflow/checklist needed for the assigned task, and applying it before edits.",
54923
+ "If the task touches multiple owned or related scopes, inspect each scope's nearest AGENTS.md and activate the union of relevant skills."
54924
+ ],
54925
+ packs: specialist.packs,
54926
+ skills: specialist.skills,
54927
+ boundaries: [
54928
+ "Operate only inside the assigned owned paths unless the parent explicitly expands scope.",
54929
+ "If the task clearly belongs to another specialist, say so explicitly instead of improvising outside your scope.",
54930
+ "If the task changes architecture, setup, contracts, decisions, or operator workflow, update the relevant docs or runbook in the same task."
54931
+ ]
54932
+ }));
54933
+ return [
54934
+ "const capabilityPacks = ",
54935
+ JSON.stringify(capabilityPacks, null, 2),
54936
+ `;
54937
+ `,
54938
+ "const agents = ",
54939
+ JSON.stringify(agents, null, 2),
54940
+ `;
54941
+ `,
54942
+ `export { agents, capabilityPacks };
54943
+ `
54944
+ ].join("");
54945
+ };
54886
54946
  var sortSubagentSpecialists = (spec) => ({
54887
54947
  ...spec,
54888
54948
  specialists: spec.specialists.toSorted((left3, right3) => left3.id.localeCompare(right3.id))
@@ -55470,7 +55530,11 @@ var writeScaffoldOutput = ({
55470
55530
  generatedFiles.push(writeArtifact({
55471
55531
  outputDirectory,
55472
55532
  relativePath: ".agents/subagents/manifest.mjs",
55473
- content: shouldPreserveExistingManagedFiles && existsSync4(sourceManifestPath) ? readFileSync5(sourceManifestPath, "utf8") : defaultSubagentManifestTemplate
55533
+ content: shouldPreserveExistingManagedFiles && existsSync4(sourceManifestPath) ? readFileSync5(sourceManifestPath, "utf8") : renderSubagentManifestModule({
55534
+ spec: subagentManifestSpec,
55535
+ baseline,
55536
+ fallback: defaultSubagentManifestTemplate
55537
+ })
55474
55538
  }));
55475
55539
  subagentFiles.push(".agents/subagents/manifest.mjs");
55476
55540
  for (const hook of hookRegistryForBaseline(baseline).filter((entry) => finalHookIds.includes(entry.id))) {
@@ -57457,7 +57521,7 @@ var runUpdate = ({
57457
57521
  finalPacks,
57458
57522
  outputDirectory: expectedDirectory,
57459
57523
  repoShapeMode,
57460
- preserveExistingManagedFiles: false,
57524
+ preserveExistingManagedFiles: true,
57461
57525
  displayOutputDirectory: rootDirectory,
57462
57526
  baseline
57463
57527
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@punks/cli",
3
- "version": "2.0.0-beta.0",
3
+ "version": "2.0.0-beta.1",
4
4
  "description": "Devpunks AI scaffolding CLI",
5
5
  "bin": {
6
6
  "devpunks": "dist/index.js",
@@ -21,6 +21,7 @@
21
21
  "dev": "bun run ./src/index.ts scaffold",
22
22
  "local": "bun run build && bun run ./dist/index.js",
23
23
  "release:publish": "node ./scripts/publish-release.mjs",
24
+ "release:publish:beta": "NPM_TAG=beta node ./scripts/publish-release.mjs",
24
25
  "sync:skills": "node ./scripts/sync-skills-repo.mjs",
25
26
  "test": "vitest run --config vitest.config.ts"
26
27
  },