agent-manifesto-kit 1.1.0 → 1.2.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 CHANGED
@@ -31,6 +31,14 @@ List available capabilities:
31
31
  agentkit list
32
32
  ```
33
33
 
34
+ Show one catalog view:
35
+
36
+ ```bash
37
+ agentkit list skills
38
+ agentkit list agents
39
+ agentkit list bundles
40
+ ```
41
+
34
42
  Adopt the Spec-Driven Development bundle for Claude:
35
43
 
36
44
  ```bash
@@ -75,7 +83,7 @@ such as templates, under `.claude/<bundle-name>/`.
75
83
  ## Commands
76
84
 
77
85
  ```bash
78
- agentkit list
86
+ agentkit list [skills|agents|bundles]
79
87
  agentkit lint [name]
80
88
  agentkit adopt <name> [--provider claude|codex|agnostic] [--dest <dir>] [--force] [--cli <cli>]
81
89
  ```
@@ -84,7 +92,7 @@ Command summary:
84
92
 
85
93
  | Command | Description |
86
94
  | --- | --- |
87
- | `agentkit list` | Show every capability and bundle available in the package |
95
+ | `agentkit list [skills|agents|bundles]` | Show the full catalog or one selected view; bundle views include item summaries |
88
96
  | `agentkit lint [name]` | Check all capabilities, or one named capability, for provider-specific tokens |
89
97
  | `agentkit adopt <name>` | Copy a capability or bundle into your project |
90
98
 
@@ -128,9 +136,15 @@ agentkit adopt sdd --provider codex --cli codex
128
136
  agentkit adopt brainstorm --provider codex --cli agy
129
137
  ```
130
138
 
131
- The assistant receives a structured prompt asking it to read your project's local
132
- instructions and documentation, then adapt the adopted files to your naming, paths,
133
- vocabulary, and conventions.
139
+ The assistant receives a structured prompt that explicitly frames the adaptation as an
140
+ approved, actionable task (not a proposal), asking it to read your project's local
141
+ instructions and documentation, then adapt the adopted files — including any bundle
142
+ extras such as SDD templates — to your naming, paths, vocabulary, and conventions.
143
+
144
+ Codex runs with a writable sandbox and no approval prompts (`--sandbox workspace-write
145
+ --ask-for-approval never`) so it can make the edits directly instead of stopping to ask.
146
+ Claude Code receives the prompt over stdin rather than as a CLI argument, so large
147
+ prompts never hit OS argument-length limits.
134
148
 
135
149
  Supported AI CLIs:
136
150
 
package/dist/cli.js CHANGED
@@ -44,13 +44,15 @@ function help() {
44
44
  console.log(`agentkit - discover and adopt Agent Manifesto Kit capabilities
45
45
 
46
46
  Usage:
47
- agentkit list
47
+ agentkit list [skills|agents|bundles]
48
48
  agentkit lint [name]
49
49
  agentkit adopt <name> [--provider claude|codex|agnostic] [--dest <dir>] [--force] [--cli <cli>]
50
50
 
51
51
  <name> is a capability (skill/agent/pipeline/convention) or a bundle.
52
52
  Adopting a bundle explodes it into type-specific directories.
53
53
 
54
+ list accepts one exact lowercase selector. Without a selector it shows the full catalog.
55
+
54
56
  Pass --cli to run an AI assistant after adoption to adapt the files to your project.
55
57
  Pass --force to overwrite existing targets without prompting.
56
58
 
