opencode-code-archaeology 2.0.2 → 2.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.
Files changed (58) hide show
  1. package/.github/pull_request_template.md +1 -0
  2. package/.github/workflows/release.yml +46 -0
  3. package/AGENTS.md +42 -10
  4. package/CHANGELOG.md +59 -0
  5. package/CONTRIBUTING.md +2 -0
  6. package/INSTALL.md +90 -20
  7. package/README.md +90 -29
  8. package/VERSION +1 -1
  9. package/assets/code-archaeology-banner.svg +173 -44
  10. package/commands/code-archaeology.md +7 -5
  11. package/dist/cli.js +28 -2
  12. package/dist/cli.js.map +1 -1
  13. package/dist/index.d.ts +1 -5
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +1 -17
  16. package/dist/index.js.map +1 -1
  17. package/dist/platform.d.ts +4 -0
  18. package/dist/platform.d.ts.map +1 -0
  19. package/dist/platform.js +11 -0
  20. package/dist/platform.js.map +1 -0
  21. package/dist/plugin.d.ts +2 -2
  22. package/dist/plugin.d.ts.map +1 -1
  23. package/dist/plugin.js +2 -1
  24. package/dist/plugin.js.map +1 -1
  25. package/dist/runtime.d.ts +18 -0
  26. package/dist/runtime.d.ts.map +1 -0
  27. package/dist/runtime.js +49 -0
  28. package/dist/runtime.js.map +1 -0
  29. package/dist/types.d.ts +1 -6
  30. package/dist/types.d.ts.map +1 -1
  31. package/dist/types.js.map +1 -1
  32. package/docs/ARCHITECTURE.md +41 -10
  33. package/docs/INSTALL.md +50 -11
  34. package/docs/README.md +37 -9
  35. package/docs/RELEASE.md +20 -16
  36. package/docs/index.html +740 -0
  37. package/hooks/hermes/runner.ps1 +247 -0
  38. package/hooks/hermes/runner.sh +262 -0
  39. package/hooks/hermes/setup.ps1 +41 -0
  40. package/hooks/hermes/setup.sh +41 -0
  41. package/hooks/opencode/init.ps1 +83 -0
  42. package/hooks/opencode/revert-phase.ps1 +12 -0
  43. package/hooks/opencode/revert-phase.sh +3 -8
  44. package/hooks/opencode/update-expedition.ps1 +51 -0
  45. package/hooks/opencode/verify-package.sh +1 -0
  46. package/hooks/opencode/verify-phase.ps1 +35 -0
  47. package/hooks/opencode/verify-phase.sh +7 -7
  48. package/hooks/shared/command-utils.ps1 +100 -0
  49. package/package.json +16 -2
  50. package/skills/code-archaeology/SKILL.md +2 -2
  51. package/skills/hermes/INTEGRATION.md +120 -0
  52. package/skills/hermes/README.md +167 -0
  53. package/skills/hermes/code-archaeology-prompt.md +203 -0
  54. package/wiki/Expedition-Workflow.md +3 -1
  55. package/wiki/Home.md +2 -2
  56. package/wiki/Installation.md +2 -0
  57. package/wiki/Release-Process.md +5 -5
  58. package/plugins/code-archaeology.ts +0 -8
package/dist/index.d.ts CHANGED
@@ -1,7 +1,3 @@
1
- import type { PluginServer } from "./types.js";
2
- export declare const id = "code-archaeology";
3
- export declare const repoRoot: string;
4
- export declare const version: string;
5
- export declare function server(): Promise<PluginServer>;
1
+ export { codeArchaeologyPlugin as default } from "./runtime.js";
6
2
  export * from "./types.js";
