@theglitchking/hit-em-with-the-docs 2.7.0 → 2.8.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.
Files changed (43) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/README.md +40 -1
  4. package/dist/action/core/enforce/guard.d.ts +54 -0
  5. package/dist/action/core/enforce/guard.d.ts.map +1 -0
  6. package/dist/action/generators/regenerate.d.ts +14 -3
  7. package/dist/action/generators/regenerate.d.ts.map +1 -1
  8. package/dist/action/index.d.ts +1 -0
  9. package/dist/action/index.d.ts.map +1 -1
  10. package/dist/action/index.js +1 -1
  11. package/dist/action/utils/config.d.ts +58 -11
  12. package/dist/action/utils/config.d.ts.map +1 -1
  13. package/dist/action/utils/glob.d.ts +15 -4
  14. package/dist/action/utils/glob.d.ts.map +1 -1
  15. package/dist/cli/index.js +45 -4
  16. package/dist/cli/index.js.map +1 -1
  17. package/dist/core/enforce/guard.d.ts +54 -0
  18. package/dist/core/enforce/guard.d.ts.map +1 -0
  19. package/dist/core/enforce/guard.js +201 -0
  20. package/dist/core/enforce/guard.js.map +1 -0
  21. package/dist/generators/regenerate.d.ts +14 -3
  22. package/dist/generators/regenerate.d.ts.map +1 -1
  23. package/dist/generators/regenerate.js +99 -16
  24. package/dist/generators/regenerate.js.map +1 -1
  25. package/dist/index.d.ts +1 -0
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +2 -0
  28. package/dist/index.js.map +1 -1
  29. package/dist/utils/config.d.ts +47 -0
  30. package/dist/utils/config.d.ts.map +1 -1
  31. package/dist/utils/config.js +13 -0
  32. package/dist/utils/config.js.map +1 -1
  33. package/dist/utils/glob.d.ts +15 -4
  34. package/dist/utils/glob.d.ts.map +1 -1
  35. package/dist/utils/glob.js +16 -4
  36. package/dist/utils/glob.js.map +1 -1
  37. package/hooks/hooks.json +16 -1
  38. package/hooks/pre-tool-use.js +98 -0
  39. package/hooks/session-brief.js +51 -0
  40. package/package.json +2 -1
  41. package/scripts/link-skills.js +5 -4
  42. package/skills/documentation-lifecycle/SKILL.md +130 -0
  43. package/templates/claude/CLAUDE.md +0 -208