@@ -66,7 +68,7 @@ Options:
66
68
  async function main() {
67
69
  const { positionals, flags } = parseArgs(process.argv.slice(2));
68
70
  const cmd = positionals[0];
69
- if (flags.version || flags.v) {
71
+ if ((flags.version || flags.v) && cmd !== "list") {
70
72
  console.log(version());
71
73
  return 0;
72
74
  }
@@ -83,7 +85,7 @@ async function main() {
83
85
  help();
84
86
  return 0;
85
87
  case "list":
86
- return list();
88
+ return list(positionals.slice(1), flags);
87
89
  case "lint":
88
90
  return runLint(positionals[1]);
89
91
  case "adopt": {
@@ -12,9 +12,17 @@ export const SUPPORTED_CLIS = [
12
12
  export function isSupportedCli(value) {
13
13
  return SUPPORTED_CLIS.includes(value);
14
14
  }
15
- const CLI_INVOCATIONS = {
16
- claude: { kind: "direct", args: (p) => ["claude", "--dangerously-skip-permissions", "-p", p] },
17
- codex: { kind: "stdin", bin: "codex", args: ["exec", "--skip-git-repo-check", "-"] },
15
+ export const CLI_INVOCATIONS = {
16
+ // Piped via stdin (not argv) so large prompts never hit OS ARG_MAX limits.
17
+ claude: { kind: "stdin", bin: "claude", args: ["--dangerously-skip-permissions", "-p"] },
18
+ // workspace-write + never-approval: this handoff already runs in a project
19
+ // the user chose to adapt, so Codex must not fall back to a read-only
20
+ // sandbox or stop to ask for approval mid-run.
21
+ codex: {
22
+ kind: "stdin",
23
+ bin: "codex",
24
+ args: ["exec", "--skip-git-repo-check", "--sandbox", "workspace-write", "--ask-for-approval", "never", "-"],
25
+ },
18
26
  agy: { kind: "bash", cmd: 'agy --dangerously-skip-permissions -p "$(cat "$0")"' },
19
27
  aider: { kind: "bash", cmd: 'aider --message "$(cat "$0")" --yes-always' },
20
28
  opencode: { kind: "bash", cmd: 'opencode run "$(cat "$0")"' },
@@ -22,10 +30,15 @@ const CLI_INVOCATIONS = {
22
30
  kilo: { kind: "bash", cmd: 'kilocode --auto "$(cat "$0")"' },
23
31
  qwen: { kind: "bash", cmd: 'qwen --prompt "$(cat "$0")"' },
24
32
  };
25
- function buildPrompt(files) {
26
- return `You have adopted the following AI capability files into this project:
33
+ export function buildPrompt(files) {
34
+ return `You have been asked, with the user's explicit approval, to adapt the
35
+ following AI capability files that were just adopted into this project:
27
36
  ${files.join("\n")}
28
37
 
38
+ This is an approved, actionable task, not a proposal or a discussion point.
39
+ Do not ask for confirmation, do not stop to summarize a plan, and do not
40
+ treat this message as background context — edit the files directly now.
41
+
29
42
  Before editing anything:
30
43
  1. Read CLAUDE.md (or AGENTS.md if present), README.md, and any project
31
44
  specification files under .docs/ or .ai/docs/.
@@ -36,7 +49,10 @@ Adapt each file to this project:
36
49
  - Replace generic references with project-specific names, paths, and terms
37
50
  - Align tool references and file paths to what this project actually uses
38
51
  - Preserve the file's structure, scope, and intent exactly
39
- - Leave files that need no changes untouched`;
52
+ - Leave files that need no changes untouched
53
+
54
+ Apply the edits yourself, in this working directory, as your final action —
55
+ do not defer them to the user.`;
40
56
  }
41
57
  const SPINNER = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"];
42
58
  // On Windows, `bash` in PATH resolves to the WSL relay (C:\Windows\System32\bash.exe),
@@ -59,7 +75,7 @@ function findBash() {
59
75
  }
60
76
  return "bash";
61
77
  }
62
- async function invokeAi(inv, prompt, cwd, cli) {
78
+ export async function invokeAi(inv, prompt, cwd, cli) {
63
79
  console.log(`\nRunning ${cli} to adapt adopted files — this may take a several minutes…`);
64
80
  let promptFile;
65
81
  let child;
@@ -142,6 +158,20 @@ function walkMd(dir) {
142
158
  }
143
159
  return out;
144
160
  }
161
+ // Dotfiles (.gitkeep, .DS_Store, ...) are housekeeping, not adaptation-worthy content.
162
+ function walkAll(dir) {
163
+ const out = [];
164
+ for (const entry of readdirSync(dir, { withFileTypes: true })) {
165
+ if (entry.name.startsWith("."))
166
+ continue;
167
+ const p = join(dir, entry.name);
168
+ if (entry.isDirectory())
169
+ out.push(...walkAll(p));
170
+ else
171
+ out.push(p);
172
+ }
173
+ return out;
174
+ }
145
175
  function surfaceCompanions(recommendsPath) {
146
176
  const rows = readFileSync(recommendsPath, "utf8")
147
177
  .split("\n")
@@ -215,6 +245,8 @@ async function adoptBundle(bundle, opts, onFile) {
215
245
  const dest = join(extrasBase, entry.name);
216
246
  mkdirSync(dirname(dest), { recursive: true });
217
247
  cpSync(src, dest, { recursive: true });
248
+ for (const f of walkAll(dest))
249
+ onFile?.(f);
218
250
  }
219
251
  console.log(`Adopted bundle "${bundle.name}" (${opts.provider}) -> ${opts.projectRoot}`);
220
252
  for (const { item } of toProcess)
@@ -6,25 +6,73 @@ const LABELS = {
6
6
  convention: "Conventions",
7
7
  };
8
8
  const ORDER = ["skill", "agent", "pipeline", "convention"];
9
+ const SELECTORS = ["skills", "agents", "bundles"];
9
10
  function truncate(text) {
10
11
  return text.length > 100 ? `${text.slice(0, 97)}...` : text;
11
12
  }
12
- export function list() {
13
- // Flat collection capabilities (bundle items are listed under their bundle below).
14
- const caps = scanCatalog().filter((c) => !c.bundle);
15
- for (const type of ORDER) {
13
+ function printCapabilities(caps, types) {
14
+ let count = 0;
15
+ for (const type of types) {
16
16
  const items = caps.filter((c) => c.type === type).sort((a, b) => a.name.localeCompare(b.name));
17
+ count += items.length;
17
18
  console.log(`\n${LABELS[type]} (${items.length})`);
18
19
  for (const c of items) {
19
20
  console.log(` ${c.name.padEnd(30)} ${truncate(c.description)}`);
20
21
  }
21
22
  }
22
- const bundles = scanBundles().sort((a, b) => a.name.localeCompare(b.name));
23
+ return count;
24
+ }
25
+ function printBundles(bundles) {
23
26
  console.log(`\nBundles (${bundles.length})`);
24
- for (const b of bundles) {
27
+ for (const b of bundles.sort((a, b) => a.name.localeCompare(b.name))) {
25
28
  console.log(` ${b.name.padEnd(30)} ${truncate(b.description)}`);
26
29
  console.log(` items: ${b.items.map((i) => i.name).join(", ")}`);
27
30
  }
31
+ return bundles.length;
32
+ }
33
+ function invalidList(message) {
34
+ console.error(`agentkit list: ${message}`);
35
+ console.error(`Valid selectors: ${SELECTORS.join(", ")}`);
36
+ return 1;
37
+ }
38
+ export function list(args = [], flags = {}, sources = { catalog: scanCatalog(), bundles: scanBundles() }) {
39
+ const unknownFlag = Object.keys(flags)[0];
40
+ if (unknownFlag) {
41
+ return invalidList(`unknown option "--${unknownFlag}". Use "--help" for help.`);
42
+ }
43
+ if (args.length > 1) {
44
+ return invalidList("expected at most one selector.");
45
+ }
46
+ const selector = args[0];
47
+ if (selector && !SELECTORS.includes(selector)) {
48
+ return invalidList(`unsupported selector "${selector}".`);
49
+ }
50
+ // Flat collection capabilities (bundle items are listed under their bundle below).
51
+ const caps = sources.catalog.filter((c) => !c.bundle);
52
+ if (!selector) {
53
+ printCapabilities(caps, ORDER);
54
+ printBundles(sources.bundles);
55
+ console.log("");
56
+ return 0;
57
+ }
58
+ if (selector === "bundles") {
59
+ if (sources.bundles.length === 0) {
60
+ console.log("No items found");
61
+ }
62
+ else {
63
+ printBundles(sources.bundles);
64
+ }
65
+ console.log("");
66
+ return 0;
67
+ }
68
+ const type = selector === "skills" ? "skill" : "agent";
69
+ const selected = caps.filter((c) => c.type === type);
70
+ if (selected.length === 0) {
71
+ console.log("No items found");
72
+ }
73
+ else {
74
+ printCapabilities(caps, [type]);
75
+ }
28
76
  console.log("");
29
77
  return 0;
30
78
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-manifesto-kit",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "CLI to discover and adopt Agent Manifesto Kit capabilities (skills, agents, pipelines) into your project for Claude, Codex, or AI-agnostic targets.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -26,7 +26,7 @@
26
26
  "test": "npm run build && node --test",
27
27
  "prepublishOnly": "npm run build && npm test",
28
28
  "prepare": "git config core.hooksPath .githooks",
29
- "version-branch": "node .ai/scripts/bump-version.mjs"
29
+ "version-branch": "node .claude/scripts/bump-version.mjs"
30
30
  },
31
31
  "engines": {
32
32
  "node": ">=20"