7
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAO/C,eAAO,MAAM,EAAE,qBAAqB,CAAC;AACrC,eAAO,MAAM,QAAQ,QAAc,CAAC;AAGpC,eAAO,MAAM,OAAO,QAA2C,CAAC;AAEhE,wBAAsB,MAAM,IAAI,OAAO,CAAC,YAAY,CAAC,CAMpD;AAED,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAChE,cAAc,YAAY,CAAC"}
package/dist/index.js CHANGED
@@ -1,19 +1,3 @@
1
- import { fileURLToPath } from "node:url";
2
- import { dirname, resolve } from "node:path";
3
- import { readFileSync } from "node:fs";
4
- const __filename = fileURLToPath(import.meta.url);
5
- const __dirname = dirname(__filename);
6
- const packageRoot = resolve(__dirname, "..");
7
- export const id = "code-archaeology";
8
- export const repoRoot = packageRoot;
9
- const versionPath = resolve(packageRoot, "VERSION");
10
- export const version = readFileSync(versionPath, "utf8").trim();
11
- export async function server() {
12
- return {
13
- event() {
14
- return undefined;
15
- },
16
- };
17
- }
1
+ export { codeArchaeologyPlugin as default } from "./runtime.js";
18
2
  export * from "./types.js";
19
3
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGvC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAEtC,MAAM,WAAW,GAAG,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAE7C,MAAM,CAAC,MAAM,EAAE,GAAG,kBAAkB,CAAC;AACrC,MAAM,CAAC,MAAM,QAAQ,GAAG,WAAW,CAAC;AAEpC,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;AACpD,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;AAEhE,MAAM,CAAC,KAAK,UAAU,MAAM;IAC1B,OAAO;QACL,KAAK;YACH,OAAO,SAAS,CAAC;QACnB,CAAC;KACF,CAAC;AACJ,CAAC;AAED,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAChE,cAAc,YAAY,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare function isWindows(): boolean;
2
+ export declare function getHookExtension(): string;
3
+ export declare function getShellCommand(): string;
4
+ //# sourceMappingURL=platform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAEA,wBAAgB,SAAS,IAAI,OAAO,CAEnC;AAED,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED,wBAAgB,eAAe,IAAI,MAAM,CAExC"}
@@ -0,0 +1,11 @@
1
+ import process from "node:process";
2
+ export function isWindows() {
3
+ return process.platform === "win32";
4
+ }
5
+ export function getHookExtension() {
6
+ return isWindows() ? ".ps1" : ".sh";
7
+ }
8
+ export function getShellCommand() {
9
+ return isWindows() ? "powershell.exe" : "bash";
10
+ }
11
+ //# sourceMappingURL=platform.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform.js","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,cAAc,CAAC;AAEnC,MAAM,UAAU,SAAS;IACvB,OAAO,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,gBAAgB;IAC9B,OAAO,SAAS,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,eAAe;IAC7B,OAAO,SAAS,EAAE,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,MAAM,CAAC;AACjD,CAAC"}
package/dist/plugin.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { id, repoRoot, version, server, } from "./index.js";
2
- export type * from "./types.js";
1
+ export { codeArchaeologyPlugin as default } from "./runtime.js";
2
+ export * from "./types.js";
3
3
  //# sourceMappingURL=plugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,EAAE,EACF,QAAQ,EACR,OAAO,EACP,MAAM,GACP,MAAM,YAAY,CAAC;AAEpB,mBAAmB,YAAY,CAAC"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAChE,cAAc,YAAY,CAAC"}
package/dist/plugin.js CHANGED
@@ -1,2 +1,3 @@
1
- export { id, repoRoot, version, server, } from "./index.js";
1
+ export { codeArchaeologyPlugin as default } from "./runtime.js";
2
+ export * from "./types.js";
2
3
  //# sourceMappingURL=plugin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,EAAE,EACF,QAAQ,EACR,OAAO,EACP,MAAM,GACP,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAChE,cAAc,YAAY,CAAC"}
