agent-manifesto-kit 0.0.0-development

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 (63) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +95 -0
  3. package/collection/NOTICE.md +36 -0
  4. package/collection/agents/code-reviewer.md +103 -0
  5. package/collection/agents/docs-manager.md +127 -0
  6. package/collection/bundles/kit-adopt/README.md +36 -0
  7. package/collection/bundles/kit-adopt/conventions/recommended-companions.md +43 -0
  8. package/collection/bundles/kit-adopt/pipelines/kit-adopt.md +52 -0
  9. package/collection/bundles/kit-adopt/skills/kit-adopt/SKILL.md +72 -0
  10. package/collection/bundles/sdd/README.md +50 -0
  11. package/collection/bundles/sdd/RECOMMENDS.md +21 -0
  12. package/collection/bundles/sdd/agents/sdd-gap-analyzer.md +79 -0
  13. package/collection/bundles/sdd/agents/sdd-spec-reviewer.md +75 -0
  14. package/collection/bundles/sdd/conventions/sdd-doc-set.md +136 -0
  15. package/collection/bundles/sdd/pipelines/sdd-adopt.md +60 -0
  16. package/collection/bundles/sdd/pipelines/sdd-bootstrap.md +60 -0
  17. package/collection/bundles/sdd/skills/sdd-doc-author/SKILL.md +69 -0
  18. package/collection/bundles/sdd/skills/sdd-feature-author/SKILL.md +71 -0
  19. package/collection/bundles/sdd/skills/sdd-index-sync/SKILL.md +61 -0
  20. package/collection/bundles/sdd/templates/docs/INDEX.md +35 -0
  21. package/collection/bundles/sdd/templates/docs/api.md +23 -0
  22. package/collection/bundles/sdd/templates/docs/architecture.md +42 -0
  23. package/collection/bundles/sdd/templates/docs/db.md +22 -0
  24. package/collection/bundles/sdd/templates/docs/decisions/ADR-template.md +24 -0
  25. package/collection/bundles/sdd/templates/docs/design.md +43 -0
  26. package/collection/bundles/sdd/templates/docs/idea.md +46 -0
  27. package/collection/bundles/sdd/templates/docs/operations.md +28 -0
  28. package/collection/bundles/sdd/templates/docs/roadmap.md +26 -0
  29. package/collection/bundles/sdd/templates/docs/security.md +24 -0
  30. package/collection/bundles/sdd/templates/docs/testing.md +34 -0
  31. package/collection/bundles/sdd/templates/features/F000_template/requirements.md +38 -0
  32. package/collection/bundles/sdd/templates/features/F000_template/scenarios.md +26 -0
  33. package/collection/bundles/sdd/templates/features/F000_template/tasks.md +11 -0
  34. package/collection/skills/brainstorm/SKILL.md +46 -0
  35. package/collection/skills/business-analyst/SKILL.md +58 -0
  36. package/collection/skills/documentation-maintenance/SKILL.md +60 -0
  37. package/collection/skills/explain-code/SKILL.md +81 -0
  38. package/collection/skills/frontend-audit/SKILL.md +135 -0
  39. package/collection/skills/frontend-impeccable-design/SKILL.md +135 -0
  40. package/collection/skills/frontend-impeccable-polish/SKILL.md +118 -0
  41. package/collection/skills/implement-feature/SKILL.md +99 -0
  42. package/collection/skills/memory-management/SKILL.md +75 -0
  43. package/collection/skills/meta-tags-optimizer/SKILL.md +73 -0
  44. package/collection/skills/pencil-design/SKILL.md +83 -0
  45. package/collection/skills/playwright-cli/SKILL.md +104 -0
  46. package/collection/skills/prepare-release-notes/SKILL.md +109 -0
  47. package/collection/skills/refactor-code/SKILL.md +104 -0
  48. package/collection/skills/review-code/SKILL.md +98 -0
  49. package/collection/skills/schema-markup-generator/SKILL.md +80 -0
  50. package/collection/skills/task-complete/SKILL.md +79 -0
  51. package/collection/skills/task-discovery/SKILL.md +69 -0
  52. package/collection/skills/task-validation/SKILL.md +71 -0
  53. package/collection/skills/test-review/SKILL.md +72 -0
  54. package/collection/skills/test-writer/SKILL.md +78 -0
  55. package/collection/skills/work-with-git/SKILL.md +154 -0
  56. package/dist/catalog.js +146 -0
  57. package/dist/cli.js +108 -0
  58. package/dist/commands/adopt.js +100 -0
  59. package/dist/commands/lint.js +26 -0
  60. package/dist/commands/list.js +30 -0
  61. package/dist/portability.js +41 -0
  62. package/dist/providers.js +37 -0
  63. package/package.json +49 -0