@@ -9,10 +9,21 @@ export interface GlobOptions {
9
9
  */
10
10
  export declare function glob(pattern: string, options?: GlobOptions): Promise<string[]>;
11
11
  /**
12
- * Reserved documentation subdirectory for DEPRECATED docs. Anything under
13
- * `<docs>/archive/` is intentionally excluded from every hewtd scan (audit,
14
- * link-check, metadata-sync, integrate dup-detection, link graph, search) —
15
- * it's a parking lot for retired docs, not part of the active corpus.
12
+ * Reserved documentation subdirectory for DEPRECATED docs.
13
+ *
14
+ * **Archived content is referenceable, never concrete.** A link *into* the
15
+ * archive still resolves link-check validates targets by file existence, so
16
+ * history stays reachable. But nothing under an `archive/` folder is part of
17
+ * the active corpus: it is not indexed, not audited, not metadata-validated,
18
+ * not dup-checked, and never counted. It is what the docs *used* to say, and it
19
+ * is never evidence of what is true now.
20
+ *
21
+ * The exclusion applies at **any depth** — `<docs>/archive/` and
22
+ * `<docs>/features/archive/` alike. Before 2.8.0 the ignore glob was anchored
23
+ * at the docs root, so a nested `archive/` was still scanned and validated
24
+ * (while 2.7.1's indexer correctly skipped it) — archived docs could raise
25
+ * audit errors and stale-metadata warnings for content nobody was supposed to
26
+ * be reading.
16
27
  */
17
28
  export declare const ARCHIVE_DIR = "archive";
18
29
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"glob.d.ts","sourceRoot":"","sources":["../../src/utils/glob.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,WAAW;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED;;GAEG;AACH,wBAAsB,IAAI,CACxB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,WAAgB,GACxB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,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEpE;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGpD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAElD"}
@@ -17,10 +17,21 @@ export async function glob(pattern, options = {}) {
17
17
  return matches;
18
18
  }
19
19
  /**
20
- * Reserved documentation subdirectory for DEPRECATED docs. Anything under
21
- * `<docs>/archive/` is intentionally excluded from every hewtd scan (audit,
22
- * link-check, metadata-sync, integrate dup-detection, link graph, search) —
23
- * it's a parking lot for retired docs, not part of the active corpus.
20
+ * Reserved documentation subdirectory for DEPRECATED docs.
21
+ *
22
+ * **Archived content is referenceable, never concrete.** A link *into* the
23
+ * archive still resolves link-check validates targets by file existence, so
24
+ * history stays reachable. But nothing under an `archive/` folder is part of
25
+ * the active corpus: it is not indexed, not audited, not metadata-validated,
26
+ * not dup-checked, and never counted. It is what the docs *used* to say, and it
27
+ * is never evidence of what is true now.
28
+ *
29
+ * The exclusion applies at **any depth** — `<docs>/archive/` and
30
+ * `<docs>/features/archive/` alike. Before 2.8.0 the ignore glob was anchored
31
+ * at the docs root, so a nested `archive/` was still scanned and validated
32
+ * (while 2.7.1's indexer correctly skipped it) — archived docs could raise
33
+ * audit errors and stale-metadata warnings for content nobody was supposed to
34
+ * be reading.
24
35
  */
25
36
  export const ARCHIVE_DIR = 'archive';
26
37
  /** Glob ignores always applied to documentation scans. */
@@ -29,6 +40,7 @@ const DOC_SCAN_IGNORE = [
29
40
  'dist/**',
30
41
  '.git/**',
31
42
  `${ARCHIVE_DIR}/**`,
43
+ `**/${ARCHIVE_DIR}/**`,
32
44
  ];
33
45
  /**
34
46
  * Find all markdown files in a directory.
@@ -1 +1 @@
1
- {"version":3,"file":"glob.js","sourceRoot":"","sources":["../../src/utils/glob.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,MAAM,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC3E,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAShC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,IAAI,CACxB,OAAe,EACf,UAAuB,EAAE;IAEzB,MAAM,EACJ,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,EACnB,QAAQ,GAAG,KAAK,EAChB,MAAM,GAAG,CAAC,iBAAiB,EAAE,SAAS,EAAE,SAAS,CAAC,EAClD,GAAG,GAAG,KAAK,GACZ,GAAG,OAAO,CAAC;IAEZ,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,OAAO,EAAE;QACrC,GAAG;QACH,QAAQ;QACR,MAAM;QACN,GAAG;QACH,KAAK,EAAE,IAAI;KACZ,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,SAAS,CAAC;AAErC,0DAA0D;AAC1D,MAAM,eAAe,GAAG;IACtB,iBAAiB;IACjB,SAAS;IACT,SAAS;IACT,GAAG,WAAW,KAAK;CACpB,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,GAAW,EACX,UAAyC,EAAE;IAE3C,MAAM,EAAE,MAAM,EAAE,WA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EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IAC3C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,IAAY,EAAE,YAAoB;IAC5D,OAAO,OAAO,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;AACrC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY,EAAE,MAAc;IAC1D,OAAO,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AAChC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;AACvB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC;AACxB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;AACvB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,MAAM,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AACpC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAClC,CAAC"}
package/hooks/hooks.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "description": "hit-em-with-the-docs SessionStart hook nudges/auto-updates per policy.",
2
+ "description": "hit-em-with-the-docs hooks — SessionStart (update check + lifecycle brief) and PreToolUse (lifecycle enforcement).",
3
3
  "hooks": {
4
4
  "SessionStart": [
5
5
  {
@@ -7,6 +7,21 @@
7
7
  {
8
8
  "type": "command",
9
9
  "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/session-start.js\""
10
+ },
11
+ {
12
+ "type": "command",
13
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/session-brief.js\""
14
+ }
15
+ ]
16
+ }
17
+ ],
18
+ "PreToolUse": [
19
+ {
20
+ "matcher": "Write|Edit|Bash",
21
+ "hooks": [
22
+ {
23
+ "type": "command",
24
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/pre-tool-use.js\""
10
25
  }
11
26
  ]
12
27
  }
@@ -0,0 +1,98 @@
1
+ #!/usr/bin/env node
2
+ // hit-em-with-the-docs PreToolUse hook — lifecycle enforcement.
3
+ //
4
+ // Denies the two irreversible policy violations (hand-editing a generated
5
+ // INDEX.md/REGISTRY.md, deleting a doc) and warns on the off-policy ones.
6
+ //
7
+ // This runs in EVERY session the plugin is installed in, including repos that
8
+ // have nothing to do with hewtd. Two invariants follow, and they matter more
9
+ // than any rule this file enforces:
10
+ //
11
+ // 1. No `.documentation/` tree (or whatever `docsDir` resolves to) → allow,
12
+ // immediately and silently.
13
+ // 2. ANY error → allow. A guard that blocks a user's unrelated work because
14
+ // it threw is far worse than no guard at all. Every path fails open.
15
+
16
+ import { existsSync, readFileSync } from 'node:fs';
17
+ import { join, resolve } from 'node:path';
18
+
19
+ /** Allow the call and exit. Never throws, never blocks. */
20
+ function allow() {
21
+ process.exit(0);
22
+ }
23
+
24
+ function respond(payload) {
25
+ process.stdout.write(
26
+ JSON.stringify({
27
+ hookSpecificOutput: { hookEventName: 'PreToolUse', ...payload },
28
+ })
29
+ );
30
+ process.exit(0);
31
+ }
32
+
33
+ async function readStdin() {
34
+ const chunks = [];
35
+ for await (const chunk of process.stdin) chunks.push(chunk);
36
+ return Buffer.concat(chunks).toString('utf-8');
37
+ }
38
+
39
+ /**
40
+ * Resolve the docs root and the enforcement policy for this project.
41
+ * `.claude/hit-em-with-the-docs.json` may carry an `enforcement` block; a
42
+ * missing or malformed config just means defaults.
43
+ */
44
+ function loadProject(cwd) {
45
+ let policy = { blockIndexEdits: true, blockDocDeletion: true };
46
+ try {
47
+ const raw = readFileSync(join(cwd, '.claude', 'hit-em-with-the-docs.json'), 'utf-8');
48
+ const cfg = JSON.parse(raw);
49
+ const e = cfg?.enforcement;
50
+ if (e && typeof e === 'object') {
51
+ if (e.block_index_edits === false) policy.blockIndexEdits = false;
52
+ if (e.block_doc_deletion === false) policy.blockDocDeletion = false;
53
+ }
54
+ } catch {
55
+ // No config, or unreadable — defaults apply.
56
+ }
57
+ return { docsDir: '.documentation', policy };
58
+ }
59
+
60
+ async function main() {
61
+ const input = await readStdin();
62
+ if (!input.trim()) allow();
63
+
64
+ const payload = JSON.parse(input);
65
+ const cwd = payload.cwd || process.cwd();
66
+
67
+ // Invariant 1: not a hewtd project → this hook has no opinion.
68
+ if (!existsSync(resolve(cwd, '.documentation'))) allow();
69
+
70
+ const { docsDir, policy } = loadProject(cwd);
71
+
72
+ // The decision function ships compiled in dist/, so the hook stays a thin
73
+ // I/O shell and the rules themselves are unit-testable.
74
+ const { evaluate } = await import('../dist/core/enforce/guard.js');
75
+
76
+ const toolInput = payload.tool_input ?? {};
77
+ const decision = evaluate(
78
+ {
79
+ toolName: payload.tool_name,
80
+ filePath: toolInput.file_path,
81
+ command: toolInput.command,
82
+ text: toolInput.content ?? toolInput.new_string,
83
+ docsDir,
84
+ },
85
+ policy
86
+ );
87
+
88
+ if (decision.action === 'deny') {
89
+ respond({ permissionDecision: 'deny', permissionDecisionReason: decision.reason });
90
+ }
91
+ if (decision.action === 'warn') {
92
+ respond({ permissionDecision: 'allow', additionalContext: decision.context });
93
+ }
94
+ allow();
95
+ }
96
+
97
+ // Invariant 2: fail open, unconditionally.
98
+ main().catch(() => allow());
@@ -0,0 +1,51 @@
1
+ #!/usr/bin/env node
2
+ // hit-em-with-the-docs SessionStart hook — the lifecycle brief.
3
+ //
4
+ // A separate hook from session-start.js on purpose: the plugin runtime owns
5
+ // stdout for that one (it always emits exactly one SessionStart response for
6
+ // the update check, and offers no way to append to it). Claude Code runs every
7
+ // registered SessionStart hook and merges their context, so this stays
8
+ // decoupled from the runtime instead of monkey-patching it.
9
+ //
10
+ // Emits nothing at all outside a hewtd-managed project.
11
+ //
12
+ // This exists because the policy used to live only in the README and in an
13
+ // orphaned template that was never installed: an agent that had never heard of
14
+ // hewtd would `rm` a stale doc, hand-edit a generated INDEX.md, or invent its
15
+ // own `docs/` folder. The PreToolUse guard now denies the destructive half of
16
+ // that; this is what stops the agent walking into the guard in the first place.
17
+
18
+ import { existsSync } from 'node:fs';
19
+ import { resolve } from 'node:path';
20
+
21
+ const projectRoot = process.env.CLAUDE_PROJECT_DIR || process.cwd();
22
+
23
+ // Not a hewtd project → say nothing. This hook runs in every session the
24
+ // plugin is installed in, most of which have no documentation tree.
25
+ if (!existsSync(resolve(projectRoot, '.documentation'))) {
26
+ process.exit(0);
27
+ }
28
+
29
+ // Stated as facts, not instructions. Imperative text injected into context can
30
+ // trip Claude's prompt-injection defenses; a description of how the repo works
31
+ // does not.
32
+ const BRIEF = `This project's documentation is managed by hit-em-with-the-docs (hewtd), under \`.documentation/\`, organized into domains (security, api, database, …).
33
+
34
+ How the tree works:
35
+ - \`INDEX.md\` and \`REGISTRY.md\` are **generated artifacts**, rebuilt from the documents on disk. Hand-edits to them are overwritten by the next \`hewtd index\`. To change what an index lists, change the documents.
36
+ - New docs are registered with \`hewtd integrate <file>\`, which classifies them into a domain and adds the frontmatter. Markdown created outside \`.documentation/\` is not indexed, link-checked, or validated.
37
+ - Docs are **never deleted**. \`hewtd archive <file>\` retires one: it moves the file under \`archive/\` (keeping git history), stamps \`archived_from\` so \`hewtd unarchive\` restores it exactly, and refuses if active docs still link to it. hewtd's own source contains no delete calls anywhere.
38
+ - \`status: deprecated\` flags intent but leaves a doc live and indexed; \`hewtd archive\` is the step that actually retires it.
39
+ - **Anything under an \`archive/\` folder is historical, at any depth.** It is excluded from every scan — not indexed, not audited, not link-checked, not validated. It can be *referenced* (links into it still resolve), but it is **never evidence of current behavior**: it is what the docs used to say. Do not cite it as how the system works today, and do not edit it. \`hewtd unarchive <file>\` restores it to active first.
40
+ - \`hewtd maintain\` regenerates indexes, syncs metadata, and checks links. \`hewtd audit\` reports drift and policy violations.
41
+
42
+ A PreToolUse hook enforces the two destructive cases: editing a generated index, and deleting a doc under \`.documentation/\`. Both are denied. Run \`/hit-em-with-the-docs:help\` for the full command surface.`;
43
+
44
+ process.stdout.write(
45
+ JSON.stringify({
46
+ hookSpecificOutput: {
47
+ hookEventName: 'SessionStart',
48
+ additionalContext: BRIEF,
49
+ },
50
+ }) + '\n'
51
+ );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theglitchking/hit-em-with-the-docs",
3
- "version": "2.7.0",
3
+ "version": "2.8.0",
4
4
  "description": "Self-managing documentation system with hierarchical structure, intelligent automation, pattern discovery, and agent orchestration",
5
5
  "type": "module",
6
6
  "main": "dist/cli/index.js",
@@ -24,6 +24,7 @@
24
24
  "dist",
25
25
  "templates",
26
26
  ".claude-plugin",
27
+ "skills",
27
28
  "commands",
28
29
  "hooks",
29
30
  "scripts/link-skills.js",
@@ -1,8 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  // Postinstall — delegates to @theglitchking/claude-plugin-runtime.
3
- // hit-em-with-the-docs ships no bundled skills, so skillsDir is null;
4
- // the runtime still writes the default update-policy config and
5
- // registers the SessionStart hook in .claude/settings.json (with
3
+ // Links the bundled skill (skills/documentation-lifecycle) into
4
+ // .claude/skills/ for npm installs; plugin installs get it automatically via
5
+ // the plugin's skills/ dir. The runtime also writes the default update-policy
6
+ // config and registers the SessionStart hook in .claude/settings.json (with
6
7
  // plugin-vs-npm dedup).
7
8
 
8
9
  import { runPostinstall } from "@theglitchking/claude-plugin-runtime";
@@ -16,7 +17,7 @@ try {
16
17
  packageName: "@theglitchking/hit-em-with-the-docs",
17
18
  pluginName: "hit-em-with-the-docs",
18
19
  configFile: "hit-em-with-the-docs.json",
19
- skillsDir: null,
20
+ skillsDir: "skills",
20
21
  packageRoot,
21
22
  hookCommand:
22
23
  "node ./node_modules/@theglitchking/hit-em-with-the-docs/hooks/session-start.js",
@@ -0,0 +1,130 @@
1
+ ---
2
+ name: documentation-lifecycle
3
+ description: Create, update, retire, or reorganize documentation in a project managed by hit-em-with-the-docs (a `.documentation/` tree with domain folders). Use when writing a new doc, updating an existing one, deleting/deprecating/archiving a doc, fixing a broken docs link, wondering where a doc belongs, or when an INDEX.md/REGISTRY.md looks out of date. Also use when a tool call was denied by the hewtd lifecycle guard.
4
+ ---
5
+
6
+ # Documentation lifecycle (hit-em-with-the-docs)
7
+
8
+ This project's docs live in `.documentation/`, split into domain folders. hewtd
9
+ owns that tree: it classifies documents, maintains their frontmatter, generates
10
+ the indexes, checks the links, and retires docs without destroying them.
11
+
12
+ **The one thing to internalize:** `INDEX.md` and `REGISTRY.md` are *generated*.
13
+ They are rebuilt from the documents on disk on every `hewtd index` / `hewtd
14
+ maintain`. Editing them by hand accomplishes nothing — your rows are overwritten
15
+ on the next run. To change what an index says, change the documents, then
16
+ regenerate.
17
+
18
+ Run every command with `npx hit-em-with-the-docs …` (or `hewtd …`).
19
+
20
+ ## Creating a doc
21
+
22
+ Write the markdown wherever is convenient, then:
23
+
24
+ ```bash
25
+ hewtd integrate path/to/new-doc.md # classifies + moves + registers it
26
+ hewtd integrate path/to/new-doc.md --dry-run # preview the chosen domain first
27
+ ```
28
+
29
+ `integrate` picks the domain by keyword-matching the content, moves the file
30
+ into `.documentation/<domain>/`, stamps frontmatter (`status: draft`, `tier:
31
+ guide`, `version: 1.0.0`, `last_updated`, `word_count`), and regenerates the
32
+ indexes. It never overwrites frontmatter you wrote yourself — it only fills what
33
+ is missing.
34
+
35
+ A markdown file left outside `.documentation/` is invisible to hewtd: not
36
+ indexed, not link-checked, not validated. Don't hand-create `docs/` folders.
37
+
38
+ ## Updating a doc
39
+
40
+ Edit the document normally, then:
41
+
42
+ ```bash
43
+ hewtd maintain --quick # regenerate indexes + sync metadata
44
+ hewtd maintain --fix # also auto-fix what it can
45
+ ```
46
+
47
+ Never hand-edit `INDEX.md` or `REGISTRY.md` — a `PreToolUse` guard denies it.
48
+
49
+ ## Retiring a doc
50
+
51
+ **Documents are never deleted.** hewtd's own source contains no `rm`/`unlink`
52
+ calls anywhere, and the guard denies shell deletion of anything under
53
+ `.documentation/`.
54
+
55
+ Two distinct steps, often confused:
56
+
57
+ | | What it does |
58
+ |---|---|
59
+ | `status: deprecated` | Flags *intent*. The doc stays in its domain folder, still indexed, still scanned. `audit` raises an INFO nudge toward archiving. |
60
+ | `hewtd archive <file>` | Actually retires it. |
61
+
62
+ ```bash
63
+ hewtd archive .documentation/api/old-guide.md --dry-run
64
+ hewtd archive .documentation/api/old-guide.md -r "superseded by v2 guide"
65
+ hewtd unarchive .documentation/archive/api/old-guide.md # lossless restore
66
+ ```
67
+
68
+ `archive` moves the doc to `archive/<same-subpath>/` (preferring `git mv` to keep
69
+ history), stamps `status: archived`, `archived_on`, `archived_from`, and
70
+ `archived_reason`, and reindexes so it drops out of its domain INDEX. The
71
+ `archived_from` stamp is what makes `unarchive` exact — **a hand-rolled `mv`
72
+ loses it**, and there is then nothing to restore from.
73
+
74
+ **Link guard:** `archive` refuses if active docs still link to the target,
75
+ listing each offender so you can fix them first. `--force` overrides, and the
76
+ inbound links go dangling.
77
+
78
+ `hewtd archive-candidates` lists docs that may warrant retiring — advisory and
79
+ read-only, it never moves anything. Nothing is ever auto-archived.
80
+
81
+ Point a replacement at the old doc with `superseded_by: <path>` in frontmatter.
82
+
83
+ ## Archived content: referenceable, never concrete
84
+
85
+ **Anything under an `archive/` folder — at any depth — is history, not truth.**
86
+
87
+ It is excluded from every hewtd scan: not indexed, not audited, not
88
+ link-checked, not metadata-validated, never counted. Links *into* it still
89
+ resolve, so history stays reachable and you may cite it as "what we used to do."
90
+
91
+ What it is **not** is evidence of how the system works now. Never quote an
92
+ archived doc as current behavior, never carry its claims into a new doc, and
93
+ never treat a `status:`/`version:` inside it as live. If it turns out an archived
94
+ doc is still correct and still needed, it should be restored, not read in place:
95
+
96
+ ```bash
97
+ hewtd unarchive .documentation/archive/api/old-guide.md
98
+ ```
99
+
100
+ Editing a file under `archive/` is not destructive, but it is almost always a
101
+ mistake — the edit lands in a subtree nothing reads, so it changes nothing anyone
102
+ will see. The guard warns when you try.
103
+
104
+ ## Checking the tree
105
+
106
+ ```bash
107
+ hewtd audit # policy + drift violations, health score
108
+ hewtd link-check # broken internal links
109
+ hewtd index --dry-run # what the indexes would become
110
+ ```
111
+
112
+ `audit`'s `index-drift` rule reports any document on disk that its domain's
113
+ `INDEX.md` fails to list — the fix is always `hewtd index`.
114
+
115
+ ## If the guard denied your tool call
116
+
117
+ It denies exactly two things, both destructive:
118
+
119
+ - **Editing a generated `INDEX.md`/`REGISTRY.md`** → change the documents and run
120
+ `hewtd index`.
121
+ - **Deleting a doc under `.documentation/`** → use `hewtd archive` instead.
122
+
123
+ Both rules are opt-out via `.claude/hit-em-with-the-docs.json`:
124
+
125
+ ```json
126
+ { "enforcement": { "block_index_edits": true, "block_doc_deletion": true } }
127
+ ```
128
+
129
+ Turning one off is a deliberate choice by the human who owns the repo — not
130
+ something to do to get past a denial.
@@ -1,208 +0,0 @@
1
- # Documentation System Plugin (hit-em-with-the-docs)
2
-
3
- This project uses the hit-em-with-the-docs documentation system for hierarchical, self-managing documentation.
4
-
5
- ## Quick Reference
6
-
7
- ### Documentation Structure
8
-
9
- ```
10
- .documentation/
11
- ├── INDEX.md # Navigation hub
12
- ├── REGISTRY.md # Quick reference
13
- ├── security/ # Security, auth, Vault, Keycloak
14
- ├── devops/ # Deployment, CI/CD, Docker
15
- ├── database/ # Schema, migrations, RLS
16
- ├── api/ # API endpoints, routes
17
- ├── standards/ # Coding standards
18
- ├── testing/ # Test strategies
19
- ├── architecture/ # System design
20
- ├── features/ # Feature guides
21
- ├── quickstart/ # Setup guides
22
- ├── procedures/ # Operational procedures
23
- ├── workflows/ # Process documentation
24
- ├── agents/ # AI agent docs
25
- ├── backups/ # Backup guides
26
- ├── troubleshooting/ # Debug guides
27
- └── plans/ # Planning documents
28
- ```
29
-
30
- These 15 domains are built-in and always present. The set is **extensible** — register project-specific domains at runtime with `npx hit-em-with-the-docs domain add <id> -k <keywords>` (stored in `.claude/hit-em-with-the-docs.json` under `domains: []`, and scaffolded under `.documentation/<id>/`). Run `npx hit-em-with-the-docs domain list` to see the active set, and `domain remove <id>` to drop a custom one (never deletes docs).
31
-
32
- **Deprecated docs → `.documentation/archive/`.** To retire a doc without deleting it, use `npx hit-em-with-the-docs archive <file>` — it moves the doc under `archive/`, stamps lifecycle frontmatter (`archived_from` makes it reversible), and reindexes. A link guard refuses if active docs still link to it (`--force` overrides); `--dry-run` previews. `unarchive <file>` restores it where it came from, and `archive-candidates` lists docs that may warrant archiving (advisory, read-only — never moves anything). hewtd excludes the `archive/` folder from every scan (audit, link-check, metadata-sync, integrate, link graph, search), so archived docs are never validated or indexed. `archive` is reserved and cannot be a domain. A doc left at `status: deprecated` in an active folder is now surfaced by `audit` as an INFO nudge toward `archive`.
33
-
34
- ## Commands
35
-
36
- ### /docs
37
-
38
- Documentation commands for managing the hierarchical documentation system.
39
-
40
- #### /docs load <domain>
41
-
42
- Load documentation for a specific domain.
43
-
44
- Usage: `/docs load security`
45
-
46
- This loads:
47
- 1. Domain INDEX.md (complete listing)
48
- 2. Domain REGISTRY.md (quick reference)
49
- 3. Key documents summary
50
-
51
- #### /docs list
52
-
53
- List all documentation domains (the 15 built-in plus any custom domains) with descriptions.
54
-
55
- #### /docs search <query>
56
-
57
- Search across all documentation for a query term.
58
-
59
- Usage: `/docs search "authentication"`
60
-
61
- #### /docs stats
62
-
63
- Show documentation health statistics including:
64
- - Total documents per domain
65
- - Link health
66
- - Metadata compliance
67
- - Recent updates
68
-
69
- #### /docs maintain
70
-
71
- Run documentation maintenance:
72
- ```bash
73
- npx hit-em-with-the-docs maintain --quick
74
- ```
75
-
76
- #### /docs integrate <file>
77
-
78
- Integrate a document into the system:
79
- ```bash
80
- npx hit-em-with-the-docs integrate ./docs/new-guide.md
81
- ```
82
-
83
- ### /discover
84
-
85
- Pattern discovery commands for extracting patterns from the codebase.
86
-
87
- #### /discover patterns
88
-
89
- Discover coding patterns in the codebase:
90
- ```bash
91
- npx hit-em-with-the-docs discover patterns
92
- ```
93
-
94
- Detects: Service layer, Repository pattern, Factory pattern, Error handling, etc.
95
-
96
- #### /discover anti-patterns
97
-
98
- Detect anti-patterns and code smells:
99
- ```bash
100
- npx hit-em-with-the-docs discover anti-patterns
101
- ```
102
-
103
- Detects: Hardcoded credentials, SQL injection risks, console.log, any types, etc.
104
-
105
- #### /discover standards
106
-
107
- Extract implicit coding standards:
108
- ```bash
109
- npx hit-em-with-the-docs discover standards
110
- ```
111
-
112
- Extracts: Naming conventions, file organization, code style, documentation coverage.
113
-
114
- #### /discover dependencies
115
-
116
- Analyze project dependencies:
117
- ```bash
118
- npx hit-em-with-the-docs discover dependencies
119
- ```
120
-
121
- Analyzes: Package versions, circular dependencies, unused dependencies, security issues.
122
-
123
- ## Metadata Schema
124
-
125
- Every documentation file should have this YAML frontmatter:
126
-
127
- ```yaml
128
- ---
129
- # Required fields
130
- title: "Document Title"
131
- tier: guide|standard|example|reference|admin
132
- domains: [primary-domain]
133
- status: draft|active|deprecated|archived
134
- last_updated: 'YYYY-MM-DD'
135
- version: '1.0.0'
136
-
137
- # Optional fields
138
- audience: [all|developers|devops|admin]
139
- tags: [tag1, tag2]
140
- purpose: "One-sentence purpose"
141
- related_docs:
142
- - path/to/related.md
143
- author: "Name"
144
- ---
145
- ```
146
-
147
- ## Tiers
148
-
149
- | Tier | Description | Size |
150
- |------|-------------|------|
151
- | guide | Step-by-step how-to guides | 15-30 KB |
152
- | standard | Coding standards and conventions | 5-15 KB |
153
- | example | Code examples and templates | 3-10 KB |
154
- | reference | Comprehensive references | 30+ KB |
155
- | admin | Administrative/operational docs | 10-20 KB |
156
-
157
- ## Workflow Guidelines
158
-
159
- ### Adding New Documentation
160
-
161
- 1. Determine the appropriate domain
162
- 2. Create file with kebab-case naming: `topic-name-type.md`
163
- 3. Add required frontmatter
164
- 4. Write content following tier template
165
- 5. Run: `npx hit-em-with-the-docs integrate <file>`
166
-
167
- ### Weekly Maintenance
168
-
169
- Run every Friday:
170
- ```bash
171
- npx hit-em-with-the-docs maintain
172
- ```
173
-
174
- This syncs metadata, checks links, and audits compliance.
175
-
176
- ### Before Committing Documentation
177
-
178
- ```bash
179
- # Quick check
180
- npx hit-em-with-the-docs audit
181
-
182
- # Fix issues
183
- npx hit-em-with-the-docs metadata-sync --fix
184
- ```
185
-
186
- ## File Naming Convention
187
-
188
- - Use kebab-case: `api-design-standards.md`
189
- - Include type suffix when appropriate: `-guide.md`, `-standard.md`, `-procedure.md`
190
- - Be specific: `keycloak-integration-guide.md` not `auth.md`
191
-
192
- ## Related Commands
193
-
194
- ```bash
195
- # Initialize documentation structure
196
- npx hit-em-with-the-docs init
197
-
198
- # Generate reports
199
- npx hit-em-with-the-docs report health
200
- npx hit-em-with-the-docs report audit
201
- npx hit-em-with-the-docs report links
202
-
203
- # Check links
204
- npx hit-em-with-the-docs link-check
205
-
206
- # Discover patterns
207
- npx hit-em-with-the-docs discover patterns --language typescript
208
- ```