pantheon-cli 0.2.34 → 0.2.37
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/pantheon.mjs +121 -53
- package/package.json +1 -1
package/dist/pantheon.mjs
CHANGED
|
@@ -21695,6 +21695,7 @@ import { join as join2 } from "node:path";
|
|
|
21695
21695
|
var SKILL_DIR = "skills";
|
|
21696
21696
|
var DRAFT_DIR = "draft";
|
|
21697
21697
|
var MAX_LIVE_SKILLS = 12;
|
|
21698
|
+
var MAX_REVIEW_DRAFTS = 5;
|
|
21698
21699
|
function skillsDir(root, status = "live") {
|
|
21699
21700
|
return status === "live" ? join2(root, SKILL_DIR) : join2(root, SKILL_DIR, DRAFT_DIR);
|
|
21700
21701
|
}
|
|
@@ -21793,6 +21794,21 @@ function saveSkill(root, input, status = "draft") {
|
|
|
21793
21794
|
"A skill needs a description saying when to use it. That line is all an agent sees before deciding to open it."
|
|
21794
21795
|
);
|
|
21795
21796
|
}
|
|
21797
|
+
const canonical = (value) => value.toLowerCase().replace(/^use when\b/i, "").replace(/[^a-z0-9]+/g, " ").trim();
|
|
21798
|
+
for (const existing of [
|
|
21799
|
+
...listSkills(root, "live"),
|
|
21800
|
+
...listSkills(root, "draft")
|
|
21801
|
+
]) {
|
|
21802
|
+
const sameName = existing.name === name;
|
|
21803
|
+
const sameKey = Boolean(input.key && existing.key && input.key === existing.key);
|
|
21804
|
+
const sameTrigger = canonical(existing.when) === canonical(input.when);
|
|
21805
|
+
const sameBody = canonical(existing.body) === canonical(input.body);
|
|
21806
|
+
if (sameName || sameKey || sameTrigger || sameBody) {
|
|
21807
|
+
throw new Error(
|
|
21808
|
+
`This repeats the existing ${existing.status} skill "${existing.name}". Review or retire that one instead of creating another.`
|
|
21809
|
+
);
|
|
21810
|
+
}
|
|
21811
|
+
}
|
|
21796
21812
|
const dir = skillsDir(root, status);
|
|
21797
21813
|
mkdirSync(dir, { recursive: true });
|
|
21798
21814
|
writeFileSync(
|
|
@@ -23150,7 +23166,11 @@ function skillReview(home, space, cwd) {
|
|
|
23150
23166
|
const { slug, root } = resolveForRead(home, space, { create: false });
|
|
23151
23167
|
const sessions = sessionDirs(root).slice(0, SKILL_SCAN_SESSIONS).map((session) => ({ id: session.id, turns: readSessionTurns(session.dir) }));
|
|
23152
23168
|
const live = skillRefs(root);
|
|
23153
|
-
const drafts = listSkills(root, "draft").map((skill) =>
|
|
23169
|
+
const drafts = listSkills(root, "draft").map((skill) => ({
|
|
23170
|
+
name: skill.name,
|
|
23171
|
+
when: skill.when,
|
|
23172
|
+
sessions: skill.sessions
|
|
23173
|
+
}));
|
|
23154
23174
|
const corrections = [];
|
|
23155
23175
|
const routines = /* @__PURE__ */ new Map();
|
|
23156
23176
|
let turns = 0;
|
|
@@ -23222,7 +23242,7 @@ function reviewNote(input) {
|
|
|
23222
23242
|
"Tool output is not archived from every client, so the strongest evidence \u2014 what a command actually printed when it failed \u2014 usually exists only in the conversation you are having now. Weigh that alongside these."
|
|
23223
23243
|
);
|
|
23224
23244
|
parts.push(
|
|
23225
|
-
`
|
|
23245
|
+
`Save at most ${MAX_REVIEW_DRAFTS} drafts, and save none if nothing here recurred: this space is using ${input.slots} of ${MAX_LIVE_SKILLS} live slots and every promoted skill costs context on every future resume. Compare each lesson against both live and draft skill triggers and do not restate one under a different name; the save also refuses repeated names, candidate keys, triggers, and bodies. Do not ask first \u2014 drafts are inert until the human approves them on the space page. Call pantheon_save_skill with evidence citing the session and turn each claim came from.`
|
|
23226
23246
|
);
|
|
23227
23247
|
return parts.join(" ");
|
|
23228
23248
|
}
|
|
@@ -23471,7 +23491,8 @@ Grounding \u2014 never break these:
|
|
|
23471
23491
|
- Never invent a slug yourself. The human's typed name is the only new-space source.
|
|
23472
23492
|
- If pantheon_* tools are missing or fail, say "Pantheon MCP is not connected" and stop. Do not guess.
|
|
23473
23493
|
- /pantheon-spaces \u2192 call pantheon_list_spaces, then show only those slugs.
|
|
23474
|
-
- /pantheon-skills \u2192 call pantheon_skill_review
|
|
23494
|
+
- /pantheon-skills \u2192 call pantheon_skill_review, then save what it justifies with pantheon_save_skill without asking first: a draft is inert until the human promotes it on the space page, so that is where they approve or reject. Never nominate a skill without the review, and cite the turns any claim rests on. Saving none is a normal, common outcome \u2014 say so plainly rather than finding something to fill the silence.
|
|
23495
|
+
- Do not narrate a command. No preamble about which tools you can see, whether MCP is connected, or what you are about to do \u2014 run it and report what happened. A call that actually failed is worth one line.
|
|
23475
23496
|
- Files you generated (PDFs, letters, CVs, spreadsheets) must go in artifacts as base64. Handoff is rejected if the chat names a .pdf and you omit it.
|
|
23476
23497
|
- After resume, the packet covers the whole space but is still a summary of it. Before you tell the human something was not carried over, call pantheon_search (it reads tool calls too) and pantheon_get_turns on any id from the sessions list.
|
|
23477
23498
|
- Shared spaces belong to someone else and are read-only. Resume, search and the get_* tools work on them exactly as on your own. Handoff, park, remember and save_skill are refused \u2014 do not retry with a different spelling, tell the human it is read-only and offer to write to a space they own. A bare name is enough when only one space matches; write owner/space when two do.
|
|
@@ -23517,16 +23538,20 @@ Tutorial
|
|
|
23517
23538
|
Missing context is nearly always unsearched, not unsaved.
|
|
23518
23539
|
6. Write down what the project learned: /pantheon-skills <space>
|
|
23519
23540
|
\u2192 pantheon_skill_review
|
|
23520
|
-
A skill
|
|
23521
|
-
|
|
23541
|
+
A skill gives every later resume its name and trigger, then the agent
|
|
23542
|
+
fetches the body when the work matches. That is how a lesson outlives the
|
|
23543
|
+
chat that taught it without spending its whole body on every conversation.
|
|
23544
|
+
The tool returns signals,
|
|
23522
23545
|
not findings \u2014 corrections the human repeated, commands run across
|
|
23523
23546
|
several conversations \u2014 and you weigh them against THIS chat, where the
|
|
23524
23547
|
errors you actually hit are still visible. Most clients never archive
|
|
23525
23548
|
what a tool printed, so that is evidence only you hold.
|
|
23526
|
-
|
|
23527
|
-
|
|
23528
|
-
|
|
23529
|
-
|
|
23549
|
+
Save at most five as drafts, citing the turns each came from. Compare the
|
|
23550
|
+
live and draft triggers first, and never repeat an existing lesson under
|
|
23551
|
+
another name. No need to ask: a draft reaches no agent until it is
|
|
23552
|
+
promoted on the space page, which is where it is approved or rejected.
|
|
23553
|
+
None is the ordinary answer: every live skill spends resume context.
|
|
23554
|
+
Never write what AGENTS.md or the README already says.
|
|
23530
23555
|
7. Spaces someone shared with you appear in pantheon_list_spaces with an
|
|
23531
23556
|
owner, and resume the same way \u2014 /pantheon-resume preorders, or
|
|
23532
23557
|
/pantheon-resume obirikan/preorders when two spaces share a name.
|
|
@@ -23560,7 +23585,7 @@ MCP tools \u2014 always the pantheon_ prefix
|
|
|
23560
23585
|
pantheon_forget_session delete one archived chat, when capture read the
|
|
23561
23586
|
wrong one. Not undoable \u2014 confirm the id first.
|
|
23562
23587
|
pantheon_skill_review read a space for lessons worth writing down, then
|
|
23563
|
-
|
|
23588
|
+
save at most five inert, non-repeating drafts
|
|
23564
23589
|
pantheon_get_skill read one skill's guidance
|
|
23565
23590
|
pantheon_save_skill write a skill as a draft, citing the turns it came
|
|
23566
23591
|
from. A draft reaches no agent until promoted.
|
|
@@ -23606,10 +23631,12 @@ function saveMachineConfig(config2, credentials) {
|
|
|
23606
23631
|
}
|
|
23607
23632
|
|
|
23608
23633
|
// ../core/src/vault.ts
|
|
23609
|
-
import { execFileSync as execFileSync2 } from "node:child_process";
|
|
23610
|
-
import { existsSync as existsSync5, mkdirSync as mkdirSync4, unlinkSync, writeFileSync as writeFileSync4 } from "node:fs";
|
|
23634
|
+
import { execFile, execFileSync as execFileSync2 } from "node:child_process";
|
|
23635
|
+
import { existsSync as existsSync5, mkdirSync as mkdirSync4, rmSync as rmSync3, unlinkSync, writeFileSync as writeFileSync4 } from "node:fs";
|
|
23611
23636
|
import { homedir as homedir4, tmpdir } from "node:os";
|
|
23612
23637
|
import { dirname, join as join5, resolve as resolve2 } from "node:path";
|
|
23638
|
+
import { promisify } from "node:util";
|
|
23639
|
+
var execFileAsync = promisify(execFile);
|
|
23613
23640
|
function gitEnv(extra = {}) {
|
|
23614
23641
|
return {
|
|
23615
23642
|
...process.env,
|
|
@@ -23776,7 +23803,7 @@ async function syncVault(home, opts = {}) {
|
|
|
23776
23803
|
}
|
|
23777
23804
|
|
|
23778
23805
|
// ../core/src/shares.ts
|
|
23779
|
-
import { existsSync as existsSync6, mkdirSync as mkdirSync5, readdirSync as readdirSync4, readFileSync as readFileSync5, rmSync as
|
|
23806
|
+
import { existsSync as existsSync6, mkdirSync as mkdirSync5, readdirSync as readdirSync4, readFileSync as readFileSync5, rmSync as rmSync4, writeFileSync as writeFileSync5 } from "node:fs";
|
|
23780
23807
|
import { dirname as dirname2, join as join6 } from "node:path";
|
|
23781
23808
|
function ledgerPath(root) {
|
|
23782
23809
|
return join6(root, "manifest.json");
|
|
@@ -23824,7 +23851,7 @@ async function pullShares(home, options = {}) {
|
|
|
23824
23851
|
};
|
|
23825
23852
|
}
|
|
23826
23853
|
if (!shares.length) {
|
|
23827
|
-
if (existsSync6(root))
|
|
23854
|
+
if (existsSync6(root)) rmSync4(root, { recursive: true, force: true });
|
|
23828
23855
|
return { ok: true, spaces: 0, fetched: 0 };
|
|
23829
23856
|
}
|
|
23830
23857
|
mkdirSync5(root, { recursive: true });
|
|
@@ -23870,9 +23897,9 @@ async function pullShares(home, options = {}) {
|
|
|
23870
23897
|
for (const owner of dirNames(root)) {
|
|
23871
23898
|
for (const slug of dirNames(join6(root, owner))) {
|
|
23872
23899
|
if (keep.has(`${owner}/${slug}`)) continue;
|
|
23873
|
-
|
|
23900
|
+
rmSync4(join6(root, owner, slug), { recursive: true, force: true });
|
|
23874
23901
|
}
|
|
23875
|
-
if (!dirNames(join6(root, owner)).length)
|
|
23902
|
+
if (!dirNames(join6(root, owner)).length) rmSync4(join6(root, owner), { recursive: true, force: true });
|
|
23876
23903
|
}
|
|
23877
23904
|
writeFileSync5(ledgerPath(root), `${JSON.stringify(next, null, 2)}
|
|
23878
23905
|
`);
|
|
@@ -23894,11 +23921,11 @@ function prune(base, dir, wanted) {
|
|
|
23894
23921
|
const full = join6(dir, entry.name);
|
|
23895
23922
|
if (entry.isDirectory()) {
|
|
23896
23923
|
prune(base, full, wanted);
|
|
23897
|
-
if (!readdirSync4(full).length)
|
|
23924
|
+
if (!readdirSync4(full).length) rmSync4(full, { recursive: true, force: true });
|
|
23898
23925
|
continue;
|
|
23899
23926
|
}
|
|
23900
23927
|
const relative2 = full.slice(base.length + 1).split("\\").join("/");
|
|
23901
|
-
if (!wanted.has(relative2))
|
|
23928
|
+
if (!wanted.has(relative2)) rmSync4(full, { force: true });
|
|
23902
23929
|
}
|
|
23903
23930
|
}
|
|
23904
23931
|
function dirNames(root) {
|
|
@@ -24028,10 +24055,27 @@ function registerTool(server, name, description, schema, handler) {
|
|
|
24028
24055
|
function createPantheonServer(home = defaultHome(), hooks, options = {}) {
|
|
24029
24056
|
const vault = vaultHooks(hooks);
|
|
24030
24057
|
const allowCapture = options.allowCapture !== false;
|
|
24058
|
+
const site = (process.env.NEXT_PUBLIC_APP_URL || "https://pantheon-ui-web.vercel.app").replace(/\/$/, "");
|
|
24031
24059
|
const server = new McpServer(
|
|
24032
24060
|
{
|
|
24033
24061
|
name: "pantheon",
|
|
24034
|
-
|
|
24062
|
+
title: "Pantheon",
|
|
24063
|
+
version: "0.1.0",
|
|
24064
|
+
websiteUrl: site,
|
|
24065
|
+
icons: [
|
|
24066
|
+
{
|
|
24067
|
+
src: `${site}/pantheon-mcp-light.png`,
|
|
24068
|
+
mimeType: "image/png",
|
|
24069
|
+
sizes: ["512x512"],
|
|
24070
|
+
theme: "light"
|
|
24071
|
+
},
|
|
24072
|
+
{
|
|
24073
|
+
src: `${site}/pantheon-mcp-dark.png`,
|
|
24074
|
+
mimeType: "image/png",
|
|
24075
|
+
sizes: ["512x512"],
|
|
24076
|
+
theme: "dark"
|
|
24077
|
+
}
|
|
24078
|
+
]
|
|
24035
24079
|
},
|
|
24036
24080
|
{ instructions: MCP_INSTRUCTIONS }
|
|
24037
24081
|
);
|
|
@@ -24289,7 +24333,7 @@ ${GUIDE}` }]
|
|
|
24289
24333
|
registerTool(
|
|
24290
24334
|
server,
|
|
24291
24335
|
"pantheon_save_skill",
|
|
24292
|
-
"Write a skill into a Pantheon space as a DRAFT for the human to review.
|
|
24336
|
+
"Write a skill into a Pantheon space as a DRAFT for the human to review on the space page. Call this after pantheon_skill_review when something genuinely recurred, when pantheon_handoff returned a skillCandidate, or when the human asks for a skill \u2014 but never speculatively, because an unread skill costs every future agent context for nothing. A draft needs no permission: it is inert until promoted, and the space page is where it is approved or rejected. Compare the review's live and draft triggers first; repeated names, candidate keys, triggers, and bodies are refused. Ground every instruction in the cited evidence: say what failed, what fixed it, and cite session and turn. Do not restate anything already in AGENTS.md or the README.",
|
|
24293
24337
|
{
|
|
24294
24338
|
space: external_exports.string(),
|
|
24295
24339
|
name: external_exports.string().describe("Short slug, e.g. nextjs-og-images."),
|
|
@@ -24314,14 +24358,14 @@ ${GUIDE}` }]
|
|
|
24314
24358
|
ok: sync2.ok !== false,
|
|
24315
24359
|
...saved,
|
|
24316
24360
|
sync: sync2,
|
|
24317
|
-
note: sync2.ok === false ? `Draft saved locally but the push failed: ${sync2.error || "unknown error"}. Tell the human it is not yet in GitHub.` : `Saved as a draft
|
|
24361
|
+
note: sync2.ok === false ? `Draft saved locally but the push failed: ${sync2.error || "unknown error"}. Tell the human it is not yet in GitHub.` : `Saved as a draft, waiting for review on the space page. Name it in your report; do not explain the draft system.`
|
|
24318
24362
|
};
|
|
24319
24363
|
})
|
|
24320
24364
|
);
|
|
24321
24365
|
registerTool(
|
|
24322
24366
|
server,
|
|
24323
24367
|
"pantheon_skill_review",
|
|
24324
|
-
|
|
24368
|
+
`Review a Pantheon space for lessons worth writing down as a skill. Trigger: /pantheon-skills <space>. Returns what this space already has \u2014 live and draft names with their triggers \u2014 how many live slots are spent, and the recurring signals its archive still holds: times the human corrected an agent, commands run across several conversations, and any deterministic candidates. These are raw material, not findings \u2014 read the turns with pantheon_get_turns before believing any of them. Judge the conversation you are having now as well, and weigh it heavily: most clients never archive what a tool printed, so a failure you hit in this chat is evidence that exists nowhere else. Then save AT MOST ${MAX_REVIEW_DRAFTS} with pantheon_save_skill, and save none if nothing genuinely recurred \u2014 none is the ordinary answer and a space with no skills is healthier than one with skills nobody reads. Do not repeat an existing live or draft lesson under different wording, and never write a skill for something AGENTS.md or the README already says. Do not ask permission first: a saved skill is a draft and no agent is ever given it until the human promotes it on the space page, which is where they approve or reject. Cite evidence with the turns you read. Report only the names you saved and what each tells a future agent, in a line or two \u2014 no preamble about which tools you have or what you are about to do.`,
|
|
24325
24369
|
{ space: external_exports.string(), cwd: external_exports.string().optional() },
|
|
24326
24370
|
async ({ space, cwd }) => safe(() => skillReview(home, space, cwd || process.cwd()))
|
|
24327
24371
|
);
|
|
@@ -24574,59 +24618,74 @@ function upsertCodex(home) {
|
|
|
24574
24618
|
${block2}`);
|
|
24575
24619
|
}
|
|
24576
24620
|
var spaceGate = 'A space is the short name the human chose for a conscience (preorders, auth-refactor). The argument is: $ARGUMENTS\n\nIf that arrived blank, or as an unexpanded placeholder rather than a name, ask: "What should this conscience be named?" and wait. Never invent a name. Otherwise use it exactly as typed \u2014 any single short slug counts, including one that is not in the vault yet.';
|
|
24621
|
+
var quiet = "Do not narrate. No preamble about which tools you can see, whether Pantheon MCP is connected, or what you are about to do. Run it and report what happened, briefly. If a call fails, say what failed in one line.";
|
|
24577
24622
|
var slashCommands = [
|
|
24578
24623
|
{
|
|
24579
24624
|
name: "pantheon-handoff",
|
|
24580
24625
|
description: "Leave a Pantheon conscience for the next agent",
|
|
24581
24626
|
body: `${spaceGate}
|
|
24582
24627
|
|
|
24583
|
-
Only after you have a real space name, call pantheon_handoff even if that name is not in pantheon_list_spaces. First handoff creates the space. Do not refuse. Do not tell the human to create it first. transcript is the real thread, not a recap. Each human message is { role: "user", text: "<what they typed>" }. Each of your replies is { role: "assistant", text: "<what you said>" }. Copy the words. Do not write "User asked\u2026" or "Assistant wrote\u2026". Do not mark your replies as user. Same timestamp on every turn will be rejected. You MUST attach artifacts for every file you generated \u2014 PDFs, letters, CVs, spreadsheets \u2014 and every file the human uploaded. Read the file and pass { name, content: "<base64>", encoding: "base64" }. Claude: /mnt/user-data/outputs or the download you presented. A chat that names a .pdf without attaching it is rejected. Named code fences are stored automatically. If the thread is too long, send the oldest visible chunk with truncated:true, then call again with append:true. The tool commits and pushes \u2014 do not run pantheon sync
|
|
24628
|
+
Only after you have a real space name, call pantheon_handoff even if that name is not in pantheon_list_spaces. First handoff creates the space. Do not refuse. Do not tell the human to create it first. transcript is the real thread, not a recap. Each human message is { role: "user", text: "<what they typed>" }. Each of your replies is { role: "assistant", text: "<what you said>" }. Copy the words. Do not write "User asked\u2026" or "Assistant wrote\u2026". Do not mark your replies as user. Same timestamp on every turn will be rejected. You MUST attach artifacts for every file you generated \u2014 PDFs, letters, CVs, spreadsheets \u2014 and every file the human uploaded. Read the file and pass { name, content: "<base64>", encoding: "base64" }. Claude: /mnt/user-data/outputs or the download you presented. A chat that names a .pdf without attaching it is rejected. Named code fences are stored automatically. If the thread is too long, send the oldest visible chunk with truncated:true, then call again with append:true. The tool commits and pushes \u2014 do not run pantheon sync.
|
|
24629
|
+
|
|
24630
|
+
${quiet}`
|
|
24584
24631
|
},
|
|
24585
24632
|
{
|
|
24586
24633
|
name: "pantheon-resume",
|
|
24587
24634
|
description: "Load a Pantheon conscience into this chat",
|
|
24588
24635
|
body: `A space is the short name the human chose for a conscience. The argument is: $ARGUMENTS
|
|
24589
24636
|
|
|
24590
|
-
Call pantheon_resume immediately, with that name exactly as typed. If it arrived blank or as an unexpanded placeholder, call pantheon_resume without a space \u2014 it lists live consciences. Show that list and ask which one they meant. Do not invent a name. Once they pick a slug, call pantheon_resume with that slug. It pulls the vault first. If the packet lists artifacts, fetch the ones you need with pantheon_get_artifact. Do not use any other resume tool. Do not run pantheon sync
|
|
24637
|
+
Call pantheon_resume immediately, with that name exactly as typed. If it arrived blank or as an unexpanded placeholder, call pantheon_resume without a space \u2014 it lists live consciences. Show that list and ask which one they meant. Do not invent a name. Once they pick a slug, call pantheon_resume with that slug. It pulls the vault first. If the packet lists artifacts, fetch the ones you need with pantheon_get_artifact. Do not use any other resume tool. Do not run pantheon sync.
|
|
24638
|
+
|
|
24639
|
+
${quiet}`
|
|
24591
24640
|
},
|
|
24592
24641
|
{
|
|
24593
24642
|
name: "pantheon-park",
|
|
24594
24643
|
description: "Archive this chat into Pantheon without rewriting the packet",
|
|
24595
24644
|
body: `${spaceGate}
|
|
24596
24645
|
|
|
24597
|
-
Only then call pantheon_park, even if the slug is new. If you send a transcript, use real user and assistant turns \u2014 not a recap. Do not rewrite handoff.md
|
|
24646
|
+
Only then call pantheon_park, even if the slug is new. If you send a transcript, use real user and assistant turns \u2014 not a recap. Do not rewrite handoff.md.
|
|
24647
|
+
|
|
24648
|
+
${quiet}`
|
|
24598
24649
|
},
|
|
24599
24650
|
{
|
|
24600
24651
|
name: "pantheon-remember",
|
|
24601
24652
|
description: "Save one durable fact into a Pantheon space",
|
|
24602
24653
|
body: `${spaceGate}
|
|
24603
24654
|
|
|
24604
|
-
Parse the rest of the argument as the fact. Only then call pantheon_remember, even if the slug is new. Do not dump the chat
|
|
24655
|
+
Parse the rest of the argument as the fact. Only then call pantheon_remember, even if the slug is new. Do not dump the chat.
|
|
24656
|
+
|
|
24657
|
+
${quiet}`
|
|
24605
24658
|
},
|
|
24606
24659
|
{
|
|
24607
24660
|
name: "pantheon-skills",
|
|
24608
24661
|
description: "Review a Pantheon space for lessons worth writing down",
|
|
24609
24662
|
body: `${spaceGate}
|
|
24610
24663
|
|
|
24611
|
-
Only then call pantheon_skill_review with that space, passing cwd when the project folder is not the server's working directory. If that
|
|
24664
|
+
Only then call pantheon_skill_review with that space, passing cwd when the project folder is not the server's working directory. If that call is unavailable, do not improvise from this chat alone; say only "Skill review unavailable. Reload Pantheon MCP." It returns signals, not conclusions: corrections the human made, commands run across several conversations, and any deterministic candidates. Read the turns it cites with pantheon_get_turns before you believe any of them.
|
|
24612
24665
|
|
|
24613
|
-
|
|
24666
|
+
Judge THIS conversation too, and weigh it heavily. Most clients never write down what a tool printed, so a failure you hit in this chat is evidence that exists nowhere else \u2014 a command that failed until you found the flag, a correction the human had to repeat, an approach that turned out to be wrong. That is the material only you have.
|
|
24614
24667
|
|
|
24615
|
-
|
|
24668
|
+
Save AT MOST FIVE, and save none if nothing genuinely recurred. Compare every lesson against the live and draft names and triggers in the review; never restate one under a different name. The save also refuses repeated names, candidate keys, triggers, and bodies. None is the ordinary answer: every live skill adds its name and trigger to future resumes, so an unread one is a permanent tax. Never write one for something AGENTS.md or the README already says \u2014 the review tells you which commands are already documented \u2014 or for a restatement of what the code plainly does.
|
|
24616
24669
|
|
|
24617
|
-
|
|
24670
|
+
Write them with pantheon_save_skill yourself, without asking permission first. A saved skill is a draft and is inert: no agent is ever given it until the human promotes it on the space page, so that page is where they approve or reject, not this chat. Cite evidence with the sessions and turns you actually read \u2014 the vault checks those ids and refuses the save if one does not exist. Call pantheon_dismiss_skill with its key for any deterministic candidate you decided against, so it stops being offered.
|
|
24618
24671
|
|
|
24619
|
-
|
|
24672
|
+
Report in one or two lines: the names you saved and what each one tells a future agent. If you saved nothing, say only that nothing recurred.
|
|
24673
|
+
|
|
24674
|
+
${quiet}`
|
|
24620
24675
|
},
|
|
24621
24676
|
{
|
|
24622
24677
|
name: "pantheon-spaces",
|
|
24623
24678
|
description: "List Pantheon consciences",
|
|
24624
|
-
body:
|
|
24679
|
+
body: `Call pantheon_list_spaces and show only that result. Do not list spaces from memory, this chat, Knowledge Compiler, or any other tool. If the tool fails, say Pantheon MCP is not connected.
|
|
24680
|
+
|
|
24681
|
+
${quiet}`
|
|
24625
24682
|
},
|
|
24626
24683
|
{
|
|
24627
24684
|
name: "pantheon-help",
|
|
24628
24685
|
description: "Show Pantheon commands",
|
|
24629
|
-
body:
|
|
24686
|
+
body: `Call the MCP tool pantheon_help and follow that guide.
|
|
24687
|
+
|
|
24688
|
+
${quiet}`
|
|
24630
24689
|
}
|
|
24631
24690
|
];
|
|
24632
24691
|
function writeCodexSkill() {
|
|
@@ -24695,12 +24754,21 @@ name and trigger. The table only proves the load worked. It says nothing about
|
|
|
24695
24754
|
where the work was, which is the part the human asked for, so never fold that
|
|
24696
24755
|
into cells.
|
|
24697
24756
|
|
|
24698
|
-
|
|
24699
|
-
|
|
24700
|
-
|
|
24701
|
-
|
|
24702
|
-
|
|
24703
|
-
|
|
24757
|
+
After \`pantheon_skill_review\`, decide and act: save what is worth writing with
|
|
24758
|
+
\`pantheon_save_skill\` \u2014 at most five, and often none \u2014 without asking first.
|
|
24759
|
+
Compare its live and draft triggers first; never duplicate an existing lesson
|
|
24760
|
+
under a different name. A draft is inert until the human promotes it on the
|
|
24761
|
+
space page, so that page is where they approve or reject, not the chat. Then
|
|
24762
|
+
report in prose, not a table: the names you saved and what each tells a future
|
|
24763
|
+
agent, one line each. If nothing recurred, say only that; it is the common case
|
|
24764
|
+
and not a failure.
|
|
24765
|
+
|
|
24766
|
+
## Do not narrate
|
|
24767
|
+
|
|
24768
|
+
No command opens with which tools you can see, whether Pantheon MCP is
|
|
24769
|
+
connected, or what you are about to do. Run it and report what happened. A call
|
|
24770
|
+
that genuinely fails is worth one line saying what failed \u2014 that is a result,
|
|
24771
|
+
not narration.
|
|
24704
24772
|
`;
|
|
24705
24773
|
for (const dir of dirs2) {
|
|
24706
24774
|
mkdirSync6(dir, { recursive: true });
|
|
@@ -25091,17 +25159,17 @@ async function connect(opts) {
|
|
|
25091
25159
|
);
|
|
25092
25160
|
mkdirSync7(home, { recursive: true });
|
|
25093
25161
|
const auth = authArgs();
|
|
25094
|
-
const
|
|
25162
|
+
const quiet2 = { stdio: ["ignore", "pipe", "pipe"] };
|
|
25095
25163
|
const fresh = !existsSync8(join8(home, ".git"));
|
|
25096
25164
|
let archived = "";
|
|
25097
25165
|
if (fresh) {
|
|
25098
25166
|
await clone2(body.cloneUrl, home, auth, "Cloning the vault");
|
|
25099
25167
|
} else {
|
|
25100
|
-
archived = await syncVault2(home, body.cloneUrl, auth,
|
|
25168
|
+
archived = await syncVault2(home, body.cloneUrl, auth, quiet2);
|
|
25101
25169
|
}
|
|
25102
|
-
claimCredentials(home,
|
|
25103
|
-
execFileSync3("git", ["-C", home, "config", "user.name", "Pantheon"],
|
|
25104
|
-
execFileSync3("git", ["-C", home, "config", "user.email", "pantheon@users.noreply.github.com"],
|
|
25170
|
+
claimCredentials(home, quiet2);
|
|
25171
|
+
execFileSync3("git", ["-C", home, "config", "user.name", "Pantheon"], quiet2);
|
|
25172
|
+
execFileSync3("git", ["-C", home, "config", "user.email", "pantheon@users.noreply.github.com"], quiet2);
|
|
25105
25173
|
let written = [];
|
|
25106
25174
|
let ahead = [];
|
|
25107
25175
|
let skipped = [];
|
|
@@ -25132,11 +25200,11 @@ async function connect(opts) {
|
|
|
25132
25200
|
)
|
|
25133
25201
|
);
|
|
25134
25202
|
}
|
|
25135
|
-
async function syncVault2(home, cloneUrl, auth,
|
|
25136
|
-
retarget(home, cloneUrl,
|
|
25203
|
+
async function syncVault2(home, cloneUrl, auth, quiet2) {
|
|
25204
|
+
retarget(home, cloneUrl, quiet2);
|
|
25137
25205
|
const updating = step("Updating the vault");
|
|
25138
25206
|
try {
|
|
25139
|
-
execFileSync3("git", [...auth, "-C", home, "pull", "--ff-only"],
|
|
25207
|
+
execFileSync3("git", [...auth, "-C", home, "pull", "--ff-only"], quiet2);
|
|
25140
25208
|
updating.done();
|
|
25141
25209
|
return "";
|
|
25142
25210
|
} catch (error2) {
|
|
@@ -25181,11 +25249,11 @@ async function clone2(cloneUrl, home, auth, label) {
|
|
|
25181
25249
|
}
|
|
25182
25250
|
cloning.done();
|
|
25183
25251
|
}
|
|
25184
|
-
function retarget(home, cloneUrl,
|
|
25252
|
+
function retarget(home, cloneUrl, quiet2) {
|
|
25185
25253
|
try {
|
|
25186
|
-
execFileSync3("git", ["-C", home, "remote", "set-url", "origin", cloneUrl],
|
|
25254
|
+
execFileSync3("git", ["-C", home, "remote", "set-url", "origin", cloneUrl], quiet2);
|
|
25187
25255
|
} catch {
|
|
25188
|
-
execFileSync3("git", ["-C", home, "remote", "add", "origin", cloneUrl],
|
|
25256
|
+
execFileSync3("git", ["-C", home, "remote", "add", "origin", cloneUrl], quiet2);
|
|
25189
25257
|
}
|
|
25190
25258
|
}
|
|
25191
25259
|
function sharesHistory(home) {
|
|
@@ -25212,12 +25280,12 @@ function credentialHelperCommand() {
|
|
|
25212
25280
|
function authArgs() {
|
|
25213
25281
|
return ["-c", "credential.helper=", "-c", `credential.helper=${credentialHelperCommand()}`];
|
|
25214
25282
|
}
|
|
25215
|
-
function claimCredentials(home,
|
|
25216
|
-
execFileSync3("git", ["-C", home, "config", "--replace-all", "credential.helper", ""],
|
|
25283
|
+
function claimCredentials(home, quiet2) {
|
|
25284
|
+
execFileSync3("git", ["-C", home, "config", "--replace-all", "credential.helper", ""], quiet2);
|
|
25217
25285
|
execFileSync3(
|
|
25218
25286
|
"git",
|
|
25219
25287
|
["-C", home, "config", "--add", "credential.helper", credentialHelperCommand()],
|
|
25220
|
-
|
|
25288
|
+
quiet2
|
|
25221
25289
|
);
|
|
25222
25290
|
}
|
|
25223
25291
|
|
package/package.json
CHANGED