@mmnto/cli 1.52.0 → 1.53.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.
- package/dist/adapters/github-cli-pr.d.ts.map +1 -1
- package/dist/adapters/github-cli-pr.js +3 -1
- package/dist/adapters/github-cli-pr.js.map +1 -1
- package/dist/adapters/github-cli-pr.test.js +4 -4
- package/dist/adapters/github-cli-pr.test.js.map +1 -1
- package/dist/adapters/github-cli-project.d.ts +21 -0
- package/dist/adapters/github-cli-project.d.ts.map +1 -0
- package/dist/adapters/github-cli-project.js +69 -0
- package/dist/adapters/github-cli-project.js.map +1 -0
- package/dist/adapters/github-cli.d.ts +7 -1
- package/dist/adapters/github-cli.d.ts.map +1 -1
- package/dist/adapters/github-cli.js +30 -0
- package/dist/adapters/github-cli.js.map +1 -1
- package/dist/adapters/github-cli.test.js +26 -0
- package/dist/adapters/github-cli.test.js.map +1 -1
- package/dist/adapters/issue-adapter.d.ts +18 -0
- package/dist/adapters/issue-adapter.d.ts.map +1 -1
- package/dist/adapters/pr-adapter.d.ts +2 -0
- package/dist/adapters/pr-adapter.d.ts.map +1 -1
- package/dist/commands/orient-coherence.d.ts +33 -0
- package/dist/commands/orient-coherence.d.ts.map +1 -0
- package/dist/commands/orient-coherence.js +64 -0
- package/dist/commands/orient-coherence.js.map +1 -0
- package/dist/commands/orient-coherence.test.d.ts +2 -0
- package/dist/commands/orient-coherence.test.d.ts.map +1 -0
- package/dist/commands/orient-coherence.test.js +99 -0
- package/dist/commands/orient-coherence.test.js.map +1 -0
- package/dist/commands/orient.d.ts +97 -0
- package/dist/commands/orient.d.ts.map +1 -0
- package/dist/commands/orient.js +530 -0
- package/dist/commands/orient.js.map +1 -0
- package/dist/commands/orient.test.d.ts +2 -0
- package/dist/commands/orient.test.d.ts.map +1 -0
- package/dist/commands/orient.test.js +457 -0
- package/dist/commands/orient.test.js.map +1 -0
- package/dist/help.js +1 -1
- package/dist/help.js.map +1 -1
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,530 @@
|
|
|
1
|
+
// `totem orient` — derive session orientation from primitives (mmnto-ai/totem#2044, WS2).
|
|
2
|
+
//
|
|
3
|
+
// A DETERMINISTIC sensor (zero LLM, zero embedding): it derives "what's parked /
|
|
4
|
+
// in flight / open" from live `gh` / `git` / fs primitives — open PRs, open
|
|
5
|
+
// issues (with epic→child grouping), the GH Project board (in-flight only),
|
|
6
|
+
// `.totem/freeze.json`, and an index-freshness pointer — plus one new derived
|
|
7
|
+
// signal: a board↔issue coherence flag. Sibling to `totem triage` (LLM synthesis
|
|
8
|
+
// on top); they compose, not duplicate.
|
|
9
|
+
//
|
|
10
|
+
// Discipline (ported from the strategy seed tools/orient.cjs):
|
|
11
|
+
// - Fail loud, never drift (Tenet 4): an underivable section is an explicit
|
|
12
|
+
// `⚠ could not derive` line / `{ error }` envelope — NEVER a silent empty.
|
|
13
|
+
// - Honest absence (Tenet 14): "not yet synced" / "no board configured" are
|
|
14
|
+
// explicit states, not errors and not blanks.
|
|
15
|
+
// - Snapshot, not source (Tenet 20): every run re-derives; the output is a cache.
|
|
16
|
+
// - NO embedding/LanceDB path — this is what makes orient run green when
|
|
17
|
+
// `@google/genai` is absent (it structurally dodges #2018).
|
|
18
|
+
import { flagBoardIssueDrift, isActiveBoardItem } from './orient-coherence.js';
|
|
19
|
+
// ─── Tunables ───────────────────────────────────────────
|
|
20
|
+
const ISSUE_LIMIT = 200;
|
|
21
|
+
const EPIC_LABEL = 'type: epic';
|
|
22
|
+
// Hide ai-workflow noise from the OTHER-issues label badges (matches the seed).
|
|
23
|
+
const NOISE_LABELS = new Set(['ai-workflow']);
|
|
24
|
+
// A registry entry older than this prints a [STALE] hint (matches `totem list`).
|
|
25
|
+
const STALE_MS = 30 * 24 * 60 * 60 * 1000;
|
|
26
|
+
// Matches "**Parent:** #N" AND fully-qualified "**Parent:** owner/repo#N".
|
|
27
|
+
// Group 1 captures the optional owner/repo prefix; group 2 the number. Only
|
|
28
|
+
// LOCAL parents (no prefix, or prefix == this repo's slug) attach children, so
|
|
29
|
+
// a cross-repo ref can't collide with a same-numbered LOCAL epic.
|
|
30
|
+
const PARENT_RE = /\*\*Parent:\*\*\s*([A-Za-z0-9._/-]+)?#(\d+)/;
|
|
31
|
+
// Validate the env-sourced project number so it can only ever be digits.
|
|
32
|
+
const PROJECT_NUMBER_RE = /^\d+$/;
|
|
33
|
+
function isError(s) {
|
|
34
|
+
return typeof s === 'object' && s !== null && 'error' in s;
|
|
35
|
+
}
|
|
36
|
+
function errMessage(err) {
|
|
37
|
+
return err instanceof Error ? err.message : String(err);
|
|
38
|
+
}
|
|
39
|
+
// ─── Per-section derivations (each fails in isolation) ──
|
|
40
|
+
const GH_TIMEOUT_MS = 20_000;
|
|
41
|
+
/**
|
|
42
|
+
* Derive `{ owner, name }` for the current repo via `gh repo view`.
|
|
43
|
+
*
|
|
44
|
+
* Uses `safeExec` (an `execFileSync` wrapper with an argument array — no shell),
|
|
45
|
+
* matching the codebase convention; static args only, so there is no injection
|
|
46
|
+
* surface. Returns `{ error }` on failure (Tenet 4 — never a silent empty).
|
|
47
|
+
*/
|
|
48
|
+
async function deriveRepoSlug(cwd) {
|
|
49
|
+
try {
|
|
50
|
+
const { safeExec } = await import('@mmnto/totem');
|
|
51
|
+
const raw = safeExec('gh', ['repo', 'view', '--json', 'owner,name'], {
|
|
52
|
+
cwd,
|
|
53
|
+
timeout: GH_TIMEOUT_MS,
|
|
54
|
+
env: { ...process.env, GH_PROMPT_DISABLED: '1' },
|
|
55
|
+
});
|
|
56
|
+
const parsed = JSON.parse(raw);
|
|
57
|
+
if (!parsed.owner?.login || !parsed.name) {
|
|
58
|
+
return { error: 'unexpected `gh repo view` shape' };
|
|
59
|
+
}
|
|
60
|
+
return { slug: { owner: parsed.owner.login, name: parsed.name } };
|
|
61
|
+
// totem-context: a gh failure becomes a fail-loud { error } envelope (Tenet 4 — surfaced in the report, not swallowed); every other section still derives independently
|
|
62
|
+
}
|
|
63
|
+
catch (err) {
|
|
64
|
+
return { error: errMessage(err) || 'gh repo view failed' };
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
async function deriveParked(repoRoot) {
|
|
68
|
+
try {
|
|
69
|
+
const { readFreezeConfig } = await import('@mmnto/totem');
|
|
70
|
+
const path = await import('node:path');
|
|
71
|
+
const totemDir = path.join(repoRoot, '.totem');
|
|
72
|
+
const config = readFreezeConfig(totemDir);
|
|
73
|
+
if (!config)
|
|
74
|
+
return [];
|
|
75
|
+
return config.frozen.map((f) => ({
|
|
76
|
+
subsystem: f.subsystem,
|
|
77
|
+
since: f.since,
|
|
78
|
+
reason: f.reason,
|
|
79
|
+
tracking: f.tracking,
|
|
80
|
+
}));
|
|
81
|
+
// totem-context: a freeze-read failure becomes a fail-loud { error } envelope (Tenet 4 — surfaced, not swallowed)
|
|
82
|
+
}
|
|
83
|
+
catch (err) {
|
|
84
|
+
return { error: errMessage(err) };
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
async function derivePRs(cwd) {
|
|
88
|
+
try {
|
|
89
|
+
const { GitHubCliPrAdapter } = await import('../adapters/github-cli-pr.js');
|
|
90
|
+
const adapter = new GitHubCliPrAdapter(cwd);
|
|
91
|
+
const prs = adapter.fetchOpenPRs();
|
|
92
|
+
return prs.map((p) => ({
|
|
93
|
+
number: p.number,
|
|
94
|
+
title: p.title,
|
|
95
|
+
headRefName: p.headRefName,
|
|
96
|
+
isDraft: p.isDraft,
|
|
97
|
+
}));
|
|
98
|
+
// totem-context: a gh PR-list failure becomes a fail-loud { error } envelope (Tenet 4 — surfaced, not swallowed)
|
|
99
|
+
}
|
|
100
|
+
catch (err) {
|
|
101
|
+
return { error: errMessage(err) };
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
async function deriveIssues(cwd, localSlug) {
|
|
105
|
+
let all;
|
|
106
|
+
try {
|
|
107
|
+
const { GitHubCliAdapter } = await import('../adapters/github-cli.js');
|
|
108
|
+
const adapter = new GitHubCliAdapter(cwd);
|
|
109
|
+
all = adapter.fetchOpenIssuesWithBody(ISSUE_LIMIT);
|
|
110
|
+
// totem-context: a gh issue-list failure becomes a fail-loud { error } envelope (Tenet 4 — surfaced, not swallowed)
|
|
111
|
+
}
|
|
112
|
+
catch (err) {
|
|
113
|
+
return { error: errMessage(err) };
|
|
114
|
+
}
|
|
115
|
+
const openNumbers = new Set(all.map((i) => i.number));
|
|
116
|
+
// Build parent# → [child] from primitives (LOCAL parent refs only).
|
|
117
|
+
const childOf = new Map();
|
|
118
|
+
for (const it of all) {
|
|
119
|
+
const m = (it.body || '').match(PARENT_RE);
|
|
120
|
+
// Case-folded compare: GitHub owner/repo slugs are case-insensitive, so a
|
|
121
|
+
// casing skew must not stop a child attaching to its LOCAL parent epic.
|
|
122
|
+
if (m && (!m[1] || (localSlug && m[1].toLowerCase() === localSlug.toLowerCase()))) {
|
|
123
|
+
const parent = Number(m[2]);
|
|
124
|
+
const list = childOf.get(parent) ?? [];
|
|
125
|
+
list.push(it);
|
|
126
|
+
childOf.set(parent, list);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
const isEpic = (it) => it.labels.includes(EPIC_LABEL);
|
|
130
|
+
const epicIssues = all.filter(isEpic);
|
|
131
|
+
const epicNums = new Set(epicIssues.map((e) => e.number));
|
|
132
|
+
// A child is "covered" (omitted from OTHER) ONLY if its parent is a rendered
|
|
133
|
+
// epic; a child whose parent isn't an epic stays in OTHER so it is never dropped.
|
|
134
|
+
const coveredChildNums = new Set();
|
|
135
|
+
for (const [parent, kids] of childOf) {
|
|
136
|
+
if (epicNums.has(parent))
|
|
137
|
+
kids.forEach((k) => coveredChildNums.add(k.number));
|
|
138
|
+
}
|
|
139
|
+
const epics = epicIssues.map((e) => ({
|
|
140
|
+
number: e.number,
|
|
141
|
+
title: e.title,
|
|
142
|
+
labels: e.labels,
|
|
143
|
+
subIssues: (childOf.get(e.number) ?? []).map((c) => ({ number: c.number, title: c.title })),
|
|
144
|
+
}));
|
|
145
|
+
const others = all
|
|
146
|
+
.filter((it) => !isEpic(it) && !coveredChildNums.has(it.number))
|
|
147
|
+
.map((i) => ({ number: i.number, title: i.title, labels: i.labels }));
|
|
148
|
+
return { epics, others, openNumbers };
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Resolve the project number (consumer-safety, Q5): config `orient.projectNumber`
|
|
152
|
+
* → env `TOTEM_ORIENT_PROJECT` (last override). No project configured ⇒ honest
|
|
153
|
+
* absence (`unconfigured`). A set-but-non-numeric env var is `invalid` — surfaced
|
|
154
|
+
* loudly by the caller, NOT masqueraded as "no board configured" (Tenet 4).
|
|
155
|
+
*/
|
|
156
|
+
async function resolveProjectNumber(cwd) {
|
|
157
|
+
const env = process.env['TOTEM_ORIENT_PROJECT'];
|
|
158
|
+
if (env !== undefined && env !== '') {
|
|
159
|
+
// Explicitly-set-but-malformed ⇒ LOUD: a user who set it expects a board, so
|
|
160
|
+
// don't degrade to silent "unconfigured" (the exact Tenet-4 drift greptile flagged).
|
|
161
|
+
if (!PROJECT_NUMBER_RE.test(env))
|
|
162
|
+
return { kind: 'invalid', raw: env };
|
|
163
|
+
return { kind: 'resolved', projectNumber: Number(env) };
|
|
164
|
+
}
|
|
165
|
+
// Optional config: orient must work even with NO totem.config.ts at all.
|
|
166
|
+
try {
|
|
167
|
+
const { loadConfig, resolveConfigPath } = await import('../utils.js');
|
|
168
|
+
const configPath = resolveConfigPath(cwd);
|
|
169
|
+
const config = await loadConfig(configPath);
|
|
170
|
+
const projectNumber = config.orient?.projectNumber;
|
|
171
|
+
return projectNumber === undefined
|
|
172
|
+
? { kind: 'unconfigured' }
|
|
173
|
+
: { kind: 'resolved', projectNumber };
|
|
174
|
+
// totem-context: intentional — a missing/unreadable totem.config.ts is honest board-absence (Tenet 14), not an orient failure
|
|
175
|
+
}
|
|
176
|
+
catch {
|
|
177
|
+
// No config / unreadable config is not an orient failure — board absence
|
|
178
|
+
// is the honest state. (resolveConfigPath throws when no config exists.)
|
|
179
|
+
return { kind: 'unconfigured' };
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
async function deriveBoard(cwd, owner) {
|
|
183
|
+
const resolution = await resolveProjectNumber(cwd);
|
|
184
|
+
if (resolution.kind === 'unconfigured') {
|
|
185
|
+
return { section: [], items: null, configured: false };
|
|
186
|
+
}
|
|
187
|
+
if (resolution.kind === 'invalid') {
|
|
188
|
+
// Fail loud (Tenet 4): a set-but-malformed TOTEM_ORIENT_PROJECT is an { error }
|
|
189
|
+
// board section + configured:true, NOT a silent "no board configured" absence.
|
|
190
|
+
return {
|
|
191
|
+
section: {
|
|
192
|
+
error: `TOTEM_ORIENT_PROJECT="${resolution.raw}" is not a positive integer (board not derived)`,
|
|
193
|
+
},
|
|
194
|
+
items: null,
|
|
195
|
+
configured: true,
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
const { projectNumber } = resolution;
|
|
199
|
+
if (owner === null) {
|
|
200
|
+
return {
|
|
201
|
+
section: { error: 'board configured but repo owner could not be derived (gh repo view)' },
|
|
202
|
+
items: null,
|
|
203
|
+
configured: true,
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
try {
|
|
207
|
+
const { fetchBoardItems } = await import('../adapters/github-cli-project.js');
|
|
208
|
+
const items = fetchBoardItems(owner, projectNumber, cwd);
|
|
209
|
+
const active = items.filter(isActiveBoardItem).map((i) => ({
|
|
210
|
+
status: i.status || 'Todo',
|
|
211
|
+
title: i.title,
|
|
212
|
+
contentNumber: i.contentNumber,
|
|
213
|
+
}));
|
|
214
|
+
return { section: active, items, configured: true };
|
|
215
|
+
// totem-context: a gh board-fetch failure becomes a fail-loud { error } section envelope (Tenet 4 — surfaced, not swallowed)
|
|
216
|
+
}
|
|
217
|
+
catch (err) {
|
|
218
|
+
return { section: { error: errMessage(err) }, items: null, configured: true };
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Derive the index-freshness pointer INLINE from the registry `lastSync` for the
|
|
223
|
+
* current repo root (Q1: no `@mmnto/cli`→`@mmnto/mcp` dependency). No registry
|
|
224
|
+
* entry ⇒ honest "not yet synced" absence.
|
|
225
|
+
*/
|
|
226
|
+
async function deriveIndexFreshness(repoRoot) {
|
|
227
|
+
try {
|
|
228
|
+
const { readRegistry } = await import('@mmnto/totem');
|
|
229
|
+
const { formatRelativeTime } = await import('./list.js');
|
|
230
|
+
const path = await import('node:path');
|
|
231
|
+
const registry = readRegistry();
|
|
232
|
+
const normalizedRoot = path.normalize(repoRoot);
|
|
233
|
+
const entry = Object.values(registry).find((e) => path.normalize(e.path) === normalizedRoot);
|
|
234
|
+
if (!entry)
|
|
235
|
+
return { synced: false };
|
|
236
|
+
const age = Date.now() - new Date(entry.lastSync).getTime();
|
|
237
|
+
return { synced: true, lastSync: formatRelativeTime(age), stale: age > STALE_MS };
|
|
238
|
+
// totem-context: intentional — an unreadable registry is honest "not synced" absence (Tenet 14) for a regenerable-cache pointer, not an orient failure
|
|
239
|
+
}
|
|
240
|
+
catch {
|
|
241
|
+
// Registry unreadable → treat as not-synced honest absence, not an error
|
|
242
|
+
// (it's a regenerable cache pointer, never load-bearing for orientation).
|
|
243
|
+
return { synced: false };
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
// ─── Orchestration ──────────────────────────────────────
|
|
247
|
+
async function derive(cwd) {
|
|
248
|
+
const { resolveGitRoot } = await import('@mmnto/totem');
|
|
249
|
+
const repoRoot = resolveGitRoot(cwd) ?? cwd;
|
|
250
|
+
const slugResult = await deriveRepoSlug(cwd);
|
|
251
|
+
const repo = isError(slugResult)
|
|
252
|
+
? { error: slugResult.error }
|
|
253
|
+
: `${slugResult.slug.owner}/${slugResult.slug.name}`;
|
|
254
|
+
const localSlug = isError(slugResult) ? null : `${slugResult.slug.owner}/${slugResult.slug.name}`;
|
|
255
|
+
const owner = isError(slugResult) ? null : slugResult.slug.owner;
|
|
256
|
+
const [indexFreshness, parked, openPRs, issues, board] = await Promise.all([
|
|
257
|
+
deriveIndexFreshness(repoRoot),
|
|
258
|
+
deriveParked(repoRoot),
|
|
259
|
+
derivePRs(cwd),
|
|
260
|
+
deriveIssues(cwd, localSlug),
|
|
261
|
+
deriveBoard(cwd, owner),
|
|
262
|
+
]);
|
|
263
|
+
return {
|
|
264
|
+
repo,
|
|
265
|
+
localSlug,
|
|
266
|
+
indexFreshness,
|
|
267
|
+
parked,
|
|
268
|
+
openPRs,
|
|
269
|
+
board: board.section,
|
|
270
|
+
boardItems: board.items,
|
|
271
|
+
issues,
|
|
272
|
+
boardConfigured: board.configured,
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
/** Coherence flags derive purely from the board + open-issue primitives (no extra gh call). */
|
|
276
|
+
function deriveCoherence(state) {
|
|
277
|
+
if (isError(state.board))
|
|
278
|
+
return { error: state.board.error };
|
|
279
|
+
if (isError(state.issues))
|
|
280
|
+
return { error: state.issues.error };
|
|
281
|
+
if (state.boardItems === null)
|
|
282
|
+
return [];
|
|
283
|
+
return flagBoardIssueDrift(state.boardItems, state.issues.openNumbers, state.localSlug);
|
|
284
|
+
}
|
|
285
|
+
function toReport(state) {
|
|
286
|
+
const coherence = deriveCoherence(state);
|
|
287
|
+
return {
|
|
288
|
+
repo: state.repo,
|
|
289
|
+
derivedAt: new Date().toISOString(),
|
|
290
|
+
indexFreshness: state.indexFreshness,
|
|
291
|
+
parked: state.parked,
|
|
292
|
+
openPRs: state.openPRs,
|
|
293
|
+
board: state.board,
|
|
294
|
+
coherence,
|
|
295
|
+
epics: isError(state.issues) ? { error: state.issues.error } : state.issues.epics,
|
|
296
|
+
otherOpenIssues: isError(state.issues) ? { error: state.issues.error } : state.issues.others,
|
|
297
|
+
boardConfigured: state.boardConfigured,
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Programmatic entry: derive the full `OrientReport` for `cwd` WITHOUT writing
|
|
302
|
+
* stdout. Identical report to `orient --json` (one derivation, two callers —
|
|
303
|
+
* cannot diverge). Reused by `orientCommand` (the CLI surface) and the
|
|
304
|
+
* SessionStart hook (`.claude/hooks/session-context.mjs`, mmnto-ai/totem#2044
|
|
305
|
+
* PR-2), which dynamic-imports this from `packages/cli/dist/commands/orient.js`
|
|
306
|
+
* — the workspace-dist pattern, deliberately NOT the global `totem` binary
|
|
307
|
+
* (sidesteps the stale-resolve trap mmnto-ai/totem#2053).
|
|
308
|
+
*
|
|
309
|
+
* Latency note: orient's gh adapters are synchronous (`safeExec`/execFileSync),
|
|
310
|
+
* so this runs ~4 sequential blocking gh calls (repo view + PRs + issues + board),
|
|
311
|
+
* each bounded by the adapter's per-call timeout. Callers on a latency-sensitive
|
|
312
|
+
* path (the hook) wrap it best-effort and degrade on failure.
|
|
313
|
+
*/
|
|
314
|
+
export async function deriveOrientReport(cwd) {
|
|
315
|
+
const state = await derive(cwd);
|
|
316
|
+
return toReport(state);
|
|
317
|
+
}
|
|
318
|
+
// ─── Human render ───────────────────────────────────────
|
|
319
|
+
const FOOTER = [
|
|
320
|
+
'— end orient. State derives from the primitives above (Tenet 20); this output is a',
|
|
321
|
+
' snapshot/cache, not a source. Deeper judgment is perceptual: ask the human; no',
|
|
322
|
+
' deeper/fleet pass needed unless you are doing an audit (a different task).',
|
|
323
|
+
].join('\n');
|
|
324
|
+
function renderFreshness(f) {
|
|
325
|
+
if (!f.synced)
|
|
326
|
+
return ' freshness unknown — not yet synced (run `totem sync`)';
|
|
327
|
+
return ' index synced ' + f.lastSync + (f.stale ? ' [STALE]' : '');
|
|
328
|
+
}
|
|
329
|
+
export function renderReport(report) {
|
|
330
|
+
const out = [];
|
|
331
|
+
const repo = isError(report.repo) ? `(repo undetermined: ${report.repo.error})` : report.repo;
|
|
332
|
+
out.push(`═══ totem orient — ${repo} ═══ derived ${report.derivedAt}`);
|
|
333
|
+
out.push(' (derived from primitives — open PRs / open issues / GH Project board / .totem/freeze.json)');
|
|
334
|
+
// PARKED
|
|
335
|
+
out.push('\n⛔ PARKED / FROZEN (.totem/freeze.json)');
|
|
336
|
+
if (isError(report.parked))
|
|
337
|
+
out.push(` ⚠ could not derive: ${report.parked.error}`);
|
|
338
|
+
else if (report.parked.length === 0)
|
|
339
|
+
out.push(' none');
|
|
340
|
+
else
|
|
341
|
+
for (const f of report.parked) {
|
|
342
|
+
const reason = (f.reason || '').split('. ')[0];
|
|
343
|
+
out.push(` • ${f.subsystem} (since ${f.since || '?'})${reason ? ` — ${reason}` : ''}`);
|
|
344
|
+
if (f.tracking)
|
|
345
|
+
out.push(` tracking: ${f.tracking}`);
|
|
346
|
+
}
|
|
347
|
+
// OPEN PRs
|
|
348
|
+
out.push('\n◐ OPEN PRs');
|
|
349
|
+
if (isError(report.openPRs))
|
|
350
|
+
out.push(` ⚠ could not derive: ${report.openPRs.error}`);
|
|
351
|
+
else if (report.openPRs.length === 0)
|
|
352
|
+
out.push(' none');
|
|
353
|
+
else
|
|
354
|
+
for (const p of report.openPRs) {
|
|
355
|
+
const head = `#${p.number}` + (p.isDraft ? ' [draft]' : '');
|
|
356
|
+
out.push(` ${head} ${p.title} (${p.headRefName})`);
|
|
357
|
+
}
|
|
358
|
+
// BOARD in-flight
|
|
359
|
+
out.push('\n▣ BOARD in-flight (active statuses only)');
|
|
360
|
+
if (isError(report.board))
|
|
361
|
+
out.push(` ⚠ could not derive: ${report.board.error}`);
|
|
362
|
+
else if (!report.boardConfigured)
|
|
363
|
+
out.push(' no board configured (set orient.projectNumber in totem.config.ts)');
|
|
364
|
+
else if (report.board.length === 0)
|
|
365
|
+
out.push(' none (no items in an active status)');
|
|
366
|
+
else
|
|
367
|
+
for (const i of report.board) {
|
|
368
|
+
const num = i.contentNumber ? `#${i.contentNumber} ` : '';
|
|
369
|
+
out.push(` [${i.status}] ${num}` + i.title);
|
|
370
|
+
}
|
|
371
|
+
// BOARD↔ISSUE COHERENCE (the new derived signal)
|
|
372
|
+
out.push('\n⚖ BOARD↔ISSUE COHERENCE (active card whose issue is closed/absent = drift)');
|
|
373
|
+
if (isError(report.coherence))
|
|
374
|
+
out.push(` ⚠ could not derive: ${report.coherence.error}`);
|
|
375
|
+
else if (report.coherence.length === 0)
|
|
376
|
+
out.push(' none (board and open issues are coherent)');
|
|
377
|
+
else
|
|
378
|
+
for (const c of report.coherence) {
|
|
379
|
+
out.push(` ⚠ [${c.boardStatus}] "${c.boardItemTitle}" → issue #${c.issueNumber} is closed/absent`);
|
|
380
|
+
}
|
|
381
|
+
// EPICS + children
|
|
382
|
+
out.push('\n✦ EPICS + sub-issues (label "type: epic"; children via body Parent ref)');
|
|
383
|
+
if (isError(report.epics))
|
|
384
|
+
out.push(` ⚠ could not derive: ${report.epics.error}`);
|
|
385
|
+
else if (report.epics.length === 0)
|
|
386
|
+
out.push(' none');
|
|
387
|
+
else
|
|
388
|
+
for (const e of report.epics) {
|
|
389
|
+
out.push(` #${e.number} ${e.title}`);
|
|
390
|
+
if (e.subIssues.length === 0)
|
|
391
|
+
out.push(' (no tracked sub-issues)');
|
|
392
|
+
else
|
|
393
|
+
e.subIssues.forEach((c, idx) => out.push(` ${idx === e.subIssues.length - 1 ? '└' : '├'} #${c.number} ${c.title}`));
|
|
394
|
+
}
|
|
395
|
+
// OTHER open issues
|
|
396
|
+
out.push('\n● OTHER open issues (non-epic, non-child)');
|
|
397
|
+
if (isError(report.otherOpenIssues))
|
|
398
|
+
out.push(` ⚠ could not derive: ${report.otherOpenIssues.error}`);
|
|
399
|
+
else if (report.otherOpenIssues.length === 0)
|
|
400
|
+
out.push(' none');
|
|
401
|
+
else
|
|
402
|
+
for (const i of report.otherOpenIssues) {
|
|
403
|
+
const labels = i.labels.filter((l) => !NOISE_LABELS.has(l));
|
|
404
|
+
const labelTag = labels.length ? ` [${labels.join(', ')}]` : '';
|
|
405
|
+
out.push(` #${i.number} ${i.title}` + labelTag);
|
|
406
|
+
}
|
|
407
|
+
// INDEX FRESHNESS pointer (honest absence when never synced)
|
|
408
|
+
out.push('\n⟳ INDEX FRESHNESS (registry lastSync for this repo)');
|
|
409
|
+
out.push(renderFreshness(report.indexFreshness));
|
|
410
|
+
out.push('');
|
|
411
|
+
out.push(FOOTER);
|
|
412
|
+
return out.join('\n');
|
|
413
|
+
}
|
|
414
|
+
// ─── Session-start projection (the auto-injected Tier-A block) ──
|
|
415
|
+
// Bounds for the session-start orient block (mmnto-ai/totem#2044 PR-2).
|
|
416
|
+
// Binding guardrail (strategy charter 2026-06-01T0229Z, mmnto-ai/totem-strategy#467):
|
|
417
|
+
// the block must be HARD-BOUNDED so it can never displace high-value session
|
|
418
|
+
// content (journal carryforward, parked, inbound mail) past the hook's
|
|
419
|
+
// MAX_TOTAL_CHARS cap — favorable ordering alone is insufficient, a runaway block
|
|
420
|
+
// would itself crowd out high-value content. Net-neutral-or-positive on
|
|
421
|
+
// high-value-content truncation; truncation absorbs the low-value vector tail.
|
|
422
|
+
const SESSION_BLOCK_MAX_CHARS = 1500;
|
|
423
|
+
const SESSION_PARKED_CAP = 8;
|
|
424
|
+
const SESSION_PR_CAP = 10;
|
|
425
|
+
const SESSION_COHERENCE_CAP = 10;
|
|
426
|
+
/**
|
|
427
|
+
* Compact projection of an `OrientReport` for auto-injection at session start.
|
|
428
|
+
*
|
|
429
|
+
* Emits ONLY high-signal state — parked/frozen subsystems, open PRs, and board↔
|
|
430
|
+
* issue coherence drift — plus a one-line COUNTS pointer for epics/other-issues
|
|
431
|
+
* (NOT the full enumeration: "pointers not bodies", mmnto-ai/totem-strategy#467
|
|
432
|
+
* Tier-A discipline). An underivable section stays a `⚠ could not derive` line
|
|
433
|
+
* (Tenet 4 — never a silent omit), so the projection inherits orient's fail-loud
|
|
434
|
+
* contract. Hard-bounded by `SESSION_BLOCK_MAX_CHARS` (the guardrail above).
|
|
435
|
+
*
|
|
436
|
+
* Returns '' when there is nothing high-signal to surface (no parked, no PRs, no
|
|
437
|
+
* drift, no derivable counts) so the hook can omit the block entirely rather than
|
|
438
|
+
* inject an empty header.
|
|
439
|
+
*/
|
|
440
|
+
export function renderOrientForSession(report) {
|
|
441
|
+
const out = [];
|
|
442
|
+
const repo = isError(report.repo) ? '(repo undetermined)' : report.repo;
|
|
443
|
+
out.push(`── orient (derived state): ${repo} ──`);
|
|
444
|
+
const headerLen = out.length;
|
|
445
|
+
// PARKED / FROZEN — you must not touch these subsystems (high value).
|
|
446
|
+
if (isError(report.parked)) {
|
|
447
|
+
out.push(`⛔ parked: ⚠ could not derive: ${report.parked.error}`);
|
|
448
|
+
}
|
|
449
|
+
else if (report.parked.length > 0) {
|
|
450
|
+
const shown = report.parked.slice(0, SESSION_PARKED_CAP).map((f) => f.subsystem);
|
|
451
|
+
const more = report.parked.length > SESSION_PARKED_CAP ? ' …' : '';
|
|
452
|
+
out.push(`⛔ parked/frozen (${report.parked.length}): ${shown.join(', ')}` + more);
|
|
453
|
+
}
|
|
454
|
+
// OPEN PRs — what's in flight.
|
|
455
|
+
if (isError(report.openPRs)) {
|
|
456
|
+
out.push(`◐ open PRs: ⚠ could not derive: ${report.openPRs.error}`);
|
|
457
|
+
}
|
|
458
|
+
else if (report.openPRs.length > 0) {
|
|
459
|
+
for (const p of report.openPRs.slice(0, SESSION_PR_CAP)) {
|
|
460
|
+
const draft = p.isDraft ? ' [draft]' : '';
|
|
461
|
+
out.push(`◐ PR #${p.number}` + draft + ` ${p.title} (${p.headRefName})`);
|
|
462
|
+
}
|
|
463
|
+
if (report.openPRs.length > SESSION_PR_CAP) {
|
|
464
|
+
out.push(` … and ${report.openPRs.length - SESSION_PR_CAP} more open PRs`);
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
// BOARD↔ISSUE COHERENCE drift — the anomaly signal (active card, issue closed/absent).
|
|
468
|
+
if (isError(report.coherence)) {
|
|
469
|
+
out.push(`⚖ coherence: ⚠ could not derive: ${report.coherence.error}`);
|
|
470
|
+
}
|
|
471
|
+
else if (report.coherence.length > 0) {
|
|
472
|
+
for (const c of report.coherence.slice(0, SESSION_COHERENCE_CAP)) {
|
|
473
|
+
out.push(`⚖ drift: [${c.boardStatus}] "${c.boardItemTitle}" → #${c.issueNumber} closed/absent`);
|
|
474
|
+
}
|
|
475
|
+
if (report.coherence.length > SESSION_COHERENCE_CAP) {
|
|
476
|
+
out.push(` … and ${report.coherence.length - SESSION_COHERENCE_CAP} more drift flags`);
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
// COUNTS pointer — NOT the enumeration (Tier-A lean: the agent runs `totem
|
|
480
|
+
// orient` on demand for the full epic/issue board). One fail-loud line if the
|
|
481
|
+
// issue derivation failed — epics + otherOpenIssues share `deriveIssues`, so
|
|
482
|
+
// they error together with the same message; surface it once, never drop it
|
|
483
|
+
// silently (Tenet 4). A zero count emits nothing (no "0 epics" noise).
|
|
484
|
+
if (isError(report.epics)) {
|
|
485
|
+
out.push(`● issues: ⚠ could not derive: ${report.epics.error}`);
|
|
486
|
+
}
|
|
487
|
+
else {
|
|
488
|
+
// `epics` and `otherOpenIssues` share `deriveIssues`, so `toReport` errors
|
|
489
|
+
// them together today — but the type (`Section<...>`) permits an independent
|
|
490
|
+
// split. Surface an errored `otherOpenIssues` explicitly rather than silently
|
|
491
|
+
// coercing its count to 0 (Tenet 4 — never a silent omit, even type-only).
|
|
492
|
+
if (isError(report.otherOpenIssues)) {
|
|
493
|
+
out.push(`● other open issues: ⚠ could not derive: ${report.otherOpenIssues.error}`);
|
|
494
|
+
}
|
|
495
|
+
const epicCount = report.epics.length;
|
|
496
|
+
const otherCount = isError(report.otherOpenIssues) ? 0 : report.otherOpenIssues.length;
|
|
497
|
+
const parts = [];
|
|
498
|
+
if (epicCount > 0)
|
|
499
|
+
parts.push(`${epicCount} epic${epicCount === 1 ? '' : 's'}`);
|
|
500
|
+
if (otherCount > 0) {
|
|
501
|
+
parts.push(`${otherCount} other open issue${otherCount === 1 ? '' : 's'}`);
|
|
502
|
+
}
|
|
503
|
+
if (parts.length > 0) {
|
|
504
|
+
out.push(`● ${parts.join(' · ')} — run \`totem orient\` for the full board`);
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
// Nothing high-signal beyond the header ⇒ let the hook omit the block.
|
|
508
|
+
if (out.length === headerLen)
|
|
509
|
+
return '';
|
|
510
|
+
const block = out.join('\n');
|
|
511
|
+
return block.length > SESSION_BLOCK_MAX_CHARS
|
|
512
|
+
? block.slice(0, SESSION_BLOCK_MAX_CHARS) + '\n …(orient block truncated)'
|
|
513
|
+
: block;
|
|
514
|
+
}
|
|
515
|
+
// ─── Command entry ──────────────────────────────────────
|
|
516
|
+
export async function orientCommand(opts) {
|
|
517
|
+
// Honor the subcommand flag AND the root program's global `--json` (commander
|
|
518
|
+
// routes a leading `--json` to the root option; the root sets this env). Same
|
|
519
|
+
// dual-source pattern other JSON-emitting commands use.
|
|
520
|
+
const { isJsonMode } = await import('../json-output.js');
|
|
521
|
+
const json = opts.json === true || isJsonMode();
|
|
522
|
+
const cwd = process.cwd();
|
|
523
|
+
const report = await deriveOrientReport(cwd);
|
|
524
|
+
if (json) {
|
|
525
|
+
process.stdout.write(JSON.stringify(report, null, 2) + '\n');
|
|
526
|
+
return;
|
|
527
|
+
}
|
|
528
|
+
process.stdout.write(renderReport(report) + '\n');
|
|
529
|
+
}
|
|
530
|
+
//# sourceMappingURL=orient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orient.js","sourceRoot":"","sources":["../../src/commands/orient.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,EAAE;AACF,iFAAiF;AACjF,4EAA4E;AAC5E,4EAA4E;AAC5E,8EAA8E;AAC9E,iFAAiF;AACjF,wCAAwC;AACxC,EAAE;AACF,+DAA+D;AAC/D,4EAA4E;AAC5E,6EAA6E;AAC7E,4EAA4E;AAC5E,gDAAgD;AAChD,kFAAkF;AAClF,yEAAyE;AACzE,8DAA8D;AAM9D,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/E,2DAA2D;AAE3D,MAAM,WAAW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