@reasontrail/cli 0.1.0 → 0.1.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/CHANGELOG.md +39 -0
- package/README.md +147 -83
- package/package.json +8 -2
- package/runtime/reasontrail-runtime.mjs +4507 -2026
- package/runtime/reasontrail-runtime.mjs.sha256 +1 -0
- package/skills/reasontrail/SKILL.md +153 -6
- package/src/build-info.json +1 -1
- package/src/cli.mjs +507 -35
- package/src/codex-sync.mjs +290 -23
- package/src/systemd-scope.mjs +3 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
990c844b8d89dbaea32e7af08775215cf7b437f7e5c01de72c9913f26d36a164 reasontrail-runtime.mjs
|
|
@@ -7,7 +7,32 @@ description: Use ReasonTrail as the authoritative shared project Brain for proje
|
|
|
7
7
|
|
|
8
8
|
ReasonTrail is the authoritative shared project memory. Repository files and
|
|
9
9
|
assistant-native memory may be indexed sources, but never substitute for the
|
|
10
|
-
Brain.
|
|
10
|
+
Brain. Users do not need to know tool names, CLI syntax, or slash commands.
|
|
11
|
+
|
|
12
|
+
## Discovery
|
|
13
|
+
|
|
14
|
+
The first time ReasonTrail becomes relevant in a host session, you may give
|
|
15
|
+
this concise hint:
|
|
16
|
+
|
|
17
|
+
> ReasonTrail active — I'll use project memory when relevant.
|
|
18
|
+
> Tip: say "update my brain" anytime to sync what we've done,
|
|
19
|
+
> or "what do you know about X?" to retrieve project context.
|
|
20
|
+
|
|
21
|
+
Give the hint at most once per host session. Do not repeat it after checks,
|
|
22
|
+
retrievals, syncs, or ordinary turns.
|
|
23
|
+
|
|
24
|
+
If the host reports that its context was compacted, surface a reminder only
|
|
25
|
+
when useful:
|
|
26
|
+
|
|
27
|
+
> Context was compacted. ReasonTrail keeps the durable project context.
|
|
28
|
+
> Say "update my brain" to sync this session, or "show changes" to preview it.
|
|
29
|
+
|
|
30
|
+
If, and only if, the unsynced count was actually measured, prefer:
|
|
31
|
+
|
|
32
|
+
> Context was compacted. 4 unsynced ReasonTrail updates are available.
|
|
33
|
+
> Say "update my brain" to sync them.
|
|
34
|
+
|
|
35
|
+
Never estimate or invent an unsynced count.
|
|
11
36
|
|
|
12
37
|
## Transport
|
|
13
38
|
|
|
@@ -32,6 +57,22 @@ add `--confirm-production` without authorization for that production operation.
|
|
|
32
57
|
Context, search, status and doctor do not synchronize transcripts. Synchronization
|
|
33
58
|
is separate: `reasontrail sync codex --profile <selected-profile>` previews locally;
|
|
34
59
|
adding `--apply` is an explicit transcript write and requires task authorization.
|
|
60
|
+
An explicitly confirmed repository binding activates the existing managed
|
|
61
|
+
capture service for that profile/project. Automatic Codex capture therefore
|
|
62
|
+
does not depend on an assistant voluntarily calling a memory tool. "Update my
|
|
63
|
+
brain" is a governed manual flush and recovery convenience, never the automatic
|
|
64
|
+
capture mechanism itself.
|
|
65
|
+
|
|
66
|
+
For a manual flush, use the host's authorized capture adapter to inspect the
|
|
67
|
+
actual native session. When a native Codex session id is available to the host,
|
|
68
|
+
the CLI fallback is `reasontrail update --session <native-session-id> --profile
|
|
69
|
+
<selected-profile>` with the structured summary and candidates on standard
|
|
70
|
+
input. Do not reconstruct a transcript from model context, and never invent a
|
|
71
|
+
session identity from a task name, title, date, repository, or summary. If the
|
|
72
|
+
native source cannot be inspected inside the authorized project binding, report
|
|
73
|
+
that transcript source as unavailable and request the binding or access needed.
|
|
74
|
+
A summary-only project update may still follow the normal governance policy,
|
|
75
|
+
but it is not evidence that any Conversation messages were synchronized.
|
|
35
76
|
|
|
36
77
|
## Context
|
|
37
78
|
|
|
@@ -47,7 +88,110 @@ Use the backend context tool over MCP, or execute:
|
|
|
47
88
|
Treat repository association as a strong relevance signal. Preserve tenant and
|
|
48
89
|
project scope and never retrieve another user's raw conversation.
|
|
49
90
|
|
|
50
|
-
##
|
|
91
|
+
## Natural-language session commands
|
|
92
|
+
|
|
93
|
+
Recognize these phrases case-insensitively, with ordinary punctuation and close
|
|
94
|
+
natural equivalents. The quoted wording is a vocabulary, not required syntax.
|
|
95
|
+
|
|
96
|
+
### Update the current session
|
|
97
|
+
|
|
98
|
+
Treat **"update my brain"** as the primary request to synchronize the current
|
|
99
|
+
session. Equivalent phrases include:
|
|
100
|
+
|
|
101
|
+
- "update ReasonTrail"
|
|
102
|
+
- "sync this session"
|
|
103
|
+
- "save what we've done"
|
|
104
|
+
- "update project memory"
|
|
105
|
+
|
|
106
|
+
For this intent:
|
|
107
|
+
|
|
108
|
+
1. Resolve the actual host-native session identity through the authorized
|
|
109
|
+
capture adapter, then inspect only that mapped session. Never guess the
|
|
110
|
+
identity or derive the transcript from the current model context.
|
|
111
|
+
2. Determine the original visible user/assistant delta since the last
|
|
112
|
+
successful ReasonTrail sync. Use the last returned sync cursor when
|
|
113
|
+
available. Never include hidden reasoning.
|
|
114
|
+
3. Honor every active "don't save this" exclusion before previewing,
|
|
115
|
+
extracting, or sending the delta.
|
|
116
|
+
4. Synchronize the original source turns through the same Conversation identity
|
|
117
|
+
and ingestion path used by automatic capture. A manual flush must not create
|
|
118
|
+
a synthetic parallel Conversation.
|
|
119
|
+
5. Extract candidate Decisions, Work, Ideas, and useful durable facts. Keep
|
|
120
|
+
speculation and open questions labelled as such.
|
|
121
|
+
6. Compare candidates with current reviewed records and pending proposals.
|
|
122
|
+
Ignore genuine duplicates. A contradiction is not a duplicate: surface it
|
|
123
|
+
instead of replacing approved canonical truth.
|
|
124
|
+
7. Submit the session summary or outcome and candidates
|
|
125
|
+
through the normal governed ReasonTrail update mechanism. Decisions, Work,
|
|
126
|
+
Ideas, and facts remain proposals wherever existing policy requires review.
|
|
127
|
+
8. Report transcript results separately from project-update results. Transcript
|
|
128
|
+
reporting includes the source identity/checkpoint, eligible and supplied
|
|
129
|
+
turns, accepted/duplicate/rejected counts, persisted matching messages,
|
|
130
|
+
cursor, and one of COMPLETE, PARTIAL, UNKNOWN, or SOURCE_UNAVAILABLE.
|
|
131
|
+
Project-update reporting covers summary, remaining work, proposals, and
|
|
132
|
+
proposal duplicates. Do not describe a proposal as approved, a failed write
|
|
133
|
+
as saved, or a summary as proof that transcript messages were persisted.
|
|
134
|
+
|
|
135
|
+
Keep the response compact and user-facing; do not expose internal tool names.
|
|
136
|
+
For example:
|
|
137
|
+
|
|
138
|
+
> ReasonTrail updated:
|
|
139
|
+
>
|
|
140
|
+
> - 1 decision proposed
|
|
141
|
+
> - 2 work items updated
|
|
142
|
+
> - 1 session outcome synced
|
|
143
|
+
> - 3 duplicate facts ignored
|
|
144
|
+
|
|
145
|
+
Only report counts that were measured. If the native source is unavailable,
|
|
146
|
+
say so explicitly; never claim the session is synchronized based on a summary
|
|
147
|
+
or proposal write. If the measured transcript delta and candidate set are
|
|
148
|
+
empty, make no write and say:
|
|
149
|
+
|
|
150
|
+
> ReasonTrail is already up to date for this session.
|
|
151
|
+
|
|
152
|
+
### Retrieve memory
|
|
153
|
+
|
|
154
|
+
- **"What do you know about X?"** — retrieve the smallest relevant slice of
|
|
155
|
+
current reviewed context about X, with source references when useful.
|
|
156
|
+
- **"What did we decide about X?"** — retrieve current canonical Decision
|
|
157
|
+
records first and answer with provenance. Clearly separate pending proposals
|
|
158
|
+
or historical/conflicting material; never present them as the approved
|
|
159
|
+
decision.
|
|
160
|
+
- **"What's pending?"** — retrieve relevant open Work, blockers, and review
|
|
161
|
+
items. Prefer the current project unless the user clearly asks more broadly.
|
|
162
|
+
|
|
163
|
+
### Capture one item
|
|
164
|
+
|
|
165
|
+
- **"Remember this"** — capture the immediately relevant information as a
|
|
166
|
+
governed proposal.
|
|
167
|
+
- **"This is a decision"** — capture the immediately relevant information as a
|
|
168
|
+
Decision proposal.
|
|
169
|
+
- **"Add this to my tasks"** — update clearly identified existing Work when
|
|
170
|
+
policy authorizes it; otherwise capture new Work as a proposal.
|
|
171
|
+
- **"Save this idea"** — capture the immediately relevant information as an
|
|
172
|
+
Idea proposal.
|
|
173
|
+
|
|
174
|
+
Resolve "this" from the immediately preceding user-visible material. Ask one
|
|
175
|
+
short question if the referent is genuinely ambiguous. These commands do not
|
|
176
|
+
bypass review or authorize replacement of canonical state.
|
|
177
|
+
|
|
178
|
+
### Preview and exclusions
|
|
179
|
+
|
|
180
|
+
- **"What changed?"** or **"show changes"** — show the measured unsynced delta
|
|
181
|
+
since the most recent successful ReasonTrail sync. Do not write.
|
|
182
|
+
- **"Show me what you're about to save"** — preview the exact pending delta,
|
|
183
|
+
candidate types, deduplication, and exclusions. Do not call any write,
|
|
184
|
+
capture, sync, completion, or canonical-mutation mechanism.
|
|
185
|
+
- **"Don't save this"** — exclude the explicitly identified material from the
|
|
186
|
+
pending delta for the rest of the current session, including candidate
|
|
187
|
+
extraction. If it was already synchronized, explain that exclusion cannot
|
|
188
|
+
silently delete it; use the existing governed correction/removal path.
|
|
189
|
+
|
|
190
|
+
Keep exclusions attached to stable message identifiers when the host supplies
|
|
191
|
+
them, and pass those identifiers to preview and update operations that support
|
|
192
|
+
them. Never imply that an exclusion removed material already stored.
|
|
193
|
+
|
|
194
|
+
## Writes and governance
|
|
51
195
|
|
|
52
196
|
Requests to update the Brain, save to ReasonTrail, remember project knowledge,
|
|
53
197
|
or record a decision are explicit Brain write intents. Use the live ReasonTrail
|
|
@@ -65,16 +209,19 @@ response may be reported as an update. If neither transport can write, report:
|
|
|
65
209
|
|
|
66
210
|
> ReasonTrail is unavailable, so the project Brain was not updated.
|
|
67
211
|
|
|
68
|
-
##
|
|
212
|
+
## Optional compatibility commands
|
|
69
213
|
|
|
70
|
-
|
|
71
|
-
|
|
214
|
+
Natural language is preferred; slash commands are never required. If the user
|
|
215
|
+
does use `$reasontrail …` in Codex or `/reasontrail …` in Claude Code, dispatch
|
|
216
|
+
it to a real transport:
|
|
72
217
|
|
|
73
218
|
- `status` — MCP read/status, otherwise `reasontrail status --profile <selected-profile>`.
|
|
74
219
|
- `context` — MCP context retrieval, otherwise `reasontrail context --profile <selected-profile> --request
|
|
75
220
|
<current request>`.
|
|
76
221
|
- `update` — MCP reviewed write, otherwise structured JSON on standard input to
|
|
77
|
-
`reasontrail update --
|
|
222
|
+
`reasontrail update --session <host-native-session-id> --profile
|
|
223
|
+
<selected-profile>` when the host identity is available. Without a verified
|
|
224
|
+
native source, the result must be labelled summary-only/SOURCE_UNAVAILABLE.
|
|
78
225
|
- `.` — MCP repository association when supported, otherwise `reasontrail . --profile <selected-profile>`.
|
|
79
226
|
|
|
80
227
|
Project binding is independent from connectivity and authentication. A missing
|
package/src/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"sourceRevision":"
|
|
1
|
+
{"sourceRevision":"e2dec2f9fa038f10880c700bba89035713baab29"}
|