@@ -0,0 +1,18 @@
1
+ export declare const packageRoot: string;
2
+ export declare const id = "code-archaeology";
3
+ export declare const repoRoot: string;
4
+ export declare const version: string;
5
+ type OpenCodeConfig = {
6
+ command?: Record<string, {
7
+ template: string;
8
+ description?: string;
9
+ }>;
10
+ skills?: {
11
+ paths?: string[];
12
+ };
13
+ };
14
+ export declare function codeArchaeologyPlugin(): Promise<{
15
+ config(config: OpenCodeConfig): void;
16
+ }>;
17
+ export {};
18
+ //# sourceMappingURL=runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,WAAW,QAA2B,CAAC;AACpD,eAAO,MAAM,EAAE,qBAAqB,CAAC;AACrC,eAAO,MAAM,QAAQ,QAAc,CAAC;AAGpC,eAAO,MAAM,OAAO,QAA2C,CAAC;AAEhE,KAAK,cAAc,GAAG;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACrE,MAAM,CAAC,EAAE;QACP,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;KAClB,CAAC;CACH,CAAC;AA6BF,wBAAsB,qBAAqB;mBAIxB,cAAc;GAYhC"}
@@ -0,0 +1,49 @@
1
+ import { readFileSync } from "node:fs";
2
+ import { dirname, resolve } from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+ const __filename = fileURLToPath(import.meta.url);
5
+ const __dirname = dirname(__filename);
6
+ export const packageRoot = resolve(__dirname, "..");
7
+ export const id = "code-archaeology";
8
+ export const repoRoot = packageRoot;
9
+ const versionPath = resolve(packageRoot, "VERSION");
10
+ export const version = readFileSync(versionPath, "utf8").trim();
11
+ const commandFiles = [
12
+ "code-archaeology",
13
+ "code-archaeology-survey",
14
+ "code-archaeology-excavate",
15
+ "code-archaeology-restore",
16
+ ];
17
+ function parseCommand(name) {
18
+ const template = readFileSync(resolve(packageRoot, "commands", `${name}.md`), "utf8");
19
+ const match = template.match(/^---\n([\s\S]*?)\n---\n([\s\S]*)$/);
20
+ if (!match) {
21
+ return { template };
22
+ }
23
+ const description = match[1]
24
+ .split("\n")
25
+ .find((line) => line.startsWith("description:"))
26
+ ?.slice("description:".length)
27
+ .trim();
28
+ return { template: match[2].trimStart(), description };
29
+ }
30
+ function loadCommands() {
31
+ return Object.fromEntries(commandFiles.map((name) => [name, parseCommand(name)]));
32
+ }
33
+ export async function codeArchaeologyPlugin() {
34
+ const skillsPath = resolve(packageRoot, "skills");
35
+ return {
36
+ config(config) {
37
+ config.command = {
38
+ ...(config.command ?? {}),
39
+ ...loadCommands(),
40
+ };
41
+ config.skills = config.skills ?? {};
42
+ config.skills.paths = config.skills.paths ?? [];
43
+ if (!config.skills.paths.includes(skillsPath)) {
44
+ config.skills.paths.push(skillsPath);
45
+ }
46
+ },
47
+ };
48
+ }
49
+ //# sourceMappingURL=runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAEtC,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AACpD,MAAM,CAAC,MAAM,EAAE,GAAG,kBAAkB,CAAC;AACrC,MAAM,CAAC,MAAM,QAAQ,GAAG,WAAW,CAAC;AAEpC,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;AACpD,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;AAShE,MAAM,YAAY,GAAG;IACnB,kBAAkB;IAClB,yBAAyB;IACzB,2BAA2B;IAC3B,0BAA0B;CAClB,CAAC;AAEX,SAAS,YAAY,CAAC,IAAY;IAChC,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC,WAAW,EAAE,UAAU,EAAE,GAAG,IAAI,KAAK,CAAC,EAAE,MAAM,C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AM,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YACvC,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
package/dist/types.d.ts CHANGED
@@ -15,7 +15,7 @@ export type ConfidenceLevel = "HIGH" | "MEDIUM" | "LOW";
15
15
  /** Status values for expedition progress. */
16
16
  export type ExpeditionStatus = "pending" | "running" | "complete" | "failed" | "skipped";
17
17
  /** Tool types used for analysis. */
18
- export type AnalysisTool = "knip" | "vulture" | "madge" | "pydeps" | "jscpd" | "tsc" | "mypy" | "ast_grep" | "manual";
18
+ export type AnalysisTool = "knip" | "unimported" | "depcheck" | "vulture" | "deadcode" | "staticcheck" | "cargo-udeps" | "rustc" | "madge" | "pydeps" | "godepgraph" | "cargo-deps" | "jscpd" | "tsc" | "mypy" | "go vet" | "pylint" | "golangci-lint" | "clippy" | "ast_grep" | "manual";
19
19
  /** Event types emitted by the plugin. */
