agent-manifesto-kit 1.1.2 → 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
 
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": {
@@ -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.2",
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": {