thoth-agents 0.4.2 → 0.5.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 (115) hide show
  1. package/LICENSE +30 -0
  2. package/README.md +86 -58
  3. package/dist/agents/prompt-sections.d.ts +5 -3
  4. package/dist/agents/prompt-utils.d.ts +1 -1
  5. package/dist/agents/worker.d.ts +2 -0
  6. package/dist/{chunk-STCURXAQ.js → chunk-MRFCA3U2.js} +33 -67
  7. package/dist/{chunk-EFGSGPYM.js → chunk-OW6I7ZUU.js} +391 -416
  8. package/dist/chunk-V7HSGRMB.js +1016 -0
  9. package/dist/{chunk-WCLUZZHI.js → chunk-VUNYH263.js} +1580 -351
  10. package/dist/cli/claude-code-paths.d.ts +2 -2
  11. package/dist/cli/codex-install.d.ts +5 -2
  12. package/dist/cli/codex-paths.d.ts +2 -2
  13. package/dist/cli/index.js +47 -11
  14. package/dist/cli/operations/pi.d.ts +1 -0
  15. package/dist/cli/pi-effort.d.ts +1 -1
  16. package/dist/cli/pi-external-package.d.ts +24 -0
  17. package/dist/cli/pi-git-source.d.ts +1 -0
  18. package/dist/cli/pi-install.d.ts +92 -15
  19. package/dist/cli/pi-managed-write.d.ts +3 -0
  20. package/dist/cli/pi-model-config.d.ts +17 -0
  21. package/dist/cli/pi-native-probe.d.ts +2 -0
  22. package/dist/cli/pi-paths.d.ts +2 -0
  23. package/dist/cli/pi-resources.d.ts +3 -1
  24. package/dist/cli/pi-tool-config.d.ts +32 -0
  25. package/dist/cli/tui/index.js +3 -3
  26. package/dist/cli/types.d.ts +2 -0
  27. package/dist/config/constants.d.ts +4 -8
  28. package/dist/config/schema.d.ts +7 -36
  29. package/dist/harness/adapters/claude-code.d.ts +2 -4
  30. package/dist/harness/core/agent-pack.d.ts +52 -42
  31. package/dist/harness/core/memory-governance.d.ts +2 -2
  32. package/dist/harness/core/sdd.d.ts +159 -319
  33. package/dist/harness/writers/pi-agent.d.ts +3 -1
  34. package/dist/index.js +12 -6
  35. package/dist/pi/tools-panel.d.ts +51 -0
  36. package/dist/pi.d.ts +44 -2
  37. package/dist/pi.js +471 -9
  38. package/dist/utils/subprocess.d.ts +1 -0
  39. package/package.json +18 -4
  40. package/pi/.thoth-agents-assets.json +5 -6
  41. package/pi/agents/thoth-designer.md +23 -8
  42. package/pi/agents/thoth-explorer.md +29 -9
  43. package/pi/agents/thoth-librarian.md +30 -8
  44. package/pi/agents/thoth-oracle.md +18 -10
  45. package/pi/agents/thoth-worker.md +96 -0
  46. package/plugin/.claude-plugin/.thoth-agents-plugin-assets.json +7 -12
  47. package/plugin/.claude-plugin/plugin.json +2 -2
  48. package/plugin/.codex-plugin/plugin.json +2 -2
  49. package/plugin/agents/designer.md +13 -5
  50. package/plugin/agents/explorer.md +16 -5
  51. package/plugin/agents/librarian.md +15 -4
  52. package/plugin/agents/oracle.md +13 -7
  53. package/plugin/agents/orchestrator.md +82 -91
  54. package/plugin/agents/worker.md +76 -0
  55. package/plugin/skills/plan-reviewer/SKILL.md +39 -141
  56. package/plugin/skills/thoth-archive/SKILL.md +50 -47
  57. package/plugin/skills/thoth-archive/scripts/archive.mjs +287 -654
  58. package/plugin/skills/thoth-constitution/SKILL.md +23 -42
  59. package/plugin/skills/thoth-constitution/templates/constitution.md +54 -44
  60. package/plugin/skills/thoth-init/SKILL.md +19 -29
  61. package/plugin/skills/thoth-init/scripts/init.mjs +73 -66
  62. package/plugin/skills/thoth-sdd/SKILL.md +164 -117
  63. package/plugin/skills/thoth-sdd/references/phases/checklist.md +2 -22
  64. package/plugin/skills/thoth-sdd/references/phases/clarify.md +14 -12
  65. package/plugin/skills/thoth-sdd/references/phases/converge.md +2 -13
  66. package/plugin/skills/thoth-sdd/references/phases/explore.md +3 -8
  67. package/plugin/skills/thoth-sdd/references/phases/implement.md +58 -57
  68. package/plugin/skills/thoth-sdd/references/phases/plan.md +2 -18
  69. package/plugin/skills/thoth-sdd/references/phases/specify.md +2 -33
  70. package/plugin/skills/thoth-sdd/references/phases/tasks.md +4 -45
  71. package/plugin/skills/thoth-sdd/references/phases/verify.md +4 -22
  72. package/plugin/skills/thoth-sdd/scripts/validate.mjs +610 -1232
  73. package/plugin/skills/thoth-sdd/templates/change.md +94 -0
  74. package/skills/README.md +11 -13
  75. package/skills/plan-reviewer/SKILL.md +39 -141
  76. package/skills/thoth-archive/SKILL.md +50 -47
  77. package/skills/thoth-archive/scripts/archive.mjs +287 -654
  78. package/skills/thoth-constitution/SKILL.md +23 -42
  79. package/skills/thoth-constitution/templates/constitution.md +54 -44
  80. package/skills/thoth-init/SKILL.md +19 -29
  81. package/skills/thoth-init/scripts/init.mjs +73 -66
  82. package/skills/thoth-sdd/SKILL.md +164 -117
  83. package/skills/thoth-sdd/references/phases/checklist.md +2 -22
  84. package/skills/thoth-sdd/references/phases/clarify.md +14 -12
  85. package/skills/thoth-sdd/references/phases/converge.md +2 -13
  86. package/skills/thoth-sdd/references/phases/explore.md +3 -8
  87. package/skills/thoth-sdd/references/phases/implement.md +58 -57
  88. package/skills/thoth-sdd/references/phases/plan.md +2 -18
  89. package/skills/thoth-sdd/references/phases/specify.md +2 -33
  90. package/skills/thoth-sdd/references/phases/tasks.md +4 -45
  91. package/skills/thoth-sdd/references/phases/verify.md +4 -22
  92. package/skills/thoth-sdd/scripts/validate.mjs +610 -1232
  93. package/skills/thoth-sdd/templates/change.md +94 -0
  94. package/thoth-agents.schema.json +9 -77
  95. package/dist/agents/deep.d.ts +0 -2
  96. package/dist/agents/quick.d.ts +0 -2
  97. package/dist/chunk-2U5MBLLV.js +0 -312
  98. package/pi/agents/thoth-deep.md +0 -81
  99. package/pi/agents/thoth-quick.md +0 -81
  100. package/plugin/agents/deep.md +0 -68
  101. package/plugin/agents/quick.md +0 -68
  102. package/plugin/skills/plan-reviewer/templates/plan-review.md +0 -65
  103. package/plugin/skills/thoth-sdd/templates/archive-report.md +0 -25
  104. package/plugin/skills/thoth-sdd/templates/checklist.md +0 -27
  105. package/plugin/skills/thoth-sdd/templates/plan.md +0 -46
  106. package/plugin/skills/thoth-sdd/templates/spec.md +0 -62
  107. package/plugin/skills/thoth-sdd/templates/tasks.md +0 -58
  108. package/plugin/skills/thoth-sdd/templates/verify-report.md +0 -28
  109. package/skills/plan-reviewer/templates/plan-review.md +0 -65
  110. package/skills/thoth-sdd/templates/archive-report.md +0 -25
  111. package/skills/thoth-sdd/templates/checklist.md +0 -27
  112. package/skills/thoth-sdd/templates/plan.md +0 -46
  113. package/skills/thoth-sdd/templates/spec.md +0 -62
  114. package/skills/thoth-sdd/templates/tasks.md +0 -58
  115. package/skills/thoth-sdd/templates/verify-report.md +0 -28
