@mmnto/cli 0.28.0 → 0.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/gh-utils.d.ts +5 -0
- package/dist/adapters/gh-utils.d.ts.map +1 -1
- package/dist/adapters/gh-utils.js +19 -0
- package/dist/adapters/gh-utils.js.map +1 -1
- package/dist/commands/audit.d.ts +44 -0
- package/dist/commands/audit.d.ts.map +1 -0
- package/dist/commands/audit.js +400 -0
- package/dist/commands/audit.js.map +1 -0
- package/dist/commands/audit.test.d.ts +2 -0
- package/dist/commands/audit.test.d.ts.map +1 -0
- package/dist/commands/audit.test.js +267 -0
- package/dist/commands/audit.test.js.map +1 -0
- package/dist/commands/briefing.d.ts +8 -0
- package/dist/commands/briefing.d.ts.map +1 -1
- package/dist/commands/briefing.js +14 -7
- package/dist/commands/briefing.js.map +1 -1
- package/dist/commands/briefing.test.js +33 -1
- package/dist/commands/briefing.test.js.map +1 -1
- package/dist/commands/compile.d.ts.map +1 -1
- package/dist/commands/compile.js +6 -4
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/init.d.ts +19 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +151 -15
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/init.test.js +125 -1
- package/dist/commands/init.test.js.map +1 -1
- package/dist/commands/shield.d.ts +1 -0
- package/dist/commands/shield.d.ts.map +1 -1
- package/dist/commands/shield.js +22 -9
- package/dist/commands/shield.js.map +1 -1
- package/dist/commands/shield.test.js +23 -0
- package/dist/commands/shield.test.js.map +1 -1
- package/dist/commands/spec.d.ts +19 -0
- package/dist/commands/spec.d.ts.map +1 -1
- package/dist/commands/spec.js +27 -10
- package/dist/commands/spec.js.map +1 -1
- package/dist/commands/spec.test.d.ts +2 -0
- package/dist/commands/spec.test.d.ts.map +1 -0
- package/dist/commands/spec.test.js +159 -0
- package/dist/commands/spec.test.js.map +1 -0
- package/dist/commands/triage.d.ts +8 -0
- package/dist/commands/triage.d.ts.map +1 -1
- package/dist/commands/triage.js +15 -7
- package/dist/commands/triage.js.map +1 -1
- package/dist/commands/triage.test.js +29 -1
- package/dist/commands/triage.test.js.map +1 -1
- package/dist/commands/wrap.d.ts.map +1 -1
- package/dist/commands/wrap.js +24 -5
- package/dist/commands/wrap.js.map +1 -1
- package/dist/commands/wrap.test.js +15 -2
- package/dist/commands/wrap.test.js.map +1 -1
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -1
- package/dist/utils.d.ts +15 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +42 -0
- package/dist/utils.js.map +1 -1
- package/dist/utils.test.js +97 -1
- package/dist/utils.test.js.map +1 -1
- package/package.json +2 -2
|
@@ -5,6 +5,11 @@ import { z } from 'zod';
|
|
|
5
5
|
* falls through to a generic message for anything else.
|
|
6
6
|
*/
|
|
7
7
|
export declare function handleGhError(err: unknown, context: string): never;
|
|
8
|
+
/**
|
|
9
|
+
* Execute a `gh` CLI command that does not return JSON (mutations like close, comment, edit).
|
|
10
|
+
* Throws on failure with a friendly error message.
|
|
11
|
+
*/
|
|
12
|
+
export declare function ghExec(args: string[], cwd: string): void;
|
|
8
13
|
/**
|
|
9
14
|
* Shared fetch → JSON.parse → Zod validate utility for all `gh` CLI calls.
|
|
10
15
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gh-utils.d.ts","sourceRoot":"","sources":["../../src/adapters/gh-utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,KAAK,CAelE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAC/B,IAAI,EAAE,MAAM,EAAE,EACd,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EACpB,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,MAAM,GACV,CAAC,CAwBH"}
|
|
1
|
+
{"version":3,"file":"gh-utils.d.ts","sourceRoot":"","sources":["../../src/adapters/gh-utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,KAAK,CAelE;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAaxD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAC/B,IAAI,EAAE,MAAM,EAAE,EACd,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EACpB,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,MAAM,GACV,CAAC,CAwBH"}
|
|
@@ -24,6 +24,25 @@ export function handleGhError(err, context) {
|
|
|
24
24
|
}
|
|
25
25
|
throw new Error(`[Totem Error] Failed to fetch ${context}: ${msg}`);
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Execute a `gh` CLI command that does not return JSON (mutations like close, comment, edit).
|
|
29
|
+
* Throws on failure with a friendly error message.
|
|
30
|
+
*/
|
|
31
|
+
export function ghExec(args, cwd) {
|
|
32
|
+
try {
|
|
33
|
+
execFileSync('gh', args, {
|
|
34
|
+
cwd,
|
|
35
|
+
encoding: 'utf-8',
|
|
36
|
+
timeout: GH_TIMEOUT_MS,
|
|
37
|
+
shell: IS_WIN,
|
|
38
|
+
stdio: 'pipe',
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
catch (err) {
|
|
42
|
+
const context = args.slice(0, 3).join(' ');
|
|
43
|
+
handleGhError(err, context);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
27
46
|
/**
|
|
28
47
|
* Shared fetch → JSON.parse → Zod validate utility for all `gh` CL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GAEG;AACH,MAAM,UAAU,eAAe,CAC7B,IAAc,EACd,MAAoB,EACpB,OAAe,EACf,GAAW;IAEX,MAAM,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IAChD,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE;YACnC,GAAG;YACH,QAAQ,EAAE,OAAO;YACjB,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,aAAa;YAC9D,KAAK,EAAE,MAAM;YACb,SAAS,EAAE,aAAa;SACzB,CAAC,CAAC;QAEH,IAAI,MAAe,CAAC;QACpB,IAAI,CAAC;YACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC3B,CAAC;QAAC,MAAM,CAAC;YACP,MAAM,IAAI,KAAK,CACb,sDAAsD,OAAO,wDAAwD,CACtH,CAAC;QACJ,CAAC;QAED,OAAO,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { StandardIssueListItem } from '../adapters/issue-adapter.js';
|
|
2
|
+
/** Max size for strategic context to avoid exceeding LLM context window (~100KB ≈ 25k tokens). */
|
|
3
|
+
export declare const MAX_STRATEGIC_CONTEXT_CHARS = 100000;
|
|
4
|
+
/** Actions the LLM can propose for each issue. */
|
|
5
|
+
declare const VALID_ACTIONS: readonly ["KEEP", "CLOSE", "REPRIORITIZE", "MERGE"];
|
|
6
|
+
type AuditAction = (typeof VALID_ACTIONS)[number];
|
|
7
|
+
export interface AuditProposal {
|
|
8
|
+
number: number;
|
|
9
|
+
title: string;
|
|
10
|
+
action: AuditAction;
|
|
11
|
+
newTier?: string;
|
|
12
|
+
mergeInto?: number;
|
|
13
|
+
rationale: string;
|
|
14
|
+
}
|
|
15
|
+
export interface AuditOptions {
|
|
16
|
+
raw?: boolean;
|
|
17
|
+
out?: string;
|
|
18
|
+
model?: string;
|
|
19
|
+
fresh?: boolean;
|
|
20
|
+
dryRun?: boolean;
|
|
21
|
+
yes?: boolean;
|
|
22
|
+
context?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare function loadStrategicDocs(cwd: string): string;
|
|
25
|
+
export declare function parseAuditResponse(content: string): AuditProposal[];
|
|
26
|
+
export declare function formatProposalTable(proposals: AuditProposal[]): string;
|
|
27
|
+
export declare function selectProposals(proposals: AuditProposal[], opts: {
|
|
28
|
+
yes?: boolean;
|
|
29
|
+
isTTY?: boolean;
|
|
30
|
+
}): Promise<AuditProposal[]>;
|
|
31
|
+
/**
|
|
32
|
+
* Validate that all MERGE targets reference issues that exist in the backlog.
|
|
33
|
+
*/
|
|
34
|
+
export declare function validateMergeTargets(proposals: AuditProposal[], issueNumbers: Set<number>): string[];
|
|
35
|
+
export interface ExecutionResult {
|
|
36
|
+
succeeded: number;
|
|
37
|
+
failed: number;
|
|
38
|
+
errors: string[];
|
|
39
|
+
}
|
|
40
|
+
export declare function executeProposals(proposals: AuditProposal[], cwd: string): ExecutionResult;
|
|
41
|
+
export declare function formatIssueInventory(issues: StandardIssueListItem[]): string;
|
|
42
|
+
export declare function auditCommand(options: AuditOptions): Promise<void>;
|
|
43
|
+
export {};
|
|
44
|
+
//# sourceMappingURL=audit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/commands/audit.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAgB1E,kGAAkG;AAClG,eAAO,MAAM,2BAA2B,SAAU,CAAC;AAEnD,kDAAkD;AAClD,QAAA,MAAM,aAAa,qDAAsD,CAAC;AAC1E,KAAK,WAAW,GAAG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,CAAC,SAAS,EAAE,aAAa,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,eAAe,CAiEzF;AAID,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,qBAAqB,EAAE,GAAG,MAAM,CAQ5E;AAmCD,wBAAsB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAoHvE"}
|
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
import * as crypto from 'node:crypto';
|
|
2
|
+
import * as fs from 'node:fs';
|
|
3
|
+
import * as os from 'node:os';
|
|
4
|
+
import * as path from 'node:path';
|
|
5
|
+
import { isCancel, multiselect } from '@clack/prompts';
|
|
6
|
+
import { sanitize } from '@mmnto/totem';
|
|
7
|
+
import { ghExec } from '../adapters/gh-utils.js';
|
|
8
|
+
import { GitHubCliAdapter } from '../adapters/github-cli.js';
|
|
9
|
+
import { log } from '../ui.js';
|
|
10
|
+
import { getSystemPrompt, loadConfig, loadEnv, resolveConfigPath, runOrchestrator, wrapXml, writeOutput, } from '../utils.js';
|
|
11
|
+
// ─── Constants ──────────────────────────────────────────
|
|
12
|
+
const TAG = 'Audit';
|
|
13
|
+
const GH_ISSUE_LIMIT = 100;
|
|
14
|
+
/** Max size for strategic context to avoid exceeding LLM context window (~100KB ≈ 25k tokens). */
|
|
15
|
+
export const MAX_STRATEGIC_CONTEXT_CHARS = 100_000;
|
|
16
|
+
/** Actions the LLM can propose for each issue. */
|
|
17
|
+
const VALID_ACTIONS = ['KEEP', 'CLOSE', 'REPRIORITIZE', 'MERGE'];
|
|
18
|
+
// ─── System prompt ──────────────────────────────────────
|
|
19
|
+
const SYSTEM_PROMPT = `# Audit System Prompt — Strategic Backlog Audit
|
|
20
|
+
|
|
21
|
+
## Identity & Role
|
|
22
|
+
You are a ruthless Product Manager auditing an open issue backlog against the project's strategic direction. Your job is to propose which issues to KEEP, CLOSE, REPRIORITIZE, or MERGE. A focused backlog (15-20 issues) is healthier than a sprawling one.
|
|
23
|
+
|
|
24
|
+
## Core Rules
|
|
25
|
+
- **Bias toward closing.** If an issue is obsolete, duplicated, vague, or misaligned with the current strategy, propose CLOSE.
|
|
26
|
+
- **One-sentence rationale per row.** Every proposal must have a clear, concise reason.
|
|
27
|
+
- **No new issues.** You only audit what exists. Do not propose creating new work.
|
|
28
|
+
- **Respect tier labels.** tier-1 = current sprint, tier-2 = next cycle, tier-3 = backlog/future.
|
|
29
|
+
- **MERGE means consolidate.** When two issues overlap significantly, propose merging the smaller into the larger (specify mergeInto number).
|
|
30
|
+
|
|
31
|
+
## Output Format
|
|
32
|
+
Respond with ONLY a JSON array inside <audit_proposals> tags. No preamble, no closing remarks.
|
|
33
|
+
|
|
34
|
+
Each element:
|
|
35
|
+
{
|
|
36
|
+
"number": <issue number>,
|
|
37
|
+
"title": "<issue title>",
|
|
38
|
+
"action": "KEEP" | "CLOSE" | "REPRIORITIZE" | "MERGE",
|
|
39
|
+
"newTier": "<tier-1|tier-2|tier-3>" (only if REPRIORITIZE),
|
|
40
|
+
"mergeInto": <issue number> (only if MERGE),
|
|
41
|
+
"rationale": "<one sentence>"
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
Example:
|
|
45
|
+
<audit_proposals>
|
|
46
|
+
[
|
|
47
|
+
{ "number": 42, "title": "Add widget support", "action": "KEEP", "rationale": "Aligns with Phase 3 roadmap goals." },
|
|
48
|
+
{ "number": 99, "title": "Legacy auth cleanup", "action": "CLOSE", "rationale": "Superseded by #150 (new auth system)." },
|
|
49
|
+
{ "number": 55, "title": "Perf optimization", "action": "REPRIORITIZE", "newTier": "tier-3", "rationale": "No user-facing impact yet; defer to post-1.0." },
|
|
50
|
+
{ "number": 88, "title": "Widget colors", "action": "MERGE", "mergeInto": 42, "rationale": "Subset of #42 scope." }
|
|
51
|
+
]
|
|
52
|
+
</audit_proposals>
|
|
53
|
+
`;
|
|
54
|
+
// ─── Strategic context loading ──────────────────────────
|
|
55
|
+
export function loadStrategicDocs(cwd) {
|
|
56
|
+
const strategyDir = path.join(cwd, '.strategy');
|
|
57
|
+
const docPaths = [path.join(cwd, 'docs', 'roadmap.md'), path.join(cwd, 'docs', 'active_work.md')];
|
|
58
|
+
const sections = [];
|
|
59
|
+
// Load root-level .strategy/*.md files (skip subdirs)
|
|
60
|
+
if (fs.existsSync(strategyDir)) {
|
|
61
|
+
const entries = fs.readdirSync(strategyDir, { withFileTypes: true });
|
|
62
|
+
for (const entry of entries) {
|
|
63
|
+
if (entry.isFile() && entry.name.endsWith('.md')) {
|
|
64
|
+
const content = fs.readFileSync(path.join(strategyDir, entry.name), 'utf-8');
|
|
65
|
+
sections.push(`### ${entry.name}\n${content}`);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
// Load roadmap and active_work
|
|
70
|
+
for (const docPath of docPaths) {
|
|
71
|
+
if (fs.existsSync(docPath)) {
|
|
72
|
+
const content = fs.readFileSync(docPath, 'utf-8');
|
|
73
|
+
const name = path.basename(docPath);
|
|
74
|
+
sections.push(`### ${name}\n${content}`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
const combined = sections.join('\n\n---\n\n');
|
|
78
|
+
if (combined.length > MAX_STRATEGIC_CONTEXT_CHARS) {
|
|
79
|
+
log.warn(TAG, `Strategic context truncated from ${(combined.length / 1024).toFixed(0)}KB to ${(MAX_STRATEGIC_CONTEXT_CHARS / 1024).toFixed(0)}KB to stay within LLM limits.`);
|
|
80
|
+
return combined.slice(0, MAX_STRATEGIC_CONTEXT_CHARS);
|
|
81
|
+
}
|
|
82
|
+
return combined;
|
|
83
|
+
}
|
|
84
|
+
// ─── Response parsing ───────────────────────────────────
|
|
85
|
+
export function parseAuditResponse(content) {
|
|
86
|
+
const match = content.match(/<audit_proposals>([\s\S]*?)<\/audit_proposals>/);
|
|
87
|
+
if (!match) {
|
|
88
|
+
throw new Error('[Totem Error] LLM response missing <audit_proposals> wrapper. Re-run or check prompt.');
|
|
89
|
+
}
|
|
90
|
+
let parsed;
|
|
91
|
+
try {
|
|
92
|
+
parsed = JSON.parse(match[1]);
|
|
93
|
+
}
|
|
94
|
+
catch {
|
|
95
|
+
throw new Error('[Totem Error] Failed to parse audit proposals as JSON.');
|
|
96
|
+
}
|
|
97
|
+
if (!Array.isArray(parsed)) {
|
|
98
|
+
throw new Error('[Totem Error] Audit proposals must be a JSON array.');
|
|
99
|
+
}
|
|
100
|
+
const VALID_TIERS = ['tier-1', 'tier-2', 'tier-3'];
|
|
101
|
+
return parsed.map((item, i) => {
|
|
102
|
+
if (typeof item.number !== 'number') {
|
|
103
|
+
throw new Error(`[Totem Error] Invalid or missing "number" for proposal ${i}.`);
|
|
104
|
+
}
|
|
105
|
+
const action = String(item.action ?? '').toUpperCase();
|
|
106
|
+
if (!VALID_ACTIONS.includes(action)) {
|
|
107
|
+
throw new Error(`[Totem Error] Invalid action "${item.action}" for proposal ${i}. Must be one of: ${VALID_ACTIONS.join(', ')}`);
|
|
108
|
+
}
|
|
109
|
+
if (action === 'MERGE' && typeof item.mergeInto !== 'number') {
|
|
110
|
+
throw new Error(`[Totem Error] Invalid or missing "mergeInto" for MERGE proposal ${i}.`);
|
|
111
|
+
}
|
|
112
|
+
if (action === 'REPRIORITIZE' &&
|
|
113
|
+
(typeof item.newTier !== 'string' || !VALID_TIERS.includes(item.newTier))) {
|
|
114
|
+
throw new Error(`[Totem Error] Invalid "newTier" for REPRIORITIZE proposal ${i}. Must be one of: ${VALID_TIERS.join(', ')}.`);
|
|
115
|
+
}
|
|
116
|
+
return {
|
|
117
|
+
number: item.number,
|
|
118
|
+
title: String(item.title ?? ''),
|
|
119
|
+
action,
|
|
120
|
+
newTier: item.newTier,
|
|
121
|
+
mergeInto: item.mergeInto,
|
|
122
|
+
rationale: String(item.rationale ?? ''),
|
|
123
|
+
};
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
// ─── Proposal display ───────────────────────────────────
|
|
127
|
+
const ACTION_LABELS = {
|
|
128
|
+
KEEP: 'KEEP',
|
|
129
|
+
CLOSE: 'CLOSE',
|
|
130
|
+
REPRIORITIZE: 'REPRI',
|
|
131
|
+
MERGE: 'MERGE',
|
|
132
|
+
};
|
|
133
|
+
export function formatProposalTable(proposals) {
|
|
134
|
+
const rows = proposals.map((p) => {
|
|
135
|
+
let detail = '';
|
|
136
|
+
if (p.action === 'REPRIORITIZE' && p.newTier)
|
|
137
|
+
detail = ` → ${p.newTier}`;
|
|
138
|
+
if (p.action === 'MERGE' && p.mergeInto)
|
|
139
|
+
detail = ` → #${p.mergeInto}`;
|
|
140
|
+
return `| #${p.number} | ${sanitize(p.title)} | ${ACTION_LABELS[p.action]}${detail} | ${sanitize(p.rationale)} |`;
|
|
141
|
+
});
|
|
142
|
+
return ['| Issue | Title | Action | Rationale |', '|---|---|---|---|', ...rows].join('\n');
|
|
143
|
+
}
|
|
144
|
+
// ─── Interactive approval ───────────────────────────────
|
|
145
|
+
/** Filter proposals to only actionable ones (not KEEP). */
|
|
146
|
+
function getActionableProposals(proposals) {
|
|
147
|
+
return proposals.filter((p) => p.action !== 'KEEP');
|
|
148
|
+
}
|
|
149
|
+
export async function selectProposals(proposals, opts) {
|
|
150
|
+
const actionable = getActionableProposals(proposals);
|
|
151
|
+
if (actionable.length === 0) {
|
|
152
|
+
log.info(TAG, 'No actionable proposals (all KEEP). Nothing to execute.');
|
|
153
|
+
return [];
|
|
154
|
+
}
|
|
155
|
+
if (opts.yes) {
|
|
156
|
+
return actionable;
|
|
157
|
+
}
|
|
158
|
+
if (!opts.isTTY) {
|
|
159
|
+
throw new Error('[Totem Error] Refusing to modify issues in non-interactive mode. Use --yes to bypass confirmation.');
|
|
160
|
+
}
|
|
161
|
+
const result = await multiselect({
|
|
162
|
+
message: `Select proposals to execute (${actionable.length} actionable):`,
|
|
163
|
+
options: actionable.map((p, i) => {
|
|
164
|
+
let label = `#${p.number} — ${ACTION_LABELS[p.action]}`;
|
|
165
|
+
if (p.action === 'REPRIORITIZE' && p.newTier)
|
|
166
|
+
label += ` → ${p.newTier}`;
|
|
167
|
+
if (p.action === 'MERGE' && p.mergeInto)
|
|
168
|
+
label += ` → #${p.mergeInto}`;
|
|
169
|
+
return {
|
|
170
|
+
value: i,
|
|
171
|
+
label,
|
|
172
|
+
hint: sanitize(p.rationale),
|
|
173
|
+
};
|
|
174
|
+
}),
|
|
175
|
+
initialValues: actionable.map((_, i) => i),
|
|
176
|
+
required: false,
|
|
177
|
+
});
|
|
178
|
+
if (isCancel(result)) {
|
|
179
|
+
log.warn(TAG, 'Cancelled. No changes made.');
|
|
180
|
+
return [];
|
|
181
|
+
}
|
|
182
|
+
return result.map((i) => actionable[i]);
|
|
183
|
+
}
|
|
184
|
+
// ─── Execution ──────────────────────────────────────────
|
|
185
|
+
/**
|
|
186
|
+
* Post a comment on an issue using --body-file to avoid shell injection.
|
|
187
|
+
* LLM-generated rationale text could contain shell metacharacters; writing
|
|
188
|
+
* to a temp file and using --body-file sidesteps this entirely.
|
|
189
|
+
*/
|
|
190
|
+
function ghComment(issueNumber, body, cwd) {
|
|
191
|
+
const tmpFile = path.join(os.tmpdir(), `totem-audit-comment-${crypto.randomUUID()}.md`); // totem-ignore — ephemeral temp file, deleted in finally block
|
|
192
|
+
try {
|
|
193
|
+
fs.writeFileSync(tmpFile, body, 'utf-8');
|
|
194
|
+
ghExec(['issue', 'comment', String(issueNumber), '--body-file', tmpFile], cwd);
|
|
195
|
+
}
|
|
196
|
+
finally {
|
|
197
|
+
try {
|
|
198
|
+
fs.unlinkSync(tmpFile);
|
|
199
|
+
}
|
|
200
|
+
catch {
|
|
201
|
+
// Best-effort cleanup
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Validate that all MERGE targets reference issues that exist in the backlog.
|
|
207
|
+
*/
|
|
208
|
+
export function validateMergeTargets(proposals, issueNumbers) {
|
|
209
|
+
const errors = [];
|
|
210
|
+
for (const p of proposals) {
|
|
211
|
+
if (p.action === 'MERGE' && p.mergeInto && !issueNumbers.has(p.mergeInto)) {
|
|
212
|
+
errors.push(`#${p.number} proposes MERGE into #${p.mergeInto} which is not in the backlog`);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
return errors;
|
|
216
|
+
}
|
|
217
|
+
export function executeProposals(proposals, cwd) {
|
|
218
|
+
const result = { succeeded: 0, failed: 0, errors: [] };
|
|
219
|
+
for (const p of proposals) {
|
|
220
|
+
try {
|
|
221
|
+
switch (p.action) {
|
|
222
|
+
case 'CLOSE': {
|
|
223
|
+
ghComment(p.number, `Closed via \`totem audit\` — ${p.rationale}`, cwd);
|
|
224
|
+
ghExec(['issue', 'close', String(p.number)], cwd);
|
|
225
|
+
log.success(TAG, `Closed #${p.number}`);
|
|
226
|
+
result.succeeded++;
|
|
227
|
+
break;
|
|
228
|
+
}
|
|
229
|
+
case 'REPRIORITIZE': {
|
|
230
|
+
if (!p.newTier) {
|
|
231
|
+
const msg = `REPRIORITIZE proposal for #${p.number} missing newTier`;
|
|
232
|
+
log.warn(TAG, msg);
|
|
233
|
+
result.failed++;
|
|
234
|
+
result.errors.push(msg);
|
|
235
|
+
break;
|
|
236
|
+
}
|
|
237
|
+
const removals = ['tier-1', 'tier-2', 'tier-3']
|
|
238
|
+
.filter((t) => t !== p.newTier)
|
|
239
|
+
.flatMap((t) => ['--remove-label', t]);
|
|
240
|
+
ghExec(['issue', 'edit', String(p.number), '--add-label', p.newTier, ...removals], cwd);
|
|
241
|
+
ghComment(p.number, `Reprioritized to ${p.newTier} via \`totem audit\` — ${p.rationale}`, cwd);
|
|
242
|
+
log.success(TAG, `Reprioritized #${p.number} → ${p.newTier}`);
|
|
243
|
+
result.succeeded++;
|
|
244
|
+
break;
|
|
245
|
+
}
|
|
246
|
+
case 'MERGE': {
|
|
247
|
+
if (!p.mergeInto) {
|
|
248
|
+
const msg = `MERGE proposal for #${p.number} missing mergeInto`;
|
|
249
|
+
log.warn(TAG, msg);
|
|
250
|
+
result.failed++;
|
|
251
|
+
result.errors.push(msg);
|
|
252
|
+
break;
|
|
253
|
+
}
|
|
254
|
+
ghComment(p.number, `Merged into #${p.mergeInto} via \`totem audit\` — ${p.rationale}`, cwd);
|
|
255
|
+
ghExec(['issue', 'close', String(p.number), '--reason', 'not planned'], cwd);
|
|
256
|
+
ghComment(p.mergeInto, `#${p.number} merged into this issue via \`totem audit\`.`, cwd);
|
|
257
|
+
log.success(TAG, `Merged #${p.number} → #${p.mergeInto}`);
|
|
258
|
+
result.succeeded++;
|
|
259
|
+
break;
|
|
260
|
+
}
|
|
261
|
+
case 'KEEP':
|
|
262
|
+
break;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
catch (err) {
|
|
266
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
267
|
+
log.error('Totem Error', `Failed to execute proposal for #${p.number}: ${sanitize(msg)}`); // totem-ignore — sanitize wraps error
|
|
268
|
+
result.failed++;
|
|
269
|
+
result.errors.push(`#${p.number}: ${msg}`);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
return result;
|
|
273
|
+
}
|
|
274
|
+
// ─── Prompt assembly ────────────────────────────────────
|
|
275
|
+
export function formatIssueInventory(issues) {
|
|
276
|
+
const rows = issues.map((i) => {
|
|
277
|
+
const labels = i.labels.join(', ') || '(none)';
|
|
278
|
+
const updated = i.updatedAt.slice(0, 10);
|
|
279
|
+
return `| #${i.number} | ${i.title} | ${labels} | ${updated} |`;
|
|
280
|
+
});
|
|
281
|
+
return ['| Issue | Title | Labels | Updated |', '|---|---|---|---|', ...rows].join('\n');
|
|
282
|
+
}
|
|
283
|
+
function assemblePrompt(issues, strategicContext, systemPrompt, userContext) {
|
|
284
|
+
const sections = [systemPrompt];
|
|
285
|
+
// Issue inventory
|
|
286
|
+
sections.push('=== OPEN ISSUES ===');
|
|
287
|
+
sections.push(`Total: ${issues.length} open issues\n`);
|
|
288
|
+
sections.push(wrapXml('issue_list', formatIssueInventory(issues)));
|
|
289
|
+
// Strategic context
|
|
290
|
+
if (strategicContext) {
|
|
291
|
+
sections.push('\n=== STRATEGIC CONTEXT ===');
|
|
292
|
+
sections.push(wrapXml('strategic_docs', strategicContext));
|
|
293
|
+
}
|
|
294
|
+
// User-supplied context (--context flag)
|
|
295
|
+
if (userContext) {
|
|
296
|
+
sections.push('\n=== AUDIT LENS ===');
|
|
297
|
+
sections.push('The user has provided the following strategic lens for this audit. Weight your proposals accordingly:');
|
|
298
|
+
sections.push(wrapXml('user_context', userContext));
|
|
299
|
+
}
|
|
300
|
+
return sections.join('\n');
|
|
301
|
+
}
|
|
302
|
+
// ─── Main command ───────────────────────────────────────
|
|
303
|
+
export async function auditCommand(options) {
|
|
304
|
+
const cwd = process.cwd();
|
|
305
|
+
const configPath = resolveConfigPath(cwd);
|
|
306
|
+
loadEnv(cwd);
|
|
307
|
+
const config = await loadConfig(configPath);
|
|
308
|
+
// Fetch open issues
|
|
309
|
+
log.info(TAG, 'Fetching open issues...');
|
|
310
|
+
const adapter = new GitHubCliAdapter(cwd);
|
|
311
|
+
const issues = adapter.fetchOpenIssues(GH_ISSUE_LIMIT);
|
|
312
|
+
if (issues.length === 0) {
|
|
313
|
+
log.warn(TAG, 'No open issues found. Nothing to audit.');
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
log.info(TAG, `Found ${issues.length} open issues.`);
|
|
317
|
+
// Load strategic context
|
|
318
|
+
log.info(TAG, 'Loading strategic context...');
|
|
319
|
+
const strategicContext = loadStrategicDocs(cwd);
|
|
320
|
+
log.dim(TAG, `Strategic context: ${(strategicContext.length / 1024).toFixed(0)}KB`);
|
|
321
|
+
// Resolve system prompt (allow .totem/prompts/audit.md override)
|
|
322
|
+
const systemPrompt = getSystemPrompt('audit', SYSTEM_PROMPT, cwd, config.totemDir);
|
|
323
|
+
// Assemble prompt
|
|
324
|
+
const prompt = assemblePrompt(issues, strategicContext, systemPrompt, options.context);
|
|
325
|
+
log.dim(TAG, `Prompt: ${(prompt.length / 1024).toFixed(0)}KB`);
|
|
326
|
+
const content = await runOrchestrator({
|
|
327
|
+
prompt,
|
|
328
|
+
tag: TAG,
|
|
329
|
+
options,
|
|
330
|
+
config,
|
|
331
|
+
cwd,
|
|
332
|
+
totalResults: issues.length,
|
|
333
|
+
});
|
|
334
|
+
if (content == null)
|
|
335
|
+
return;
|
|
336
|
+
// --raw or --out without interactive: just write and exit
|
|
337
|
+
if (options.out && !options.dryRun) {
|
|
338
|
+
writeOutput(content, options.out);
|
|
339
|
+
log.success(TAG, `Written to ${options.out}`);
|
|
340
|
+
}
|
|
341
|
+
// Parse proposals
|
|
342
|
+
let proposals;
|
|
343
|
+
try {
|
|
344
|
+
proposals = parseAuditResponse(content);
|
|
345
|
+
}
|
|
346
|
+
catch (err) {
|
|
347
|
+
// If parsing fails, output raw content so user can see what the LLM produced
|
|
348
|
+
writeOutput(content);
|
|
349
|
+
throw err;
|
|
350
|
+
}
|
|
351
|
+
log.info(TAG, `${proposals.length} proposals parsed.`);
|
|
352
|
+
// Display table
|
|
353
|
+
const table = formatProposalTable(proposals);
|
|
354
|
+
writeOutput(`\n${table}\n`);
|
|
355
|
+
const actionable = getActionableProposals(proposals);
|
|
356
|
+
const closes = proposals.filter((p) => p.action === 'CLOSE').length;
|
|
357
|
+
const repris = proposals.filter((p) => p.action === 'REPRIORITIZE').length;
|
|
358
|
+
const merges = proposals.filter((p) => p.action === 'MERGE').length;
|
|
359
|
+
const keeps = proposals.filter((p) => p.action === 'KEEP').length;
|
|
360
|
+
log.info(TAG, `Summary: ${keeps} KEEP, ${closes} CLOSE, ${repris} REPRIORITIZE, ${merges} MERGE`);
|
|
361
|
+
// Dry-run: stop here
|
|
362
|
+
if (options.dryRun) {
|
|
363
|
+
log.info(TAG, 'Dry run — no changes made.');
|
|
364
|
+
return;
|
|
365
|
+
}
|
|
366
|
+
if (actionable.length === 0) {
|
|
367
|
+
log.info(TAG, 'No actionable proposals. Backlog looks healthy.');
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
370
|
+
// Interactive approval
|
|
371
|
+
let selected = await selectProposals(proposals, {
|
|
372
|
+
yes: options.yes,
|
|
373
|
+
isTTY: !!process.stdin.isTTY,
|
|
374
|
+
});
|
|
375
|
+
if (selected.length === 0) {
|
|
376
|
+
log.info(TAG, 'No proposals selected. No changes made.');
|
|
377
|
+
return;
|
|
378
|
+
}
|
|
379
|
+
// Validate merge targets — filter out invalid ones
|
|
380
|
+
const issueNumbers = new Set(issues.map((i) => i.number));
|
|
381
|
+
const mergeErrors = validateMergeTargets(selected, issueNumbers);
|
|
382
|
+
if (mergeErrors.length > 0) {
|
|
383
|
+
for (const err of mergeErrors) {
|
|
384
|
+
log.warn(TAG, `Invalid merge target: ${err}`); // totem-ignore — err is our own validation string, not an Error object
|
|
385
|
+
}
|
|
386
|
+
selected = selected.filter((p) => !(p.action === 'MERGE' && p.mergeInto && !issueNumbers.has(p.mergeInto)));
|
|
387
|
+
if (selected.length === 0) {
|
|
388
|
+
log.info(TAG, 'No valid proposals remaining after filtering. No changes made.');
|
|
389
|
+
return;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
// Execute
|
|
393
|
+
log.info(TAG, `Executing ${selected.length} proposal(s)...`);
|
|
394
|
+
const result = executeProposals(selected, cwd);
|
|
395
|
+
if (result.failed > 0) {
|
|
396
|
+
log.warn(TAG, `${result.failed} proposal(s) failed. See errors above.`); // totem-ignore — result is our own counter
|
|
397
|
+
}
|
|
398
|
+
log.success(TAG, `Done — ${result.succeeded} issue(s) updated.`); // totem-ignore — result is our own counter
|
|
399
|
+
}
|
|
400
|
+
//# sourceMappingURL=audit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../src/commands/audit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI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