mini-trellis 0.1.1 → 0.2.1

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 (51) hide show
  1. package/README.md +108 -94
  2. package/dist/cli/index.d.ts.map +1 -1
  3. package/dist/cli/index.js +32 -0
  4. package/dist/cli/index.js.map +1 -1
  5. package/dist/commands/doctor.d.ts +18 -0
  6. package/dist/commands/doctor.d.ts.map +1 -0
  7. package/dist/commands/doctor.js +197 -0
  8. package/dist/commands/doctor.js.map +1 -0
  9. package/dist/commands/init.d.ts.map +1 -1
  10. package/dist/commands/init.js +34 -8
  11. package/dist/commands/init.js.map +1 -1
  12. package/dist/commands/mem.d.ts +2 -0
  13. package/dist/commands/mem.d.ts.map +1 -1
  14. package/dist/commands/mem.js +85 -2
  15. package/dist/commands/mem.js.map +1 -1
  16. package/dist/commands/refresh.d.ts +24 -0
  17. package/dist/commands/refresh.d.ts.map +1 -0
  18. package/dist/commands/refresh.js +180 -0
  19. package/dist/commands/refresh.js.map +1 -0
  20. package/dist/configurators/shared.d.ts.map +1 -1
  21. package/dist/configurators/shared.js +15 -2
  22. package/dist/configurators/shared.js.map +1 -1
  23. package/dist/templates/codex/config.toml +7 -15
  24. package/dist/templates/codex/hooks.json +4 -1
  25. package/dist/templates/common/bundled-skills/mini-trellis-session-insight/SKILL.md +13 -7
  26. package/dist/templates/common/bundled-skills/mini-trellis-session-insight/references/cli-quick-reference.md +24 -11
  27. package/dist/templates/common/bundled-skills/mini-trellis-session-insight/references/triggering-patterns.md +18 -10
  28. package/dist/templates/common/commands/remember.md +17 -3
  29. package/dist/templates/common/skills/update-spec.md +4 -0
  30. package/dist/templates/extract.d.ts +2 -0
  31. package/dist/templates/extract.d.ts.map +1 -1
  32. package/dist/templates/extract.js +21 -0
  33. package/dist/templates/extract.js.map +1 -1
  34. package/dist/templates/markdown/agents.md +9 -1
  35. package/dist/templates/markdown/spec/guides/mini-memory.md.txt +15 -8
  36. package/dist/templates/opencode/lib/session-utils.js +13 -58
  37. package/dist/templates/opencode/plugins/session-start.js +6 -10
  38. package/dist/templates/pi/extensions/mini-trellis/index.ts.txt +27 -78
  39. package/dist/templates/shared-hooks/session-start.py +108 -64
  40. package/dist/templates/trellis/config.yaml +3 -3
  41. package/dist/templates/trellis/scripts/add_session.py +95 -9
  42. package/dist/templates/trellis/scripts/common/config.py +4 -3
  43. package/dist/utils/managed-manifest.d.ts +12 -0
  44. package/dist/utils/managed-manifest.d.ts.map +1 -0
  45. package/dist/utils/managed-manifest.js +48 -0
  46. package/dist/utils/managed-manifest.js.map +1 -0
  47. package/dist/utils/managed-merge.d.ts +17 -0
  48. package/dist/utils/managed-merge.d.ts.map +1 -0
  49. package/dist/utils/managed-merge.js +101 -0
  50. package/dist/utils/managed-merge.js.map +1 -0
  51. package/package.json +4 -4
package/README.md CHANGED
@@ -1,143 +1,157 @@
1
- # mini-trellis
1
+ <h1 align="center">mini-trellis</h1>
2
2
 
