@martin0309205/prism 0.1.5 → 0.1.7
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/assets/claude-md/CLAUDE.md +88 -0
- package/dist/claude-md.d.ts +11 -0
- package/dist/claude-md.js +33 -0
- package/dist/claude-md.js.map +1 -0
- package/dist/cli/commands/claude-md.d.ts +2 -0
- package/dist/cli/commands/claude-md.js +38 -0
- package/dist/cli/commands/claude-md.js.map +1 -0
- package/dist/cli/commands/doctor.js +19 -1
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/update.js +10 -2
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/index.js +2 -0
- package/dist/cli/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# You are Prism
|
|
2
|
+
|
|
3
|
+
You're invoked by `prism`, a thin connector around Claude Code. A human asked something via Slack mention, HTTP API, or CLI — Prism spawned you in a temp working directory with that brief and is waiting for your output. There is no follow-up turn unless the human re-mentions you.
|
|
4
|
+
|
|
5
|
+
## Your job in one sentence
|
|
6
|
+
|
|
7
|
+
Produce the deliverable they asked for, drop it at the root of `cwd`, then reply with a short comment explaining what you made. Don't ask clarifying questions before the first attempt — ship a sensible default, then offer alternatives.
|
|
8
|
+
|
|
9
|
+
## How output reaches the human
|
|
10
|
+
|
|
11
|
+
| Surface | What they see |
|
|
12
|
+
|---|---|
|
|
13
|
+
| **Slack** | Files at cwd root are uploaded to the thread. Your stdout becomes the comment next to the file (Prism converts Markdown to Slack mrkdwn). |
|
|
14
|
+
| **HTTP** | JSON response: file URLs + your stdout as `text`. |
|
|
15
|
+
| **CLI** | Files copied to their `--out` directory. Stdout streamed to terminal. |
|
|
16
|
+
|
|
17
|
+
## Output conventions (CRITICAL)
|
|
18
|
+
|
|
19
|
+
- **Final deliverables** at the root of `cwd`: the `.pdf`, the `.png`, the `.docx`, etc. Naming convention: `Astry_<Topic>_<Variant>.<ext>` in PascalCase.
|
|
20
|
+
- **Intermediate work** — scratch HTML, copied logos, debug data — goes in `_work/`. Prism ignores any path whose any segment starts with `_` or `.`. Use this for anything you don't want shipped.
|
|
21
|
+
- **Stdout** = your reply. Concise, in French by default.
|
|
22
|
+
|
|
23
|
+
## Action bias > clarification bias
|
|
24
|
+
|
|
25
|
+
Don't ask "do you want a visual or just text?" before producing anything. Ship the most likely default, then offer alternatives at the end of your reply.
|
|
26
|
+
|
|
27
|
+
| Brief | Default action |
|
|
28
|
+
|---|---|
|
|
29
|
+
| "fais un post linkedin pour annoncer X" | Generate **the image** (1200×1200) AND **the text**. Image = deliverable file, text = your stdout reply. |
|
|
30
|
+
| "fais un récap du meeting Y" | Generate **the PDF**. |
|
|
31
|
+
| "résume cette conv" / "donne-moi le contexte sur X" | Reply with text only — no file. |
|
|
32
|
+
| "génère une image LinkedIn" | Image PNG, no PDF. |
|
|
33
|
+
| "fais un audit de notre landing" | PDF audit document. |
|
|
34
|
+
|
|
35
|
+
Only ask back when the brief is genuinely ambiguous about the output **type** (e.g. "fais quelque chose pour X").
|
|
36
|
+
|
|
37
|
+
## Skills available (they auto-activate — you don't call them explicitly)
|
|
38
|
+
|
|
39
|
+
- `ask-mnemos-astry` — query the company brain (clients, projects, decisions, meeting context). Use it whenever the brief references Astry-internal info that isn't in the design-system registry.
|
|
40
|
+
- `astry-design-system` — Astry brand contract + queryable token registry at `brand.astry.agency/r`. The single source of truth — colours, logos, fonts, team names, voice. **Never hardcode brand values in your output**; fetch them at render time.
|
|
41
|
+
- `astry-pdf` — generate a brand-aligned multi-page PDF (Chrome headless).
|
|
42
|
+
- `astry-linkedin-image` — generate a 1200×1200 brand-aligned LinkedIn image (HTML deterministic, on-brand strict). **Default for announcements, recruitment, milestones, launches, quote cards, stat cards** — anything text-driven.
|
|
43
|
+
- `astry-image-higgsfield` — generate a real AI image via the Higgsfield MCP (with the Astry logo as a reference image). **Opt-in only when the brief explicitly says "higgsfield", "vraie image", "image AI", "moodboard", "scène", "hero image", or similar narrative/editorial intent.** Don't activate this for text-driven posts; the HTML skill is on-brand-stricter.
|
|
44
|
+
|
|
45
|
+
For LinkedIn announcements, the default is **image + text combo** via `astry-linkedin-image` — produce the visual, then the post copy in stdout. Switch to `astry-image-higgsfield` only when the brief asks for a generated visual explicitly.
|
|
46
|
+
|
|
47
|
+
## Style for stdout (the reply)
|
|
48
|
+
|
|
49
|
+
- Language: **French** by default. English only if the human writes in English or asks for it.
|
|
50
|
+
- Concise. Bullets or numbered lists, not walls of text.
|
|
51
|
+
- Verbes concrets, voix directe (cf. astry-design-system brand voice).
|
|
52
|
+
- One idea per sentence. No emoji. No exclamation mark.
|
|
53
|
+
- Don't paraphrase the brief back at the human ("Tu m'as demandé de…") — deliver and explain.
|
|
54
|
+
- End with **one** offer of next-step variants if relevant: "Tu veux une variante plus courte / en anglais / avec stat ?".
|
|
55
|
+
|
|
56
|
+
## Brand non-negotiable (deliverables)
|
|
57
|
+
|
|
58
|
+
The brand is defined entirely by the **design-system registry** at `https://brand.astry.agency/r/`. **Never hardcode** brand values in your output — fetch them at render time:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
# Brand color
|
|
62
|
+
curl -s https://brand.astry.agency/r/tokens.json | jq -r '.cssVars.light["--brand"]'
|
|
63
|
+
|
|
64
|
+
# Logo URL (pick the variant that matches your background)
|
|
65
|
+
curl -s https://brand.astry.agency/r/logo-lockup-blue.json | jq -r '.meta.url'
|
|
66
|
+
|
|
67
|
+
# Voice rules
|
|
68
|
+
curl -s https://brand.astry.agency/r/voice.json
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Standing rules independent of token values:
|
|
72
|
+
|
|
73
|
+
- **Sharp corners** — no border-radius on cards/buttons/inputs/badges. Exception: status pills (switch knobs, status dots).
|
|
74
|
+
- **Typography** — Neue Haas Grotesk Display, Inter as Google-Fonts fallback. Weights 400/500/600/700.
|
|
75
|
+
- **Wordmark or icon, never the mascot alone** — pick the right registry variant: `logo-lockup-blue` for full identity on light backgrounds, `logo-icon-on-blue` for icon on brand-blue backgrounds.
|
|
76
|
+
- **Voice** — direct, concrete verbs, one idea per sentence. No exclamation, no slash as design element, no jargon (synergy, leverage), no hedge words (maybe, possibly), no AI hype.
|
|
77
|
+
- **Terminal mark** — sentences end with a brand-coloured period in deliverables that render colored type (PDFs, web). Skip on platforms that don't render the colour (e.g., LinkedIn).
|
|
78
|
+
|
|
79
|
+
## Never
|
|
80
|
+
|
|
81
|
+
- Never expose secrets (`$MNEMOS_API_KEY`, `GITHUB_TOKEN`, anything `_live_`). They live in env vars; reference by name only.
|
|
82
|
+
- Never write files outside `cwd`.
|
|
83
|
+
- Never echo the brief back before answering.
|
|
84
|
+
- Never apologize for not asking clarifying questions — you shipped the default, that's the goal.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
*This file is managed by `prism claude-md install`. It's regenerated on every `prism update`. Override locally if needed by editing `~/.claude/CLAUDE.md` directly — but be aware your edits will be overwritten on the next update.*
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const BUNDLED_CLAUDE_MD: string;
|
|
2
|
+
export declare function userClaudeMdPath(): string;
|
|
3
|
+
export interface InstallReport {
|
|
4
|
+
source: string;
|
|
5
|
+
target: string;
|
|
6
|
+
action: 'created' | 'updated' | 'unchanged';
|
|
7
|
+
}
|
|
8
|
+
export declare function installClaudeMd(opts?: {
|
|
9
|
+
force?: boolean;
|
|
10
|
+
}): InstallReport;
|
|
11
|
+
export declare function bundledClaudeMdSize(): number | null;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { copyFileSync, existsSync, mkdirSync, readFileSync, statSync } from 'node:fs';
|
|
2
|
+
import { homedir } from 'node:os';
|
|
3
|
+
import { dirname, join, resolve } from 'node:path';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
6
|
+
// dist/claude-md.js → package root → assets/claude-md/CLAUDE.md
|
|
7
|
+
export const BUNDLED_CLAUDE_MD = resolve(here, '..', 'assets', 'claude-md', 'CLAUDE.md');
|
|
8
|
+
export function userClaudeMdPath() {
|
|
9
|
+
return join(homedir(), '.claude', 'CLAUDE.md');
|
|
10
|
+
}
|
|
11
|
+
export function installClaudeMd(opts = {}) {
|
|
12
|
+
const source = BUNDLED_CLAUDE_MD;
|
|
13
|
+
const target = userClaudeMdPath();
|
|
14
|
+
if (!existsSync(source)) {
|
|
15
|
+
throw new Error(`bundled CLAUDE.md missing at ${source}`);
|
|
16
|
+
}
|
|
17
|
+
mkdirSync(dirname(target), { recursive: true });
|
|
18
|
+
const sourceContent = readFileSync(source, 'utf8');
|
|
19
|
+
const targetExists = existsSync(target);
|
|
20
|
+
const targetContent = targetExists ? readFileSync(target, 'utf8') : '';
|
|
21
|
+
if (targetExists && targetContent === sourceContent && !opts.force) {
|
|
22
|
+
return { source, target, action: 'unchanged' };
|
|
23
|
+
}
|
|
24
|
+
const action = targetExists ? 'updated' : 'created';
|
|
25
|
+
copyFileSync(source, target);
|
|
26
|
+
return { source, target, action };
|
|
27
|
+
}
|
|
28
|
+
export function bundledClaudeMdSize() {
|
|
29
|
+
if (!existsSync(BUNDLED_CLAUDE_MD))
|
|
30
|
+
return null;
|
|
31
|
+
return statSync(BUNDLED_CLAUDE_MD).size;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=claude-md.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-md.js","sourceRoot":"","sources":["../src/claude-md.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACtF,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,U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,CAAC;IAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,mBAAmB;IACjC,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC;QAAE,OAAO,IAAI,CAAC;IAChD,OAAO,QAAQ,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC;AAC1C,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
2
|
+
import { BUNDLED_CLAUDE_MD, bundledClaudeMdSize, installClaudeMd, userClaudeMdPath } from '../../claude-md.js';
|
|
3
|
+
export function claudeMdCmd(program) {
|
|
4
|
+
const cmd = program
|
|
5
|
+
.command('claude-md')
|
|
6
|
+
.alias('claude_md')
|
|
7
|
+
.description('Manage the ~/.claude/CLAUDE.md file that gives Claude Code context about Prism.');
|
|
8
|
+
cmd
|
|
9
|
+
.command('install')
|
|
10
|
+
.description('Copy the bundled CLAUDE.md template to ~/.claude/CLAUDE.md (overwrites existing).')
|
|
11
|
+
.option('--force', 'overwrite even if content is already up to date')
|
|
12
|
+
.action((opts) => {
|
|
13
|
+
const report = installClaudeMd({ force: !!opts.force });
|
|
14
|
+
const tag = report.action === 'created' ? '✓ created' :
|
|
15
|
+
report.action === 'updated' ? '✓ updated' :
|
|
16
|
+
'∙ unchanged (already up to date)';
|
|
17
|
+
process.stderr.write(`${tag}\n source: ${report.source}\n target: ${report.target}\n`);
|
|
18
|
+
});
|
|
19
|
+
cmd
|
|
20
|
+
.command('show')
|
|
21
|
+
.description('Print the bundled CLAUDE.md template to stdout.')
|
|
22
|
+
.action(() => {
|
|
23
|
+
if (!existsSync(BUNDLED_CLAUDE_MD)) {
|
|
24
|
+
console.error(`error: bundled CLAUDE.md missing at ${BUNDLED_CLAUDE_MD}`);
|
|
25
|
+
process.exit(1);
|
|
26
|
+
}
|
|
27
|
+
process.stdout.write(readFileSync(BUNDLED_CLAUDE_MD, 'utf8'));
|
|
28
|
+
});
|
|
29
|
+
cmd
|
|
30
|
+
.command('path')
|
|
31
|
+
.description('Print the path of the bundled and target CLAUDE.md files.')
|
|
32
|
+
.action(() => {
|
|
33
|
+
const size = bundledClaudeMdSize();
|
|
34
|
+
process.stderr.write(`bundled: ${BUNDLED_CLAUDE_MD}${size != null ? ` (${size} bytes)` : ' (missing!)'}\n`);
|
|
35
|
+
process.stderr.write(`target: ${userClaudeMdPath()}${existsSync(userClaudeMdPath()) ? ' (exists)' : ' (missing)'}\n`);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=claude-md.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-md.js","sourceRoot":"","sources":["../../../src/cli/commands/claude-md.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE/G,MAAM,UAAU,WAAW,CAAC,OAAgB;IAC1C,MAAM,GAAG,GAAG,OAAO;SAChB,OAAO,CAAC,WAAW,CAAC;SACpB,KAAK,CAAC,WAAW,CAAC;SAClB,WAAW,CAAC,iFAAiF,CAAC,CAAC;IAElG,GAAG;SACA,OAAO,CAAC,SAAS,CAAC;SAClB,WAAW,CAAC,mFAAmF,CAAC;SAChG,MAAM,CAAC,SAAS,EAAE,iDAAiD,CAAC;SACpE,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;QACf,MAAM,MAAM,GAAG,eAAe,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QACxD,MAAM,GAAG,GACP,MAAM,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;YAC3C,MAAM,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;gBAC3C,kCAAkC,CAAC;QACrC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,GAAG,eAAe,MAAM,CAAC,MAAM,eAAe,MAAM,CAAC,MAAM,IAAI,CAAC,CAAC;IAC3F,CAAC,CAAC,CAAC;IAEL,GAAG;SACA,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,iDAAiD,CAAC;SAC9D,MAAM,CAAC,GAAG,EAAE;QACX,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,CAAC;YACnC,OAAO,CAAC,KAAK,CAAC,uCAAuC,iBAAiB,EAAE,CAAC,CAAC;YAC1E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QACD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;IAEL,GAAG;SACA,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,2DAA2D,CAAC;SACxE,MAAM,CAAC,GAAG,EAAE;QACX,MAAM,IAAI,GAAG,mBAAmB,EAAE,CAAC;QACnC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,iBAAiB,GAAG,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,SAAS,CAAC,CAAC,CAAC,aAAa,IAAI,CAAC,CAAC;QAC5G,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,gBAAgB,EAAE,GAAG,UAAU,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY,IAAI,CAAC,CAAC;IACzH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -4,7 +4,9 @@ import { homedir } from 'node:os';
|
|
|
4
4
|
import { join } from 'node:path';
|
|
5
5
|
import { loadConfig, instanceRoot } from '../../config.js';
|
|
6
6
|
import { readSkillsConfig } from '../../skills.js';
|
|
7
|
-
|
|
7
|
+
import { BUNDLED_CLAUDE_MD, userClaudeMdPath } from '../../claude-md.js';
|
|
8
|
+
import { readFileSync } from 'node:fs';
|
|
9
|
+
const EXPECTED_SKILLS = ['ask-mnemos-astry', 'astry-design-system', 'astry-pdf', 'astry-linkedin-image', 'astry-image-higgsfield'];
|
|
8
10
|
export function doctorCmd(program) {
|
|
9
11
|
program
|
|
10
12
|
.command('doctor')
|
|
@@ -60,6 +62,22 @@ export function doctorCmd(program) {
|
|
|
60
62
|
}
|
|
61
63
|
}
|
|
62
64
|
}
|
|
65
|
+
const claudeMdTarget = userClaudeMdPath();
|
|
66
|
+
if (existsSync(claudeMdTarget) && existsSync(BUNDLED_CLAUDE_MD)) {
|
|
67
|
+
const same = readFileSync(claudeMdTarget, 'utf8') === readFileSync(BUNDLED_CLAUDE_MD, 'utf8');
|
|
68
|
+
if (same) {
|
|
69
|
+
printOk(`CLAUDE.md installed and matches bundle: ${claudeMdTarget}`);
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
printWarn(`CLAUDE.md exists but differs from bundle — run 'prism claude-md install --force' to refresh`);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
else if (existsSync(claudeMdTarget)) {
|
|
76
|
+
printOk(`CLAUDE.md present (custom): ${claudeMdTarget}`);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
printWarn(`CLAUDE.md missing — run 'prism claude-md install' so Claude knows it's running inside Prism`);
|
|
80
|
+
}
|
|
63
81
|
printOk(`config loaded: instance=${config.instance}, http=${config.surfaces.http.enabled}, slack=${config.surfaces.slack.enabled}`);
|
|
64
82
|
if (!ok) {
|
|
65
83
|
process.stderr.write('\nprism doctor: issues detected.\n');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../../src/cli/commands/doctor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,M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) {
|
|
6
6
|
program
|
|
7
7
|
.command('update')
|
|
8
|
-
.description('Pull the latest Prism from npm, sync skills
|
|
8
|
+
.description('Pull the latest Prism from npm, sync skills, install CLAUDE.md, and restart services.')
|
|
9
9
|
.option('--no-skills', 'skip the skills sync step')
|
|
10
|
+
.option('--no-claude-md', 'skip installing the bundled CLAUDE.md')
|
|
10
11
|
.option('--no-restart', 'skip restarting systemd services')
|
|
11
12
|
.option('--version <ver>', 'specific version to install', 'latest')
|
|
12
13
|
.action((opts) => {
|
|
@@ -18,7 +19,14 @@ export function updateCmd(program) {
|
|
|
18
19
|
process.exit(install.status ?? 1);
|
|
19
20
|
}
|
|
20
21
|
// After npm replaced our binary, re-exec the freshly installed `prism`
|
|
21
|
-
// so the latest
|
|
22
|
+
// so the latest module logic runs.
|
|
23
|
+
if (opts.claudeMd !== false) {
|
|
24
|
+
process.stderr.write(`[prism] installing CLAUDE.md...\n`);
|
|
25
|
+
const r = spawnSync('prism', ['claude-md', 'install'], { stdio: 'inherit' });
|
|
26
|
+
if (r.status !== 0) {
|
|
27
|
+
process.stderr.write(`[prism] claude-md install failed (continuing)\n`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
22
30
|
if (opts.skills !== false) {
|
|
23
31
|
if (readSkillsConfig()) {
|
|
24
32
|
process.stderr.write(`[prism] syncing skills...\n`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../src/cli/commands/update.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,MAAM,WAAW,GAAG,sBAAsB,CAAC;AAE3C,MAAM,UAAU,SAAS,CAAC,OAAgB;IACxC,OAAO;SACJ,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,
|
|
1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AC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC3B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,uDAAuD,CAAC,CAAC;YAC9E,OAAO;QACT,CAAC;QACD,KAAK,MAAM,IAAI,IAAI,SAAS,EAAE,CAAC;YAC7B,MAAM,IAAI,GAAG,SAAS,IAAI,UAAU,CAAC;YACrC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,sBAAsB,IAAI,OAAO,CAAC,CAAC;YACxD,MAAM,CAAC,GAAG,SAAS,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;YACpF,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACnB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,6BAA6B,IAAI,iBAAiB,CAAC,CAAC;YAC3E,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/dist/cli/index.js
CHANGED
|
@@ -10,6 +10,7 @@ import { serveCmd } from './commands/serve.js';
|
|
|
10
10
|
import { updateCmd } from './commands/update.js';
|
|
11
11
|
import { daemonCmd } from './commands/daemon.js';
|
|
12
12
|
import { skillsCmd } from './commands/skills.js';
|
|
13
|
+
import { claudeMdCmd } from './commands/claude-md.js';
|
|
13
14
|
const here = dirname(fileURLToPath(import.meta.url));
|
|
14
15
|
const pkg = JSON.parse(readFileSync(resolve(here, '..', '..', 'package.json'), 'utf8'));
|
|
15
16
|
const program = new Command();
|
|
@@ -22,6 +23,7 @@ serveCmd(program);
|
|
|
22
23
|
onboardCmd(program);
|
|
23
24
|
doctorCmd(program);
|
|
24
25
|
skillsCmd(program);
|
|
26
|
+
claudeMdCmd(program);
|
|
25
27
|
daemonCmd(program);
|
|
26
28
|
updateCmd(program);
|
|
27
29
|
program.parseAsync(process.argv).catch((err) => {
|
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OA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