aigentdocs 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 rodrigo-amc and AIGenticDocs contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,24 @@
1
+ # aigentdocs
2
+
3
+ CLI for the [AIGentDocs](https://github.com/rodrigo-amc/AIGentDocs) docs-as-code standard: living domain documentation designed for AI coding agents. Deterministic — no LLM involved.
4
+
5
+ ```bash
6
+ # Scaffold the structure into your repository (or --lite for the minimal profile)
7
+ npx aigentdocs init
8
+
9
+ # Validate documentation compliance (exit 1 on critical findings)
10
+ npx aigentdocs lint
11
+
12
+ # Install the pre-commit hook (only critical findings block; bypass: --no-verify)
13
+ npx aigentdocs hooks install
14
+
15
+ # Generate per-tool adapter files pointing to AGENTS.md
16
+ npx aigentdocs adapt
17
+
18
+ # Upgrade docs/standard/ to this CLI's bundled standard version
19
+ npx aigentdocs update
20
+ ```
21
+
22
+ Once installed (`npm i -D aigentdocs`), the short alias `agd` works too.
23
+
24
+ Full documentation: see the [AIGentDocs repository](https://github.com/rodrigo-amc/AIGentDocs).
@@ -0,0 +1,2 @@
1
+ /** Write .git/hooks/pre-commit in the repository at targetDir. Returns the written path. */
2
+ export declare function installPreCommitHook(targetDir: string): Promise<string>;
@@ -0,0 +1,42 @@
1
+ import { access, mkdir, writeFile } from "node:fs/promises";
2
+ import path from "node:path";
3
+ /**
4
+ * Pre-commit hook installation. Design constraint (T-07): the tool informs,
5
+ * the human decides — only critical findings block, and the failure message
6
+ * always shows the conscious bypass.
7
+ */
8
+ const HOOK = `#!/bin/sh
9
+ # AIGentDocs pre-commit hook — validates documentation compliance.
10
+ # Installed by 'aigentdocs hooks install'. Deterministic; no LLM involved.
11
+ #
12
+ # The tool informs, the human decides: only critical findings block,
13
+ # and you can always consciously bypass this check.
14
+
15
+ npx --no-install aigentdocs lint
16
+ status=$?
17
+ if [ $status -ne 0 ]; then
18
+ echo ""
19
+ echo "Documentation compliance check failed (see findings above)."
20
+ echo "Fix the documentation, or to proceed anyway — consciously — run:"
21
+ echo ""
22
+ echo " git commit --no-verify"
23
+ echo ""
24
+ exit $status
25
+ fi
26
+ `;
27
+ const exists = (p) => access(p).then(() => true, () => false);
28
+ /** Write .git/hooks/pre-commit in the repository at targetDir. Returns the written path. */
29
+ export async function installPreCommitHook(targetDir) {
30
+ const gitDir = path.join(targetDir, ".git");
31
+ if (!(await exists(gitDir))) {
32
+ throw new Error(`'${targetDir}' is not a git repository ('.git' not found)`);
33
+ }
34
+ const hookPath = path.join(gitDir, "hooks", "pre-commit");
35
+ if (await exists(hookPath)) {
36
+ throw new Error(`'${hookPath}' already exists — refusing to overwrite. Append the 'aigentdocs lint' call to your existing hook manually.`);
37
+ }
38
+ await mkdir(path.dirname(hookPath), { recursive: true });
39
+ await writeFile(hookPath, HOOK, { mode: 0o755 });
40
+ return hookPath;
41
+ }
42
+ //# sourceMappingURL=hooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../src/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B;;;;GAIG;AAEH,MAAM,IAAI,GAAG;;;;;;;;;;;;;;;;;;CAkBZ,CAAC;AAEF,MAAM,MAAM,GAAG,CAAC,CAAS,EAAoB,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;AAExF,4FAA4F;AAC5F,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,SAAiB;IAC1D,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAC5C,IAAI,CAAC,CAAC,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CAAC,IAAI,SAAS,8CAA8C,CAAC,CAAC;IAC/E,CAAC;IACD,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;IAC1D,IAAI,MAAM,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CACb,IAAI,QAAQ,6GAA6G,CAC1H,CAAC;IACJ,CAAC;IACD,MAAM,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACzD,MAAM,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACjD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env node
2
+ import { main } from "./main.js";
3
+ // Exit quietly when stdout is piped to a consumer that closes early
4
+ // (e.g. `aigentdocs lint | head`); EPIPE is not an error for a CLI.
5
+ process.stdout.on("error", (error) => {
6
+ if (error.code === "EPIPE") {
7
+ process.exit(0);
8
+ }
9
+ throw error;
10
+ });
11
+ process.exitCode = await main(process.argv.slice(2), {
12
+ out: (text) => process.stdout.write(text),
13
+ err: (text) => process.stderr.write(text),
14
+ });
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,oEAAoE;AACpE,oEAAoE;AACpE,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAA4B,EAAE,EAAE;IAC1D,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;QAC3B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IACD,MAAM,KAAK,CAAC;AACd,CAAC,CAAC,CAAC;AAEH,OAAO,CAAC,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;IACnD,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;IACzC,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;CAC1C,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export interface Io {
2
+ out: (text: string) => void;
3
+ err: (text: string) => void;
4
+ }
5
+ /** Entry point of the CLI. Returns the process exit code. */
6
+ export declare function main(argv: string[], io: Io): Promise<number>;
@@ -0,0 +1,210 @@
1
+ import { createRequire } from "node:module";
2
+ import path from "node:path";
3
+ import { adaptProject, initProject, lintProject, updateStandard } from "@aigentdocs/core";
4
+ import { installPreCommitHook } from "./hooks.js";
5
+ const require = createRequire(import.meta.url);
6
+ const { version } = require("../../package.json");
7
+ const HELP = `aigentdocs ${version} — tooling for the AIGentDocs docs-as-code standard
8
+
9
+ Usage: aigentdocs <command> (or its short alias: agd <command>)
10
+
11
+ Commands:
12
+ init [path] [--lite] Scaffold docs/ into a repository (path defaults to
13
+ the current directory; --lite for the minimal profile)
14
+ lint [path] Validate documentation compliance (exits 1 on
15
+ critical findings)
16
+ hooks install [path] Install the pre-commit hook that runs lint (only
17
+ critical findings block; bypass: --no-verify)
18
+ adapt [path] [--tool x] Generate per-tool adapter files pointing to
19
+ AGENTS.md (tools: claude, cursor, copilot,
20
+ antigravity; default: all). Never overwrites
21
+ hand-edited files.
22
+ update [path] [--check] Upgrade docs/standard to this CLI's bundled
23
+ version (--check only reports; exits 1 if outdated)
24
+
25
+ Options:
26
+ -h, --help Show this help
27
+ -v, --version Show the CLI version
28
+ `;
29
+ /** Locate the packaged standard (ADR-0004). */
30
+ function standardDir() {
31
+ const pkgJson = require.resolve("@aigentdocs/standard/package.json");
32
+ return path.join(path.dirname(pkgJson), "standard");
33
+ }
34
+ const ICONS = {
35
+ critical: "🔴",
36
+ warning: "🟡",
37
+ suggestion: "🟢",
38
+ };
39
+ async function runLint(root, io) {
40
+ let findings;
41
+ let filesChecked;
42
+ try {
43
+ ({ findings, filesChecked } = await lintProject(root));
44
+ }
45
+ catch (error) {
46
+ io.err(`aigentdocs: ${error instanceof Error ? error.message : String(error)}\n`);
47
+ return 2;
48
+ }
49
+ const byFile = new Map();
50
+ for (const finding of findings) {
51
+ const list = byFile.get(finding.file) ?? [];
52
+ list.push(finding);
53
+ byFile.set(finding.file, list);
54
+ }
55
+ for (const [file, list] of byFile) {
56
+ io.out(`${file}\n`);
57
+ for (const f of list) {
58
+ io.out(` ${ICONS[f.severity]} ${f.rule} ${f.message}\n`);
59
+ }
60
+ }
61
+ const count = (severity) => findings.filter((f) => f.severity === severity).length;
62
+ const criticals = count("critical");
63
+ io.out(`${findings.length === 0 ? "No findings. " : "\n"}` +
64
+ `${filesChecked} file(s) checked: ${criticals} critical, ${count("warning")} warning(s), ${count("suggestion")} suggestion(s).\n`);
65
+ return criticals > 0 ? 1 : 0;
66
+ }
67
+ /** Entry point of the CLI. Returns the process exit code. */
68
+ export async function main(argv, io) {
69
+ const [command] = argv;
70
+ if (command === undefined || command === "help" || command === "--help" || command === "-h") {
71
+ io.out(HELP);
72
+ return 0;
73
+ }
74
+ if (command === "--version" || command === "-v") {
75
+ io.out(`${version}\n`);
76
+ return 0;
77
+ }
78
+ if (command === "lint") {
79
+ return runLint(argv[1] ?? process.cwd(), io);
80
+ }
81
+ if (command === "init") {
82
+ const rest = argv.slice(1);
83
+ const profile = rest.includes("--lite") ? "lite" : "full";
84
+ const positional = rest.filter((arg) => !arg.startsWith("--"));
85
+ const unknownFlags = rest.filter((arg) => arg.startsWith("--") && arg !== "--lite");
86
+ if (unknownFlags.length > 0) {
87
+ io.err(`aigentdocs: unknown init option '${unknownFlags[0]}'\n`);
88
+ return 2;
89
+ }
90
+ const target = positional[0] ?? process.cwd();
91
+ try {
92
+ const result = await initProject(target, standardDir(), profile);
93
+ io.out(`Initialized AIGentDocs (${result.profile} profile) in ${target}:\n`);
94
+ for (const entry of result.created) {
95
+ io.out(` + ${entry}\n`);
96
+ }
97
+ io.out("\nNext steps:\n" +
98
+ " 1. Customize docs/standard/README.md (project name, conventions" +
99
+ (result.profile === "lite" ? ", set 'Adoption profile: lite'" : "") +
100
+ ").\n" +
101
+ " 2. Read docs/standard/QUICKSTART.md for the workflow.\n" +
102
+ (result.profile === "lite"
103
+ ? " 3. Run 'aigentdocs lint' — the empty [REQUIRED] sections it reports are your documentation to-do list.\n"
104
+ : " 3. Start a 01_product session to create vision.md and roadmap.md from the templates.\n"));
105
+ return 0;
106
+ }
107
+ catch (error) {
108
+ io.err(`aigentdocs: ${error instanceof Error ? error.message : String(error)}\n`);
109
+ return 2;
110
+ }
111
+ }
112
+ if (command === "adapt") {
113
+ const rest = argv.slice(1);
114
+ const tools = [];
115
+ const positional = [];
116
+ for (let i = 0; i < rest.length; i++) {
117
+ const arg = rest[i] ?? "";
118
+ if (arg === "--tool") {
119
+ const value = rest[++i];
120
+ if (value === undefined) {
121
+ io.err("aigentdocs: --tool requires a value\n");
122
+ return 2;
123
+ }
124
+ tools.push(...value.split(","));
125
+ }
126
+ else if (arg.startsWith("--")) {
127
+ io.err(`aigentdocs: unknown adapt option '${arg}'\n`);
128
+ return 2;
129
+ }
130
+ else {
131
+ positional.push(arg);
132
+ }
133
+ }
134
+ try {
135
+ const result = await adaptProject(positional[0] ?? process.cwd(), tools);
136
+ for (const entry of result.written) {
137
+ io.out(` + ${entry.file} (${entry.description})\n`);
138
+ }
139
+ for (const skip of result.skipped) {
140
+ io.out(` ! ${skip.file} (${skip.reason})\n`);
141
+ }
142
+ io.out(`\n${result.written.length} adapter(s) written, ${result.skipped.length} skipped. Adapters point to AGENTS.md — edit that file, then re-run adapt.\n`);
143
+ return 0;
144
+ }
145
+ catch (error) {
146
+ io.err(`aigentdocs: ${error instanceof Error ? error.message : String(error)}\n`);
147
+ return 2;
148
+ }
149
+ }
150
+ if (command === "update") {
151
+ const rest = argv.slice(1);
152
+ const check = rest.includes("--check");
153
+ const positional = rest.filter((arg) => !arg.startsWith("--"));
154
+ const unknownFlags = rest.filter((arg) => arg.startsWith("--") && arg !== "--check");
155
+ if (unknownFlags.length > 0) {
156
+ io.err(`aigentdocs: unknown update option '${unknownFlags[0]}'\n`);
157
+ return 2;
158
+ }
159
+ try {
160
+ const result = await updateStandard(positional[0] ?? process.cwd(), standardDir(), { check });
161
+ switch (result.status) {
162
+ case "up-to-date":
163
+ io.out(`Standard is up to date (${result.from}).\n`);
164
+ return 0;
165
+ case "ahead":
166
+ io.err(`aigentdocs: the installed standard (${result.from}) is newer than this CLI's (${result.to}).\n` +
167
+ "Update the CLI instead: npm install -D aigentdocs@latest\n");
168
+ return 2;
169
+ case "would-update":
170
+ case "updated": {
171
+ const verb = result.status === "updated" ? "Updated" : "Update available:";
172
+ io.out(`${verb} ${result.from} -> ${result.to}\n\nChanges that need your attention:\n`);
173
+ for (const note of result.notes) {
174
+ io.out(` ${note.version} (${note.date ?? "?"}): ${note.summary ?? ""}\n`);
175
+ }
176
+ io.out("\nDetails: docs/standard/changelog.yaml\n");
177
+ if (result.readmeNeedsMerge) {
178
+ io.out("\nYour customized docs/standard/README.md was preserved. The new version\n" +
179
+ "was written to docs/standard/README.md.new — merge it manually and delete it.\n");
180
+ }
181
+ return result.status === "would-update" ? 1 : 0;
182
+ }
183
+ }
184
+ }
185
+ catch (error) {
186
+ io.err(`aigentdocs: ${error instanceof Error ? error.message : String(error)}\n`);
187
+ return 2;
188
+ }
189
+ }
190
+ if (command === "hooks") {
191
+ if (argv[1] !== "install") {
192
+ io.err(`aigentdocs: unknown hooks subcommand '${argv[1] ?? ""}'. Did you mean 'hooks install'?\n`);
193
+ return 2;
194
+ }
195
+ try {
196
+ const hookPath = await installPreCommitHook(argv[2] ?? process.cwd());
197
+ io.out(`Installed pre-commit hook: ${hookPath}\n`);
198
+ io.out("It runs 'aigentdocs lint' before each commit. Only critical findings block;\n");
199
+ io.out("to consciously bypass it: git commit --no-verify\n");
200
+ return 0;
201
+ }
202
+ catch (error) {
203
+ io.err(`aigentdocs: ${error instanceof Error ? error.message : String(error)}\n`);
204
+ return 2;
205
+ }
206
+ }
207
+ io.err(`aigentdocs: unknown or not yet implemented command '${command}'. See 'aigentdocs help'.\n`);
208
+ return 1;
209
+ }
210
+ //# sourceMappingURL=main.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/main.ts"],"names":[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AAC,CAAC;YAClF,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;IAED,IAAI,OAAO,KAAK,OAAO,EAAE,CAAC;QACxB,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE,CAAC;YAC1B,EAAE,CAAC,GAAG,CAAC,yCAAyC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,oCAAoC,CAAC,CAAC;YACnG,OAAO,CAAC,CAAC;QACX,CAAC;QACD,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;YACtE,EAAE,CAAC,GAAG,CAAC,8BAA8B,QAAQ,IAAI,CAAC,CAAC;YACnD,EAAE,CAAC,GAAG,CAAC,+EAA+E,CAAC,CAAC;YACxF,EAAE,CAAC,GAAG,CAAC,oDAAoD,CAAC,CAAC;YAC7D,OAAO,CAAC,CAAC;QACX,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,EAAE,CAAC,GAAG,CAAC,eAAe,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAClF,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;IAED,EAAE,CAAC,GAAG,CAAC,uDAAuD,OAAO,6BAA6B,CAAC,CAAC;IACpG,OAAO,CAAC,CAAC;AACX,CAAC"}
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "aigentdocs",
3
+ "version": "0.1.0",
4
+ "description": "CLI for the AIGentDocs docs-as-code standard: scaffold, validate, and maintain AI-agent-ready project documentation. Deterministic — no LLM involved.",
5
+ "license": "MIT",
6
+ "homepage": "https://github.com/rodrigo-amc/AIGentDocs#readme",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/rodrigo-amc/AIGentDocs.git",
10
+ "directory": "packages/cli"
11
+ },
12
+ "keywords": ["documentation", "docs-as-code", "ai-agents", "agents-md", "cli", "lint", "scaffold"],
13
+ "type": "module",
14
+ "bin": {
15
+ "aigentdocs": "dist/src/index.js",
16
+ "agd": "dist/src/index.js"
17
+ },
18
+ "main": "dist/src/main.js",
19
+ "types": "dist/src/main.d.ts",
20
+ "files": [
21
+ "dist/src"
22
+ ],
23
+ "publishConfig": {
24
+ "access": "public"
25
+ },
26
+ "engines": {
27
+ "node": ">=20"
28
+ },
29
+ "dependencies": {
30
+ "@aigentdocs/core": "0.1.0",
31
+ "@aigentdocs/standard": "^1.4.3"
32
+ }
33
+ }