mini-trellis 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +124 -101
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +90 -7
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/init.js +1 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/mem.d.ts +2 -0
- package/dist/commands/mem.d.ts.map +1 -1
- package/dist/commands/mem.js +85 -2
- package/dist/commands/mem.js.map +1 -1
- package/dist/commands/migrate.d.ts +8 -0
- package/dist/commands/migrate.d.ts.map +1 -1
- package/dist/commands/migrate.js +123 -4
- package/dist/commands/migrate.js.map +1 -1
- package/dist/commands/refresh.d.ts +1 -1
- package/dist/commands/refresh.d.ts.map +1 -1
- package/dist/commands/refresh.js +19 -1
- package/dist/commands/refresh.js.map +1 -1
- package/dist/configurators/shared.d.ts.map +1 -1
- package/dist/configurators/shared.js +2 -2
- package/dist/configurators/shared.js.map +1 -1
- package/dist/templates/codex/config.toml +5 -5
- package/dist/templates/codex/hooks.json +4 -1
- package/dist/templates/common/bundled-skills/mini-trellis-session-insight/SKILL.md +13 -7
- package/dist/templates/common/bundled-skills/mini-trellis-session-insight/references/cli-quick-reference.md +24 -11
- package/dist/templates/common/bundled-skills/mini-trellis-session-insight/references/triggering-patterns.md +18 -10
- package/dist/templates/common/commands/remember.md +18 -3
- package/dist/templates/common/skills/update-spec.md +5 -0
- package/dist/templates/markdown/agents.md +7 -1
- package/dist/templates/markdown/spec/guides/mini-memory.md.txt +15 -8
- package/dist/templates/opencode/lib/session-utils.js +11 -56
- package/dist/templates/opencode/plugins/session-start.js +3 -16
- package/dist/templates/pi/extensions/mini-trellis/index.ts.txt +22 -87
- package/dist/templates/shared-hooks/session-start.py +101 -68
- package/dist/templates/trellis/config.yaml +3 -3
- package/dist/templates/trellis/scripts/add_session.py +95 -9
- package/dist/templates/trellis/scripts/common/config.py +5 -5
- package/dist/utils/uninstall-scrubbers.d.ts +8 -0
- package/dist/utils/uninstall-scrubbers.d.ts.map +1 -1
- package/dist/utils/uninstall-scrubbers.js +66 -18
- package/dist/utils/uninstall-scrubbers.js.map +1 -1
- package/package.json +3 -3
- package/dist/templates/trellis/scripts/common/cli_adapter.py +0 -950
- package/dist/templates/trellis/scripts/common/task_context.py +0 -470
- package/dist/templates/trellis/scripts/common/task_queue.py +0 -188
- package/dist/templates/trellis/scripts/common/task_store.py +0 -1930
- package/dist/templates/trellis/scripts/common/task_utils.py +0 -498
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/configurators/shared.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH;;;;;;;;;;;;GAYG;AACH,IAAI,qBAAqB,GAAkB,IAAI,CAAC;AAEhD,MAAM,UAAU,wBAAwB,CAAC,GAAW;IAClD,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IAC3B,qBAAqB,GAAG,OAAO,IAAI,IAAI,CAAC;AAC1C,CAAC;AAED,iEAAiE;AACjE,MAAM,UAAU,0BAA0B;IACxC,qBAAqB,GAAG,IAAI,CAAC;AAC/B,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,2BAA2B,CACzC,QAA0B;IAE1B,IAAI,QAAQ,KAAK,SAAS,IAAI,qBAAqB,EAAE,CAAC;QACpD,OAAO,qBAAqB,CAAC;IAC/B,CAAC;IACD,MAAM,MAAM,GAAG,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC;IAC5C,OAAO,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;AACnD,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,4BAA4B,CAAC,OAAe;IAC1D,MAAM,MAAM,GAAG,2BAA2B,EAAE,CAAC;IAC7C,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,OAA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
# Codex hooks
|
|
13
|
-
#
|
|
14
|
-
#
|
|
15
|
-
#
|
|
16
|
-
#
|
|
12
|
+
# Recent Codex versions enable hooks by default. If hooks are disabled in the
|
|
13
|
+
# user configuration, re-enable them there with `[features].hooks = true` in
|
|
14
|
+
# ~/.codex/config.toml (the legacy `codex_hooks = true` alias may still work).
|
|
15
|
+
# Project-level config.toml cannot set feature flags; this file only documents
|
|
16
|
+
# the requirement.
|
|
17
17
|
# Codex 0.129+ additionally gates each installed hook behind a one-time
|
|
18
18
|
# `/hooks` TUI review; until the user approves it, the hook stays inactive.
|
|
19
19
|
|
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
"hooks": {
|
|
3
3
|
"SessionStart": [
|
|
4
4
|
{
|
|
5
|
+
"matcher": "startup|resume|clear|compact",
|
|
5
6
|
"hooks": [
|
|
6
7
|
{
|
|
7
8
|
"type": "command",
|
|
8
9
|
"command": "{{PYTHON_CMD}} -X utf8 .codex/hooks/session-start.py",
|
|
9
|
-
"timeout": 30
|
|
10
|
+
"timeout": 30,
|
|
11
|
+
"statusMessage": "Loading mini-trellis context",
|
|
12
|
+
"additionalContextLimit": 2500
|
|
10
13
|
}
|
|
11
14
|
]
|
|
12
15
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mini-trellis-session-insight
|
|
3
|
-
description: "
|
|
3
|
+
description: "Find project knowledge and past AI conversation history through the `mini-trellis mem` CLI. Use whenever the user asks 'how did we solve X last time', 'have we discussed this before', 'what was the decision on X', '上次怎么解的', '之前讨论过吗', or when continuing work across sessions. Returns source-linked excerpts from project documents and past conversations."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Session Insight
|
|
@@ -9,14 +9,12 @@ How to call `mini-trellis mem` and when that is the right move. Capability, not
|
|
|
9
9
|
|
|
10
10
|
## What it is
|
|
11
11
|
|
|
12
|
-
A local CLI that
|
|
12
|
+
A local CLI that searches project Markdown and Claude Code, Codex, OpenCode, and Pi conversation logs. Documents are discovered automatically; no index service or configuration is needed. Nothing is uploaded.
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
|
-
mini-trellis mem
|
|
16
|
-
|
|
17
|
-
mini-trellis mem
|
|
18
|
-
mini-trellis mem list --cwd <project-path>
|
|
19
|
-
mini-trellis mem projects
|
|
15
|
+
mini-trellis mem recall "<topic or path>"
|
|
16
|
+
# Only when the excerpts leave a question unresolved:
|
|
17
|
+
mini-trellis mem read "<ref from recall>" "<another ref>"
|
|
20
18
|
```
|
|
21
19
|
|
|
22
20
|
Full flags: `mini-trellis mem help`.
|
|
@@ -35,3 +33,11 @@ Full flags: `mini-trellis mem help`.
|
|
|
35
33
|
## After a hit
|
|
36
34
|
|
|
37
35
|
Treat output as raw material. Quote it, promote a durable boundary with `mini-trellis-update-spec`, or just use it. Do not invent a task directory.
|
|
36
|
+
|
|
37
|
+
## Evidence and limits
|
|
38
|
+
|
|
39
|
+
Start with `recall` when earlier decisions or relevant project rules are needed; do not search on every turn. If an excerpt already answers the question with its source and necessary conditions/negations, cite it and stop. `read` is not a mandatory verification step. Use it for missing context, especially a proposal, rejection or condition in neighboring turns. Preserve speakers and chronological order. Reuse refs exactly; they include a source fingerprint. If a source changed or moved, recall again rather than trusting old text. Do not repeat the same lookup or run the legacy dialogue-only `search/context` after sufficient evidence merely to confirm it again; those commands remain available for explicit dialogue-only work.
|
|
40
|
+
|
|
41
|
+
`weak` is lexical overlap, not a confirmed answer. `incomplete` means some sources were not searched; `truncated` means the output budget or result limit was reached. Check warnings before claiming no memory exists. One keyword rewrite can help; do not loop indefinitely or infer semantic search.
|
|
42
|
+
|
|
43
|
+
Write new notes in the user's requested language, otherwise the discussion language. Preserve an existing document's language and original identifiers. Update the existing topic before creating another; journal entries should link to the topic rather than duplicate it.
|
|
@@ -1,36 +1,49 @@
|
|
|
1
1
|
# `mini-trellis mem` CLI Reference
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Use `recall` for project knowledge and `read` for missing context. Full command help: `mini-trellis mem help`.
|
|
4
4
|
|
|
5
5
|
## Subcommands
|
|
6
6
|
|
|
7
7
|
| Command | Purpose |
|
|
8
8
|
| ------ | ------ |
|
|
9
|
+
| `recall <query>` | Search project Markdown and past conversations together. Returns source-linked excerpts; default `3` hits. |
|
|
10
|
+
| `read <ref...>` | Expand one or more refs copied from recall, sharing one output budget. |
|
|
9
11
|
| `list` | List sessions. Default when none is given. |
|
|
10
12
|
| `search <keyword>` | Find sessions whose contents match a keyword. |
|
|
11
13
|
| `context <session-id>` | Top-N hit turns plus surrounding context. Pair with `--grep`. |
|
|
12
14
|
| `extract <session-id>` | Dump cleaned dialogue. Combine with `--grep`. |
|
|
13
15
|
| `projects` | List active project `cwd` values with session counts. |
|
|
14
16
|
|
|
17
|
+
`list`, `search`, `context`, and `extract` operate on conversations only. Use them when the original dialogue is specifically needed.
|
|
18
|
+
|
|
15
19
|
## Flags
|
|
16
20
|
|
|
17
21
|
| Flag | Subcommands | Meaning |
|
|
18
22
|
| ---- | ----------- | ------- |
|
|
19
|
-
| `--platform claude\|codex\|opencode\|pi\|all` |
|
|
20
|
-
| `--since YYYY-MM-DD` | list / search | Inclusive lower date bound. |
|
|
21
|
-
| `--until YYYY-MM-DD` | list / search | Inclusive upper date bound. |
|
|
22
|
-
| `--global` | list / search | Include
|
|
23
|
-
| `--cwd <path>` | list / search |
|
|
24
|
-
| `--limit N` | list / search |
|
|
23
|
+
| `--platform claude\|codex\|opencode\|pi\|all` | recall / list / search / context / extract / projects | Default `all`; filters conversation sources. |
|
|
24
|
+
| `--since YYYY-MM-DD` | list / search / context / extract / projects | Inclusive lower date bound. |
|
|
25
|
+
| `--until YYYY-MM-DD` | list / search / context / extract / projects | Inclusive upper date bound. |
|
|
26
|
+
| `--global` | list / search / context / extract | Include all projects' conversations, only for explicit cross-project requests. Not supported by `recall`. |
|
|
27
|
+
| `--cwd <path>` | recall / read / list / search / context / extract | Select a project. Default is the current project. |
|
|
28
|
+
| `--limit N` | recall / list / search / projects | Result limit. Defaults: recall `3`, list/search `50`, projects `30`. |
|
|
25
29
|
| `--grep KW` | extract / context | Filter turns by keyword. |
|
|
26
30
|
| `--turns N` | context | Hit turns to return. Default `3`. |
|
|
27
31
|
| `--around N` | context | Surrounding turns per hit. Default `1`. |
|
|
28
|
-
| `--max-chars N` | context | Character budget.
|
|
32
|
+
| `--max-chars N` | recall / read / context | Character budget. Defaults: recall stdout `3000`, read stdout `4000`, context text `6000`. |
|
|
29
33
|
| `--include-children` | search / context | Merge OpenCode sub-agent sessions into parent. |
|
|
30
34
|
| `--json` | all | Machine-readable JSON. |
|
|
31
35
|
|
|
32
36
|
```bash
|
|
33
|
-
mini-trellis mem
|
|
34
|
-
|
|
35
|
-
mini-trellis mem
|
|
37
|
+
mini-trellis mem recall "deadlock"
|
|
38
|
+
# Only when the excerpts lack necessary context:
|
|
39
|
+
mini-trellis mem read "<ref copied from recall>"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
If the excerpts already answer the question with their source and conditions, stop. Keep refs unchanged; if a source has changed, recall again. For an explicit request about another project, pass the same `--cwd "<project path>"` to recall and read.
|
|
43
|
+
|
|
44
|
+
For an explicit conversation-only lookup:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
mini-trellis mem search "deadlock"
|
|
48
|
+
mini-trellis mem context <session-id> --grep "lock" --turns 3 --around 1
|
|
36
49
|
```
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
# Triggering Patterns
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Examples of requests that may need earlier project knowledge. Use `mini-trellis mem` when the current conversation or open files do not already provide the answer.
|
|
4
4
|
|
|
5
5
|
Patterns are grouped by the *intent* behind the phrasing, not the surface words. The same intent shows up in different languages and registers.
|
|
6
6
|
|
|
7
|
+
Start with project-scoped `recall`. It returns source-linked excerpts from documents and past conversations. If an excerpt answers the question with its necessary conditions and negations, cite it and stop. Use `read` only for missing context; a hit is not a reason to repeat the query or run another search path.
|
|
8
|
+
|
|
7
9
|
## Past-solution recall
|
|
8
10
|
|
|
9
|
-
The user is asking "how did we (or I) solve this before".
|
|
11
|
+
The user is asking "how did we (or I) solve this before". Topic notes and past conversations can explain the reasoning behind the code.
|
|
10
12
|
|
|
11
13
|
- "How did we solve this last time?"
|
|
12
14
|
- "What did we end up doing about X?"
|
|
@@ -15,11 +17,11 @@ The user is asking "how did we (or I) solve this before". Past dialogue holds th
|
|
|
15
17
|
- "之前是怎么搞定 X 的?"
|
|
16
18
|
- "我记得以前修过类似的"
|
|
17
19
|
|
|
18
|
-
Reach: `mini-trellis mem
|
|
20
|
+
Reach: `mini-trellis mem recall "<symptom keyword or relevant path>"`. Use `mini-trellis mem read "<ref>"` if the excerpt leaves the resolution or its conditions unclear.
|
|
19
21
|
|
|
20
22
|
## Decision retrieval
|
|
21
23
|
|
|
22
|
-
The user is referencing
|
|
24
|
+
The user is referencing an earlier decision whose rationale may be in project notes or past dialogue.
|
|
23
25
|
|
|
24
26
|
- "What was the decision on X?"
|
|
25
27
|
- "Did we decide to use Postgres or SQLite?"
|
|
@@ -28,7 +30,7 @@ The user is referencing a decision that lives in old dialogue, not in any commit
|
|
|
28
30
|
- "关于 X 我们之前是怎么定的?"
|
|
29
31
|
- "之前讨论过 X 的方案吗?"
|
|
30
32
|
|
|
31
|
-
Reach: `mini-trellis mem
|
|
33
|
+
Reach: `mini-trellis mem recall "<decision keyword>"`. Expand a returned ref only when needed to distinguish a proposal, rejection, or confirmed decision.
|
|
32
34
|
|
|
33
35
|
## Cross-session continuation
|
|
34
36
|
|
|
@@ -41,7 +43,7 @@ The user resumed work after a gap and the context is implicit.
|
|
|
41
43
|
- "我们上次做到哪了"
|
|
42
44
|
- "接着昨天那个任务"
|
|
43
45
|
|
|
44
|
-
Reach: `mini-trellis mem
|
|
46
|
+
Reach: check the active journal and current context first. If earlier details are missing, use `mini-trellis mem recall "<work topic or changed path>"`, then read only the refs needed to resume.
|
|
45
47
|
|
|
46
48
|
## Familiar-bug debugging
|
|
47
49
|
|
|
@@ -54,7 +56,7 @@ The current bug feels like one already seen. Past sessions probably hold the res
|
|
|
54
56
|
- "这个 bug 是不是上次那个?"
|
|
55
57
|
- "怎么又是这个 error?"
|
|
56
58
|
|
|
57
|
-
Reach: `mini-trellis mem
|
|
59
|
+
Reach: `mini-trellis mem recall "<error message fragment>"`. Anchor on a short, distinctive token from the actual error string, and read a ref only if the fix or its conditions need more context.
|
|
58
60
|
|
|
59
61
|
## Self-pattern spotting
|
|
60
62
|
|
|
@@ -67,7 +69,7 @@ The user is asking whether they keep repeating the same kind of mistake or decis
|
|
|
67
69
|
- "我老犯这个错?"
|
|
68
70
|
- "这类问题之前出现过几次?"
|
|
69
71
|
|
|
70
|
-
Reach: `mini-trellis mem
|
|
72
|
+
Reach: `mini-trellis mem recall "<topic>"`. Compare the returned examples and their sources; expand only unresolved context. Describe observed examples rather than treating a limited result set as a complete count.
|
|
71
73
|
|
|
72
74
|
## Session retrospective (on demand)
|
|
73
75
|
|
|
@@ -80,13 +82,19 @@ The user explicitly wants to look back at recent work — not as a forced step,
|
|
|
80
82
|
- "记一下这次踩的坑"
|
|
81
83
|
- "复盘下这个任务"
|
|
82
84
|
|
|
83
|
-
Reach:
|
|
85
|
+
Reach: summarize from the current conversation first. If older context is needed, use `mini-trellis mem recall "<work topic>"` and read only the refs that fill a gap. Include source or file:line citations where useful.
|
|
86
|
+
|
|
87
|
+
For an explicit recording request or a confirmed reusable decision, follow the host's remember guidance: update an existing spec/research topic, check the saved content, and link it from a brief journal entry. Summarizing alone does not turn unconfirmed ideas into decisions. Respect requests not to record; ordinary edits need no automatic note.
|
|
88
|
+
|
|
89
|
+
## Explicit cross-project requests
|
|
90
|
+
|
|
91
|
+
Keep lookup in the current project by default. When the user explicitly asks about another project, pass `--cwd "<requested project path>"` to both `recall` and any follow-up `read`. Each lookup stays scoped to that project. Cross-project conversation-only commands and filters are listed in [the CLI reference](cli-quick-reference.md).
|
|
84
92
|
|
|
85
93
|
## Anti-patterns: do NOT reach for `mem` here
|
|
86
94
|
|
|
87
95
|
- "What does this function do?" → read the file.
|
|
88
96
|
- "Why is this test failing?" → read the test output and the file.
|
|
89
|
-
- "What's the right pattern for X in our codebase?" →
|
|
97
|
+
- "What's the right pattern for X in our codebase?" → read an already located spec or code example; use recall if the relevant rule is missing.
|
|
90
98
|
- "What's the latest npm version of Y?" → call `npm view`.
|
|
91
99
|
- "Fix this bug." → debug. Reach for `mem` only if you suspect prior context exists; otherwise it is noise.
|
|
92
100
|
|
|
@@ -1,22 +1,37 @@
|
|
|
1
1
|
# Remember
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Save the confirmed decision or finding in the relevant topic, updating an existing file, then link it from the journal. Keep the rule short and faithful; leave unconfirmed exceptions and implementation choices open or label them as inference. A journal entry alone does not update a topic.
|
|
4
4
|
|
|
5
5
|
## When
|
|
6
6
|
|
|
7
7
|
- The user asks to remember / persist notes
|
|
8
|
-
-
|
|
8
|
+
- A confirmed decision, reusable finding, or verified fix should survive this session
|
|
9
|
+
- A rejected approach or dead end should not be retried in a later session; label it rejected, not as a current rule
|
|
10
|
+
- The session is about to end and has a useful handoff
|
|
9
11
|
- The session was compacted, or context is about to be compacted
|
|
10
12
|
|
|
11
13
|
## Write
|
|
12
14
|
|
|
15
|
+
For a confirmed rule or reusable finding, follow this short order: read the existing research/spec topic (new durable rules can go directly into spec); edit that file; read it back and compare the changed rule with the requested conclusion, including limits and negations; then record the journal link. Reuse files already open; use `mem recall` only when you need to locate the topic. Preserve the existing document's language. Do not claim a topic update based on a planned edit or journal text.
|
|
16
|
+
|
|
17
|
+
Then record a short journal entry using the existing script; no CLI `spec` or `update-spec` subcommand is needed:
|
|
18
|
+
|
|
13
19
|
```bash
|
|
14
20
|
python3 ./.trellis/scripts/add_session.py \
|
|
15
21
|
--title "Short title" \
|
|
16
22
|
--commit - \
|
|
17
|
-
--summary "What happened, what was decided, what to reuse"
|
|
23
|
+
--summary "What happened, what was decided, what to reuse" \
|
|
24
|
+
--topic .trellis/research/example.md
|
|
18
25
|
```
|
|
19
26
|
|
|
27
|
+
Replace `--topic` with the actual file just verified, or omit it for a handoff without a topic. It validates the file and adds its path to the journal; it does not write the topic or check its meaning. Do not pass an invented path. Read back the resulting journal entry to verify its link before reporting completion. If only the topic or journal was saved, name the completed part and the missing part; retry only the missing work.
|
|
28
|
+
|
|
20
29
|
`--commit` already defaults to `-` (no git evidence). Add `--change`, `--test`, `--next-step` when they help a future session. Use `--stdin` for longer notes.
|
|
21
30
|
|
|
22
31
|
If this session produced reusable research, write `.trellis/research/<topic>.md` and mention that path in the summary. Promote durable boundaries into `.trellis/spec/` with `mini-trellis-update-spec` (short markdown).
|
|
32
|
+
|
|
33
|
+
## Reuse and language
|
|
34
|
+
|
|
35
|
+
Before writing a topic, use `mini-trellis mem recall "<topic>"` if the relevant notes are not already open. Expand needed evidence with `mini-trellis mem read "<ref>"`. Update the existing research/spec section; record the scope and sources, distinguish user confirmation from measured facts and inference, and keep a link when replacing an earlier decision. Journal should briefly describe the work and link to the topic, not repeat its body.
|
|
36
|
+
|
|
37
|
+
Skip ordinary turns and changes that add no reusable knowledge. Write new notes in the user's requested language, otherwise the discussion language; preserve the language of an existing document. Do not translate paths or identifiers. Check the writer's result and report failures; never claim notes were saved after an error. Closing a window or a crash does not guarantee a final write.
|
|
@@ -9,8 +9,13 @@ Capture durable contracts and conventions into `.trellis/spec/` as short markdow
|
|
|
9
9
|
|
|
10
10
|
## Write
|
|
11
11
|
|
|
12
|
+
- Check the existing topic first (`mini-trellis mem recall "<topic or path>"` when needed); update the relevant section instead of duplicating it.
|
|
13
|
+
- Record only confirmed rules, scope, and sources. Preserve the supplied wording when possible; leave unconfirmed behavior open or label it as inference. Keep a history link when replacing an earlier decision.
|
|
14
|
+
- Leave rejected approaches in research, labeled rejected. Do not promote them into spec as current rules.
|
|
15
|
+
- New documents follow the requested or discussion language; updates retain the existing language. Paths and identifiers stay unchanged.
|
|
12
16
|
- Short markdown. The 7-section template is optional.
|
|
13
17
|
- Link the new or updated file from the matching `index.md`.
|
|
18
|
+
- Read back the changed rule before reporting success. A journal-only edit is not a spec update. For a requested session record, use `add_session.py --title "..." --summary "..." --topic <actual-spec-path>` after verifying the spec.
|
|
14
19
|
- Prefer one concrete rule over a catalogue of principles.
|
|
15
20
|
|
|
16
21
|
Spec lives under `.trellis/spec/`. There are no task directories; do not create one.
|
|
@@ -7,10 +7,16 @@ This project uses mini-trellis as a memory layer. Working knowledge lives under
|
|
|
7
7
|
- `.trellis/research/` — topic inbox (`<topic>.md`; `README.md` is not a topic)
|
|
8
8
|
- `.trellis/workspace/` — per-developer journals
|
|
9
9
|
|
|
10
|
-
Record a session with `/mini-trellis:remember` (Claude/OpenCode), `/mini-trellis-remember` (Pi), or `$mini-trellis-remember` (Codex).
|
|
10
|
+
Record a session with `/mini-trellis:remember` (Claude/OpenCode), `/mini-trellis-remember` (Pi), or `$mini-trellis-remember` (Codex). When earlier decisions or relevant project rules are needed, use `mini-trellis mem recall "<topic or path>"`; expand evidence with `mini-trellis mem read "<ref>"`. No search is required for unrelated work. Promote lasting boundaries into spec with `mini-trellis-update-spec`.
|
|
11
11
|
|
|
12
12
|
Record only confirmed decisions, reusable research findings, or the session/compact handoff. Skip ordinary turns and unconfirmed guesses. New installs write notes without an automatic git commit; use `mini-trellis doctor` to check host wiring and `mini-trellis refresh --dry-run` before refreshing assets.
|
|
13
13
|
|
|
14
|
+
Keep confirmed rules short and faithful. Unconfirmed scope, exceptions, and implementation choices stay open or are labeled as inference, not added to the contract.
|
|
15
|
+
|
|
16
|
+
For a confirmed update, follow this short order: read the existing topic; edit that file; read it back and check the new rule, limits, and negations; run `python3 ./.trellis/scripts/add_session.py --title "..." --summary "..." --topic <actual-topic-path>`; read the journal and check its topic link. Journal-only success is not topic success; report partial writes accurately. New notes follow the requested or discussion language; updates preserve the document language.
|
|
17
|
+
|
|
18
|
+
When recall excerpts already answer the question with source and qualifiers, cite them and stop. Expand only missing context; do not repeat a lookup or fall back to dialogue-only `search` merely to reconfirm sufficient evidence.
|
|
19
|
+
|
|
14
20
|
mini-trellis does not create or drive tasks.
|
|
15
21
|
|
|
16
22
|
Managed by mini-trellis. Edits outside this block are preserved.
|
|
@@ -6,25 +6,32 @@
|
|
|
6
6
|
|
|
7
7
|
| Layer | Path | Role |
|
|
8
8
|
|-------|------|------|
|
|
9
|
-
| Journal | `.trellis/workspace/<dev>/journal-*.md` |
|
|
9
|
+
| Journal | `.trellis/workspace/<dev>/journal-*.md` | Per-developer session notes |
|
|
10
10
|
| Research | `.trellis/research/<topic>.md` | Topic inbox. `README.md` is not a topic |
|
|
11
11
|
| Spec | `.trellis/spec/**/index.md`, then linked files | Durable contracts. Short markdown |
|
|
12
|
-
|
|
|
12
|
+
| Recall | `mini-trellis mem recall "<query>"` | Project Markdown and cross-session dialogue |
|
|
13
13
|
|
|
14
14
|
## SessionStart contract
|
|
15
15
|
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
16
|
+
- Deliver a short memory entry and the active journal path; do not enumerate research topics or inject their bodies.
|
|
17
|
+
- Retrieve relevant rules and research on demand with `mini-trellis mem recall "<query>"`. Use `mini-trellis mem read "<ref>"` only when excerpts lack necessary context or conditions.
|
|
18
|
+
- Archived research remains searchable and is marked archived; it is not injected at startup.
|
|
19
|
+
- After compact, restore the short entry and remember any confirmed conclusions that have not been saved.
|
|
20
20
|
|
|
21
21
|
## Remember
|
|
22
22
|
|
|
23
|
+
Save confirmed decisions and reusable findings in the relevant spec/research topic, updating an existing topic when possible. Check the saved content, then record a short journal entry linking to it:
|
|
24
|
+
|
|
25
|
+
Keep confirmed rules short and faithful. Unconfirmed scope, exceptions, and implementation choices stay open or are labeled as inference, not added to the contract.
|
|
26
|
+
|
|
23
27
|
```bash
|
|
24
28
|
python3 ./.trellis/scripts/add_session.py \
|
|
25
29
|
--title "Short title" \
|
|
26
30
|
--commit - \
|
|
27
|
-
--summary "What happened, what was decided, what to reuse"
|
|
31
|
+
--summary "What happened, what was decided, what to reuse" \
|
|
32
|
+
--topic .trellis/research/example.md
|
|
28
33
|
```
|
|
29
34
|
|
|
30
|
-
|
|
35
|
+
Use the actual topic path; omit `--topic` for a handoff without a topic. The script writes journal/index and a relative topic link; it does not edit the topic. Verify the files before reporting completion. Skip ordinary changes and unconfirmed ideas. New notes follow the discussion language; updates keep the original document's language.
|
|
36
|
+
|
|
37
|
+
Promote durable boundaries into `.trellis/spec/` and link them from the matching `index.md`. Cold research can move into `.trellis/research/archive/`.
|
|
@@ -9,10 +9,6 @@ const PYTHON_CMD = platform() === "win32" ? "python" : "python3"
|
|
|
9
9
|
|
|
10
10
|
const MAX_CONTEXT_CHARS = 4000
|
|
11
11
|
|
|
12
|
-
const FIRST_REPLY_NOTICE = `<first-reply-notice>
|
|
13
|
-
On the first visible assistant reply, briefly acknowledge that mini-trellis SessionStart context loaded, then continue with the user's request. Use the user's language; otherwise say \`mini-trellis SessionStart ✓\`. This is one-shot and must not be repeated.
|
|
14
|
-
</first-reply-notice>`
|
|
15
|
-
|
|
16
12
|
function loadTrellisConfig(directory, contextKey = null) {
|
|
17
13
|
const scriptPath = join(directory, ".trellis", "scripts", "get_context.py")
|
|
18
14
|
if (!existsSync(scriptPath)) {
|
|
@@ -117,27 +113,6 @@ function resolveSpecScope(config) {
|
|
|
117
113
|
return null
|
|
118
114
|
}
|
|
119
115
|
|
|
120
|
-
function collectResearchTopics(directory) {
|
|
121
|
-
const researchDir = join(directory, ".trellis", "research")
|
|
122
|
-
if (!existsSync(researchDir)) return []
|
|
123
|
-
try {
|
|
124
|
-
return readdirSync(researchDir, { withFileTypes: true })
|
|
125
|
-
.filter(entry => {
|
|
126
|
-
if (entry.name.startsWith(".") || entry.name.toLowerCase() === "readme.md") return false
|
|
127
|
-
if (entry.name === "archive") return false
|
|
128
|
-
// A topic is a note, or a directory: `mini-trellis migrate` folds each
|
|
129
|
-
// Trellis task into one so its evidence sits next to its notes.
|
|
130
|
-
if (entry.isDirectory()) return true
|
|
131
|
-
return entry.isFile() && entry.name.toLowerCase().endsWith(".md")
|
|
132
|
-
})
|
|
133
|
-
.map(entry => ({ name: entry.name, dir: entry.isDirectory() }))
|
|
134
|
-
.sort((a, b) => a.name.localeCompare(b.name))
|
|
135
|
-
.map(topic => `.trellis/research/${topic.name}${topic.dir ? "/" : ""}`)
|
|
136
|
-
} catch {
|
|
137
|
-
return []
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
116
|
function collectSpecIndexPaths(directory, allowedPkgs) {
|
|
142
117
|
const specDir = join(directory, ".trellis", "spec")
|
|
143
118
|
const paths = []
|
|
@@ -216,7 +191,7 @@ function runGit(directory, args) {
|
|
|
216
191
|
}
|
|
217
192
|
}
|
|
218
193
|
|
|
219
|
-
function buildCompactCurrentState(ctx, specIndexPaths
|
|
194
|
+
function buildCompactCurrentState(ctx, specIndexPaths) {
|
|
220
195
|
const directory = ctx.directory
|
|
221
196
|
const lines = []
|
|
222
197
|
lines.push(`Developer: ${readDeveloper(directory)}`)
|
|
@@ -249,11 +224,7 @@ function buildCompactCurrentState(ctx, specIndexPaths, researchTopics) {
|
|
|
249
224
|
lines.push(`Spec indexes: ${specIndexPaths.length} available.`)
|
|
250
225
|
}
|
|
251
226
|
|
|
252
|
-
|
|
253
|
-
lines.push(`Research notes: ${researchTopics.length} in .trellis/research/.`)
|
|
254
|
-
} else {
|
|
255
|
-
lines.push("Research notes: none yet. Write .trellis/research/<topic>.md.")
|
|
256
|
-
}
|
|
227
|
+
lines.push("Research: use `mini-trellis mem recall <query>` when relevant.")
|
|
257
228
|
|
|
258
229
|
return lines.join("\n")
|
|
259
230
|
}
|
|
@@ -267,14 +238,12 @@ export function buildSessionContext(ctx, platformInput = null) {
|
|
|
267
238
|
const config = loadTrellisConfig(directory, contextKey)
|
|
268
239
|
const allowedPkgs = resolveSpecScope(config)
|
|
269
240
|
const paths = collectSpecIndexPaths(directory, allowedPkgs)
|
|
270
|
-
const researchTopics = collectResearchTopics(directory)
|
|
271
241
|
|
|
272
242
|
const parts = []
|
|
273
243
|
|
|
274
244
|
parts.push(`<session-context>
|
|
275
245
|
mini-trellis SessionStart context. Orient from journal, spec, and research.
|
|
276
246
|
</session-context>`)
|
|
277
|
-
parts.push(FIRST_REPLY_NOTICE)
|
|
278
247
|
|
|
279
248
|
const legacyWarning = checkLegacySpec(directory, config)
|
|
280
249
|
if (legacyWarning) {
|
|
@@ -282,35 +251,21 @@ mini-trellis SessionStart context. Orient from journal, spec, and research.
|
|
|
282
251
|
}
|
|
283
252
|
|
|
284
253
|
parts.push("<current-state>")
|
|
285
|
-
parts.push(buildCompactCurrentState(ctx, paths
|
|
254
|
+
parts.push(buildCompactCurrentState(ctx, paths))
|
|
286
255
|
parts.push("</current-state>")
|
|
287
256
|
|
|
288
257
|
parts.push("<guidelines>")
|
|
289
258
|
parts.push(
|
|
290
|
-
"Memory:
|
|
291
|
-
"
|
|
292
|
-
"`mini-trellis mem
|
|
293
|
-
"
|
|
294
|
-
"`.trellis/research
|
|
295
|
-
"
|
|
296
|
-
|
|
259
|
+
"Memory: use `mini-trellis mem recall <query>` for prior decisions, rejected " +
|
|
260
|
+
"approaches, and project rules. If the excerpt answers the question with its " +
|
|
261
|
+
"source and conditions, cite it and stop; use `mini-trellis mem read <ref>` " +
|
|
262
|
+
"only for missing context. Do not repeat a sufficient lookup.\n" +
|
|
263
|
+
"Research lives in `.trellis/research/`; durable rules belong in `.trellis/spec/`.\n" +
|
|
264
|
+
"Record a confirmed decision, a rejected approach worth not retrying, or a useful " +
|
|
265
|
+
"handoff with `/mini-trellis:remember` or `python3 ./.trellis/scripts/add_session.py`. " +
|
|
266
|
+
"Do not record every turn, and do not create a git commit unless the user asks.\n"
|
|
297
267
|
)
|
|
298
268
|
|
|
299
|
-
if (paths.length > 0) {
|
|
300
|
-
parts.push("## Spec indexes (read on demand)")
|
|
301
|
-
for (const p of paths) {
|
|
302
|
-
parts.push(`- ${p}`)
|
|
303
|
-
}
|
|
304
|
-
parts.push("")
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
if (researchTopics.length > 0) {
|
|
308
|
-
parts.push("## Research notes (read on demand)")
|
|
309
|
-
for (const p of researchTopics) {
|
|
310
|
-
parts.push(`- ${p}`)
|
|
311
|
-
}
|
|
312
|
-
parts.push("")
|
|
313
|
-
}
|
|
314
269
|
|
|
315
270
|
parts.push("</guidelines>")
|
|
316
271
|
|
|
@@ -13,16 +13,9 @@ import {
|
|
|
13
13
|
MESSAGES_TRANSFORM_HOOK,
|
|
14
14
|
platformInputFromMessages,
|
|
15
15
|
prependEphemeralText,
|
|
16
|
-
transcriptHasAssistantMessage,
|
|
17
16
|
} from "../lib/context-visibility.js"
|
|
18
17
|
import { buildSessionContext } from "../lib/session-utils.js"
|
|
19
18
|
|
|
20
|
-
const FIRST_REPLY_NOTICE_RE = /<first-reply-notice>[\s\S]*?<\/first-reply-notice>\s*/g
|
|
21
|
-
|
|
22
|
-
function stripFirstReplyNotice(context) {
|
|
23
|
-
return context.replace(FIRST_REPLY_NOTICE_RE, "")
|
|
24
|
-
}
|
|
25
|
-
|
|
26
19
|
// OpenCode 1.2.x expects plugins to be factory functions (see inject-subagent-context.js comment).
|
|
27
20
|
export default async ({ directory }) => {
|
|
28
21
|
const ctx = new TrellisContext(directory)
|
|
@@ -51,19 +44,13 @@ export default async ({ directory }) => {
|
|
|
51
44
|
return
|
|
52
45
|
}
|
|
53
46
|
|
|
47
|
+
const context = buildSessionContext(ctx, platformInput)
|
|
54
48
|
if (messages?.some(message =>
|
|
55
49
|
message?.parts?.some(part =>
|
|
56
|
-
part?.synthetic === true &&
|
|
57
|
-
|
|
58
|
-
part.text.includes("<session-context>")))) {
|
|
59
|
-
debugLog("session", "Skipping - SessionStart context already injected")
|
|
50
|
+
part?.synthetic === true && part.text === context))) {
|
|
51
|
+
debugLog("session", "Skipping - same SessionStart content already injected")
|
|
60
52
|
return
|
|
61
53
|
}
|
|
62
|
-
|
|
63
|
-
let context = buildSessionContext(ctx, platformInput)
|
|
64
|
-
if (transcriptHasAssistantMessage(messages)) {
|
|
65
|
-
context = stripFirstReplyNotice(context)
|
|
66
|
-
}
|
|
67
54
|
debugLog("session", "Built context, length:", context.length)
|
|
68
55
|
prependEphemeralText(messages, context)
|
|
69
56
|
} catch (error) {
|