@mmnto/cli 0.13.0 → 0.15.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/github-cli.d.ts +9 -0
- package/dist/adapters/github-cli.d.ts.map +1 -1
- package/dist/adapters/github-cli.js +34 -0
- package/dist/adapters/github-cli.js.map +1 -1
- package/dist/assets/universal-lessons.d.ts +9 -0
- package/dist/assets/universal-lessons.d.ts.map +1 -0
- package/dist/assets/universal-lessons.js +71 -0
- package/dist/assets/universal-lessons.js.map +1 -0
- package/dist/commands/briefing.d.ts.map +1 -1
- package/dist/commands/briefing.js +3 -2
- package/dist/commands/briefing.js.map +1 -1
- package/dist/commands/docs.d.ts +11 -0
- package/dist/commands/docs.d.ts.map +1 -0
- package/dist/commands/docs.js +210 -0
- package/dist/commands/docs.js.map +1 -0
- package/dist/commands/docs.test.d.ts +2 -0
- package/dist/commands/docs.test.d.ts.map +1 -0
- package/dist/commands/docs.test.js +188 -0
- package/dist/commands/docs.test.js.map +1 -0
- package/dist/commands/extract.d.ts.map +1 -1
- package/dist/commands/extract.js +3 -2
- package/dist/commands/extract.js.map +1 -1
- package/dist/commands/init.d.ts +16 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +107 -28
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/init.test.js +175 -1
- package/dist/commands/init.test.js.map +1 -1
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/search.js +3 -2
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/shield.d.ts.map +1 -1
- package/dist/commands/shield.js +3 -2
- package/dist/commands/shield.js.map +1 -1
- package/dist/commands/spec.d.ts.map +1 -1
- package/dist/commands/spec.js +3 -2
- package/dist/commands/spec.js.map +1 -1
- package/dist/commands/stats.d.ts.map +1 -1
- package/dist/commands/stats.js +3 -2
- package/dist/commands/stats.js.map +1 -1
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +2 -1
- package/dist/commands/sync.js.map +1 -1
- package/dist/commands/triage.d.ts.map +1 -1
- package/dist/commands/triage.js +3 -2
- package/dist/commands/triage.js.map +1 -1
- package/dist/commands/wrap.d.ts.map +1 -1
- package/dist/commands/wrap.js +23 -4
- package/dist/commands/wrap.js.map +1 -1
- package/dist/commands/wrap.test.js +30 -2
- package/dist/commands/wrap.test.js.map +1 -1
- package/dist/git.d.ts +19 -0
- package/dist/git.d.ts.map +1 -1
- package/dist/git.js +72 -0
- package/dist/git.js.map +1 -1
- package/dist/git.test.d.ts +2 -0
- package/dist/git.test.d.ts.map +1 -0
- package/dist/git.test.js +74 -0
- package/dist/git.test.js.map +1 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -1
- package/dist/utils.d.ts +6 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +39 -0
- package/dist/utils.js.map +1 -1
- package/dist/utils.test.js +83 -1
- package/dist/utils.test.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import type { IssueAdapter, StandardIssue, StandardIssueListItem } from './issue-adapter.js';
|
|
2
|
+
export interface ClosedIssueListItem {
|
|
3
|
+
number: number;
|
|
4
|
+
title: string;
|
|
5
|
+
closedAt: string;
|
|
6
|
+
}
|
|
2
7
|
export declare class GitHubCliAdapter implements IssueAdapter {
|
|
3
8
|
private cwd;
|
|
4
9
|
constructor(cwd: string);
|
|
5
10
|
fetchIssue(issueNumber: number): StandardIssue;
|
|
11
|
+
/**
|
|
12
|
+
* Fetch recently closed issues, optionally filtered by search query (e.g., "closed:>2026-01-01").
|
|
13
|
+
*/
|
|
14
|
+
fetchClosedIssues(limit?: number, sinceTag?: string): ClosedIssueListItem[];
|
|
6
15
|
fetchOpenIssues(limit?: number): StandardIssueListItem[];
|
|
7
16
|
}
|
|
8
17
|
//# sourceMappingURL=github-cli.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-cli.d.ts","sourceRoot":"","sources":["../../src/adapters/github-cli.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"github-cli.d.ts","sourceRoot":"","sources":["../../src/adapters/github-cli.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE7F,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB;AA6BD,qBAAa,gBAAiB,YAAW,YAAY;IACvC,OAAO,CAAC,GAAG;gBAAH,GAAG,EAAE,MAAM;IAE/B,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,aAAa;IAgB9C;;OAEG;IACH,iBAAiB,CAAC,KAAK,GAAE,MAA4B,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,mBAAmB,EAAE;IAiChG,eAAe,CAAC,KAAK,GAAE,MAA4B,GAAG,qBAAqB,EAAE;CAuB9E"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { getTagDate } from '../git.js';
|
|
2
3
|
import { ghFetchAndParse } from './gh-utils.js';
|
|
3
4
|
// ─── Zod schemas for GitHub CLI JSON output ─────────────
|
|
4
5
|
const GhIssueSchema = z.object({
|
|
@@ -14,6 +15,11 @@ const GhIssueListItemSchema = z.object({
|
|
|
14
15
|
labels: z.array(z.object({ name: z.string() })),
|
|
15
16
|
updatedAt: z.string().datetime(),
|
|
16
17
|
});
|
|
18
|
+
const GhClosedIssueListItemSchema = z.object({
|
|
19
|
+
number: z.number(),
|
|
20
|
+
title: z.string(),
|
|
21
|
+
closedAt: z.string().datetime(),
|
|
22
|
+
});
|
|
17
23
|
// ─── Adapter implementation ─────────────────────────────
|
|
18
24
|
const DEFAULT_ISSUE_LIMIT = 100;
|
|
19
25
|
export class GitHubCliAdapter {
|
|
@@ -31,6 +37,34 @@ export class GitHubCliAdapter {
|
|
|
31
37
|
labels: issue.labels.map((l) => l.name),
|
|
32
38
|
};
|
|
33
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* Fetch recently closed issues, optionally filtered by search query (e.g., "closed:>2026-01-01").
|
|
42
|
+
*/
|
|
43
|
+
fetchClosedIssues(limit = DEFAULT_ISSUE_LIMIT, sinceTag) {
|
|
44
|
+
const args = [
|
|
45
|
+
'issue',
|
|
46
|
+
'list',
|
|
47
|
+
'--state',
|
|
48
|
+
'closed',
|
|
49
|
+
'--json',
|
|
50
|
+
'number,title,closedAt',
|
|
51
|
+
'--limit',
|
|
52
|
+
String(limit),
|
|
53
|
+
];
|
|
54
|
+
// If we have a tag, use --search to filter by close date
|
|
55
|
+
if (sinceTag) {
|
|
56
|
+
const tagDate = getTagDate(this.cwd, sinceTag);
|
|
57
|
+
if (tagDate) {
|
|
58
|
+
args.push('--search', `closed:>=${tagDate}`);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
const issues = ghFetchAndParse(args, z.array(GhClosedIssueListItemSchema), 'closed issues', this.cwd);
|
|
62
|
+
return issues.map((i) => ({
|
|
63
|
+
number: i.number,
|
|
64
|
+
title: i.title,
|
|
65
|
+
closedAt: i.closedAt,
|
|
66
|
+
}));
|
|
67
|
+
}
|
|
34
68
|
fetchOpenIssues(limit = DEFAULT_ISSUE_LIMIT) {
|
|
35
69
|
const issues = ghFetchAndParse([
|
|
36
70
|
'issue',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-cli.js","sourceRoot":"","sources":["../../src/adapters/github-cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"github-cli.js","sourceRoot":"","sources":["../../src/adapters/github-cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;A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AQ,EAAE,CAAC,CAAC,QAAQ;SACrB,CAAC,CAAC,CAAC;IACN,CAAC;IAED,eAAe,CAAC,QAAgB,mBAAmB;QACjD,MAAM,MAAM,GAAG,eAAe,CAC5B;YACE,OAAO;YACP,MAAM;YACN,SAAS;YACT,MAAM;YACN,QAAQ;YACR,+BAA+B;YAC/B,SAAS;YACT,MAAM,CAAC,KAAK,CAAC;SACd,EACD,CAAC,CAAC,KAAK,CAAC,qBAAqB,CAAC,EAC9B,aAAa,EACb,IAAI,CAAC,GAAG,CACT,CAAC;QACF,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACxB,MAAM,EAAE,CAAC,CAAC,MAAM;YAChB,KAAK,EAAE,CAAC,CAAC,KAAK;YACd,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;YACnC,SAAS,EAAE,CAAC,CAAC,SAAS;SACvB,CAAC,CAAC,CAAC;IACN,CAAC;CACF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Universal AI Developer Baseline — curated lessons installed during `totem init`.
|
|
3
|
+
*
|
|
4
|
+
* These lessons provide immediate Day-1 value for any AI-assisted project.
|
|
5
|
+
* Format matches what `add_lesson` produces so the markdown chunker indexes them correctly.
|
|
6
|
+
*/
|
|
7
|
+
export declare const BASELINE_MARKER = "<!-- totem:baseline -->";
|
|
8
|
+
export declare const UNIVERSAL_LESSONS_MARKDOWN = "\n<!-- totem:baseline -->\n\n## Lesson \u2014 Prompt Injection Prevention\n\n**Tags:** security, prompt-injection, trap\n\nNever trust raw text from external sources (PR comments, issue bodies, user input) when feeding it to an AI agent. Always sanitize or escape untrusted content before persisting it to memory files or passing it as context. Indirect prompt injection can cause agents to execute unintended actions.\n\n## Lesson \u2014 Secret Management\n\n**Tags:** security, secrets, trap\n\nNever commit API keys, tokens, or credentials to version control \u2014 even in `.env.example` files. Use environment variables loaded at runtime. If a secret is accidentally committed, rotate it immediately; removing it from git history alone is not sufficient.\n\n## Lesson \u2014 AI Hallucination Traps\n\n**Tags:** ai-behavior, hallucination, trap\n\nAI agents will confidently reference APIs, functions, database tables, and configuration options that do not exist. Always verify AI-generated code against the actual codebase and documentation before merging. Prefer semantic search over asking the agent to \"remember\" prior context.\n\n## Lesson \u2014 Scope Creep Prevention\n\n**Tags:** ai-behavior, scope-creep, architecture\n\nWhen an AI agent proposes a \"small improvement\" or \"quick refactor\" alongside the requested change, reject it. Unrelated changes in the same commit obscure code review diffs, introduce untested side effects, and make git bisect useless.\n\n## Lesson \u2014 Dependency Verification\n\n**Tags:** architecture, dependencies, trap\n\nBefore an AI agent adds a new dependency, verify it exists, is actively maintained, and matches your project's license. AI agents frequently hallucinate package names or suggest deprecated libraries. Check the npm/PyPI registry directly.\n\n## Lesson \u2014 Meaningful Test Assertions\n\n**Tags:** testing, ai-behavior, trap\n\nAI-generated tests often pass trivially \u2014 asserting that a mock returns the value it was told to return, or testing implementation details rather than behavior. Review test assertions for meaningful coverage: does the test fail when the feature breaks?\n\n## Lesson \u2014 No Empty Catch Blocks\n\n**Tags:** architecture, error-handling, design-decision\n\nCatch blocks should never be empty. At minimum, log the error or re-throw with added context. Silent failures cause cascading bugs that are extremely difficult to diagnose. If an error truly can be ignored, add a comment explaining why.\n\n## Lesson \u2014 Shell Injection Prevention\n\n**Tags:** security, shell, trap\n\nNever interpolate user-controlled strings directly into shell commands. Use parameterized APIs or write inputs to temp files. This applies to CI/CD pipelines (GitHub Actions `run:` blocks), CLI tools, and any code that calls `exec` or `spawn`.\n\n## Lesson \u2014 Context Window Management\n\n**Tags:** ai-behavior, context-window, design-decision\n\nWhen an AI agent's context window fills up, it loses earlier instructions and begins contradicting its own prior outputs. Break long tasks into smaller, well-scoped steps. Use handoff artifacts (like `totem bridge` or `totem handoff`) to preserve context across session boundaries.\n\n## Lesson \u2014 Idempotent Scaffolding\n\n**Tags:** architecture, idempotency, design-decision\n\nScaffolding commands (init, setup, install) must be idempotent \u2014 running them twice should not duplicate content, overwrite user changes, or corrupt state. Always check for existing files/content before writing, and use markers to detect prior runs.\n";
|
|
9
|
+
//# sourceMappingURL=universal-lessons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"universal-lessons.d.ts","sourceRoot":"","sources":["../../src/assets/universal-lessons.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,eAAe,4BAA4B,CAAC;AAEzD,eAAO,MAAM,0BAA0B,0/GA8DtC,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Universal AI Developer Baseline — curated lessons installed during `totem init`.
|
|
3
|
+
*
|
|
4
|
+
* These lessons provide immediate Day-1 value for any AI-assisted project.
|
|
5
|
+
* Format matches what `add_lesson` produces so the markdown chunker indexes them correctly.
|
|
6
|
+
*/
|
|
7
|
+
export const BASELINE_MARKER = '<!-- totem:baseline -->';
|
|
8
|
+
export const UNIVERSAL_LESSONS_MARKDOWN = `
|
|
9
|
+
${BASELINE_MARKER}
|
|
10
|
+
|
|
11
|
+
## Lesson — Prompt Injection Prevention
|
|
12
|
+
|
|
13
|
+
**Tags:** security, prompt-injection, trap
|
|
14
|
+
|
|
15
|
+
Never trust raw text from external sources (PR comments, issue bodies, user input) when feeding it to an AI agent. Always sanitize or escape untrusted content before persisting it to memory files or passing it as context. Indirect prompt injection can cause agents to execute unintended actions.
|
|
16
|
+
|
|
17
|
+
## Lesson — Secret Management
|
|
18
|
+
|
|
19
|
+
**Tags:** security, secrets, trap
|
|
20
|
+
|
|
21
|
+
Never commit API keys, tokens, or credentials to version control — even in \`.env.example\` files. Use environment variables loaded at runtime. If a secret is accidentally committed, rotate it immediately; removing it from git history alone is not sufficient.
|
|
22
|
+
|
|
23
|
+
## Lesson — AI Hallucination Traps
|
|
24
|
+
|
|
25
|
+
**Tags:** ai-behavior, hallucination, trap
|
|
26
|
+
|
|
27
|
+
AI agents will confidently reference APIs, functions, database tables, and configuration options that do not exist. Always verify AI-generated code against the actual codebase and documentation before merging. Prefer semantic search over asking the agent to "remember" prior context.
|
|
28
|
+
|
|
29
|
+
## Lesson — Scope Creep Prevention
|
|
30
|
+
|
|
31
|
+
**Tags:** ai-behavior, scope-creep, architecture
|
|
32
|
+
|
|
33
|
+
When an AI agent proposes a "small improvement" or "quick refactor" alongside the requested change, reject it. Unrelated changes in the same commit obscure code review diffs, introduce untested side effects, and make git bisect useless.
|
|
34
|
+
|
|
35
|
+
## Lesson — Dependency Verification
|
|
36
|
+
|
|
37
|
+
**Tags:** architecture, dependencies, trap
|
|
38
|
+
|
|
39
|
+
Before an AI agent adds a new dependency, verify it exists, is actively maintained, and matches your project's license. AI agents frequently hallucinate package names or suggest deprecated libraries. Check the npm/PyPI registry directly.
|
|
40
|
+
|
|
41
|
+
## Lesson — Meaningful Test Assertions
|
|
42
|
+
|
|
43
|
+
**Tags:** testing, ai-behavior, trap
|
|
44
|
+
|
|
45
|
+
AI-generated tests often pass trivially — asserting that a mock returns the value it was told to return, or testing implementation details rather than behavior. Review test assertions for meaningful coverage: does the test fail when the feature breaks?
|
|
46
|
+
|
|
47
|
+
## Lesson — No Empty Catch Blocks
|
|
48
|
+
|
|
49
|
+
**Tags:** architecture, error-handling, design-decision
|
|
50
|
+
|
|
51
|
+
Catch blocks should never be empty. At minimum, log the error or re-throw with added context. Silent failures cause cascading bugs that are extremely difficult to diagnose. If an error truly can be ignored, add a comment explaining why.
|
|
52
|
+
|
|
53
|
+
## Lesson — Shell Injection Prevention
|
|
54
|
+
|
|
55
|
+
**Tags:** security, shell, trap
|
|
56
|
+
|
|
57
|
+
Never interpolate user-controlled strings directly into shell commands. Use parameterized APIs or write inputs to temp files. This applies to CI/CD pipelines (GitHub Actions \`run:\` blocks), CLI tools, and any code that calls \`exec\` or \`spawn\`.
|
|
58
|
+
|
|
59
|
+
## Lesson — Context Window Management
|
|
60
|
+
|
|
61
|
+
**Tags:** ai-behavior, context-window, design-decision
|
|
62
|
+
|
|
63
|
+
When an AI agent's context window fills up, it loses earlier instructions and begins contradicting its own prior outputs. Break long tasks into smaller, well-scoped steps. Use handoff artifacts (like \`totem bridge\` or \`totem handoff\`) to preserve context across session boundaries.
|
|
64
|
+
|
|
65
|
+
## Lesson — Idempotent Scaffolding
|
|
66
|
+
|
|
67
|
+
**Tags:** architecture, idempotency, design-decision
|
|
68
|
+
|
|
69
|
+
Scaffolding commands (init, setup, install) must be idempotent — running them twice should not duplicate content, overwrite user changes, or corrupt state. Always check for existing files/content before writing, and use markers to detect prior runs.
|
|
70
|
+
`;
|
|
71
|
+
//# sourceMappingURL=universal-lessons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"universal-lessons.js","sourceRoot":"","sources":["../../src/assets/universal-lessons.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,yBAAyB,CAAC;AAEzD,MAAM,CAAC,MAAM,0BAA0B,GAAG;EACxC,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6DhB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"briefing.d.ts","sourceRoot":"","sources":["../../src/commands/briefing.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"briefing.d.ts","sourceRoot":"","sources":["../../src/commands/briefing.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AA4EpE,wBAAgB,YAAY,CAAC,GAAG,EAAE,kBAAkB,EAAE,GAAG,MAAM,CAG9D;AAqCD,MAAM,WAAW,eAAe;IAC9B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,wBAAsB,eAAe,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CA2C7E"}
|
|
@@ -3,7 +3,7 @@ import { createEmbedder, LanceStore } from '@mmnto/totem';
|
|
|
3
3
|
import { GitHubCliPrAdapter } from '../adapters/github-cli-pr.js';
|
|
4
4
|
import { getGitBranch, getGitStatus } from '../git.js';
|
|
5
5
|
import { log } from '../ui.js';
|
|
6
|
-
import { formatResults, getSystemPrompt, loadConfig, loadEnv, resolveConfigPath, runOrchestrator, wrapXml, writeOutput, } from '../utils.js';
|
|
6
|
+
import { formatResults, getSystemPrompt, loadConfig, loadEnv, requireEmbedding, resolveConfigPath, runOrchestrator, wrapXml, writeOutput, } from '../utils.js';
|
|
7
7
|
// ─── Constants ──────────────────────────────────────────
|
|
8
8
|
const TAG = 'Briefing';
|
|
9
9
|
const MAX_SPEC_RESULTS = 5;
|
|
@@ -91,7 +91,8 @@ export async function briefingCommand(options) {
|
|
|
91
91
|
const prs = adapter.fetchOpenPRs();
|
|
92
92
|
log.info(TAG, `Found ${prs.length} open PRs.`);
|
|
93
93
|
// Connect to LanceDB
|
|
94
|
-
const
|
|
94
|
+
const embedding = requireEmbedding(config);
|
|
95
|
+
const embedder = createEmbedder(embedding);
|
|
95
96
|
const store = new LanceStore(path.join(cwd, config.lanceDir), embedder);
|
|
96
97
|
await store.connect();
|
|
97
98
|
// Retrieve context from LanceDB
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"briefing.js","sourceRoot":"","sources":["../../src/commands/briefing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAGlC,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,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,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,WAAW,CAAC,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAE/D,MAAM,OAAO,GAAG,eAAe,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,YAAY,EAAE,CAAC,CAAC;IAC1F,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC;QACpB,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;QAClC,IAAI,OAAO,CAAC,GAAG;YAAE,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,cAAc,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IACjE,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface DocsOptions {
|
|
2
|
+
raw?: boolean;
|
|
3
|
+
out?: string;
|
|
4
|
+
model?: string;
|
|
5
|
+
fresh?: boolean;
|
|
6
|
+
only?: string;
|
|
7
|
+
dryRun?: boolean;
|
|
8
|
+
yes?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function docsCommand(options: DocsOptions): Promise<void>;
|
|
11
|
+
//# sourceMappingURL=docs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/commands/docs.ts"],"names":[],"mappings":"AA8JA,MAAM,WAAW,WAAW;IAC1B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,wBAAsB,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAoHrE"}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import * as fs from 'node:fs';
|
|
2
|
+
import * as path from 'node:path';
|
|
3
|
+
import { GitHubCliAdapter } from '../adapters/github-cli.js';
|
|
4
|
+
import { getGitLogSince, getLatestTag, isFileDirty } from '../git.js';
|
|
5
|
+
import { log } from '../ui.js';
|
|
6
|
+
import { getSystemPrompt, loadConfig, loadEnv, resolveConfigPath, runOrchestrator, wrapXml, writeOutput, } from '../utils.js';
|
|
7
|
+
// ─── Constants ──────────────────────────────────────────
|
|
8
|
+
const TAG = 'Docs';
|
|
9
|
+
const MAX_DOC_CHARS = 80_000;
|
|
10
|
+
const MAX_LOG_CHARS = 20_000;
|
|
11
|
+
const GH_CLOSED_ISSUE_LIMIT = 50;
|
|
12
|
+
// ─── System prompt ──────────────────────────────────────
|
|
13
|
+
const SYSTEM_PROMPT = `# Docs System Prompt — Automated Documentation Sync
|
|
14
|
+
|
|
15
|
+
## Identity & Role
|
|
16
|
+
You are a meticulous Technical Writer responsible for keeping project documentation accurate and up-to-date. You rewrite documentation files to reflect the latest project state.
|
|
17
|
+
|
|
18
|
+
## Core Mission
|
|
19
|
+
Given a documentation file, its purpose, and recent project changes (git log, closed issues), produce an updated version of the entire file that accurately reflects the current state.
|
|
20
|
+
|
|
21
|
+
## Critical Rules
|
|
22
|
+
- **Full Rewrite:** Output the ENTIRE updated file content — not a diff, not a patch, the complete file.
|
|
23
|
+
- **Preserve Structure:** Maintain the existing document's structure, tone, and formatting conventions unless changes require restructuring.
|
|
24
|
+
- **Evidence-Based:** Only update information that is supported by the provided git log, closed issues, or active work context. Do NOT invent features or status changes.
|
|
25
|
+
- **Phase Numbering:** If the document references phases, use ONLY the phase numbering from the provided active_work.md context. Do NOT change or renumber phases.
|
|
26
|
+
- **Conservative Updates:** When in doubt, keep the existing text. Only change what the evidence supports.
|
|
27
|
+
- **No Preamble:** Output ONLY the updated file content. No commentary, no explanation, no markdown code fences wrapping the output.
|
|
28
|
+
`;
|
|
29
|
+
function gatherReleaseContext(cwd) {
|
|
30
|
+
const tag = getLatestTag(cwd);
|
|
31
|
+
const gitLog = getGitLogSince(cwd, tag ?? undefined);
|
|
32
|
+
let closedIssues = '';
|
|
33
|
+
try {
|
|
34
|
+
const adapter = new GitHubCliAdapter(cwd);
|
|
35
|
+
const issues = adapter.fetchClosedIssues(GH_CLOSED_ISSUE_LIMIT, tag ?? undefined);
|
|
36
|
+
if (issues.length > 0) {
|
|
37
|
+
closedIssues = issues
|
|
38
|
+
.map((i) => `#${i.number} — ${i.title} (closed ${i.closedAt?.slice(0, 10) ?? 'unknown'})`)
|
|
39
|
+
.join('\n');
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
log.dim(TAG, 'Could not fetch closed issues (gh CLI unavailable or no remote).');
|
|
44
|
+
}
|
|
45
|
+
return { tag, gitLog, closedIssues };
|
|
46
|
+
}
|
|
47
|
+
// ─── Prompt assembly ────────────────────────────────────
|
|
48
|
+
function assemblePrompt(doc, currentContent, releaseContext, activeWork, systemPrompt) {
|
|
49
|
+
const sections = [systemPrompt];
|
|
50
|
+
// Document metadata
|
|
51
|
+
sections.push('=== DOCUMENT TO UPDATE ===');
|
|
52
|
+
sections.push(`Path: ${doc.path}`);
|
|
53
|
+
sections.push(`Purpose: ${doc.description}`);
|
|
54
|
+
sections.push('');
|
|
55
|
+
// Current content
|
|
56
|
+
const truncatedContent = currentContent.length > MAX_DOC_CHARS
|
|
57
|
+
? currentContent.slice(0, MAX_DOC_CHARS) + '\n... [truncated] ...'
|
|
58
|
+
: currentContent;
|
|
59
|
+
sections.push(wrapXml('current_document', truncatedContent));
|
|
60
|
+
// Release context
|
|
61
|
+
sections.push('\n=== CHANGES SINCE LAST RELEASE ===');
|
|
62
|
+
if (releaseContext.tag) {
|
|
63
|
+
sections.push(`Last release tag: ${releaseContext.tag}`);
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
sections.push('No release tags found — showing recent commits.');
|
|
67
|
+
}
|
|
68
|
+
if (releaseContext.gitLog) {
|
|
69
|
+
const truncatedLog = releaseContext.gitLog.length > MAX_LOG_CHARS
|
|
70
|
+
? releaseContext.gitLog.slice(0, MAX_LOG_CHARS) + '\n... [truncated] ...'
|
|
71
|
+
: releaseContext.gitLog;
|
|
72
|
+
sections.push(wrapXml('git_log', truncatedLog));
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
sections.push('(No commits found since last release)');
|
|
76
|
+
}
|
|
77
|
+
if (releaseContext.closedIssues) {
|
|
78
|
+
sections.push(wrapXml('closed_issues', releaseContext.closedIssues));
|
|
79
|
+
}
|
|
80
|
+
// Active work context
|
|
81
|
+
if (activeWork) {
|
|
82
|
+
sections.push('\n=== ACTIVE WORK (SOURCE OF TRUTH FOR PHASES & PRIORITIES) ===');
|
|
83
|
+
sections.push(wrapXml('active_work', activeWork));
|
|
84
|
+
}
|
|
85
|
+
return sections.join('\n');
|
|
86
|
+
}
|
|
87
|
+
// ─── Diff display ───────────────────────────────────────
|
|
88
|
+
function showDiff(filePath, original, updated) {
|
|
89
|
+
if (original === updated) {
|
|
90
|
+
log.dim(TAG, `No changes for ${filePath}.`);
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
const originalLines = original.split('\n');
|
|
94
|
+
const updatedLines = updated.split('\n');
|
|
95
|
+
let added = 0;
|
|
96
|
+
let removed = 0;
|
|
97
|
+
// Simple line-level diff summary
|
|
98
|
+
const originalSet = new Set(originalLines);
|
|
99
|
+
const updatedSet = new Set(updatedLines);
|
|
100
|
+
for (const line of updatedLines) {
|
|
101
|
+
if (!originalSet.has(line))
|
|
102
|
+
added++;
|
|
103
|
+
}
|
|
104
|
+
for (const line of originalLines) {
|
|
105
|
+
if (!updatedSet.has(line))
|
|
106
|
+
removed++;
|
|
107
|
+
}
|
|
108
|
+
log.info(TAG, `${filePath}: +${added} / -${removed} lines changed`);
|
|
109
|
+
return true;
|
|
110
|
+
}
|
|
111
|
+
export async function docsCommand(options) {
|
|
112
|
+
const cwd = process.cwd();
|
|
113
|
+
const configPath = resolveConfigPath(cwd);
|
|
114
|
+
loadEnv(cwd);
|
|
115
|
+
const config = await loadConfig(configPath);
|
|
116
|
+
// Validate docs are configured
|
|
117
|
+
if (!config.docs || config.docs.length === 0) {
|
|
118
|
+
const err = new Error(`[Totem Error] No docs configured.\n` +
|
|
119
|
+
`Add a 'docs' array to totem.config.ts. Example:\n` +
|
|
120
|
+
` docs: [\n` +
|
|
121
|
+
` { path: 'README.md', description: 'Public-facing README', trigger: 'post-release' },\n` +
|
|
122
|
+
` ]`);
|
|
123
|
+
err.name = 'NoDocsConfiguredError';
|
|
124
|
+
throw err;
|
|
125
|
+
}
|
|
126
|
+
// Filter by --only
|
|
127
|
+
let targets = config.docs;
|
|
128
|
+
if (options.only) {
|
|
129
|
+
const onlyNames = options.only.split(',').map((s) => s.trim().toLowerCase());
|
|
130
|
+
targets = config.docs.filter((d) => {
|
|
131
|
+
const basename = path.basename(d.path, path.extname(d.path)).toLowerCase();
|
|
132
|
+
const fullPath = d.path.toLowerCase();
|
|
133
|
+
return onlyNames.some((name) => basename.includes(name) || fullPath.includes(name));
|
|
134
|
+
});
|
|
135
|
+
if (targets.length === 0) {
|
|
136
|
+
throw new Error(`[Totem Error] --only '${options.only}' matched no configured docs.\n` +
|
|
137
|
+
`Available: ${config.docs.map((d) => d.path).join(', ')}`);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
log.info(TAG, `Updating ${targets.length} doc(s): ${targets.map((d) => d.path).join(', ')}`);
|
|
141
|
+
// Check for dirty files (data loss protection)
|
|
142
|
+
const dirtyFiles = targets.filter((d) => isFileDirty(cwd, d.path));
|
|
143
|
+
if (dirtyFiles.length > 0 && !options.dryRun) {
|
|
144
|
+
throw new Error(`[Totem Error] The following doc(s) have uncommitted changes:\n` +
|
|
145
|
+
dirtyFiles.map((d) => ` - ${d.path}`).join('\n') +
|
|
146
|
+
`\nCommit or stash changes before running \`totem docs\` to prevent data loss.`);
|
|
147
|
+
}
|
|
148
|
+
// Gather release context (shared across all docs)
|
|
149
|
+
log.info(TAG, 'Gathering release context...');
|
|
150
|
+
const releaseContext = gatherReleaseContext(cwd);
|
|
151
|
+
if (releaseContext.tag) {
|
|
152
|
+
log.dim(TAG, `Last release: ${releaseContext.tag}`);
|
|
153
|
+
}
|
|
154
|
+
// Load active_work.md for phase/priority context
|
|
155
|
+
let activeWork = '';
|
|
156
|
+
const activeWorkPath = path.join(cwd, 'docs', 'active_work.md');
|
|
157
|
+
try {
|
|
158
|
+
activeWork = fs.readFileSync(activeWorkPath, 'utf-8');
|
|
159
|
+
}
|
|
160
|
+
catch {
|
|
161
|
+
log.dim(TAG, 'No docs/active_work.md found — proceeding without active work context.');
|
|
162
|
+
}
|
|
163
|
+
// Resolve system prompt (allow .totem/prompts/docs.md override)
|
|
164
|
+
const systemPrompt = getSystemPrompt('docs', SYSTEM_PROMPT, cwd, config.totemDir);
|
|
165
|
+
// Process each doc sequentially (separate orchestrator call per doc)
|
|
166
|
+
let updated = 0;
|
|
167
|
+
for (const doc of targets) {
|
|
168
|
+
const filePath = path.join(cwd, doc.path);
|
|
169
|
+
// Read current content
|
|
170
|
+
let currentContent;
|
|
171
|
+
try {
|
|
172
|
+
currentContent = fs.readFileSync(filePath, 'utf-8');
|
|
173
|
+
}
|
|
174
|
+
catch {
|
|
175
|
+
log.warn(TAG, `Skipping ${doc.path} — file not found.`);
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
178
|
+
log.info(TAG, `Processing ${doc.path}...`);
|
|
179
|
+
// Assemble prompt for this doc
|
|
180
|
+
const prompt = assemblePrompt(doc, currentContent, releaseContext, activeWork, systemPrompt);
|
|
181
|
+
log.dim(TAG, `Prompt: ${(prompt.length / 1024).toFixed(0)}KB`);
|
|
182
|
+
const content = runOrchestrator({ prompt, tag: TAG, options, config, cwd });
|
|
183
|
+
if (content == null)
|
|
184
|
+
continue; // --raw mode
|
|
185
|
+
// Check if anything changed
|
|
186
|
+
const trimmedContent = content.trimEnd() + '\n';
|
|
187
|
+
const hasChanges = showDiff(doc.path, currentContent, trimmedContent);
|
|
188
|
+
if (!hasChanges)
|
|
189
|
+
continue;
|
|
190
|
+
if (options.dryRun) {
|
|
191
|
+
log.dim(TAG, `[dry-run] Would update ${doc.path}`);
|
|
192
|
+
if (options.out) {
|
|
193
|
+
writeOutput(trimmedContent, options.out);
|
|
194
|
+
log.success(TAG, `[dry-run] Preview written to ${options.out}`);
|
|
195
|
+
}
|
|
196
|
+
continue;
|
|
197
|
+
}
|
|
198
|
+
// Write the updated content
|
|
199
|
+
fs.writeFileSync(filePath, trimmedContent, 'utf-8');
|
|
200
|
+
log.success(TAG, `Updated ${doc.path}`);
|
|
201
|
+
updated++;
|
|
202
|
+
}
|
|
203
|
+
if (updated > 0) {
|
|
204
|
+
log.success(TAG, `Done — ${updated} doc(s) updated.`);
|
|
205
|
+
}
|
|
206
|
+
else if (!options.raw && !options.dryRun) {
|
|
207
|
+
log.dim(TAG, 'No docs needed updating.');
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
//# sourceMappingURL=docs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs.js","sourceRoot":"","sources":["../../src/commands/docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAIlC,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACtE,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EACL,eAAe,EACf,UAAU,EACV,OAAO,EACP,iBAAiB,EACjB,eAAe,EACf,OAAO,EACP,WAAW,GACZ,MAAM,aAAa,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