3
- **A memory layer for AI coding agents.** A trimmed fork of [Trellis](https://github.com/mindfold-ai/Trellis) 0.6.17 that keeps spec, research, journal and cross-session recall, and drops everything else.
3
+ <p align="center"><strong>Project knowledge for the next coding session.</strong></p>
4
4
 
5
- English | [简体中文](./README_CN.md)
5
+ <p align="center">Keep conventions, research and development notes for your agent.<br/>Find earlier decisions and their sources when you need them again.</p>
6
6
 
7
- <p>
8
- <a href="https://www.npmjs.com/package/mini-trellis"><img src="https://img.shields.io/npm/v/mini-trellis.svg?style=flat-square&color=2563eb" alt="npm version" /></a>
9
- <a href="https://www.npmjs.com/package/mini-trellis"><img src="https://img.shields.io/npm/dm/mini-trellis?style=flat-square&color=cb3837&label=downloads" alt="npm downloads" /></a>
10
- <a href="https://github.com/Tiger-zzZ/mini-trellis/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-AGPL--3.0-16a34a.svg?style=flat-square" alt="license" /></a>
11
- <a href="https://github.com/Tiger-zzZ/mini-trellis/stargazers"><img src="https://img.shields.io/github/stars/Tiger-zzZ/mini-trellis?style=flat-square&color=f59e0b" alt="GitHub stars" /></a>
12
- <a href="https://github.com/Tiger-zzZ/mini-trellis/issues"><img src="https://img.shields.io/github/issues/Tiger-zzZ/mini-trellis?style=flat-square" alt="GitHub issues" /></a>
13
- <a href="https://github.com/Tiger-zzZ/mini-trellis/pulls"><img src="https://img.shields.io/github/issues-pr/Tiger-zzZ/mini-trellis?style=flat-square" alt="GitHub pull requests" /></a>
7
+ <p align="center">Local Markdown · On-demand lookup · Across sessions</p>
8
+
9
+ <p align="center">
10
+ <a href="#quick-start">Quick start</a> ·
11
+ <a href="#working-with-project-memory">How it works</a> ·
12
+ <a href="#migrating-from-trellis">Migration</a> ·
13
+ <a href="./README_CN.md">简体中文</a>
14
+ </p>
15
+
16
+ <p align="center">
17
+ <a href="https://www.npmjs.com/package/mini-trellis"><img src="https://img.shields.io/npm/v/mini-trellis?style=flat-square&amp;color=28785e" alt="npm version" /></a>
18
+ <a href="./LICENSE"><img src="https://img.shields.io/badge/license-AGPL--3.0-64766f?style=flat-square" alt="AGPL-3.0 license" /></a>
14
19
  </p>
15
20
 
16
- ## Why this fork exists
21
+ ![Conventions, research and verified fixes accumulate in project Markdown, inform later work, and are updated with new evidence.](./docs/assets/knowledge-en.svg)
22
+
23
+ - **Carry decisions forward.** Keep agreed interface boundaries and project conventions where the next session can read them.
24
+ - **Build on earlier research.** Save the conclusion, its conditions and its sources. Update the same topic as you learn more.
25
+ - **Check the original discussion.** Search local conversation history when you need to distinguish a proposal from the decision that followed.
26
+
27
+ mini-trellis adds project memory to your existing way of working. Planning, implementation and review stay with you and your agent. Knowledge is stored as editable Markdown; history lookup runs locally, without an embedding model or a separate retrieval service.
28
+
29
+ ## Quick start
30
+
31
+ v0.2.1 brings unified project knowledge recall, topic-linked journals, and lightweight session context. See the [release notes](./docs/releases/v0.2.1.md).
32
+
33
+ Requires **Node.js ≥ 18.17**, **Python ≥ 3.9**, and Git for version control.
34
+
35
+ Run in your project:
36
+
37
+ ```bash
38
+ npm install -g mini-trellis
39
+ mini-trellis init -u your-name --claude
40
+ ```
41
+
42
+ Choose your agent's flag from the [supported tools](#supported-tools) below. Flags can be combined.
17
43
 
18
- Trellis gave me four things I rely on every day: spec, research notes, session journals, and a way to search past AI conversations. It also shipped a full four-phase task workflow: `task.py`, PRD gates, sub-agent review, a per-turn breadcrumb telling the model which phase it is in. Over time I noticed I was routing around the workflow and only ever using the memory parts.
44
+ Start a new agent session. Once you have a decision worth keeping, ask the agent to save it and invoke its `remember` command. To look up project knowledge from the terminal:
19
45
 
20
- Models have moved on too. A GPT 6 / Fable 5 class agent does not need a script telling it when to plan and when to verify. What it still cannot do is remember what we decided last week, or find the conversation where we already solved this bug. That gap is what this fork keeps.
46
+ ```bash
47
+ mini-trellis mem recall "callback retries"
48
+ ```
21
49
 
22
- So mini-trellis cuts the workflow and keeps the memory. The "mini" is the point.
50
+ ## Working with project memory
23
51
 
24
- Credit where due: the heavy lifting is all Trellis. Standing on the shoulders of giants, my main contribution was deleting code.
52
+ Consider a billing service where repeated callbacks caused duplicate charges. The fix is complete, but the reason for it needs to survive the session.
25
53
 
26
- ## Trellis vs mini-trellis
54
+ | Keep | Example | Use it next time |
55
+ | --- | --- | --- |
56
+ | A project convention | Every callback must carry an idempotency key. | Check the rule before changing the callback handler. |
57
+ | Research and evidence | Retry conditions, alternatives considered, and links to the provider's documentation. | Revisit the reasoning when the provider changes its API. |
58
+ | A development note | What caused the duplicate charge, what changed, and which test verified the fix. | Find the earlier investigation when a similar report arrives. |
27
59
 
28
- Trellis is an engineering framework: it decides how a task moves from PRD to implementation to review, and it drives that with hooks on every turn, sub-agents, and a task state machine. mini-trellis is only the memory underneath that framework. It never creates a task, never tells the model what phase it is in, and never dispatches a sub-agent. It injects a short orientation at session start, lets the model read spec and research on demand, and gives it two verbs: `remember` to write the journal, and `mem` to search past dialogue. Everything Trellis does *around* memory is left to the model and to you.
60
+ The agent saves these findings as project notes, ready to consult and update in later sessions.
29
61
 
30
- | | Trellis 0.6.17 | mini-trellis 0.1.1 |
31
- |---|---|---|
32
- | Purpose | Engineering framework: spec + task workflow + memory | Memory layer only |
33
- | Hosts | 22 AI coding tools | Claude Code, Codex, OpenCode, Pi |
34
- | Hooks | SessionStart + per-turn breadcrumb + PreToolUse sub-agent injection | SessionStart only |
35
- | Task system | `task.py`, `tasks/`, PRD / jsonl gates, `workflow.md`, archive | None |
36
- | Sub-agents | `trellis-research` / `implement` / `check` | None |
37
- | Skills & commands shipped | ~10 skills, 3 commands, 3 agents | `remember`, `session-insight`, `update-spec` |
38
- | CLI | init, update, workflow, channel, ablate, restore, mem, upgrade, uninstall, platforms | init, migrate, mem, upgrade, uninstall, platforms |
39
- | Spec | 7-section templates per layer, generated at init | One short seed; you write short markdown |
40
- | Research | Lives inside a task directory | First-class `.trellis/research/` inbox with a cold `archive/` |
41
- | Journal trigger | Task archive, then `finish-work` | `remember`, plus a reminder after compact |
42
- | Code shipped | ~110k lines across `packages/` | ~31k lines |
43
- | License | AGPL-3.0 | AGPL-3.0 (unchanged) |
62
+ ### Where knowledge lives
44
63
 
45
- If you want an opinionated workflow with guard rails, use Trellis. If you want your agent to remember and stay out of the way, use this.
64
+ | Location | Contents |
65
+ | --- | --- |
66
+ | `.trellis/spec/` | Current project conventions and durable contracts. Read the relevant `index.md` first. |
67
+ | `.trellis/research/` | Topic notes with conclusions, conditions and sources. Historical topics can be kept under `archive/`. |
68
+ | `.trellis/workspace/<you>/` | Your session journals: changes, decisions, verification and next steps. |
69
+ | Your agent's local history | Original conversations, searched in place with `mini-trellis mem`. |
46
70
 
47
- ## What's kept
71
+ The Markdown files can be reviewed, edited and versioned in Git. Check your ignore rules if you want to share them with the team. Original conversations remain in the agent's own local store.
48
72
 
49
- | Path | What it is |
50
- |------|------------|
51
- | `.trellis/spec/` | Durable contracts, short markdown; read `index.md` first |
52
- | `.trellis/research/<topic>.md` | Research inbox; `git mv` stale notes into `research/archive/` |
53
- | `.trellis/workspace/<you>/journal-*.md` | Session notes, auto-committed by remember |
54
- | `mini-trellis mem search <kw>` | Past chat from Claude / Codex / OpenCode / Pi |
73
+ ### During a session
55
74
 
56
- ## How a session goes
75
+ At startup, the configured hook supplies knowledge locations and recording guidance. The agent can read the relevant notes while working and search history when a previous decision matters.
57
76
 
58
- 1. **SessionStart** injects a few lines: your journal path, the spec index paths, the hot research topics. Paths only, never bodies. Nothing about tasks or phases.
59
- 2. **During the session** the model reads spec or research on demand, and reaches for `mini-trellis mem` when a question sounds like "didn't we already discuss this".
60
- 3. **At the end, or after a compact,** ask the agent to run `remember` to append a journal entry (auto-commit follows `session_auto_commit`). Reusable research can go into `.trellis/research/<topic>.md`; lasting boundaries go into spec via `mini-trellis-update-spec`. The hook supplies context and reminders; closing a session does not automatically save notes.
77
+ Record confirmed decisions, reusable findings and verified fixes. Update an existing topic when it already covers the subject; keep the journal brief and link to the detailed note. Use `mini-trellis-update-spec` to capture a lasting project rule.
61
78
 
62
- ## Install
79
+ Use `remember` to save a checkpoint before ending a session. New installations write notes without an automatic Git commit; existing projects follow their `session_auto_commit` setting.
80
+
81
+ ### Find project knowledge
82
+
83
+ `recall` searches project Markdown and past conversations together. It discovers documents automatically and returns short excerpts with their sources. Copy a result's `ref` into `read` to expand it:
63
84
 
64
85
  ```bash
65
- npm install -g mini-trellis
66
- mini-trellis init -u your-name --claude
67
- # also: --codex --opencode --pi
86
+ mini-trellis mem recall "callback retries"
87
+ mini-trellis mem read "<ref>"
68
88
  ```
69
89
 
70
- Python ≥ 3.9 is required for the journal scripts and SessionStart hooks. Codex SessionStart needs `[features].hooks = true` in `~/.codex/config.toml`, then a one-time `/hooks` approval.
90
+ Lookup stays within the current project. Results are kept short; expand the sources you need. `read` checks for source changes before returning the text.
71
91
 
72
- | Command | What it does |
73
- |---|---|
74
- | `mini-trellis init` | Write the memory skeleton and the host surfaces for the flags you pass |
75
- | `mini-trellis mem list\|search\|context\|extract\|projects` | Search local session logs of the four hosts; nothing is uploaded |
76
- | `mini-trellis migrate` | Convert a Trellis project (see below) |
77
- | `mini-trellis upgrade` | Upgrade the global CLI via npm |
78
- | `mini-trellis uninstall` | Remove the host files and `.trellis/` from a project |
79
- | `mini-trellis platforms` | Show which hosts are configured here |
92
+ For conversation-only lookup, use `mem search`, then `mem context` with a returned session ID. See `mini-trellis mem help` for commands and filters.
80
93
 
81
- There is no `update` command that rewrites project files.
94
+ ## Supported tools
82
95
 
83
- ### Upgrading an existing mini-trellis project
96
+ | Agent | Initialization flag | Record a session |
97
+ | --- | --- | --- |
98
+ | Claude Code | `--claude` | `/mini-trellis:remember` |
99
+ | Codex | `--codex` | `$mini-trellis-remember` |
100
+ | OpenCode | `--opencode` | `/mini-trellis:remember` |
101
+ | Pi | `--pi` | `/mini-trellis-remember` |
84
102
 
85
- `mini-trellis upgrade` updates the global CLI only. To refresh a 0.1.0 project's installed scripts and host templates:
103
+ For example, add both Claude Code and Codex with `mini-trellis init -u your-name --claude --codex`.
86
104
 
87
- 1. Commit or back up `.trellis/`, `AGENTS.md`, and the configured host directories, including ignored files.
88
- 2. Run `mini-trellis init` in an interactive terminal **without flags**, choose **Full re-initialize**, then select your existing hosts.
89
- 3. Choose **Overwrite** for the scripts, hooks, and mini-trellis commands/skills you want to refresh. Keep your custom config, workspace index, spec guides, and host settings; merge any necessary template changes into customized files. Avoid **Overwrite all** and `--force`, which also reset those files.
90
- 4. Review the diff and developer identity, then open a new host session to load the refreshed context.
105
+ For Codex:
91
106
 
92
- `--skip-existing` does not refresh existing templates. Use `migrate` for Trellis projects or leftover `.trellis/tasks/`; it is not a general template updater.
107
+ 1. Run `codex` in the project and review the project trust prompt. If project-local configuration is disabled, follow Codex's message to trust the resolved project path in `~/.codex/config.toml`.
108
+ 2. Open `/hooks` to review and approve the project hook. Project trust and hook trust are separate checks; an `untrusted` hook stays inactive.
109
+ 3. If your Codex version requires the opt-in, set `hooks = true` under `[features]` in the user config.
110
+ 4. Run `mini-trellis doctor`, then start a new session. Hook delivery remains `unknown` until a real run is observed.
93
111
 
94
- ## Coming from Trellis?
112
+ ## Upgrade and check an installation
95
113
 
96
- If Trellis is already running in one of your projects, my honest advice is: leave it there. Point mini-trellis at a new project instead. The two share `.trellis/`, and their instruction surfaces don't merge cleanly — Trellis's skills, commands, and agents stay discoverable right next to mini-trellis's.
114
+ `upgrade` updates the global CLI. `refresh` updates the project's installed scripts and agent files.
97
115
 
98
- If you do want to convert one, `mini-trellis migrate` handles it:
116
+ Back up `.trellis/`, `AGENTS.md` and the configured agent directories first, including ignored files. Then:
99
117
 
100
118
  ```bash
101
- mini-trellis migrate --dry-run # list what would go
102
- mini-trellis migrate # asks first, defaults to no
119
+ mini-trellis upgrade
120
+ mini-trellis refresh --dry-run
103
121
  ```
104
122
 
105
- It rewrites the four host surfaces with mini-trellis's versions, deletes the Trellis-only instruction files (skills, commands, agents, per-turn injectors, `workflow.md`, `task.py`), replaces the Trellis block in `AGENTS.md`, and drops `.trellis/.version` so the Trellis CLI stops offering to update the project back to the four-phase workflow.
106
-
107
- It also converges `.trellis/tasks/` into the memory layer, because with `task.py` gone nothing reads that tree any more:
123
+ Review the preview before applying it:
108
124
 
109
- - Each task directory becomes one research topic: `.trellis/tasks/<name>/` → `.trellis/research/<name>/`, and archived ones go to `.trellis/research/archive/YYYY-MM/<name>/`. Date prefixes and directory names are kept, preserving relative links within the retained task content. Links to departing files such as `../prd.md` are not repaired.
110
- - Each topic keeps its `research/` subtree and `design.md` exactly where they are. Everything else at the task root — `task.json`, `prd.md`, `implement*`, `check.jsonl`, `drafts/`, and any file migrate does not recognise — leaves the topic. You choose once, up front: archive it to `.trellis/research/<topic>/legacy/`, or delete it. Archive is the default, `--yes` included.
111
- - Repo-relative `.trellis/tasks/…` mentions inside the notes that stay are repointed by their full source paths. Stale pre-archive paths are repaired only when the task name is unique. Ambiguous or unsupported references are left unchanged and counted; references to other repositories are not rewritten.
112
- - The `current_task` pointer in `.trellis/.runtime/sessions/*.json` is cleared, and `.trellis/tasks/` is removed once it is empty.
125
+ ```bash
126
+ mini-trellis refresh
127
+ mini-trellis doctor
128
+ ```
113
129
 
114
- If a topic destination already exists under `.trellis/research/`, or a task root already contains `legacy`, migrate stops before touching anything and lists the collisions. Move or rename those entries before retrying. Migration directories must be real directories, not symlinks. Unprocessed entries, including dangling symlinks, keep `tasks/` from being removed and are reported. Note symlinks are never followed for rewriting.
130
+ Refresh updates only managed assets that have not been modified locally. It preserves knowledge and custom configuration, and reports conflicts for you to resolve. Open a new agent session after refreshing.
115
131
 
116
- **There is no backup.** Deleting is permanent, so commit or copy anything you might want back first.
132
+ Use `mini-trellis platforms` to inspect configured tools. To remove an installation, check `mini-trellis uninstall --help` first: uninstall removes `.trellis/`, including knowledge files, so back them up before removal.
117
133
 
118
- ### What you get afterwards
134
+ ## Migrating from Trellis
119
135
 
120
- - `.trellis/spec/`, `research/`, and `workspace/` are left alone. Your spec content survives, including any `backend/`/`frontend/` docs Trellis wrote — those still show up in the SessionStart spec list.
121
- - `.trellis/config.yaml` and `.trellis/scripts/` get overwritten with mini-trellis's versions. Re-apply any local edits.
122
- - Migrated task directories are topics under `.trellis/research/` now; hot topics are listed by SessionStart. `.trellis/tasks/` is removed only if no unprocessed entries remain.
123
- - `.trellis/.version` is removed and mini-trellis never writes one, so the Trellis CLI stays quiet in that project.
136
+ Trellis projects can be converted with `migrate`. The two tools share `.trellis/`; use migration to replace the existing integration rather than installing both into the same project.
124
137
 
125
- ## Record a session
138
+ ```bash
139
+ mini-trellis migrate --dry-run
140
+ mini-trellis migrate
141
+ ```
126
142
 
127
- - Claude / OpenCode: `/mini-trellis:remember`
128
- - Codex: `$mini-trellis-remember`
129
- - Pi: `/mini-trellis-remember`
143
+ Migration retains existing spec, research and journals, and moves task research into research topics. Other task material is archived under `legacy/` by default; deletion is an explicit choice. Trellis-specific workflow files are removed, while scripts, configuration and detected host integrations are replaced with mini-trellis versions.
130
144
 
131
- Promote a lasting boundary into spec with the `mini-trellis-update-spec` skill.
145
+ Before migration, back up project knowledge and custom configuration, including Git-ignored files. The migration command does not create backups. It asks for confirmation and defaults to no.
132
146
 
133
- ## Feedback
147
+ See the [migration guide](./docs/migration.md) for path mappings, retained files, conflicts and link handling. Use `refresh` to update an existing mini-trellis installation.
134
148
 
135
- This was cut in a hurry. Please try it, complain freely in [issues](https://github.com/Tiger-zzZ/mini-trellis/issues), and send pull requests; see [CONTRIBUTING](./CONTRIBUTING.md) for the local setup. Thanks to the Trellis team, and to everyone on the forum who pushed for a smaller Trellis.
149
+ ## Contributing
136
150
 
137
- ## License
151
+ Bug reports and practical examples are welcome in [Issues](https://github.com/Tiger-zzZ/mini-trellis/issues). For local development, see [CONTRIBUTING](./CONTRIBUTING.md). Community: [Linux.do](https://linux.do/).
138
152
 
139
- AGPL-3.0. Original copyright Mindfold LLC; this fork's modification notice is in `COPYRIGHT`.
153
+ ## Acknowledgments and license
140
154
 
141
- ## Community Support
155
+ mini-trellis originated from [Trellis](https://github.com/mindfold-ai/Trellis) 0.6.17 by Mindfold. Thanks to its authors for the foundation of the project.
142
156
 
143
- [Linuxdo](https://linux.do/)
157
+ [AGPL-3.0](./LICENSE). Original copyright Mindfold LLC; modification notices and contributor attribution are retained in [COPYRIGHT](./COPYRIGHT).
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAIhE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAIhE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC"}
package/dist/cli/index.js CHANGED
@@ -5,6 +5,8 @@ import { migrate } from "../commands/migrate.js";
5
5
  import { upgrade } from "../commands/upgrade.js";
6
6
  import { uninstall } from "../commands/uninstall.js";
7
7
  import { runMem } from "../commands/mem.js";
8
+ import { runDoctor } from "../commands/doctor.js";
9
+ import { runRefresh } from "../commands/refresh.js";
8
10
  import { PACKAGE_NAME, VERSION } from "../constants/version.js";
9
11
  import { getConfiguredPlatforms } from "../configurators/index.js";
10
12
  import { AI_TOOLS } from "../types/ai-tools.js";
@@ -115,6 +117,36 @@ program
115
117
  process.exit(1);
116
118
  }
117
119
  });
120
+ program
121
+ .command("doctor")
122
+ .description("Check mini-trellis files, managed instructions, and host hooks")
123
+ .option("--json", "Output machine-readable JSON")
124
+ .action((options) => {
125
+ const report = runDoctor({ json: options.json });
126
+ if (!report.ok)
127
+ process.exitCode = 1;
128
+ });
129
+ program
130
+ .command("refresh")
131
+ .description("Preview or safely refresh installed mini-trellis assets")
132
+ .option("--claude", "Refresh Claude Code assets")
133
+ .option("--codex", "Refresh Codex assets")
134
+ .option("--opencode", "Refresh OpenCode assets")
135
+ .option("--pi", "Refresh Pi Agent assets")
136
+ .option("--dry-run", "Preview changes without writing files")
137
+ .option("--json", "Output machine-readable JSON")
138
+ .action((options) => {
139
+ const report = runRefresh({
140
+ claude: options.claude,
141
+ codex: options.codex,
142
+ opencode: options.opencode,
143
+ pi: options.pi,
144
+ dryRun: options.dryRun,
145
+ json: options.json,
146
+ });
147
+ if (!report.ok)
148
+ process.exitCode = 1;
149
+ });
118
150
  program
119
151
  .command("platforms")
120
152
  .description("Show which AI platforms are configured (active) in the current project")
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD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"unknown";
3
+ export interface DoctorCheck {
4
+ level: DoctorLevel;
5
+ name: string;
6
+ detail: string;
7
+ }
8
+ export interface DoctorReport {
9
+ ok: boolean;
10
+ checks: DoctorCheck[];
11
+ platforms: AITool[];
12
+ }
13
+ export declare function buildDoctorReport(cwd: string): DoctorReport;
14
+ export declare function runDoctor(options?: {
15
+ json?: boolean;
16
+ cwd?: string;
17
+ }): DoctorReport;
18
+ //# sourceMappingURL=doctor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAGA,OAAO,EAAY,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAG7D,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAE9D,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,WAAW,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAwED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAmI3D;AAED,wBAAgB,SAAS,CACvB,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAO,GAC7C,YAAY,CAyBd"}
@@ -0,0 +1,197 @@
1
+ import fs from "node:fs";
2
+ import path from "node:path";
3
+ import chalk from "chalk";
4
+ import { AI_TOOLS } from "../types/ai-tools.js";
5
+ import { getConfiguredPlatforms } from "../configurators/index.js";
6
+ function recordingCheck(cwd) {
7
+ const name = "recording-runtime";
8
+ const file = path.join(cwd, ".trellis/.runtime/writes/latest.json");
9
+ if (!fs.existsSync(file)) {
10
+ return {
11
+ name,
12
+ level: "unknown",
13
+ detail: "no add_session.py outcome observed",
14
+ };
15
+ }
16
+ try {
17
+ const value = JSON.parse(fs.readFileSync(file, "utf8"));
18
+ if (value?.schema !== 1 ||
19
+ typeof value.last_write_at !== "string" ||
20
+ !Number.isFinite(Date.parse(value.last_write_at)) ||
21
+ !Number.isInteger(value.last_exit_code) ||
22
+ value.last_exit_code < 0 ||
23
+ !["ok", "error"].includes(value.last_status) ||
24
+ (value.last_status === "ok") !== (value.last_exit_code === 0))
25
+ throw new Error("invalid metadata");
26
+ return {
27
+ name,
28
+ level: value.last_status === "ok" ? "ok" : "warn",
29
+ detail: `last add_session.py ${value.last_status} at ${value.last_write_at}; exit ${value.last_exit_code}` +
30
+ (value.last_status === "error"
31
+ ? "; recording-failed (a partial checkpoint may exist; inspect the command error before retrying)"
32
+ : " (does not verify direct spec/research edits)"),
33
+ };
34
+ }
35
+ catch {
36
+ return {
37
+ name,
38
+ level: "warn",
39
+ detail: "recording metadata is unreadable or invalid; outcome unknown",
40
+ };
41
+ }
42
+ }
43
+ const PLATFORM_CHECKS = {
44
+ "claude-code": [".claude/hooks/session-start.py", ".claude/settings.json"],
45
+ codex: [".codex/hooks/session-start.py", ".codex/hooks.json"],
46
+ opencode: [".opencode/plugins/session-start.js"],
47
+ pi: [".pi/extensions/mini-trellis/index.ts", ".pi/settings.json"],
48
+ };
49
+ const TRIGGER_MARKERS = {
50
+ "claude-code": [".claude/hooks/session-start.py", "additional_context"],
51
+ codex: [".codex/hooks/session-start.py", "additional_context"],
52
+ opencode: [".opencode/plugins/session-start.js", "messages.transform"],
53
+ pi: [".pi/extensions/mini-trellis/index.ts", "before_agent_start"],
54
+ };
55
+ export function buildDoctorReport(cwd) {
56
+ const checks = [];
57
+ const exists = (relative) => fs.existsSync(path.join(cwd, relative));
58
+ const runtimeStatus = (platform) => {
59
+ const file = path.join(cwd, ".trellis", ".runtime", "hooks", `${platform}.json`);
60
+ try {
61
+ const value = JSON.parse(fs.readFileSync(file, "utf8"));
62
+ return value?.schema === 1 &&
63
+ typeof value.last_status === "string" &&
64
+ typeof value.last_hook_at === "string" &&
65
+ Number.isFinite(Date.parse(value.last_hook_at)) &&
66
+ Number.isInteger(value.last_output_chars) &&
67
+ (value.last_output_chars ?? -1) >= 0
68
+ ? value
69
+ : null;
70
+ }
71
+ catch {
72
+ return null;
73
+ }
74
+ };
75
+ const workflowReady = exists(".trellis") && exists(".trellis/scripts/add_session.py");
76
+ checks.push({
77
+ level: workflowReady ? "ok" : "error",
78
+ name: "memory-layer",
79
+ detail: workflowReady
80
+ ? ".trellis and add_session.py are present"
81
+ : "missing .trellis or .trellis/scripts/add_session.py; run mini-trellis init",
82
+ });
83
+ checks.push(recordingCheck(cwd));
84
+ const agents = exists("AGENTS.md")
85
+ ? fs.readFileSync(path.join(cwd, "AGENTS.md"), "utf8")
86
+ : "";
87
+ const agentsReady = agents.includes("<!-- TRELLIS:START -->") &&
88
+ agents.includes("<!-- TRELLIS:END -->");
89
+ checks.push({
90
+ level: agentsReady ? "ok" : "warn",
91
+ name: "instructions",
92
+ detail: agentsReady
93
+ ? "AGENTS.md contains the managed mini-trellis block"
94
+ : "AGENTS.md is missing the managed mini-trellis block; run init to add it",
95
+ });
96
+ const platforms = [...getConfiguredPlatforms(cwd)];
97
+ for (const platform of Object.keys(AI_TOOLS)) {
98
+ const files = PLATFORM_CHECKS[platform];
99
+ const present = files.filter(exists);
100
+ if (present.length === 0)
101
+ continue;
102
+ const complete = present.length === files.length;
103
+ checks.push({
104
+ level: complete ? "ok" : "warn",
105
+ name: platform,
106
+ detail: complete
107
+ ? `${AI_TOOLS[platform].name} hook and config are present`
108
+ : `${AI_TOOLS[platform].name} is partially configured (${present.length}/${files.length} files)`,
109
+ });
110
+ if (complete) {
111
+ const [triggerPath, marker] = TRIGGER_MARKERS[platform];
112
+ let triggerLevel = "unknown";
113
+ let triggerDetail = "host delivery is unknown until a real session runs";
114
+ try {
115
+ const content = fs.readFileSync(path.join(cwd, triggerPath), "utf8");
116
+ if (content.includes(marker)) {
117
+ triggerLevel = "ok";
118
+ triggerDetail = `trigger asset contains ${marker}`;
119
+ }
120
+ else {
121
+ triggerLevel = "warn";
122
+ triggerDetail = `trigger asset does not contain ${marker}`;
123
+ }
124
+ }
125
+ catch {
126
+ triggerLevel = "warn";
127
+ triggerDetail = "trigger asset could not be read";
128
+ }
129
+ checks.push({
130
+ level: triggerLevel,
131
+ name: `${platform}-trigger`,
132
+ detail: triggerDetail,
133
+ });
134
+ const runtime = runtimeStatus(platform);
135
+ if (!runtime) {
136
+ checks.push({
137
+ level: "unknown",
138
+ name: `${platform}-runtime`,
139
+ detail: platform === "codex"
140
+ ? "no real hook execution observed; ensure Codex trusts this project, then use /hooks to review/trust the project hook and start a new session"
141
+ : "no real hook execution observed; run one host session",
142
+ });
143
+ }
144
+ else if (runtime.last_status === "ok" ||
145
+ runtime.last_status === "deduped") {
146
+ checks.push({
147
+ level: "ok",
148
+ name: `${platform}-runtime`,
149
+ detail: `hook ${runtime.last_status} at ${runtime.last_hook_at ?? "unknown time"}; emitted ${runtime.last_output_chars ?? 0} chars (model delivery still requires real-session evidence)`,
150
+ });
151
+ }
152
+ else {
153
+ checks.push({
154
+ level: "warn",
155
+ name: `${platform}-runtime`,
156
+ detail: `last hook ${runtime.last_status ?? "unknown"} at ${runtime.last_hook_at ?? "unknown time"}${runtime.last_error_category ? `; error ${runtime.last_error_category}` : ""}`,
157
+ });
158
+ }
159
+ }
160
+ }
161
+ if (platforms.length === 0) {
162
+ checks.push({
163
+ level: "warn",
164
+ name: "platforms",
165
+ detail: "no host hook detected; choose --claude, --codex, --opencode, or --pi",
166
+ });
167
+ }
168
+ return {
169
+ ok: checks.every((check) => check.level !== "error"),
170
+ checks,
171
+ platforms,
172
+ };
173
+ }
174
+ export function runDoctor(options = {}) {
175
+ const report = buildDoctorReport(options.cwd ?? process.cwd());
176
+ if (options.json) {
177
+ console.log(JSON.stringify(report, null, 2));
178
+ }
179
+ else {
180
+ console.log(chalk.bold("mini-trellis doctor\n"));
181
+ for (const check of report.checks) {
182
+ const icon = check.level === "ok" ? "✓" : check.level === "warn" ? "!" : "✗";
183
+ const color = check.level === "ok"
184
+ ? chalk.green
185
+ : check.level === "warn"
186
+ ? chalk.yellow
187
+ : chalk.red;
188
+ console.log(`${color(icon)} ${check.name}: ${check.detail}`);
189
+ }
190
+ console.log();
191
+ console.log(report.ok
192
+ ? chalk.green("Doctor passed.")
193
+ : chalk.red("Doctor found blocking issues."));
194
+ }
195
+ return report;
196
+ }
197
+ //# sourceMappingURL=doctor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAe,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAgCnE,SAAS,cAAc,CAAC,GAAW;IACjC,MAAM,IAAI,GAAG,mBAAmB,CAAC;IACjC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,sCAAsC,CAAC,CAAC;IACpE,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACzB,OAAO;YACL,IAAI;YACJ,KAAK,EAAE,SAAS;YAChB,MAAM,EAAE,oCAAoC;SAC7C,CAAC;IACJ,CAAC;IACD,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAoB,CAAC;QAC3E,IACE,KAAK,EAAE,MAAM,KAAK,CAAC;YACnB,OAAO,KAAK,CAAC,aAAa,KAAK,QAAQ;YACvC,CAAC,MAAM,CAAC,QAAQ,CAAC,I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CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAsCA,wBAAgB,wBAAwB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAUvE;AAmBD,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAgC9D;AAOD,wBAAgB,sBAAsB,IAAI;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,CAkEA;AA0BD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOzD;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAsMD,wBAAsB,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CA8I9D"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAsCA,wBAAgB,wBAAwB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAUvE;AAmBD,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAgC9D;AAOD,wBAAgB,sBAAsB,IAAI;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,CAkEA;AA0BD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOzD;AAED,MAAM,WAAW,WAAW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