@@ -1,56 +1,59 @@
1
1
  ---
2
2
  name: thoth-archive
3
- description: Close a passing artifact-backed thoth-agents change by transactionally synchronizing explicitly declared durable requirement deltas and moving the complete audit trail to a dated archive.
3
+ description: Transactionally apply declared .thoth/specs deltas and archive independently verified substantial SDD changes.
4
4
  license: MIT
5
- compatibility: Requires Node.js >=22.19 and write access to the project OpenSpec tree.
5
+ compatibility: Requires Node.js >=22.19 and installed sibling thoth-sdd skill.
6
6
  metadata:
7
7
  author: thoth-agents
8
- version: "1.0"
8
+ version: "2.0"
9
9
  ---
10
10
 
11
11
  # Thoth Archive
12
12
 
13
- Archive is the required terminal transition for Accelerated and Full routes.
14
- Resolve `<skill-dir>` as the directory containing this `SKILL.md`, and resolve
15
- `<skills-root>` as its parent directory. Bundled paths below are anchored to
16
- those installed roots rather than the project or current working directory.
17
-
18
- 1. Confirm every task is `[x]`, `verify-report.md` records independent oracle
19
- `PASS`, its compliance matrix covers every FR and buildable SC, every outcome
20
- SC has observed PASS evidence or an explicit residual RISK, and no unresolved
21
- CRITICAL issue remains.
22
- 2. Prepare `archive-report.md` from
23
- `<skills-root>/thoth-sdd/templates/archive-report.md` with status `READY`,
24
- verification lineage, completed scope, deviations, residual warnings, and
25
- the pending canonical-sync line.
26
- 3. Run `node "<skills-root>/thoth-sdd/scripts/validate.mjs"` through `closeout`.
27
- 4. Run `node "<skill-dir>/scripts/archive.mjs" --change <path> --date YYYY-MM-DD --json`.
28
- 5. Return the dated archive path, updated capability specifications, and audit
29
- summary.
30
-
31
- The script reads delta metadata directly from `spec.md`:
32
-
33
- - `[ADDED capability]` creates a named canonical requirement.
34
- - `[MODIFIED capability]` replaces the named requirement and its scenarios.
35
- - `[REMOVED capability]` removes the named requirement.
36
- - `[RENAMED capability FROM Previous title]` renames and replaces it.
37
- - `[INTERNAL]` never changes `openspec/specs/`.
38
-
39
- The SDD validator preflights these operations against the canonical requirement
40
- titles from `specify` onward. Archive reuses the same ordered parser and
41
- preflight as a final defense before staging writes, preserving stable
42
- `SDD-SPEC-DELTA-*` incompatibility codes. An `ADDED` warning for an existing
43
- nonempty capability requires semantic-overlap review because differently named
44
- requirements cannot be proven distinct by exact-title tooling alone.
45
-
46
- All delta targets are validated before any permanent specification changes. The
47
- operation stages and rolls back the full canonical update if a delta, report
48
- update, or final move raises a handled error in the active process. Report and
49
- canonical recovery are attempted independently. It never merges undeclared
50
- feature prose. No CLI, network access, or installation action is used during SDD
51
- closeout.
52
-
53
- This operation is not crash-atomic. Forced process or operating-system
54
- termination between filesystem renames can leave `.spec.md.thoth-stage-*` or
55
- `spec.md.thoth-backup-*` files. Inspect them and the canonical specification
56
- before retrying archive.
13
+ Root archives only after the implementation writer has terminated and a fresh
14
+ independent Oracle PASS has covered the actual change, diff, checks, and risks.
15
+ Structural closeout validation is not approval. The single record must have all
16
+ tasks complete, explicit plan-review disposition and implementation authorization,
17
+ every acceptance outcome's concrete PASS check/evidence, reviewed-record and
18
+ source digests, reviewed canonical baselines for every affected capability, and
19
+ `**Archive**: READY`. Each affected canonical spec is covered in that same record
20
+ by its SHA-256 `Source` entry or an explicit `absent` entry. Missing or stale
21
+ coverage blocks before canonical or archive changes. No verification or archive
22
+ report is required or allowed.
23
+
24
+ Plan-review selection provenance must be `EXPLICIT_REVIEW`, `EXPLICIT_SKIP`, or
25
+ `DEFAULT_REVIEW_AFTER_3`. A `SKIPPED` disposition requires `EXPLICIT_SKIP`; an
26
+ `OKAY` disposition requires explicit review or the third-answerless review
27
+ default. An unanswered offer never authorizes skip. The orchestrator owns the
28
+ choice and uses the shared per-question recommendation rule; archive validation
29
+ does not claim that it can authenticate the native interaction.
30
+
31
+ Run the installed sibling validator at `--through closeout`, then:
32
+
33
+ ```text
34
+ node "<skill-dir>/scripts/archive.mjs" --change .thoth/changes/<id> --date YYYY-MM-DD --json
35
+ ```
36
+
37
+ The shipped `--project <repository-root>` option is also accepted and checked
38
+ against the change location. JSON includes the stable change ID, archive path,
39
+ record path, and updated capabilities.
40
+
41
+ The script validates before creating the transaction, revalidates under its
42
+ exclusive transaction, and checks actual reviewed baselines again immediately
43
+ before mutation. It applies only declared ADDED/MODIFIED/REMOVED/RENAMED
44
+ exact-title requirements to `.thoth/specs/<capability>/spec.md`, preserving
45
+ unaffected requirements. It then moves the active
46
+ `.thoth/changes/<id>/<id>.md` record to
47
+ `.thoth/changes/archive/<date>-<id>/<id>.md`. The filename and identity remain
48
+ unchanged; the date appears only in the archive directory. Historical changes
49
+ are preserved.
50
+
51
+ It preflights canonical baselines and destination topology, captures displaced
52
+ original bytes, installs exclusively without overwriting concurrent creation,
53
+ verifies applied bytes, and rolls back handled failures. It rejects unsafe IDs,
54
+ symlink escapes, archive collisions, and unfinished transactions. Forced
55
+ termination is not crash-atomic; a retained
56
+ `.thoth/.archive-transaction/recovery.json` is a filesystem recovery aid, not
57
+ workflow state. Inspect real files, backups, and change/archive locations before
58
+ recovery; never blindly replay external effects. No installer or network access
59
+ is involved.