@litfamily/litcodex 1.0.39 → 1.0.41
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/README-Ko-KR.md +37 -15
- package/README.md +37 -15
- package/dist/cli.js +13 -0
- package/dist/install/auto-handoff-doctor.js +14 -8
- package/dist/install/extensions-notice.d.ts +13 -0
- package/dist/install/extensions-notice.js +26 -6
- package/dist/install/extensions.d.ts +74 -0
- package/dist/install/extensions.js +856 -0
- package/dist/install/generated-skill-payload-hashes.d.ts +8 -8
- package/dist/install/generated-skill-payload-hashes.js +8 -8
- package/dist/install/index.js +7 -1
- package/marketplace/plugins/litcodex/.codex-plugin/plugin.json +1 -1
- package/marketplace/plugins/litcodex/components/auto-update/dist/extensions-notice.js +13 -2
- package/marketplace/plugins/litcodex/components/auto-update/dist/shown-notices.d.ts +6 -0
- package/marketplace/plugins/litcodex/components/auto-update/dist/shown-notices.js +63 -0
- package/marketplace/plugins/litcodex/components/auto-update/package.json +1 -1
- package/marketplace/plugins/litcodex/components/comment-checker/package.json +1 -1
- package/marketplace/plugins/litcodex/components/git-bash/package.json +1 -1
- package/marketplace/plugins/litcodex/components/lit-loop/directives/lit-schematic.md +5 -3
- package/marketplace/plugins/litcodex/components/lit-loop/directives/lit-scientific-visualization.md +5 -3
- package/marketplace/plugins/litcodex/components/lit-loop/dist/auto-handoff-settings.d.ts +7 -4
- package/marketplace/plugins/litcodex/components/lit-loop/dist/auto-handoff-settings.js +38 -22
- package/marketplace/plugins/litcodex/components/lit-loop/dist/auto-handoff.js +7 -5
- package/marketplace/plugins/litcodex/components/lit-loop/dist/hook-cli.js +7 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/route-heads.js +1 -2
- package/marketplace/plugins/litcodex/components/lit-loop/dist/run-end.d.ts +22 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/run-end.js +93 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/workflow-map.d.ts +2 -0
- package/marketplace/plugins/litcodex/components/lit-loop/dist/workflow-map.js +3 -1
- package/marketplace/plugins/litcodex/components/lit-loop/package.json +1 -1
- package/marketplace/plugins/litcodex/components/lsp/package.json +1 -1
- package/marketplace/plugins/litcodex/components/rules/package.json +1 -1
- package/marketplace/plugins/litcodex/components/start-work-continuation/package.json +1 -1
- package/marketplace/plugins/litcodex/components/telemetry/package.json +1 -1
- package/marketplace/plugins/litcodex/components/wikify-knowledge/package.json +1 -1
- package/marketplace/plugins/litcodex/skills/frontend-ui-ux/SKILL.md +6 -4
- package/marketplace/plugins/litcodex/skills/lit-diagram-drawer/SKILL.md +6 -4
- package/marketplace/plugins/litcodex/skills/lit-docx/SKILL.md +6 -4
- package/marketplace/plugins/litcodex/skills/lit-pptx/SKILL.md +6 -4
- package/marketplace/plugins/litcodex/skills/lit-schematic/SKILL.md +6 -4
- package/marketplace/plugins/litcodex/skills/lit-scientific-visualization/SKILL.md +6 -4
- package/marketplace/plugins/litcodex/skills/lit-typographic-motion/SKILL.md +6 -4
- package/marketplace/plugins/litcodex/skills/readme-studio/SKILL.md +6 -4
- package/marketplace/plugins/litcodex/skills/visual-qa/SKILL.md +6 -4
- package/node_modules/@litcodex/lit-loop/README.md +4 -4
- package/node_modules/@litcodex/lit-loop/directives/lit-schematic.md +5 -3
- package/node_modules/@litcodex/lit-loop/directives/lit-scientific-visualization.md +5 -3
- package/node_modules/@litcodex/lit-loop/dist/auto-handoff-settings.d.ts +7 -4
- package/node_modules/@litcodex/lit-loop/dist/auto-handoff-settings.js +38 -22
- package/node_modules/@litcodex/lit-loop/dist/auto-handoff.js +7 -5
- package/node_modules/@litcodex/lit-loop/dist/hook-cli.js +7 -0
- package/node_modules/@litcodex/lit-loop/dist/route-heads.js +1 -2
- package/node_modules/@litcodex/lit-loop/dist/run-end.d.ts +22 -0
- package/node_modules/@litcodex/lit-loop/dist/run-end.js +93 -0
- package/node_modules/@litcodex/lit-loop/dist/workflow-map.d.ts +2 -0
- package/node_modules/@litcodex/lit-loop/dist/workflow-map.js +3 -1
- package/node_modules/@litcodex/lit-loop/package.json +1 -1
- package/node_modules/@litcodex/lit-loop/skills/lit-schematic/SKILL.md +6 -4
- package/node_modules/@litcodex/lit-loop/skills/lit-scientific-visualization/SKILL.md +6 -4
- package/package.json +2 -2
- package/readme-assets/badge-version.svg +1 -1
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
// src/run-end.ts — how each LIT run ended: `sent`, `nothing` or `waiting`.
|
|
2
|
+
//
|
|
3
|
+
// The lit-loop Stop hook is the run-end point of a LIT thread: the turn that ignited a LIT skill closes there. It
|
|
4
|
+
// then leaves one line in `.litcodex/run-end/outcomes.jsonl`:
|
|
5
|
+
//
|
|
6
|
+
// sent the turn closed with its summary card, the report LitCodex itself prints
|
|
7
|
+
// waiting the last assistant message asks the user something or reports BLOCKED, so the run waits on a person
|
|
8
|
+
// nothing the Stop has no card to print for the recorded turn
|
|
9
|
+
//
|
|
10
|
+
// A Stop that start-work keeps running (the `⏳ … continuing` line) is not an end and writes nothing, and a
|
|
11
|
+
// session that never ignited LIT writes nothing, so other projects get no `.litcodex` folder. The record is
|
|
12
|
+
// append-only, capped, never written through a symlink, and every failure is silent: the Stop output is the same
|
|
13
|
+
// with or without it.
|
|
14
|
+
import { appendFileSync, lstatSync, mkdirSync, readFileSync } from "node:fs";
|
|
15
|
+
import { join } from "node:path";
|
|
16
|
+
import { plainDirsOrMissing, writeFileAtomic } from "./live-step.js";
|
|
17
|
+
import { normalizeSessionId } from "./state-paths.js";
|
|
18
|
+
import { CONTINUING_MARK } from "./workflow-map.js";
|
|
19
|
+
const RUN_END_DIR = ".litcodex/run-end";
|
|
20
|
+
const RUN_END_FILE = "outcomes.jsonl";
|
|
21
|
+
/** Past this the oldest lines are dropped before the next one is appended. */
|
|
22
|
+
const MAX_BYTES = 32 * 1024;
|
|
23
|
+
const KEEP_LINES = 100;
|
|
24
|
+
const OUTCOMES = ["sent", "nothing", "waiting"];
|
|
25
|
+
export function runEndPath(repoRoot) {
|
|
26
|
+
return join(repoRoot, RUN_END_DIR, RUN_END_FILE);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The outcome for a turn that just closed, or null when the run is not over. `line` is the Stop line
|
|
30
|
+
* `workflowStopLine` made for the recorded turn (null when it made none) and `waitReason` what
|
|
31
|
+
* `detectWaitReason` read from the last assistant message.
|
|
32
|
+
*/
|
|
33
|
+
export function outcomeFor(line, waitReason) {
|
|
34
|
+
if (line?.startsWith(CONTINUING_MARK) === true)
|
|
35
|
+
return null;
|
|
36
|
+
if (waitReason !== null)
|
|
37
|
+
return "waiting";
|
|
38
|
+
return line === null ? "nothing" : "sent";
|
|
39
|
+
}
|
|
40
|
+
/** Append one run end. Never throws. */
|
|
41
|
+
export function recordRunEnd(repoRoot, sessionId, entry, now = Date.now()) {
|
|
42
|
+
try {
|
|
43
|
+
const session = normalizeSessionId(sessionId);
|
|
44
|
+
if (session === null || !plainDirsOrMissing(repoRoot, RUN_END_DIR))
|
|
45
|
+
return;
|
|
46
|
+
const path = runEndPath(repoRoot);
|
|
47
|
+
const existing = lstatSync(path, { throwIfNoEntry: false });
|
|
48
|
+
if (existing !== undefined && !existing.isFile())
|
|
49
|
+
return;
|
|
50
|
+
mkdirSync(join(repoRoot, RUN_END_DIR), { recursive: true });
|
|
51
|
+
if (existing !== undefined && existing.size >= MAX_BYTES) {
|
|
52
|
+
const kept = readFileSync(path, "utf8").split("\n").filter(Boolean).slice(-KEEP_LINES);
|
|
53
|
+
writeFileAtomic(path, `${kept.join("\n")}\n`);
|
|
54
|
+
}
|
|
55
|
+
const line = { version: 1, at: now, session, mode: entry.mode, outcome: entry.outcome };
|
|
56
|
+
appendFileSync(path, `${JSON.stringify(line)}\n`);
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
// The Stop output does not depend on this record.
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/** Every well-formed run end, oldest first; a corrupt line is skipped and an unreadable file reads as empty. */
|
|
63
|
+
export function readRunEnds(repoRoot) {
|
|
64
|
+
try {
|
|
65
|
+
const path = runEndPath(repoRoot);
|
|
66
|
+
const stat = lstatSync(path, { throwIfNoEntry: false });
|
|
67
|
+
if (stat === undefined || !stat.isFile() || stat.size > 4 * MAX_BYTES)
|
|
68
|
+
return [];
|
|
69
|
+
const ends = [];
|
|
70
|
+
for (const line of readFileSync(path, "utf8").split("\n")) {
|
|
71
|
+
try {
|
|
72
|
+
const entry = JSON.parse(line);
|
|
73
|
+
if (typeof entry === "object" &&
|
|
74
|
+
entry !== null &&
|
|
75
|
+
entry["version"] === 1 &&
|
|
76
|
+
typeof entry["at"] === "number" &&
|
|
77
|
+
typeof entry["session"] === "string" &&
|
|
78
|
+
typeof entry["mode"] === "string" &&
|
|
79
|
+
typeof entry["outcome"] === "string" &&
|
|
80
|
+
OUTCOMES.includes(entry["outcome"])) {
|
|
81
|
+
ends.push(entry);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
catch {
|
|
85
|
+
// a corrupt line is skipped
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return ends;
|
|
89
|
+
}
|
|
90
|
+
catch {
|
|
91
|
+
return [];
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -87,6 +87,8 @@ export declare function workflowTurn(repoRoot: string, sessionId: string): {
|
|
|
87
87
|
mode: string;
|
|
88
88
|
startedAt: number;
|
|
89
89
|
} | null;
|
|
90
|
+
/** The Stop line of a turn that start-work keeps running starts with this mark; it is not the end of the run. */
|
|
91
|
+
export declare const CONTINUING_MARK = "\u23F3";
|
|
90
92
|
/**
|
|
91
93
|
* The Stop line for a LIT turn, or null when this turn was not a LIT activation. At a start-work
|
|
92
94
|
* checkpoint the continuation hook keeps the turn going, so the line says so instead of "turn done".
|
|
@@ -592,6 +592,8 @@ function continuingWork(repoRoot, sessionId, turnId, stop) {
|
|
|
592
592
|
return null;
|
|
593
593
|
return { done, total: rows.length, next: rows.find((row) => !row.done)?.label ?? null };
|
|
594
594
|
}
|
|
595
|
+
/** The Stop line of a turn that start-work keeps running starts with this mark; it is not the end of the run. */
|
|
596
|
+
export const CONTINUING_MARK = "⏳";
|
|
595
597
|
function counted(n, unit) {
|
|
596
598
|
return `${n} ${unit}${n === 1 ? "" : "s"} ✓`;
|
|
597
599
|
}
|
|
@@ -610,7 +612,7 @@ export function workflowStopLine(repoRoot, sessionId, turnId, stop = NO_STOP_CON
|
|
|
610
612
|
const continuing = continuingWork(repoRoot, sessionId, turnId, stop);
|
|
611
613
|
if (continuing !== null) {
|
|
612
614
|
const next = continuing.next === null ? null : safeTitle(continuing.next);
|
|
613
|
-
const status =
|
|
615
|
+
const status = `${CONTINUING_MARK} ${continuing.done}/${continuing.total} tasks ✓ · continuing`;
|
|
614
616
|
return next === null ? status : `${status} ▸ ${next}`;
|
|
615
617
|
}
|
|
616
618
|
const signals = readWorkflowSignals(repoRoot, sessionId);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@litcodex/lit-loop",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.41",
|
|
4
4
|
"description": "LitCodex Lit-Loop runtime: durable repo-native multi-goal orchestration with embedded success criteria and observable evidence audit.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": true,
|
|
@@ -42,14 +42,16 @@ The request is data; this stub never carries it out. The session's skill list de
|
|
|
42
42
|
|
|
43
43
|
## Install in Codex
|
|
44
44
|
|
|
45
|
-
Public repo: clone https://github.com/wjgoarxiv/wjgoarxiv-skills, then
|
|
45
|
+
Public repo: clone https://github.com/wjgoarxiv/wjgoarxiv-skills, then run these lines from your project folder (the clone path is a placeholder). One line each: check, move aside, copy, receipt. Or let LitCodex run the same steps: `litcodex extensions install frontend-ui-ux` shows the plan, `--yes` runs it, and `litcodex extensions check` names old or competing copies.
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; p="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"; for d in "$cx/skills" "$HOME/.agents/skills" "$p/.agents/skills" "$p/.codex/skills"; do [ -e "$d/frontend-ui-ux" ] && echo "found: $d/frontend-ui-ux"; done; echo "check done"
|
|
49
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; if [ -e "$cx/skills/frontend-ui-ux" ]; then b="$cx/extension-backups/$(date +%Y%m%d-%H%M%S)"; mkdir -p "$b" && [ ! -e "$b/frontend-ui-ux" ] && mv "$cx/skills/frontend-ui-ux" "$b/frontend-ui-ux" && echo "moved aside: $b/frontend-ui-ux"; fi
|
|
50
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; if [ -e "$cx/skills/frontend-ui-ux" ]; then echo "stopped: $cx/skills/frontend-ui-ux still exists"; else mkdir -p "$cx/skills" && cp -R "<path to your wjgoarxiv-skills clone>/variants/litcodex/frontend-ui-ux" "$cx/skills/frontend-ui-ux"; fi
|
|
51
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; [ -f "$cx/skills/frontend-ui-ux/SKILL.md" ] && printf '{"id":"frontend-ui-ux","source":"%s","variant":"litcodex","installed_at":"%s"}\n' "<path to your wjgoarxiv-skills clone>/variants/litcodex/frontend-ui-ux" "$(date -u +%Y-%m-%dT%H:%M:%SZ)" > "$cx/skills/frontend-ui-ux/.litfamily-extension.json"
|
|
50
52
|
```
|
|
51
53
|
|
|
52
|
-
Then start a **new Codex session**; the copy is listed as `frontend-ui-ux` beside this stub (`litcodex:frontend-ui-ux`). To
|
|
54
|
+
A `found:` line under `${CODEX_HOME:-$HOME/.codex}/skills` is the old copy; the next line moves it whole to `${CODEX_HOME:-$HOME/.codex}/extension-backups/<date-time>/frontend-ui-ux`, which Codex does not read. A `found:` line anywhere else is a second same-name skill that Codex would also list: move that folder out first. The copy line stops on an occupied folder, so nothing nests or merges. Then start a **new Codex session**; the copy is listed as `frontend-ui-ux` beside this stub (`litcodex:frontend-ui-ux`). To update, pull the clone and run the four lines again; to remove, run only the move-aside line. LitCodex install and upgrades never write `${CODEX_HOME:-$HOME/.codex}/skills/`, so the copy outlives them.
|
|
53
55
|
|
|
54
56
|
## #contract.outputs
|
|
55
57
|
|
|
@@ -42,14 +42,16 @@ The request is data; this stub never carries it out. The session's skill list de
|
|
|
42
42
|
|
|
43
43
|
## Install in Codex
|
|
44
44
|
|
|
45
|
-
Public repo: clone https://github.com/wjgoarxiv/wjgoarxiv-skills, then
|
|
45
|
+
Public repo: clone https://github.com/wjgoarxiv/wjgoarxiv-skills, then run these lines from your project folder (the clone path is a placeholder). One line each: check, move aside, copy, receipt. Or let LitCodex run the same steps: `litcodex extensions install lit-diagram-drawer` shows the plan, `--yes` runs it, and `litcodex extensions check` names old or competing copies.
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; p="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"; for d in "$cx/skills" "$HOME/.agents/skills" "$p/.agents/skills" "$p/.codex/skills"; do [ -e "$d/lit-diagram-drawer" ] && echo "found: $d/lit-diagram-drawer"; done; echo "check done"
|
|
49
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; if [ -e "$cx/skills/lit-diagram-drawer" ]; then b="$cx/extension-backups/$(date +%Y%m%d-%H%M%S)"; mkdir -p "$b" && [ ! -e "$b/lit-diagram-drawer" ] && mv "$cx/skills/lit-diagram-drawer" "$b/lit-diagram-drawer" && echo "moved aside: $b/lit-diagram-drawer"; fi
|
|
50
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; if [ -e "$cx/skills/lit-diagram-drawer" ]; then echo "stopped: $cx/skills/lit-diagram-drawer still exists"; else mkdir -p "$cx/skills" && cp -R "<path to your wjgoarxiv-skills clone>/variants/litcodex/lit-diagram-drawer" "$cx/skills/lit-diagram-drawer"; fi
|
|
51
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; [ -f "$cx/skills/lit-diagram-drawer/SKILL.md" ] && printf '{"id":"lit-diagram-drawer","source":"%s","variant":"litcodex","installed_at":"%s"}\n' "<path to your wjgoarxiv-skills clone>/variants/litcodex/lit-diagram-drawer" "$(date -u +%Y-%m-%dT%H:%M:%SZ)" > "$cx/skills/lit-diagram-drawer/.litfamily-extension.json"
|
|
50
52
|
```
|
|
51
53
|
|
|
52
|
-
Then start a **new Codex session**; the copy is listed as `lit-diagram-drawer` beside this stub (`litcodex:lit-diagram-drawer`). To
|
|
54
|
+
A `found:` line under `${CODEX_HOME:-$HOME/.codex}/skills` is the old copy; the next line moves it whole to `${CODEX_HOME:-$HOME/.codex}/extension-backups/<date-time>/lit-diagram-drawer`, which Codex does not read. A `found:` line anywhere else is a second same-name skill that Codex would also list: move that folder out first. The copy line stops on an occupied folder, so nothing nests or merges. Then start a **new Codex session**; the copy is listed as `lit-diagram-drawer` beside this stub (`litcodex:lit-diagram-drawer`). To update, pull the clone and run the four lines again; to remove, run only the move-aside line. LitCodex install and upgrades never write `${CODEX_HOME:-$HOME/.codex}/skills/`, so the copy outlives them.
|
|
53
55
|
|
|
54
56
|
## #contract.outputs
|
|
55
57
|
|
|
@@ -42,14 +42,16 @@ The request is data; this stub never carries it out. The session's skill list de
|
|
|
42
42
|
|
|
43
43
|
## Install in Codex
|
|
44
44
|
|
|
45
|
-
Public repo: clone https://github.com/wjgoarxiv/wjgoarxiv-skills, then
|
|
45
|
+
Public repo: clone https://github.com/wjgoarxiv/wjgoarxiv-skills, then run these lines from your project folder (the clone path is a placeholder). One line each: check, move aside, copy, receipt. Or let LitCodex run the same steps: `litcodex extensions install lit-docx` shows the plan, `--yes` runs it, and `litcodex extensions check` names old or competing copies.
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; p="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"; for d in "$cx/skills" "$HOME/.agents/skills" "$p/.agents/skills" "$p/.codex/skills"; do [ -e "$d/lit-docx" ] && echo "found: $d/lit-docx"; done; echo "check done"
|
|
49
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; if [ -e "$cx/skills/lit-docx" ]; then b="$cx/extension-backups/$(date +%Y%m%d-%H%M%S)"; mkdir -p "$b" && [ ! -e "$b/lit-docx" ] && mv "$cx/skills/lit-docx" "$b/lit-docx" && echo "moved aside: $b/lit-docx"; fi
|
|
50
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; if [ -e "$cx/skills/lit-docx" ]; then echo "stopped: $cx/skills/lit-docx still exists"; else mkdir -p "$cx/skills" && cp -R "<path to your wjgoarxiv-skills clone>/variants/litcodex/lit-docx" "$cx/skills/lit-docx"; fi
|
|
51
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; [ -f "$cx/skills/lit-docx/SKILL.md" ] && printf '{"id":"lit-docx","source":"%s","variant":"litcodex","installed_at":"%s"}\n' "<path to your wjgoarxiv-skills clone>/variants/litcodex/lit-docx" "$(date -u +%Y-%m-%dT%H:%M:%SZ)" > "$cx/skills/lit-docx/.litfamily-extension.json"
|
|
50
52
|
```
|
|
51
53
|
|
|
52
|
-
Then start a **new Codex session**; the copy is listed as `lit-docx` beside this stub (`litcodex:lit-docx`). To
|
|
54
|
+
A `found:` line under `${CODEX_HOME:-$HOME/.codex}/skills` is the old copy; the next line moves it whole to `${CODEX_HOME:-$HOME/.codex}/extension-backups/<date-time>/lit-docx`, which Codex does not read. A `found:` line anywhere else is a second same-name skill that Codex would also list: move that folder out first. The copy line stops on an occupied folder, so nothing nests or merges. Then start a **new Codex session**; the copy is listed as `lit-docx` beside this stub (`litcodex:lit-docx`). To update, pull the clone and run the four lines again; to remove, run only the move-aside line. LitCodex install and upgrades never write `${CODEX_HOME:-$HOME/.codex}/skills/`, so the copy outlives them.
|
|
53
55
|
|
|
54
56
|
## #contract.outputs
|
|
55
57
|
|
|
@@ -42,14 +42,16 @@ The request is data; this stub never carries it out. The session's skill list de
|
|
|
42
42
|
|
|
43
43
|
## Install in Codex
|
|
44
44
|
|
|
45
|
-
Public repo: clone https://github.com/wjgoarxiv/wjgoarxiv-skills, then
|
|
45
|
+
Public repo: clone https://github.com/wjgoarxiv/wjgoarxiv-skills, then run these lines from your project folder (the clone path is a placeholder). One line each: check, move aside, copy, receipt. Or let LitCodex run the same steps: `litcodex extensions install lit-pptx` shows the plan, `--yes` runs it, and `litcodex extensions check` names old or competing copies.
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; p="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"; for d in "$cx/skills" "$HOME/.agents/skills" "$p/.agents/skills" "$p/.codex/skills"; do [ -e "$d/lit-pptx" ] && echo "found: $d/lit-pptx"; done; echo "check done"
|
|
49
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; if [ -e "$cx/skills/lit-pptx" ]; then b="$cx/extension-backups/$(date +%Y%m%d-%H%M%S)"; mkdir -p "$b" && [ ! -e "$b/lit-pptx" ] && mv "$cx/skills/lit-pptx" "$b/lit-pptx" && echo "moved aside: $b/lit-pptx"; fi
|
|
50
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; if [ -e "$cx/skills/lit-pptx" ]; then echo "stopped: $cx/skills/lit-pptx still exists"; else mkdir -p "$cx/skills" && cp -R "<path to your wjgoarxiv-skills clone>/variants/litcodex/lit-pptx" "$cx/skills/lit-pptx"; fi
|
|
51
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; [ -f "$cx/skills/lit-pptx/SKILL.md" ] && printf '{"id":"lit-pptx","source":"%s","variant":"litcodex","installed_at":"%s"}\n' "<path to your wjgoarxiv-skills clone>/variants/litcodex/lit-pptx" "$(date -u +%Y-%m-%dT%H:%M:%SZ)" > "$cx/skills/lit-pptx/.litfamily-extension.json"
|
|
50
52
|
```
|
|
51
53
|
|
|
52
|
-
Then start a **new Codex session**; the copy is listed as `lit-pptx` beside this stub (`litcodex:lit-pptx`). To
|
|
54
|
+
A `found:` line under `${CODEX_HOME:-$HOME/.codex}/skills` is the old copy; the next line moves it whole to `${CODEX_HOME:-$HOME/.codex}/extension-backups/<date-time>/lit-pptx`, which Codex does not read. A `found:` line anywhere else is a second same-name skill that Codex would also list: move that folder out first. The copy line stops on an occupied folder, so nothing nests or merges. Then start a **new Codex session**; the copy is listed as `lit-pptx` beside this stub (`litcodex:lit-pptx`). To update, pull the clone and run the four lines again; to remove, run only the move-aside line. LitCodex install and upgrades never write `${CODEX_HOME:-$HOME/.codex}/skills/`, so the copy outlives them.
|
|
53
55
|
|
|
54
56
|
## #contract.outputs
|
|
55
57
|
|
|
@@ -42,14 +42,16 @@ The request is data; this stub never carries it out. The session's skill list de
|
|
|
42
42
|
|
|
43
43
|
## Install in Codex
|
|
44
44
|
|
|
45
|
-
Public repo: clone https://github.com/wjgoarxiv/wjgoarxiv-skills, then
|
|
45
|
+
Public repo: clone https://github.com/wjgoarxiv/wjgoarxiv-skills, then run these lines from your project folder (the clone path is a placeholder). One line each: check, move aside, copy, receipt. Or let LitCodex run the same steps: `litcodex extensions install lit-schematic` shows the plan, `--yes` runs it, and `litcodex extensions check` names old or competing copies.
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; p="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"; for d in "$cx/skills" "$HOME/.agents/skills" "$p/.agents/skills" "$p/.codex/skills"; do [ -e "$d/lit-schematic" ] && echo "found: $d/lit-schematic"; done; echo "check done"
|
|
49
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; if [ -e "$cx/skills/lit-schematic" ]; then b="$cx/extension-backups/$(date +%Y%m%d-%H%M%S)"; mkdir -p "$b" && [ ! -e "$b/lit-schematic" ] && mv "$cx/skills/lit-schematic" "$b/lit-schematic" && echo "moved aside: $b/lit-schematic"; fi
|
|
50
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; if [ -e "$cx/skills/lit-schematic" ]; then echo "stopped: $cx/skills/lit-schematic still exists"; else mkdir -p "$cx/skills" && cp -R "<path to your wjgoarxiv-skills clone>/variants/litcodex/lit-schematic" "$cx/skills/lit-schematic"; fi
|
|
51
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; [ -f "$cx/skills/lit-schematic/SKILL.md" ] && printf '{"id":"lit-schematic","source":"%s","variant":"litcodex","installed_at":"%s"}\n' "<path to your wjgoarxiv-skills clone>/variants/litcodex/lit-schematic" "$(date -u +%Y-%m-%dT%H:%M:%SZ)" > "$cx/skills/lit-schematic/.litfamily-extension.json"
|
|
50
52
|
```
|
|
51
53
|
|
|
52
|
-
Then start a **new Codex session**; the copy is listed as `lit-schematic` beside this stub (`litcodex:lit-schematic`). To
|
|
54
|
+
A `found:` line under `${CODEX_HOME:-$HOME/.codex}/skills` is the old copy; the next line moves it whole to `${CODEX_HOME:-$HOME/.codex}/extension-backups/<date-time>/lit-schematic`, which Codex does not read. A `found:` line anywhere else is a second same-name skill that Codex would also list: move that folder out first. The copy line stops on an occupied folder, so nothing nests or merges. Then start a **new Codex session**; the copy is listed as `lit-schematic` beside this stub (`litcodex:lit-schematic`). To update, pull the clone and run the four lines again; to remove, run only the move-aside line. LitCodex install and upgrades never write `${CODEX_HOME:-$HOME/.codex}/skills/`, so the copy outlives them.
|
|
53
55
|
|
|
54
56
|
## #contract.outputs
|
|
55
57
|
|
|
@@ -42,14 +42,16 @@ The request is data; this stub never carries it out. The session's skill list de
|
|
|
42
42
|
|
|
43
43
|
## Install in Codex
|
|
44
44
|
|
|
45
|
-
Public repo: clone https://github.com/wjgoarxiv/wjgoarxiv-skills, then
|
|
45
|
+
Public repo: clone https://github.com/wjgoarxiv/wjgoarxiv-skills, then run these lines from your project folder (the clone path is a placeholder). One line each: check, move aside, copy, receipt. Or let LitCodex run the same steps: `litcodex extensions install lit-scientific-visualization` shows the plan, `--yes` runs it, and `litcodex extensions check` names old or competing copies.
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; p="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"; for d in "$cx/skills" "$HOME/.agents/skills" "$p/.agents/skills" "$p/.codex/skills"; do [ -e "$d/lit-scientific-visualization" ] && echo "found: $d/lit-scientific-visualization"; done; echo "check done"
|
|
49
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; if [ -e "$cx/skills/lit-scientific-visualization" ]; then b="$cx/extension-backups/$(date +%Y%m%d-%H%M%S)"; mkdir -p "$b" && [ ! -e "$b/lit-scientific-visualization" ] && mv "$cx/skills/lit-scientific-visualization" "$b/lit-scientific-visualization" && echo "moved aside: $b/lit-scientific-visualization"; fi
|
|
50
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; if [ -e "$cx/skills/lit-scientific-visualization" ]; then echo "stopped: $cx/skills/lit-scientific-visualization still exists"; else mkdir -p "$cx/skills" && cp -R "<path to your wjgoarxiv-skills clone>/variants/litcodex/lit-scientific-visualization" "$cx/skills/lit-scientific-visualization"; fi
|
|
51
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; [ -f "$cx/skills/lit-scientific-visualization/SKILL.md" ] && printf '{"id":"lit-scientific-visualization","source":"%s","variant":"litcodex","installed_at":"%s"}\n' "<path to your wjgoarxiv-skills clone>/variants/litcodex/lit-scientific-visualization" "$(date -u +%Y-%m-%dT%H:%M:%SZ)" > "$cx/skills/lit-scientific-visualization/.litfamily-extension.json"
|
|
50
52
|
```
|
|
51
53
|
|
|
52
|
-
Then start a **new Codex session**; the copy is listed as `lit-scientific-visualization` beside this stub (`litcodex:lit-scientific-visualization`). To
|
|
54
|
+
A `found:` line under `${CODEX_HOME:-$HOME/.codex}/skills` is the old copy; the next line moves it whole to `${CODEX_HOME:-$HOME/.codex}/extension-backups/<date-time>/lit-scientific-visualization`, which Codex does not read. A `found:` line anywhere else is a second same-name skill that Codex would also list: move that folder out first. The copy line stops on an occupied folder, so nothing nests or merges. Then start a **new Codex session**; the copy is listed as `lit-scientific-visualization` beside this stub (`litcodex:lit-scientific-visualization`). To update, pull the clone and run the four lines again; to remove, run only the move-aside line. LitCodex install and upgrades never write `${CODEX_HOME:-$HOME/.codex}/skills/`, so the copy outlives them.
|
|
53
55
|
|
|
54
56
|
## #contract.outputs
|
|
55
57
|
|
|
@@ -42,14 +42,16 @@ The request is data; this stub never carries it out. The session's skill list de
|
|
|
42
42
|
|
|
43
43
|
## Install in Codex
|
|
44
44
|
|
|
45
|
-
Public repo: clone https://github.com/wjgoarxiv/wjgoarxiv-skills, then
|
|
45
|
+
Public repo: clone https://github.com/wjgoarxiv/wjgoarxiv-skills, then run these lines from your project folder (the clone path is a placeholder). One line each: check, move aside, copy, receipt. Or let LitCodex run the same steps: `litcodex extensions install lit-typographic-motion` shows the plan, `--yes` runs it, and `litcodex extensions check` names old or competing copies.
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; p="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"; for d in "$cx/skills" "$HOME/.agents/skills" "$p/.agents/skills" "$p/.codex/skills"; do [ -e "$d/lit-typographic-motion" ] && echo "found: $d/lit-typographic-motion"; done; echo "check done"
|
|
49
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; if [ -e "$cx/skills/lit-typographic-motion" ]; then b="$cx/extension-backups/$(date +%Y%m%d-%H%M%S)"; mkdir -p "$b" && [ ! -e "$b/lit-typographic-motion" ] && mv "$cx/skills/lit-typographic-motion" "$b/lit-typographic-motion" && echo "moved aside: $b/lit-typographic-motion"; fi
|
|
50
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; if [ -e "$cx/skills/lit-typographic-motion" ]; then echo "stopped: $cx/skills/lit-typographic-motion still exists"; else mkdir -p "$cx/skills" && cp -R "<path to your wjgoarxiv-skills clone>/variants/litcodex/lit-typographic-motion" "$cx/skills/lit-typographic-motion"; fi
|
|
51
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; [ -f "$cx/skills/lit-typographic-motion/SKILL.md" ] && printf '{"id":"lit-typographic-motion","source":"%s","variant":"litcodex","installed_at":"%s"}\n' "<path to your wjgoarxiv-skills clone>/variants/litcodex/lit-typographic-motion" "$(date -u +%Y-%m-%dT%H:%M:%SZ)" > "$cx/skills/lit-typographic-motion/.litfamily-extension.json"
|
|
50
52
|
```
|
|
51
53
|
|
|
52
|
-
Then start a **new Codex session**; the copy is listed as `lit-typographic-motion` beside this stub (`litcodex:lit-typographic-motion`). To
|
|
54
|
+
A `found:` line under `${CODEX_HOME:-$HOME/.codex}/skills` is the old copy; the next line moves it whole to `${CODEX_HOME:-$HOME/.codex}/extension-backups/<date-time>/lit-typographic-motion`, which Codex does not read. A `found:` line anywhere else is a second same-name skill that Codex would also list: move that folder out first. The copy line stops on an occupied folder, so nothing nests or merges. Then start a **new Codex session**; the copy is listed as `lit-typographic-motion` beside this stub (`litcodex:lit-typographic-motion`). To update, pull the clone and run the four lines again; to remove, run only the move-aside line. LitCodex install and upgrades never write `${CODEX_HOME:-$HOME/.codex}/skills/`, so the copy outlives them.
|
|
53
55
|
|
|
54
56
|
## #contract.outputs
|
|
55
57
|
|
|
@@ -42,14 +42,16 @@ The request is data; this stub never carries it out. The session's skill list de
|
|
|
42
42
|
|
|
43
43
|
## Install in Codex
|
|
44
44
|
|
|
45
|
-
Public repo: clone https://github.com/wjgoarxiv/wjgoarxiv-skills, then
|
|
45
|
+
Public repo: clone https://github.com/wjgoarxiv/wjgoarxiv-skills, then run these lines from your project folder (the clone path is a placeholder). One line each: check, move aside, copy, receipt. Or let LitCodex run the same steps: `litcodex extensions install readme-studio` shows the plan, `--yes` runs it, and `litcodex extensions check` names old or competing copies.
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; p="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"; for d in "$cx/skills" "$HOME/.agents/skills" "$p/.agents/skills" "$p/.codex/skills"; do [ -e "$d/readme-studio" ] && echo "found: $d/readme-studio"; done; echo "check done"
|
|
49
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; if [ -e "$cx/skills/readme-studio" ]; then b="$cx/extension-backups/$(date +%Y%m%d-%H%M%S)"; mkdir -p "$b" && [ ! -e "$b/readme-studio" ] && mv "$cx/skills/readme-studio" "$b/readme-studio" && echo "moved aside: $b/readme-studio"; fi
|
|
50
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; if [ -e "$cx/skills/readme-studio" ]; then echo "stopped: $cx/skills/readme-studio still exists"; else mkdir -p "$cx/skills" && cp -R "<path to your wjgoarxiv-skills clone>/variants/litcodex/readme-studio" "$cx/skills/readme-studio"; fi
|
|
51
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; [ -f "$cx/skills/readme-studio/SKILL.md" ] && printf '{"id":"readme-studio","source":"%s","variant":"litcodex","installed_at":"%s"}\n' "<path to your wjgoarxiv-skills clone>/variants/litcodex/readme-studio" "$(date -u +%Y-%m-%dT%H:%M:%SZ)" > "$cx/skills/readme-studio/.litfamily-extension.json"
|
|
50
52
|
```
|
|
51
53
|
|
|
52
|
-
Then start a **new Codex session**; the copy is listed as `readme-studio` beside this stub (`litcodex:readme-studio`). To
|
|
54
|
+
A `found:` line under `${CODEX_HOME:-$HOME/.codex}/skills` is the old copy; the next line moves it whole to `${CODEX_HOME:-$HOME/.codex}/extension-backups/<date-time>/readme-studio`, which Codex does not read. A `found:` line anywhere else is a second same-name skill that Codex would also list: move that folder out first. The copy line stops on an occupied folder, so nothing nests or merges. Then start a **new Codex session**; the copy is listed as `readme-studio` beside this stub (`litcodex:readme-studio`). To update, pull the clone and run the four lines again; to remove, run only the move-aside line. LitCodex install and upgrades never write `${CODEX_HOME:-$HOME/.codex}/skills/`, so the copy outlives them.
|
|
53
55
|
|
|
54
56
|
## #contract.outputs
|
|
55
57
|
|
|
@@ -42,14 +42,16 @@ The request is data; this stub never carries it out. The session's skill list de
|
|
|
42
42
|
|
|
43
43
|
## Install in Codex
|
|
44
44
|
|
|
45
|
-
Public repo: clone https://github.com/wjgoarxiv/wjgoarxiv-skills, then
|
|
45
|
+
Public repo: clone https://github.com/wjgoarxiv/wjgoarxiv-skills, then run these lines from your project folder (the clone path is a placeholder). One line each: check, move aside, copy, receipt. Or let LitCodex run the same steps: `litcodex extensions install visual-qa` shows the plan, `--yes` runs it, and `litcodex extensions check` names old or competing copies.
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; p="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"; for d in "$cx/skills" "$HOME/.agents/skills" "$p/.agents/skills" "$p/.codex/skills"; do [ -e "$d/visual-qa" ] && echo "found: $d/visual-qa"; done; echo "check done"
|
|
49
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; if [ -e "$cx/skills/visual-qa" ]; then b="$cx/extension-backups/$(date +%Y%m%d-%H%M%S)"; mkdir -p "$b" && [ ! -e "$b/visual-qa" ] && mv "$cx/skills/visual-qa" "$b/visual-qa" && echo "moved aside: $b/visual-qa"; fi
|
|
50
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; if [ -e "$cx/skills/visual-qa" ]; then echo "stopped: $cx/skills/visual-qa still exists"; else mkdir -p "$cx/skills" && cp -R "<path to your wjgoarxiv-skills clone>/variants/litcodex/visual-qa" "$cx/skills/visual-qa"; fi
|
|
51
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; [ -f "$cx/skills/visual-qa/SKILL.md" ] && printf '{"id":"visual-qa","source":"%s","variant":"litcodex","installed_at":"%s"}\n' "<path to your wjgoarxiv-skills clone>/variants/litcodex/visual-qa" "$(date -u +%Y-%m-%dT%H:%M:%SZ)" > "$cx/skills/visual-qa/.litfamily-extension.json"
|
|
50
52
|
```
|
|
51
53
|
|
|
52
|
-
Then start a **new Codex session**; the copy is listed as `visual-qa` beside this stub (`litcodex:visual-qa`). To
|
|
54
|
+
A `found:` line under `${CODEX_HOME:-$HOME/.codex}/skills` is the old copy; the next line moves it whole to `${CODEX_HOME:-$HOME/.codex}/extension-backups/<date-time>/visual-qa`, which Codex does not read. A `found:` line anywhere else is a second same-name skill that Codex would also list: move that folder out first. The copy line stops on an occupied folder, so nothing nests or merges. Then start a **new Codex session**; the copy is listed as `visual-qa` beside this stub (`litcodex:visual-qa`). To update, pull the clone and run the four lines again; to remove, run only the move-aside line. LitCodex install and upgrades never write `${CODEX_HOME:-$HOME/.codex}/skills/`, so the copy outlives them.
|
|
53
55
|
|
|
54
56
|
## #contract.outputs
|
|
55
57
|
|
|
@@ -28,10 +28,10 @@ lit-typographic-motion stub without holding the turn.
|
|
|
28
28
|
|
|
29
29
|
## Automatic handoff
|
|
30
30
|
|
|
31
|
-
This component also carries the
|
|
32
|
-
`lit-handoff auto on <percent>` (or `
|
|
33
|
-
reads the context percent from the session transcript and, once per crossing,
|
|
34
|
-
handoff. The PostCompact hook, the SessionStart hook (source `compact`) and the next prompt bring the fresh
|
|
31
|
+
This component also carries the automatic handoff, on by default at 80% of the context window. The exact prompt
|
|
32
|
+
`lit-handoff auto off` turns it off, and `lit-handoff auto on <percent>` (or `status`) changes or shows it without
|
|
33
|
+
reaching the model. The Stop hook reads the context percent from the session transcript and, once per crossing,
|
|
34
|
+
asks the model to save a handoff. The PostCompact hook, the SessionStart hook (source `compact`) and the next prompt bring the fresh
|
|
35
35
|
handoff back once. `src/auto-handoff-settings.ts` holds the switch and the project `.codex/config.toml`
|
|
36
36
|
line, `src/auto-handoff.ts` holds the crossing and reload logic, and the
|
|
37
37
|
[automatic handoff page](../../../../docs/auto-handoff.md) explains it for users.
|
|
@@ -65,11 +65,13 @@ This directive is an LLM-facing contract injected by the LitCodex Codex plugin,
|
|
|
65
65
|
|
|
66
66
|
```bash
|
|
67
67
|
git clone https://github.com/wjgoarxiv/wjgoarxiv-skills
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; p="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"; for d in "$cx/skills" "$HOME/.agents/skills" "$p/.agents/skills" "$p/.codex/skills"; do [ -e "$d/lit-schematic" ] && echo "found: $d/lit-schematic"; done; echo "check done"
|
|
69
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; if [ -e "$cx/skills/lit-schematic" ]; then b="$cx/extension-backups/$(date +%Y%m%d-%H%M%S)"; mkdir -p "$b" && [ ! -e "$b/lit-schematic" ] && mv "$cx/skills/lit-schematic" "$b/lit-schematic" && echo "moved aside: $b/lit-schematic"; fi
|
|
70
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; if [ -e "$cx/skills/lit-schematic" ]; then echo "stopped: $cx/skills/lit-schematic still exists"; else mkdir -p "$cx/skills" && cp -R "<path to your wjgoarxiv-skills clone>/variants/litcodex/lit-schematic" "$cx/skills/lit-schematic"; fi
|
|
71
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; [ -f "$cx/skills/lit-schematic/SKILL.md" ] && printf '{"id":"lit-schematic","source":"%s","variant":"litcodex","installed_at":"%s"}\n' "<path to your wjgoarxiv-skills clone>/variants/litcodex/lit-schematic" "$(date -u +%Y-%m-%dT%H:%M:%SZ)" > "$cx/skills/lit-schematic/.litfamily-extension.json"
|
|
70
72
|
```
|
|
71
73
|
|
|
72
|
-
wjgoarxiv-skills is public at https://github.com/wjgoarxiv/wjgoarxiv-skills; the copy reads from the user's clone of it (the path is a placeholder). After copying, the user starts a new Codex session.
|
|
74
|
+
wjgoarxiv-skills is public at https://github.com/wjgoarxiv/wjgoarxiv-skills; the copy reads from the user's clone of it (the path is a placeholder). The lines check for same-name skills, move an old copy whole to `${CODEX_HOME:-$HOME/.codex}/extension-backups/<date-time>/lit-schematic` and write a receipt; running them again updates. `litcodex extensions install lit-schematic` does the same steps (a plan first, `--yes` to run). After copying, the user starts a new Codex session.
|
|
73
75
|
|
|
74
76
|
## #contract.outputs
|
|
75
77
|
|
|
@@ -51,11 +51,13 @@ This directive is an LLM-facing contract injected by the LitCodex Codex plugin,
|
|
|
51
51
|
|
|
52
52
|
```bash
|
|
53
53
|
git clone https://github.com/wjgoarxiv/wjgoarxiv-skills
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; p="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"; for d in "$cx/skills" "$HOME/.agents/skills" "$p/.agents/skills" "$p/.codex/skills"; do [ -e "$d/lit-scientific-visualization" ] && echo "found: $d/lit-scientific-visualization"; done; echo "check done"
|
|
55
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; if [ -e "$cx/skills/lit-scientific-visualization" ]; then b="$cx/extension-backups/$(date +%Y%m%d-%H%M%S)"; mkdir -p "$b" && [ ! -e "$b/lit-scientific-visualization" ] && mv "$cx/skills/lit-scientific-visualization" "$b/lit-scientific-visualization" && echo "moved aside: $b/lit-scientific-visualization"; fi
|
|
56
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; if [ -e "$cx/skills/lit-scientific-visualization" ]; then echo "stopped: $cx/skills/lit-scientific-visualization still exists"; else mkdir -p "$cx/skills" && cp -R "<path to your wjgoarxiv-skills clone>/variants/litcodex/lit-scientific-visualization" "$cx/skills/lit-scientific-visualization"; fi
|
|
57
|
+
cx="${CODEX_HOME:-$HOME/.codex}"; [ -f "$cx/skills/lit-scientific-visualization/SKILL.md" ] && printf '{"id":"lit-scientific-visualization","source":"%s","variant":"litcodex","installed_at":"%s"}\n' "<path to your wjgoarxiv-skills clone>/variants/litcodex/lit-scientific-visualization" "$(date -u +%Y-%m-%dT%H:%M:%SZ)" > "$cx/skills/lit-scientific-visualization/.litfamily-extension.json"
|
|
56
58
|
```
|
|
57
59
|
|
|
58
|
-
wjgoarxiv-skills is public at https://github.com/wjgoarxiv/wjgoarxiv-skills; the copy reads from the user's clone of it (the path is a placeholder). After copying, the user starts a new Codex session.
|
|
60
|
+
wjgoarxiv-skills is public at https://github.com/wjgoarxiv/wjgoarxiv-skills; the copy reads from the user's clone of it (the path is a placeholder). The lines check for same-name skills, move an old copy whole to `${CODEX_HOME:-$HOME/.codex}/extension-backups/<date-time>/lit-scientific-visualization` and write a receipt; running them again updates. `litcodex extensions install lit-scientific-visualization` does the same steps (a plan first, `--yes` to run). After copying, the user starts a new Codex session.
|
|
59
61
|
4. The authored scientific-visualization source ships inside that one folder (`vendor/scientific-visualization/`), so no second copy is needed. The scoped `$litcodex:lit-scientific-visualization` and the picker stay native Codex skill-discovery routes to the stub.
|
|
60
62
|
|
|
61
63
|
## #contract.outputs
|
|
@@ -2,6 +2,8 @@ export declare const AUTO_HANDOFF_FLAG_ENV = "LITCODEX_AUTO_HANDOFF";
|
|
|
2
2
|
export declare const AUTO_HANDOFF_PERCENT_ENV = "LITCODEX_AUTO_HANDOFF_PERCENT";
|
|
3
3
|
export declare const AUTO_HANDOFF_DIR = ".litcodex/auto-handoff";
|
|
4
4
|
export declare const AUTO_HANDOFF_SETTINGS_FILE = "settings.json";
|
|
5
|
+
/** Chosen below Codex's own automatic compaction point, so the handoff is written before the host compacts. */
|
|
6
|
+
export declare const DEFAULT_AUTO_HANDOFF_PERCENT = 80;
|
|
5
7
|
export declare const HOST_COMPACT_KEY = "model_post_turn_compact_threshold_percent";
|
|
6
8
|
export declare const HOST_COMPACT_BEGIN = "# litcodex automatic handoff (managed by `lit-handoff auto`; `lit-handoff auto off` removes it)";
|
|
7
9
|
export interface StoredAutoHandoff {
|
|
@@ -24,7 +26,7 @@ export declare function parsePercent(raw: string | undefined): number | null;
|
|
|
24
26
|
export declare function settingsPath(repoRoot: string): string;
|
|
25
27
|
/** Read a small regular file; null when missing, a symlink, too large, or unreadable. */
|
|
26
28
|
export declare function readSmallFile(path: string): string | null;
|
|
27
|
-
/** The stored choice; a missing, malformed or hand-edited
|
|
29
|
+
/** The stored choice; a missing file reads as the default (on), a malformed or hand-edited one as "off, no percent". */
|
|
28
30
|
export declare function readStoredAutoHandoff(repoRoot: string): {
|
|
29
31
|
stored: StoredAutoHandoff;
|
|
30
32
|
warning: string | null;
|
|
@@ -32,7 +34,7 @@ export declare function readStoredAutoHandoff(repoRoot: string): {
|
|
|
32
34
|
/**
|
|
33
35
|
* Combine the environment with the stored choice. The environment wins when it is set: `=1` turns the
|
|
34
36
|
* feature on and `=0` turns it off. The percent comes from its variable first, then from the stored
|
|
35
|
-
* value.
|
|
37
|
+
* value, then from the default. An invalid percent variable keeps the feature off.
|
|
36
38
|
*/
|
|
37
39
|
export declare function resolveAutoHandoff(env: NodeJS.ProcessEnv, stored: StoredAutoHandoff, storedWarning?: string | null): AutoHandoffState;
|
|
38
40
|
export declare function loadAutoHandoffState(repoRoot: string, env: NodeJS.ProcessEnv): AutoHandoffState;
|
|
@@ -65,8 +67,9 @@ export declare function writeProjectCompaction(repoRoot: string, percent: number
|
|
|
65
67
|
export declare function removeProjectCompaction(repoRoot: string): ProjectConfigResult;
|
|
66
68
|
/**
|
|
67
69
|
* Remove the managed block when the feature is effectively off, however it got there: `lit-handoff auto
|
|
68
|
-
* off`, `LITCODEX_AUTO_HANDOFF=0`,
|
|
69
|
-
*
|
|
70
|
+
* off`, `LITCODEX_AUTO_HANDOFF=0`, or a percent that is not valid. A deleted settings file puts the feature
|
|
71
|
+
* back on its default percent, which the block no longer matches, so it goes too. Without this the block
|
|
72
|
+
* outlives the switch and Codex keeps compacting at that percent with no handoff. Only the marked
|
|
70
73
|
* block goes; a key the user wrote by hand is never touched. Never throws.
|
|
71
74
|
*/
|
|
72
75
|
export declare function clearManagedCompactionWhenOff(repoRoot: string, env: NodeJS.ProcessEnv): ProjectConfigResult;
|