20
20
  export type EventType = "phase_complete" | "phase_failed" | "finding_detected" | "report_generated";
21
21
  /** Runtime parameters for an archaeology session. */
@@ -231,11 +231,6 @@ export interface FinalCatalog {
231
231
  /** Recommendations for future maintenance. */
232
232
  recommendations: string[];
233
233
  }
234
- /** Minimal OpenCode plugin server shape. */
235
- export interface PluginServer {
236
- /** Event handler (currently a no-op stub). */
237
- event(): undefined;
238
- }
239
234
  /** CLI argument shape for `opencode-code-archaeology`. */
240
235
  export interface CliArgs {
241
236
  /** Target repository path. */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,+BAA+B;AAC/B,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;AAEhE,uCAAuC;AACvC,MAAM,MAAM,cAAc,GAAG,YAAY,GAAG,YAAY,GAAG,QAAQ,GAAG,IAAI,GAAG,MAAM,CAAC;AAEpF,wCAAwC;AACxC,MAAM,MAAM,eAAe,GACvB,QAAQ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EAAE,OAAO,CAAC;IACjB,gCAAgC;IAChC,WAAW,EAAE,uBAAuB,EAAE,CAAC;IACvC,yBAAyB;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,2BAA2B;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,+BAA+B;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,oCAAoC;IACpC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,8CAA8C;IAC9C,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B;AAMD,0DAA0D;AAC1D,MAAM,WAAW,OAAO;IACtB,8BAA8B;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uBAAuB;IACvB,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,wBAAwB;IACxB,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,wBAAwB;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,wCAAwC;IACxC,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,6BAA6B;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kCAAkC;IAClC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,4BAA4B;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAoEH,oCAAoC;AACpC,MAAM,CAAC,MAAM,cAAc,GAAsB;IAC/C,SAAS,EAAE,GAAG;IACd,QAAQ,EAAE,YAAY;IACtB,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,KAAK;IAClB,YAAY,EAAE,UAAU;IACxB,iBAAiB,EAAE,kBAAkB;IACrC,WAAW,EAAE,sBAAsB;CACpC,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAgFH,oCAAoC;AACpC,MAAM,CAAC,MAAM,cAAc,GAAsB;IAC/C,SAAS,EAAE,GAAG;IACd,QAAQ,EAAE,YAAY;IACtB,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,KAAK;IAClB,YAAY,EAAE,UAAU;IACxB,iBAAiB,EAAE,kBAAkB;IACrC,WAAW,EAAE,sBAAsB;CACpC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  # Code Archaeology Architecture
2
2
 
3
- Code Archaeology is an OpenCode plugin that operates entirely inside the target repository. It coordinates slash commands, a domain skill, shell hooks, prompts, schemas, and local `.archaeology/` artifacts to run a fixed excavation workflow.
3
+ Code Archaeology is a multi-runtime plugin that operates entirely inside the target repository. It coordinates slash commands (OpenCode), cron-based execution (Hermes), a domain skill, shell hooks, prompts, schemas, and local `.archaeology/` artifacts to run a fixed excavation workflow.
4
4
 
5
5
  ## Repository Layout
6
6
 
@@ -11,39 +11,56 @@ Code-Archaeology/
11
11
  |-- dist/ # Built package output for GitHub-based installs
12
12
  |-- docs/ # Public documentation and release notes
13
13
  |-- hooks/opencode/ # Init, verification, revert, and status hooks
14
- |-- plugins/ # OpenCode plugin entry point
14
+ |-- hooks/hermes/ # Setup and runner hooks for Hermes Agent
15
+ |-- plugins/ # Repo-local legacy plugin shim
15
16
  |-- prompts/ # Expedition prompts by phase
16
17
  |-- schema/ # JSON schemas for reports
17
- |-- skills/ # Code Archaeology skill definition
18
+ |-- skills/ # Code Archaeology skill definitions
19
+ | |-- code-archaeology/ # OpenCode skill
20
+ | `-- hermes/ # Hermes Agent skill and integration docs
18
21
  |-- src/ # TypeScript package and CLI source
19
22
  |-- wiki/ # Source pages for GitHub Wiki publication
20
23
  |-- INSTALL.md # Root install handoff
21
24
  |-- README.md # Public project overview
22
- `-- AGENTS.md # Agent runtime guide
25
+ |-- AGENTS.md # Agent runtime guide
23
26
  ```
24
27
 
25
- ## OpenCode Plugin Surfaces
28
+ ## Runtime Surfaces
26
29
 
27
- - `plugins/` exposes the plugin entry point consumed by OpenCode.
28
- - `commands/` defines the slash command family: `/code-archaeology`, `/code-archaeology-survey`, `/code-archaeology-excavate`, and `/code-archaeology-restore`.
29
- - `skills/` contains the domain workflow instructions agents follow during an expedition.
30
+ ### OpenCode Plugin Surfaces
31
+
32
+ - `dist/index.js` and the `./plugin` package export expose the plugin entry point consumed by OpenCode. `plugins/` is a repo-local legacy shim and is not included in npm package contents.
33
+ - `commands/` defines the slash command family: `/code-archaeology`, `/code-archaeology-survey`, `/code-archaeology-excavate`, and `/code-archaeology-restore`. The default `/code-archaeology` command runs the full survey chain without per-phase prompts and remains non-destructive.
34
+ - `skills/code-archaeology/` contains the domain workflow instructions agents follow during an expedition.
30
35
  - `hooks/opencode/` provides shell gates for session setup, verification, rollback, and status updates.
31
36
  - `prompts/` and `schema/` provide phase-specific guidance and artifact structure.
32
37
  - `src/` builds the npm package and CLI used by `opencode-code-archaeology install`, `doctor`, and `version`.
33
38
 
39
+ ### Hermes Agent Surfaces
40
+
41
+ - `hooks/hermes/setup.sh` detects Hermes capabilities and writes `hermes-runtime.json`.
42
+ - `hooks/hermes/runner.sh` executes one expedition phase per cron run with built-in verification.
43
+ - `skills/hermes/` contains the Hermes-specific skill prompt, integration guide, and README.
44
+ - Hermes uses the same `.archaeology/session.json` state file as OpenCode.
45
+
34
46
  ## Commands, Skills, And Hooks
35
47
 
36
- Commands are the user-facing entry points. A command selects the mode and starts the archaeology workflow in the target repository.
48
+ Commands are the user-facing entry points. `/code-archaeology` selects survey mode by default and runs all 10 phases to produce reports. The explicit restore command is required before source files are changed.
37
49
 
38
50
  The Code Archaeology skill defines the expedition order, safety constraints, language-tool preferences, and reporting expectations. It is the agent-facing control layer that prevents phases from running out of order.
39
51
 
40
52
  Hooks are the shell-level enforcement layer:
41
53
 
54
+ ### OpenCode hooks
42
55
  - `init.sh` initializes `.archaeology/` and session state.
43
56
  - `verify-phase.sh <phase>` runs configured tests and type checks between phases.
44
57
  - `revert-phase.sh <phase>` reverts changes when a restore phase fails verification.
45
58
  - `update-expedition.sh <phase> <status> [findings]` updates session progress.
46
59
 
60
+ ### Hermes hooks
61
+ - `setup.sh` detects Hermes CLI / active session and writes runtime config.
62
+ - `runner.sh` reads session state, executes one phase, verifies, and advances.
63
+
47
64
  ## Expedition Flow
48
65
 
49
66
  The phase order is fixed because later cleanup depends on earlier evidence:
@@ -61,6 +78,18 @@ The phase order is fixed because later cleanup depends on earlier evidence:
61
78
 
62
79
  `survey` mode writes reports only. `excavate` mode writes reports plus mock patches. `restore` mode applies approved changes and must pass verification between phases.
63
80
 
81
+ ## Runtime Comparison
82
+
83
+ | Feature | OpenCode | Hermes |
84
+ |---------|----------|--------|
85
+ | Entry | `/code-archaeology` slash command | `cronjob` |
86
+ | Phases | All in one session | One per cron run |
87
+ | Verification | Between expeditions | Between every phase |
88
+ | Revert | Manual or automatic | Automatic on failure |
89
+ | State | `.archaeology/session.json` | Same file |
90
+ | Background | Plugin stays active | Cron resumes automatically |
91
+ | Real-time | Yes | Delayed (15-min intervals) |
92
+
64
93
  ## Artifact Lifecycle
65
94
 
66
95
  Runtime artifacts live in `.archaeology/` inside the target repository:
@@ -73,6 +102,7 @@ Runtime artifacts live in `.archaeology/` inside the target repository:
73
102
  | `FINAL_CATALOG.md` | Final excavation summary and recommendations. |
74
103
  | `excavation_log.txt` | `git diff --stat` for applied restoration work. |
75
104
  | `patches/` | Mock patches generated by `excavate` mode. |
105
+ | `hermes-runtime.json` | Hermes runtime configuration (Hermes only). |
76
106
 
77
107
  `.archaeology/` is ignored local state and should not be committed.
78
108
 
@@ -83,7 +113,8 @@ Runtime artifacts live in `.archaeology/` inside the target repository:
83
113
  - Never consolidate types before dead code and legacy removal.
84
114
  - Never remove try/catch blocks from I/O or external input boundaries automatically.
85
115
  - Flag uncertain type replacements for human review instead of guessing.
86
- - Run `verify-phase.sh` between restore phases.
116
+ - Run `verify-phase.sh` between restore phases (OpenCode).
117
+ - Run built-in verification in `runner.sh` between phases (Hermes).
87
118
  - Run `revert-phase.sh` and stop if a phase introduces test failures.
88
119
  - Keep restore work isolated to the configured branch, `refactor/archaeology` by default.
89
120
 
package/docs/INSTALL.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Install Code Archaeology
2
2
 
3
- This guide mirrors the root [`INSTALL.md`](../INSTALL.md) and covers the recommended OpenCode plugin configuration plus the npm CLI install path.
3
+ This guide mirrors the root [`INSTALL.md`](../INSTALL.md) and covers the recommended OpenCode plugin configuration, npm CLI install path, and Hermes Agent setup.
4
4
 
5
5
  ## Prerequisites
6
6
 
@@ -8,6 +8,7 @@ This guide mirrors the root [`INSTALL.md`](../INSTALL.md) and covers the recomme
8
8
  - Node.js 18 or newer with npm.
9
9
  - Git installed and available in your shell.
10
10
  - A target repository with tests or type checks before running `restore` mode.
11
+ - For Hermes: Hermes Agent CLI or an active Hermes session.
11
12
 
12
13
  ## Recommended OpenCode Plugin Install
13
14
 
@@ -16,7 +17,7 @@ Add Code Archaeology to the top-level `plugin` array in `opencode.json`:
16
17
  ```json
17
18
  {
18
19
  "plugin": [
19
- "opencode-code-archaeology@git+https://github.com/Maleick/Code-Archaeology.git"
20
+ "opencode-code-archaeology@2.2.0"
20
21
  ]
21
22
  }
22
23
  ```
@@ -30,12 +31,14 @@ Restart OpenCode after editing the configuration. The command family should then
30
31
  /code-archaeology-restore
31
32
  ```
32
33
 
34
+ `/code-archaeology` runs the full 10-phase survey chain by default without per-phase prompts. It writes reports under `.archaeology/` and makes no source-code changes. Use `/code-archaeology-restore` only after reviewing the reports and deciding to apply changes.
35
+
33
36
  ## npm Global Install
34
37
 
35
38
  Use the npm package when you want the CLI installer and diagnostics:
36
39
 
37
40
  ```bash
38
- npm install -g opencode-code-archaeology
41
+ npm install -g opencode-code-archaeology@2.2.0
39
42
  opencode-code-archaeology install
40
43
  opencode-code-archaeology doctor
41
44
  opencode-code-archaeology version
@@ -44,9 +47,31 @@ opencode-code-archaeology version
44
47
  Then restart OpenCode and run:
45
48
 
46
49
  ```text
47
- /code-archaeology-survey
50
+ /code-archaeology
51
+ ```
52
+
53
+ ## Hermes Setup
54
+
55
+ Install the CLI globally so Hermes can invoke Code Archaeology commands. To initialize Hermes runtime metadata, run the hook from a local clone or from the unpacked package contents:
56
+
57
+ ```bash
58
+ npm install -g opencode-code-archaeology@2.2.0
59
+ cd ~/projects/Code-Archaeology
60
+ bash hooks/hermes/setup.sh
61
+ ```
62
+
63
+ Create a cronjob that runs exactly one expedition phase per invocation:
64
+
65
+ ```bash
66
+ hermes cronjob create \
67
+ --name "code-archaeology-expedition" \
68
+ --schedule "every 15m" \
69
+ --workdir ~/projects/Code-Archaeology \
70
+ --prompt "Run one Code Archaeology expedition phase. Read .archaeology/session.json, execute current phase with verification, advance to next phase."
48
71
  ```
49
72
 
73
+ See [`skills/hermes/INTEGRATION.md`](../skills/hermes/INTEGRATION.md) for the full Hermes workflow.
74
+
50
75
  ## Verification
51
76
 
52
77
  Confirm the published package and local CLI are visible:
@@ -65,24 +90,25 @@ npm install
65
90
  npm run build
66
91
  npm run typecheck
67
92
  bash -n hooks/opencode/*.sh
93
+ bash -n hooks/hermes/*.sh
68
94
  ```
69
95
 
70
96
  To verify plugin behavior, restart OpenCode in a Git repository and run:
71
97
 
72
98
  ```text
73
- /code-archaeology-survey
99
+ /code-archaeology
74
100
  ```
75
101
 
76
- The survey should create `.archaeology/` reports without modifying source files.
102
+ The default survey chain should create `.archaeology/` reports without modifying source files or asking to proceed phase by phase.
77
103
 
78
104
  ## Updating
79
105
 
80
- For plugin-array installs, update through your OpenCode package manager flow, then restart OpenCode. If your setup caches Git plugins, clear the cached `opencode-code-archaeology` package and let OpenCode reinstall it.
106
+ For plugin-array installs, update by changing the package version to a reviewed npm release, then restart OpenCode. Do not point OpenCode at a mutable Git branch such as `main` for automatic updates.
81
107
 
82
108
  For npm global installs:
83
109
 
84
110
  ```bash
85
- npm install -g opencode-code-archaeology@latest
111
+ npm install -g opencode-code-archaeology@2.2.0
86
112
  npm list -g opencode-code-archaeology --depth=0
87
113
  opencode-code-archaeology doctor
88
114
  ```
@@ -94,13 +120,26 @@ opencode-code-archaeology doctor
94
120
  - Confirm `opencode.json` is valid JSON.
95
121
  - Confirm the package entry is in the top-level `plugin` array, not `plugins`.
96
122
  - Restart OpenCode after changing configuration.
97
- - Confirm Git can reach `https://github.com/Maleick/Code-Archaeology.git`.
123
+ - Confirm npm can resolve the pinned `opencode-code-archaeology` release.
98
124
 
99
125
  ### Commands Not Found
100
126
 
101
127
  - Restart OpenCode so it reloads plugin commands.
102
128
  - Confirm the npm package installed with `npm list -g opencode-code-archaeology --depth=0` if using the global path.
103
- - Run `/code-archaeology-survey` from inside a Git repository.
129
+ - Run `/code-archaeology` from inside a Git repository.
130
+
131
+ ### Cron Not Running
132
+
133
+ ```bash
134
+ hermes cronjob list
135
+ hermes cronjob log code-archaeology-expedition
136
+ ```
137
+
138
+ ### Phase Blocked
139
+
140
+ ```bash
141
+ cat .archaeology/session.json | jq '.flags.blocked_reason'
142
+ ```
104
143
 
105
144
  ### Stale Cache
106
145
 
@@ -110,7 +149,7 @@ opencode-code-archaeology doctor
110
149
 
111
150
  ### Restore Safety
112
151
 
113
- - Start with `/code-archaeology-survey`; it writes reports only.
152
+ - Start with `/code-archaeology`; it writes reports only.
114
153
  - Review `.archaeology/site_survey.md` and expedition reports before restore.
115
154
  - Use `/code-archaeology-excavate` for mock patches if you want another review gate.
116
155
  - Run `/code-archaeology-restore` only when the target repository has tests or type checks available.
package/docs/README.md CHANGED
@@ -1,8 +1,10 @@
1
1
  # Code Archaeology Documentation
2
2
 
3
- Code Archaeology is an OpenCode plugin for systematic codebase excavation, cataloging, and restoration. It runs inside the target repository, writes local `.archaeology/` reports, and only modifies source files in `restore` mode after review and verification.
3
+ Excavate technical debt. Restore with confidence.
4
4
 
5
- These Markdown files are ready to serve from GitHub Pages, but this repository does not assume Pages is already enabled.
5
+ Code Archaeology is a multi-runtime plugin for systematic codebase excavation, cataloging, and restoration. It supports both **OpenCode** (interactive slash commands) and **Hermes Agent** (cron-based background execution). It runs inside the target repository, writes local `.archaeology/` reports, and only modifies source files in `restore` mode after review and verification.
6
+
7
+ The public landing page is [`index.html`](index.html). These Markdown files remain the detailed documentation source.
6
8
 
7
9
  ## Quick Links
8
10
 
@@ -12,24 +14,33 @@ These Markdown files are ready to serve from GitHub Pages, but this repository d
12
14
  - [Security Audit](SECURITY_AUDIT.md)
13
15
  - [Repository README](../README.md)
14
16
  - [Root Install Handoff](../INSTALL.md)
17
+ - [Hermes Integration](../skills/hermes/INTEGRATION.md)
18
+ - [Hermes Skill](../skills/hermes/README.md)
15
19
 
16
20
  ## Quick Start
17
21
 
22
+ ### OpenCode
23
+
18
24
  Install the package globally, register the plugin, then verify the CLI:
19
25
 
20
26
  ```bash
21
- npm install -g opencode-code-archaeology
22
- opencode-code-archaeology install
23
- opencode-code-archaeology doctor
24
- opencode-code-archaeology version
27
+ npm install -g opencode-code-archaeology@2.2.0 && opencode-code-archaeology install && opencode-code-archaeology doctor
25
28
  ```
26
29
 
27
- Restart OpenCode in the repository you want to inspect and start with the non-destructive survey command:
30
+ Or tell OpenCode:
28
31
 
29
32
  ```text
30
- /code-archaeology-survey
33
+ Fetch and follow the instructions in the installed package's INSTALL.md at $(npm root -g)/opencode-code-archaeology/INSTALL.md for opencode-code-archaeology@2.2.0
31
34
  ```
32
35
 
36
+ Restart OpenCode in the repository you want to inspect and start with the non-destructive default command:
37
+
38
+ ```text
39
+ /code-archaeology
40
+ ```
41
+
42
+ This runs the full 10-phase survey chain without per-phase prompts, writes reports under `.archaeology/`, and makes no source-code changes.
43
+
33
44
  Review `.archaeology/site_survey.md` and expedition reports before using:
34
45
 
35
46
  ```text
@@ -37,8 +48,25 @@ Review `.archaeology/site_survey.md` and expedition reports before using:
37
48
  /code-archaeology-restore
38
49
  ```
39
50
 
51
+ ### Hermes Agent
52
+
53
+ Setup the Hermes runtime and create a cronjob:
54
+
55
+ ```bash
56
+ cd ~/projects/Code-Archaeology
57
+ bash hooks/hermes/setup.sh
58
+
59
+ hermes cronjob create \
60
+ --name "code-archaeology-expedition" \
61
+ --schedule "every 15m" \
62
+ --workdir ~/projects/Code-Archaeology \
63
+ --prompt "Run one Code Archaeology expedition phase. Read .archaeology/session.json, execute current phase with test/typecheck verification, advance to next phase. STOP after one phase."
64
+ ```
65
+
66
+ Each cron run executes exactly **one** phase. Ten phases complete in ~2.5 hours minimum.
67
+
40
68
  ## Safety Warning
41
69
 
42
- `survey` mode writes reports only. `excavate` mode writes reports and mock patches. `restore` mode can edit source files and should only run after report review, on an isolated branch, with tests or type checks available.
70
+ `/code-archaeology` defaults to survey mode and writes reports only. `excavate` mode writes reports and mock patches. `restore` mode can edit source files and should only run after report review, on an isolated branch, with tests or type checks available.
43
71
 
44
72
  Do not commit `.archaeology/`; it is local runtime state.