package/dist/cli.js ADDED
@@ -0,0 +1,108 @@
1
+ #!/usr/bin/env node
2
+ import { readFileSync } from "node:fs";
3
+ import { join } from "node:path";
4
+ import { list } from "./commands/list.js";
5
+ import { adopt } from "./commands/adopt.js";
6
+ import { runLint } from "./commands/lint.js";
7
+ import { isProvider } from "./providers.js";
8
+ import { packageRoot } from "./catalog.js";
9
+ function version() {
10
+ try {
11
+ const pkg = JSON.parse(readFileSync(join(packageRoot(), "package.json"), "utf8"));
12
+ return typeof pkg.version === "string" ? pkg.version : "unknown";
13
+ }
14
+ catch {
15
+ return "unknown";
16
+ }
17
+ }
18
+ function parseArgs(args) {
19
+ const positionals = [];
20
+ const flags = {};
21
+ for (let i = 0; i < args.length; i++) {
22
+ const arg = args[i];
23
+ if (arg.startsWith("--")) {
24
+ const key = arg.slice(2);
25
+ const next = args[i + 1];
26
+ if (next !== undefined && !next.startsWith("-")) {
27
+ flags[key] = next;
28
+ i++;
29
+ }
30
+ else {
31
+ flags[key] = true;
32
+ }
33
+ }
34
+ else if (arg.length > 1 && arg.startsWith("-")) {
35
+ flags[arg.slice(1)] = true;
36
+ }
37
+ else {
38
+ positionals.push(arg);
39
+ }
40
+ }
41
+ return { positionals, flags };
42
+ }
43
+ function help() {
44
+ console.log(`agentkit - discover and adopt Agent Manifesto Kit capabilities
45
+
46
+ Usage:
47
+ agentkit list
48
+ agentkit lint [name]
49
+ agentkit adopt <name> [--provider claude|codex|agnostic] [--dest <dir>]
50
+
51
+ <name> is a capability (skill/agent/pipeline/convention) or a bundle.
52
+ Adopting a bundle copies it whole and surfaces its recommended companions.
53
+
54
+ Options:
55
+ --provider target AI provider (default: claude)
56
+ --dest target project root (default: current directory)
57
+ --version,-v print the installed version
58
+ --help,-h show this help`);
59
+ }
60
+ function main() {
61
+ const { positionals, flags } = parseArgs(process.argv.slice(2));
62
+ const cmd = positionals[0];
63
+ if (flags.version || flags.v) {
64
+ console.log(version());
65
+ return 0;
66
+ }
67
+ if (flags.help || flags.h) {
68
+ help();
69
+ return 0;
70
+ }
71
+ if (!cmd) {
72
+ help();
73
+ return 1;
74
+ }
75
+ switch (cmd) {
76
+ case "help":
77
+ help();
78
+ return 0;
79
+ case "list":
80
+ return list();
81
+ case "lint":
82
+ return runLint(positionals[1]);
83
+ case "adopt": {
84
+ const name = positionals[1];
85
+ if (!name) {
86
+ console.error('adopt requires a <name>. Run "agentkit list" to see options.');
87
+ return 1;
88
+ }
89
+ const provider = typeof flags.provider === "string" ? flags.provider : "claude";
90
+ if (!isProvider(provider)) {
91
+ console.error(`Invalid --provider "${provider}". Use claude|codex|agnostic.`);
92
+ return 1;
93
+ }
94
+ const projectRoot = typeof flags.dest === "string" ? flags.dest : process.cwd();
95
+ return adopt({ name, provider, projectRoot });
96
+ }
97
+ default:
98
+ console.error(`Unknown command "${cmd}". Run "agentkit --help".`);
99
+ return 1;
100
+ }
101
+ }
102
+ try {
103
+ process.exit(main());
104
+ }
105
+ catch (err) {
106
+ console.error(`agentkit: ${err instanceof Error ? err.message : String(err)}`);
107
+ process.exit(1);
108
+ }
@@ -0,0 +1,100 @@
1
+ import { cpSync, existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
2
+ import { dirname, join, relative } from "node:path";
3
+ import { findBundle, findCapability } from "../catalog.js";
4
+ import { bundleDestination, destinationFor, wiringHint } from "../providers.js";
5
+ import { lint, transform } from "../portability.js";
6
+ function walkMd(dir) {
7
+ const out = [];
8
+ for (const entry of readdirSync(dir, { withFileTypes: true })) {
9
+ const p = join(dir, entry.name);
10
+ if (entry.isDirectory())
11
+ out.push(...walkMd(p));
12
+ else if (entry.name.endsWith(".md"))
13
+ out.push(p);
14
+ }
15
+ return out;
16
+ }
17
+ /** Print a bundle's RECOMMENDS.md companions as opt-in suggestions; never installs them. */
18
+ function surfaceCompanions(recommendsPath) {
19
+ const rows = readFileSync(recommendsPath, "utf8")
20
+ .split("\n")
21
+ .map((l) => /^\|\s*`([^`]+)`\s*\|\s*([^|]+)\|/.exec(l))
22
+ .filter((m) => m !== null)
23
+ .map((m) => ` - ${m[1]} (${m[2].trim()})`);
24
+ if (rows.length === 0)
25
+ return;
26
+ console.log("\nRecommended companions (optional, not installed):");
27
+ for (const r of rows)
28
+ console.log(r);
29
+ console.log("Adopt any you want with: agentkit adopt <name>");
30
+ }
31
+ function adoptBundle(bundle, opts) {
32
+ const target = bundleDestination(bundle.name, opts.provider, opts.projectRoot);
33
+ if (existsSync(target)) {
34
+ console.error(`Target already exists: ${target}`);
35
+ console.error("Remove it or choose another --dest before adopting.");
36
+ return 1;
37
+ }
38
+ mkdirSync(dirname(target), { recursive: true });
39
+ cpSync(bundle.dir, target, { recursive: true });
40
+ for (const md of walkMd(target)) {
41
+ const content = readFileSync(md, "utf8");
42
+ for (const f of lint(content)) {
43
+ console.warn(`warning: ${relative(target, md)}:${f.line} contains "${f.token}" — review for ${opts.provider}.`);
44
+ }
45
+ writeFileSync(md, transform(content, opts.provider));
46
+ }
47
+ console.log(`Adopted bundle "${bundle.name}" (${opts.provider}) -> ${target}`);
48
+ for (const item of bundle.items)
49
+ console.log(` + ${item.type} ${item.name}`);
50
+ console.log(wiringHint(opts.provider));
51
+ if (bundle.recommendsPath)
52
+ surfaceCompanions(bundle.recommendsPath);
53
+ return 0;
54
+ }
55
+ function adoptSingle(match, opts) {
56
+ const target = destinationFor(match, opts.provider, opts.projectRoot);
57
+ if (existsSync(target)) {
58
+ console.error(`Target already exists: ${target}`);
59
+ console.error("Remove it or choose another --dest before adopting.");
60
+ return 1;
61
+ }
62
+ // Non-fatal neutrality warning on the source.
63
+ for (const f of lint(readFileSync(match.sourcePath, "utf8"))) {
64
+ console.warn(`warning: ${match.name}:${f.line} contains "${f.token}" — review before relying on it for ${opts.provider}.`);
65
+ }
66
+ mkdirSync(dirname(target), { recursive: true });
67
+ if (match.isDir) {
68
+ cpSync(match.sourceCopyPath, target, { recursive: true });
69
+ for (const md of walkMd(target))
70
+ writeFileSync(md, transform(readFileSync(md, "utf8"), opts.provider));
71
+ }
72
+ else {
73
+ writeFileSync(target, transform(readFileSync(match.sourceCopyPath, "utf8"), opts.provider));
74
+ }
75
+ console.log(`Adopted ${match.type} "${match.name}" (${opts.provider}) -> ${target}`);
76
+ console.log(wiringHint(opts.provider));
77
+ return 0;
78
+ }
79
+ export function adopt(opts) {
80
+ // A bundle name takes precedence: bundles are the primary adoptable unit.
81
+ const bundle = findBundle(opts.name);
82
+ if (bundle)
83
+ return adoptBundle(bundle, opts);
84
+ const { match, ambiguous } = findCapability(opts.name);
85
+ if (ambiguous.length > 0) {
86
+ console.error(`Ambiguous name "${opts.name}" matches: ${ambiguous.map((c) => `${c.type}/${c.name}`).join(", ")}.`);
87
+ console.error("Names are expected to be unique; resolve the collision in the kit before adopting.");
88
+ return 1;
89
+ }
90
+ if (!match) {
91
+ console.error(`No capability named "${opts.name}". Run "agentkit list" to see options.`);
92
+ return 1;
93
+ }
94
+ if (match.bundle) {
95
+ console.error(`"${match.name}" is part of the "${match.bundle}" bundle and depends on other files in it.`);
96
+ console.error(`Adopt the whole bundle instead: agentkit adopt ${match.bundle}`);
97
+ return 1;
98
+ }
99
+ return adoptSingle(match, opts);
100
+ }
@@ -0,0 +1,26 @@
1
+ import { readFileSync } from "node:fs";
2
+ import { scanCatalog, findCapability } from "../catalog.js";
3
+ import { lint } from "../portability.js";
4
+ export function runLint(name) {
5
+ let caps;
6
+ if (name) {
7
+ const match = findCapability(name).match;
8
+ if (!match) {
9
+ console.error(`No capability named "${name}". Run "agentkit list" to see options.`);
10
+ return 1;
11
+ }
12
+ caps = [match];
13
+ }
14
+ else {
15
+ caps = scanCatalog();
16
+ }
17
+ let total = 0;
18
+ for (const cap of caps) {
19
+ for (const f of lint(readFileSync(cap.sourcePath, "utf8"))) {
20
+ console.log(`${cap.type}/${cap.name}:${f.line} breaking token "${f.token}"`);
21
+ total++;
22
+ }
23
+ }
24
+ console.log(total === 0 ? "No breaking provider-specific tokens found." : `${total} finding(s).`);
25
+ return total === 0 ? 0 : 1;
26
+ }
@@ -0,0 +1,30 @@
1
+ import { scanBundles, scanCatalog } from "../catalog.js";
2
+ const LABELS = {
3
+ skill: "Skills",
4
+ agent: "Agents",
5
+ pipeline: "Pipelines",
6
+ convention: "Conventions",
7
+ };
8
+ const ORDER = ["skill", "agent", "pipeline", "convention"];
9
+ function truncate(text) {
10
+ return text.length > 100 ? `${text.slice(0, 97)}...` : text;
11
+ }
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) {
16
+ const items = caps.filter((c) => c.type === type).sort((a, b) => a.name.localeCompare(b.name));
17
+ console.log(`\n${LABELS[type]} (${items.length})`);
18
+ for (const c of items) {
19
+ console.log(` ${c.name.padEnd(30)} ${truncate(c.description)}`);
20
+ }
21
+ }
22
+ const bundles = scanBundles().sort((a, b) => a.name.localeCompare(b.name));
23
+ console.log(`\nBundles (${bundles.length})`);
24
+ for (const b of bundles) {
25
+ console.log(` ${b.name.padEnd(30)} ${truncate(b.description)}`);
26
+ console.log(` items: ${b.items.map((i) => i.name).join(", ")}`);
27
+ }
28
+ console.log("");
29
+ return 0;
30
+ }
@@ -0,0 +1,41 @@
1
+ import { PROVIDER_ROOT } from "./providers.js";
2
+ /** Breaking Claude-specific tokens — high-precision, safe to match mechanically. */
3
+ const BREAKING_TOKENS = ["CLAUDE.md", "Task tool"];
4
+ /** Detect breaking provider-specific tokens. Detection only — never rewrites prose. */
5
+ export function lint(content) {
6
+ const findings = [];
7
+ content.split("\n").forEach((text, i) => {
8
+ for (const token of BREAKING_TOKENS) {
9
+ if (text.includes(token))
10
+ findings.push({ token, line: i + 1 });
11
+ }
12
+ });
13
+ return findings;
14
+ }
15
+ const RULES = {
16
+ claude: { swapPaths: false, stripKeys: [] },
17
+ codex: { swapPaths: true, stripKeys: ["tools"] },
18
+ agnostic: { swapPaths: true, stripKeys: [] },
19
+ };
20
+ /** Apply the deterministic per-provider transform to Markdown content. */
21
+ export function transform(content, provider) {
22
+ const rule = RULES[provider];
23
+ let out = content;
24
+ if (rule.swapPaths)
25
+ out = out.split(".claude/").join(`${PROVIDER_ROOT[provider]}/`);
26
+ if (rule.stripKeys.length > 0)
27
+ out = stripFrontmatterKeys(out, rule.stripKeys);
28
+ return out;
29
+ }
30
+ /** Remove the given keys from the leading YAML frontmatter block only. */
31
+ function stripFrontmatterKeys(content, keys) {
32
+ const m = /^(---\r?\n)([\s\S]*?)(\r?\n---)/.exec(content);
33
+ if (!m)
34
+ return content;
35
+ const eol = m[1].includes("\r") ? "\r\n" : "\n";
36
+ const kept = m[2]
37
+ .split(/\r?\n/)
38
+ .filter((line) => !keys.some((k) => new RegExp(`^${k}\\s*:`).test(line)))
39
+ .join(eol);
40
+ return m[1] + kept + m[3] + content.slice(m[0].length);
41
+ }
@@ -0,0 +1,37 @@
1
+ import { join } from "node:path";
2
+ export const PROVIDER_ROOT = {
3
+ claude: ".claude",
4
+ codex: ".codex",
5
+ agnostic: ".ai",
6
+ };
7
+ const TYPE_DIR = {
8
+ skill: "skills",
9
+ agent: "agents",
10
+ pipeline: "pipelines",
11
+ convention: "conventions",
12
+ };
13
+ export function isProvider(value) {
14
+ return value === "claude" || value === "codex" || value === "agnostic";
15
+ }
16
+ /** Provider-correct destination for a single capability inside the consumer project. */
17
+ export function destinationFor(cap, provider, projectRoot) {
18
+ const base = join(projectRoot, PROVIDER_ROOT[provider], TYPE_DIR[cap.type]);
19
+ return cap.isDir ? join(base, cap.name) : join(base, `${cap.name}.md`);
20
+ }
21
+ /**
22
+ * Destination for a whole bundle. The bundle folder is copied intact under the provider
23
+ * root so its bundle-relative references keep resolving without rewriting.
24
+ */
25
+ export function bundleDestination(name, provider, projectRoot) {
26
+ return join(projectRoot, PROVIDER_ROOT[provider], "bundles", name);
27
+ }
28
+ export function wiringHint(provider) {
29
+ switch (provider) {
30
+ case "claude":
31
+ return "Wire it up: reference it from CLAUDE.md or your .claude configuration as needed.";
32
+ case "codex":
33
+ return "Wire it up: register it in your AGENTS.md capability registry.";
34
+ case "agnostic":
35
+ return "Wire it up: register it in your project's AGENTS.md / .ai capability registry.";
36
+ }
37
+ }
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "agent-manifesto-kit",
3
+ "version": "0.0.0-development",
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
+ "type": "module",
6
+ "bin": {
7
+ "agentkit": "dist/cli.js"
8
+ },
9
+ "files": [
10
+ "dist",
11
+ "collection"
12
+ ],
13
+ "keywords": [
14
+ "ai",
15
+ "agents",
16
+ "skills",
17
+ "claude",
18
+ "codex",
19
+ "spec-driven-development",
20
+ "cli",
21
+ "agent-manifesto"
22
+ ],
23
+ "scripts": {
24
+ "build": "tsc",
25
+ "start": "node dist/cli.js",
26
+ "test": "npm run build && node --test",
27
+ "prepublishOnly": "npm run build && npm test"
28
+ },
29
+ "engines": {
30
+ "node": ">=20"
31
+ },
32
+ "license": "MIT",
33
+ "author": "Alexey Platkovsky",
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "git+https://github.com/AlexeyPlatkovsky/agent-manifesto-kit.git"
37
+ },
38
+ "homepage": "https://github.com/AlexeyPlatkovsky/agent-manifesto-kit#readme",
39
+ "bugs": {
40
+ "url": "https://github.com/AlexeyPlatkovsky/agent-manifesto-kit/issues"
41
+ },
42
+ "devDependencies": {
43
+ "@semantic-release/changelog": "^6.0.3",
44
+ "@semantic-release/git": "^10.0.1",
45
+ "@types/node": "^22.19.19",
46
+ "semantic-release": "^24.2.9",
47
+ "typescript": "^5.6.0"
48
+ }
49
+ }