okstra 0.184.0 → 0.185.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cli-registry.mjs +9 -0
- package/dist/cli-registry.mjs.map +1 -1
- package/dist/commands/chat/chat.d.mts +1 -0
- package/dist/commands/chat/chat.mjs +385 -0
- package/dist/commands/chat/chat.mjs.map +1 -0
- package/dist/lib/skill-catalog.mjs +1 -0
- package/dist/lib/skill-catalog.mjs.map +1 -1
- package/docs/architecture.md +8 -6
- package/docs/cli.md +2 -1
- package/docs/for-ai/README.md +4 -2
- package/docs/for-ai/skills/okstra-chat.md +28 -0
- package/docs/for-ai/skills/okstra-inspect.md +1 -1
- package/docs/for-ai/skills/okstra-run.md +2 -2
- package/docs/for-ai/skills/okstra-user-response.md +10 -8
- package/docs/project-structure-overview.md +5 -4
- package/docs/task-process/README.md +1 -1
- package/docs/task-process/implementation-planning.md +1 -1
- package/package.json +1 -1
- package/runtime/BUILD.json +2 -2
- package/runtime/prompts/lead/okstra-lead-contract.md +6 -5
- package/runtime/prompts/lead/report-writer.md +1 -1
- package/runtime/prompts/profiles/_clarification-recommendation.md +2 -2
- package/runtime/prompts/profiles/implementation-planning.md +2 -1
- package/runtime/prompts/wizard/prompts.ko.json +2 -0
- package/runtime/python/okstra_ctl/adapters/hosts/claude-code/relay.md +2 -2
- package/runtime/python/okstra_ctl/adapters/hosts/codex/relay.md +1 -1
- package/runtime/python/okstra_ctl/adapters/hosts/grok/relay.md +1 -1
- package/runtime/python/okstra_ctl/next_phase.py +67 -4
- package/runtime/python/okstra_ctl/user_response.py +147 -37
- package/runtime/python/okstra_ctl/wizard.py +13 -0
- package/runtime/skills/okstra-chat/SKILL.md +104 -0
- package/runtime/skills/okstra-inspect/facets/status.md +6 -5
- package/runtime/skills/okstra-run/SKILL.md +2 -2
- package/runtime/skills/okstra-user-response/SKILL.md +50 -16
- package/runtime/validators/validate-run.py +90 -15
package/README.md
CHANGED
|
@@ -195,7 +195,7 @@ Use these slash commands inside a Claude Code session:
|
|
|
195
195
|
| `/okstra-container-build` | Deploy a verified task's code as a local Docker Compose group and monitor per-container logs (subcommands: `up` / `status` / `logs` / `stop-watcher` / `down`) |
|
|
196
196
|
| `/okstra-manager` | Coordinate cross-project okstra tasks through manager-owned plans, assignments, one-way project sync snapshots, status, and child launch context packets |
|
|
197
197
|
| `/okstra-pr-gen` | Register PR body templates under `~/.okstra/template/pr/` and generate a PR description from a branch diff (subcommands: `template` / `branches` / `gen`). Global skill—needs a Git repo, not a registered okstra project |
|
|
198
|
-
| `/okstra-user-response` | Answer a task's open clarification questions in-session and write the response sidecar. Each answer is dispositioned as `answer` or `reframe`; a `reframe` is carried into the next run as a re-scoped brief |
|
|
198
|
+
| `/okstra-user-response` | Answer a task's open clarification questions in-session and write the response sidecar. The skill reads cited context first, then asks in plain language with each option's outcome through the host's native selection UI. Each answer is dispositioned as `answer` or `reframe`; a `reframe` is carried into the next run as a re-scoped brief |
|
|
199
199
|
| `/okstra-code-review` | Review what a diff changed—one okstra `implementation` stage, or any branch—against this project's coding-preflight rules, and write the result to a file. The orchestrator censuses the diff into an explicit worklist once, four parallel reviewers return a verdict for every cell, and a coverage audit re-dispatches any gap. Result files land under `.okstra/tasks/<task-group>/<task-id>/code-reviews/` (stage mode) or `.project-docs/code-reviews/<branch>/` (branch mode) |
|
|
200
200
|
| `/okstra-setup` | Bootstrap a project as described in §3.2 |
|
|
201
201
|
|
package/dist/cli-registry.mjs
CHANGED
|
@@ -510,6 +510,15 @@ export const COMMAND_REGISTRY = [
|
|
|
510
510
|
"~/.okstra/memory-book.",
|
|
511
511
|
],
|
|
512
512
|
},
|
|
513
|
+
{
|
|
514
|
+
name: "chat",
|
|
515
|
+
module: "./commands/chat/chat.mjs",
|
|
516
|
+
export: "run",
|
|
517
|
+
category: "introspection",
|
|
518
|
+
summary: [
|
|
519
|
+
"Create and join global chat rooms under ~/.okstra/chat.",
|
|
520
|
+
],
|
|
521
|
+
},
|
|
513
522
|
{
|
|
514
523
|
name: "pr",
|
|
515
524
|
module: "./commands/pr/pr.mjs",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-registry.mjs","sourceRoot":"","sources":["../src/cli-registry.mts"],"names":[],"mappings":"AAKA,MAAM,cAAc,GAAG,EAAE,CAAC;AAE1B,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B;QACE,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,kCAAkC;QAC1C,MAAM,EAAE,YAAY;QACpB,QAAQ,EAAE,OAAO;QACjB,OAAO,EAAE,CAAC,0DAA0D,CAAC;KACtE;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,MAAM,EAAE,kCAAkC;QAC1C,MAAM,EAAE,oBAAoB;QAC5B,QAAQ,EAAE,OAAO;QACjB,OAAO,EAAE,CAAC,0DAA0D,CAAC;KACtE;IACD;QACE,IAAI,EAAE,WAAW;QACjB,MAAM,EAAE,oCAAoC;QAC5C,MAAM,EAAE,cAAc;QACtB,QAAQ,EAAE,OAAO;QACjB,OAAO,EAAE,CAAC,0DAA0D,CAAC;KACtE;IACD;QACE,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,gCAAgC;QACxC,MAAM,EAAE,KAAK;QACb,QAAQ,EAAE,OAAO;QACjB,OAAO,EAAE,CAAC,qDAAqD,CAAC;KACjE;IACD;QACE,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,iCAAiC;QACzC,MAAM,EAAE,KAAK;QACb,QAAQ,EAAE,OAAO;QACjB,OAAO,EAAE;YACP,sEAAsE;SACvE;KACF;IACD;QACE,IAAI,EAAE,eAAe;QACrB,MAAM,EAAE,wCAAwC;QAChD,MAAM,EAAE,KAAK;QACb,QAAQ,EAAE,OAAO;QACjB,OAAO,EAAE,CAAC,2DAA2D,CAAC;KACvE;IACD;QACE,IAAI,EAAE,WAAW;QACjB,MAAM,EAAE,oCAAoC;QAC5C,MAAM,EAAE,KAAK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CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,CAAC;IAC5E,OAAO,CAAC,IAAI,EAAE,GAAG,aAAa,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC7C,CAAC;AAED,SAAS,UAAU,CAAC,QAAuC;IACzD,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC;SAC3D,GAAG,CAAC,SAAS,CAAC;SACd,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC;AAED,MAAM,CAAC,MAAM,KAAK,GAChB,QAAQ;IACR,qBAAqB;IACrB,UAAU,CAAC,OAAO,CAAC;IACnB,2FAA2F;IAC3F,UAAU,CAAC,eAAe,CAAC;IAC3B,uBAAuB;IACvB,cAAc;IACd,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function run(args: readonly string[]): Promise<number>;
|
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
import { promises as fs } from "node:fs";
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
3
|
+
import { resolveOkstraHome } from "../../lib/paths.mjs";
|
|
4
|
+
const BROADCAST = "all";
|
|
5
|
+
const USAGE = `okstra chat — cross-session rooms in ~/.okstra/chat
|
|
6
|
+
|
|
7
|
+
Rooms live in the global okstra home. They are not task artifacts.
|
|
8
|
+
|
|
9
|
+
Usage:
|
|
10
|
+
okstra chat rooms
|
|
11
|
+
okstra chat create --room <name>
|
|
12
|
+
okstra chat join --room <name> --name <display>
|
|
13
|
+
okstra chat members --room <name>
|
|
14
|
+
okstra chat send --room <name> --as <display> --to <all|name> --body <text>
|
|
15
|
+
okstra chat unread --room <name> --as <display>
|
|
16
|
+
okstra chat inbox --room <name> --as <display>
|
|
17
|
+
okstra chat log --room <name> --as <display> [--to <all|name>]
|
|
18
|
+
okstra chat ack --room <name> --as <display> --through <id>
|
|
19
|
+
`;
|
|
20
|
+
class ChatError extends Error {
|
|
21
|
+
constructor(message) {
|
|
22
|
+
super(message);
|
|
23
|
+
this.name = "ChatError";
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function chatRoot() {
|
|
27
|
+
return join(resolveOkstraHome(), "chat");
|
|
28
|
+
}
|
|
29
|
+
function indexPath() {
|
|
30
|
+
return join(chatRoot(), "index.json");
|
|
31
|
+
}
|
|
32
|
+
function roomDir(room) {
|
|
33
|
+
return join(chatRoot(), "rooms", encodeURIComponent(room));
|
|
34
|
+
}
|
|
35
|
+
function statePath(room) {
|
|
36
|
+
return join(roomDir(room), "state.json");
|
|
37
|
+
}
|
|
38
|
+
function messagesPath(room) {
|
|
39
|
+
return join(roomDir(room), "messages.jsonl");
|
|
40
|
+
}
|
|
41
|
+
function takeValue(args, index, flag) {
|
|
42
|
+
const value = args[index + 1];
|
|
43
|
+
if (value === undefined || value.startsWith("--")) {
|
|
44
|
+
throw new ChatError(`${flag} requires a value`);
|
|
45
|
+
}
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
function parseFlags(args, allowed) {
|
|
49
|
+
const out = {};
|
|
50
|
+
for (let i = 0; i < args.length; i++) {
|
|
51
|
+
const flag = args[i];
|
|
52
|
+
if (flag === undefined)
|
|
53
|
+
continue;
|
|
54
|
+
if (!flag.startsWith("--") || !allowed.has(flag)) {
|
|
55
|
+
throw new ChatError(`unknown flag ${flag}`);
|
|
56
|
+
}
|
|
57
|
+
out[flag.slice(2)] = takeValue(args, i++, flag);
|
|
58
|
+
}
|
|
59
|
+
return out;
|
|
60
|
+
}
|
|
61
|
+
function requireFlag(flags, name) {
|
|
62
|
+
const value = flags[name];
|
|
63
|
+
if (value === undefined)
|
|
64
|
+
throw new ChatError(`${name === "name" ? "join requires --name" : `--${name} is required`}`);
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
function cleanToken(raw, label) {
|
|
68
|
+
const value = raw.trim();
|
|
69
|
+
if (value === "")
|
|
70
|
+
throw new ChatError(`${label} is empty`);
|
|
71
|
+
if (/[\\/\0\n\r]/.test(value)) {
|
|
72
|
+
throw new ChatError(`${label} contains a path separator`);
|
|
73
|
+
}
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
function cleanDisplayName(raw) {
|
|
77
|
+
const value = cleanToken(raw, "display name");
|
|
78
|
+
if (value === BROADCAST)
|
|
79
|
+
throw new ChatError("display name 'all' is reserved");
|
|
80
|
+
return value;
|
|
81
|
+
}
|
|
82
|
+
function formatLine(message) {
|
|
83
|
+
const to = message.to === BROADCAST ? BROADCAST : `@${message.to}`;
|
|
84
|
+
return `${message.id}:${message.at}:${to}:${message.body}`;
|
|
85
|
+
}
|
|
86
|
+
function emptyIndex() {
|
|
87
|
+
return { rooms: [] };
|
|
88
|
+
}
|
|
89
|
+
function emptyRoom(name) {
|
|
90
|
+
return { name, members: [], nextId: 1, cursors: {} };
|
|
91
|
+
}
|
|
92
|
+
function isIndex(value) {
|
|
93
|
+
if (typeof value !== "object" || value === null)
|
|
94
|
+
return false;
|
|
95
|
+
const rooms = value.rooms;
|
|
96
|
+
return Array.isArray(rooms) && rooms.every((item) => typeof item === "string");
|
|
97
|
+
}
|
|
98
|
+
function isRoomState(value) {
|
|
99
|
+
if (typeof value !== "object" || value === null)
|
|
100
|
+
return false;
|
|
101
|
+
const row = value;
|
|
102
|
+
return (typeof row.name === "string" &&
|
|
103
|
+
Array.isArray(row.members) &&
|
|
104
|
+
typeof row.nextId === "number" &&
|
|
105
|
+
typeof row.cursors === "object" &&
|
|
106
|
+
row.cursors !== null);
|
|
107
|
+
}
|
|
108
|
+
async function readJson(path) {
|
|
109
|
+
try {
|
|
110
|
+
return JSON.parse(await fs.readFile(path, "utf8"));
|
|
111
|
+
}
|
|
112
|
+
catch (err) {
|
|
113
|
+
const code = err.code;
|
|
114
|
+
if (code === "ENOENT")
|
|
115
|
+
return null;
|
|
116
|
+
throw err;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
async function writeJson(path, value) {
|
|
120
|
+
await fs.mkdir(dirname(path), { recursive: true });
|
|
121
|
+
const tmp = `${path}.${process.pid}.tmp`;
|
|
122
|
+
await fs.writeFile(tmp, `${JSON.stringify(value, null, 2)}\n`, "utf8");
|
|
123
|
+
await fs.rename(tmp, path);
|
|
124
|
+
}
|
|
125
|
+
async function withLock(dir, fn) {
|
|
126
|
+
await fs.mkdir(dir, { recursive: true });
|
|
127
|
+
const lockPath = join(dir, ".lock");
|
|
128
|
+
let handle;
|
|
129
|
+
for (let i = 0; i < 50; i++) {
|
|
130
|
+
try {
|
|
131
|
+
handle = await fs.open(lockPath, "wx");
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
catch (err) {
|
|
135
|
+
if (err.code !== "EEXIST")
|
|
136
|
+
throw err;
|
|
137
|
+
await new Promise((resolve) => setTimeout(resolve, 20));
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
if (handle === undefined)
|
|
141
|
+
throw new ChatError("could not lock chat store");
|
|
142
|
+
try {
|
|
143
|
+
return await fn();
|
|
144
|
+
}
|
|
145
|
+
finally {
|
|
146
|
+
await handle.close();
|
|
147
|
+
await fs.rm(lockPath, { force: true });
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
async function loadIndex() {
|
|
151
|
+
const parsed = await readJson(indexPath());
|
|
152
|
+
if (parsed === null)
|
|
153
|
+
return emptyIndex();
|
|
154
|
+
if (!isIndex(parsed))
|
|
155
|
+
throw new ChatError("chat index is damaged");
|
|
156
|
+
return parsed;
|
|
157
|
+
}
|
|
158
|
+
async function loadRoom(room) {
|
|
159
|
+
const parsed = await readJson(statePath(room));
|
|
160
|
+
if (parsed === null)
|
|
161
|
+
throw new ChatError("room not found");
|
|
162
|
+
if (!isRoomState(parsed))
|
|
163
|
+
throw new ChatError("room state is damaged");
|
|
164
|
+
return parsed;
|
|
165
|
+
}
|
|
166
|
+
async function loadMessages(room) {
|
|
167
|
+
let text;
|
|
168
|
+
try {
|
|
169
|
+
text = await fs.readFile(messagesPath(room), "utf8");
|
|
170
|
+
}
|
|
171
|
+
catch (err) {
|
|
172
|
+
if (err.code === "ENOENT")
|
|
173
|
+
return [];
|
|
174
|
+
throw err;
|
|
175
|
+
}
|
|
176
|
+
const rows = [];
|
|
177
|
+
for (const line of text.split(/\r?\n/)) {
|
|
178
|
+
if (line === "")
|
|
179
|
+
continue;
|
|
180
|
+
const parsed = JSON.parse(line);
|
|
181
|
+
if (typeof parsed === "object" && parsed !== null && "id" in parsed) {
|
|
182
|
+
rows.push(parsed);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
return rows;
|
|
186
|
+
}
|
|
187
|
+
async function appendMessage(room, message) {
|
|
188
|
+
await fs.mkdir(roomDir(room), { recursive: true });
|
|
189
|
+
await fs.appendFile(messagesPath(room), `${JSON.stringify(message)}\n`, "utf8");
|
|
190
|
+
}
|
|
191
|
+
function requireMember(state, name) {
|
|
192
|
+
if (!state.members.includes(name))
|
|
193
|
+
throw new ChatError("not a member");
|
|
194
|
+
}
|
|
195
|
+
function inboxOf(messages, member, afterId) {
|
|
196
|
+
return messages.filter((message) => {
|
|
197
|
+
if (message.id <= afterId)
|
|
198
|
+
return false;
|
|
199
|
+
return message.to === BROADCAST || message.to === member;
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
function printLines(lines, empty) {
|
|
203
|
+
process.stdout.write(lines.length === 0 ? `${empty}\n` : `${lines.join("\n")}\n`);
|
|
204
|
+
}
|
|
205
|
+
async function opRooms() {
|
|
206
|
+
const index = await loadIndex();
|
|
207
|
+
printLines(index.rooms, "no rooms");
|
|
208
|
+
return 0;
|
|
209
|
+
}
|
|
210
|
+
async function opCreate(args) {
|
|
211
|
+
const flags = parseFlags(args, new Set(["--room"]));
|
|
212
|
+
const room = cleanToken(requireFlag(flags, "room"), "room name");
|
|
213
|
+
await withLock(chatRoot(), async () => {
|
|
214
|
+
const index = await loadIndex();
|
|
215
|
+
if (index.rooms.includes(room))
|
|
216
|
+
throw new ChatError("room already exists");
|
|
217
|
+
await writeJson(statePath(room), emptyRoom(room));
|
|
218
|
+
await writeJson(indexPath(), { rooms: [...index.rooms, room] });
|
|
219
|
+
});
|
|
220
|
+
process.stdout.write(`created ${room}\n`);
|
|
221
|
+
return 0;
|
|
222
|
+
}
|
|
223
|
+
async function opJoin(args) {
|
|
224
|
+
const flags = parseFlags(args, new Set(["--room", "--name"]));
|
|
225
|
+
if (flags.name === undefined)
|
|
226
|
+
throw new ChatError("join requires --name");
|
|
227
|
+
const room = cleanToken(requireFlag(flags, "room"), "room name");
|
|
228
|
+
const name = cleanDisplayName(flags.name);
|
|
229
|
+
await withLock(roomDir(room), async () => {
|
|
230
|
+
const state = await loadRoom(room);
|
|
231
|
+
if (state.members.includes(name))
|
|
232
|
+
throw new ChatError("display name already taken");
|
|
233
|
+
const next = {
|
|
234
|
+
...state,
|
|
235
|
+
members: [...state.members, name],
|
|
236
|
+
cursors: { ...state.cursors, [name]: 0 },
|
|
237
|
+
};
|
|
238
|
+
await writeJson(statePath(room), next);
|
|
239
|
+
});
|
|
240
|
+
process.stdout.write(`joined ${room} as ${name}\n`);
|
|
241
|
+
return 0;
|
|
242
|
+
}
|
|
243
|
+
async function opMembers(args) {
|
|
244
|
+
const flags = parseFlags(args, new Set(["--room"]));
|
|
245
|
+
const room = cleanToken(requireFlag(flags, "room"), "room name");
|
|
246
|
+
const state = await loadRoom(room);
|
|
247
|
+
printLines(state.members, "no members");
|
|
248
|
+
return 0;
|
|
249
|
+
}
|
|
250
|
+
function resolveRecipient(state, raw) {
|
|
251
|
+
const value = raw.trim();
|
|
252
|
+
if (value === BROADCAST || value === `@${BROADCAST}`)
|
|
253
|
+
return BROADCAST;
|
|
254
|
+
const name = value.startsWith("@") ? value.slice(1) : value;
|
|
255
|
+
if (!state.members.includes(name))
|
|
256
|
+
throw new ChatError("recipient is not a member");
|
|
257
|
+
return name;
|
|
258
|
+
}
|
|
259
|
+
async function opSend(args) {
|
|
260
|
+
const flags = parseFlags(args, new Set(["--room", "--as", "--to", "--body"]));
|
|
261
|
+
if (flags.to === undefined)
|
|
262
|
+
throw new ChatError("send requires --to");
|
|
263
|
+
if (flags.body === undefined)
|
|
264
|
+
throw new ChatError("send requires --body");
|
|
265
|
+
const room = cleanToken(requireFlag(flags, "room"), "room name");
|
|
266
|
+
const from = cleanDisplayName(requireFlag(flags, "as"));
|
|
267
|
+
const body = flags.body;
|
|
268
|
+
if (body.trim() === "" || /[\n\r]/.test(body)) {
|
|
269
|
+
throw new ChatError("body must be a single non-empty line");
|
|
270
|
+
}
|
|
271
|
+
const id = await withLock(roomDir(room), async () => {
|
|
272
|
+
const state = await loadRoom(room);
|
|
273
|
+
requireMember(state, from);
|
|
274
|
+
const to = resolveRecipient(state, flags.to ?? "");
|
|
275
|
+
const message = {
|
|
276
|
+
id: state.nextId,
|
|
277
|
+
at: new Date().toISOString(),
|
|
278
|
+
from,
|
|
279
|
+
to,
|
|
280
|
+
body,
|
|
281
|
+
};
|
|
282
|
+
await appendMessage(room, message);
|
|
283
|
+
await writeJson(statePath(room), { ...state, nextId: state.nextId + 1 });
|
|
284
|
+
return message.id;
|
|
285
|
+
});
|
|
286
|
+
process.stdout.write(`sent ${id}\n`);
|
|
287
|
+
return 0;
|
|
288
|
+
}
|
|
289
|
+
async function opUnread(args) {
|
|
290
|
+
const flags = parseFlags(args, new Set(["--room", "--as"]));
|
|
291
|
+
const room = cleanToken(requireFlag(flags, "room"), "room name");
|
|
292
|
+
const name = cleanDisplayName(requireFlag(flags, "as"));
|
|
293
|
+
const state = await loadRoom(room);
|
|
294
|
+
requireMember(state, name);
|
|
295
|
+
const after = state.cursors[name] ?? 0;
|
|
296
|
+
const rows = inboxOf(await loadMessages(room), name, after);
|
|
297
|
+
printLines(rows.map(formatLine), "no unread");
|
|
298
|
+
return 0;
|
|
299
|
+
}
|
|
300
|
+
async function opInbox(args) {
|
|
301
|
+
const flags = parseFlags(args, new Set(["--room", "--as"]));
|
|
302
|
+
const room = cleanToken(requireFlag(flags, "room"), "room name");
|
|
303
|
+
const name = cleanDisplayName(requireFlag(flags, "as"));
|
|
304
|
+
const state = await loadRoom(room);
|
|
305
|
+
requireMember(state, name);
|
|
306
|
+
const rows = inboxOf(await loadMessages(room), name, 0);
|
|
307
|
+
printLines(rows.map(formatLine), "no inbox");
|
|
308
|
+
return 0;
|
|
309
|
+
}
|
|
310
|
+
async function opLog(args) {
|
|
311
|
+
const flags = parseFlags(args, new Set(["--room", "--as", "--to"]));
|
|
312
|
+
const room = cleanToken(requireFlag(flags, "room"), "room name");
|
|
313
|
+
const name = cleanDisplayName(requireFlag(flags, "as"));
|
|
314
|
+
const state = await loadRoom(room);
|
|
315
|
+
requireMember(state, name);
|
|
316
|
+
let rows = await loadMessages(room);
|
|
317
|
+
if (flags.to !== undefined) {
|
|
318
|
+
const to = resolveRecipient(state, flags.to);
|
|
319
|
+
rows = rows.filter((message) => message.to === to);
|
|
320
|
+
}
|
|
321
|
+
printLines(rows.map(formatLine), "no messages");
|
|
322
|
+
return 0;
|
|
323
|
+
}
|
|
324
|
+
async function opAck(args) {
|
|
325
|
+
const flags = parseFlags(args, new Set(["--room", "--as", "--through"]));
|
|
326
|
+
const room = cleanToken(requireFlag(flags, "room"), "room name");
|
|
327
|
+
const name = cleanDisplayName(requireFlag(flags, "as"));
|
|
328
|
+
const through = Number.parseInt(requireFlag(flags, "through"), 10);
|
|
329
|
+
if (!Number.isInteger(through) || through < 1) {
|
|
330
|
+
throw new ChatError("--through must be a positive message id");
|
|
331
|
+
}
|
|
332
|
+
await withLock(roomDir(room), async () => {
|
|
333
|
+
const state = await loadRoom(room);
|
|
334
|
+
requireMember(state, name);
|
|
335
|
+
const messages = await loadMessages(room);
|
|
336
|
+
if (!messages.some((message) => message.id === through)) {
|
|
337
|
+
throw new ChatError("message id not found");
|
|
338
|
+
}
|
|
339
|
+
await writeJson(statePath(room), {
|
|
340
|
+
...state,
|
|
341
|
+
cursors: { ...state.cursors, [name]: through },
|
|
342
|
+
});
|
|
343
|
+
});
|
|
344
|
+
process.stdout.write(`acked through ${through}\n`);
|
|
345
|
+
return 0;
|
|
346
|
+
}
|
|
347
|
+
export async function run(args) {
|
|
348
|
+
if (args.length === 0 || args.includes("--help") || args.includes("-h")) {
|
|
349
|
+
process.stdout.write(USAGE);
|
|
350
|
+
return args.length === 0 ? 2 : 0;
|
|
351
|
+
}
|
|
352
|
+
const op = args[0];
|
|
353
|
+
const rest = args.slice(1);
|
|
354
|
+
try {
|
|
355
|
+
switch (op) {
|
|
356
|
+
case "rooms":
|
|
357
|
+
return await opRooms();
|
|
358
|
+
case "create":
|
|
359
|
+
return await opCreate(rest);
|
|
360
|
+
case "join":
|
|
361
|
+
return await opJoin(rest);
|
|
362
|
+
case "members":
|
|
363
|
+
return await opMembers(rest);
|
|
364
|
+
case "send":
|
|
365
|
+
return await opSend(rest);
|
|
366
|
+
case "unread":
|
|
367
|
+
return await opUnread(rest);
|
|
368
|
+
case "inbox":
|
|
369
|
+
return await opInbox(rest);
|
|
370
|
+
case "log":
|
|
371
|
+
return await opLog(rest);
|
|
372
|
+
case "ack":
|
|
373
|
+
return await opAck(rest);
|
|
374
|
+
default:
|
|
375
|
+
process.stderr.write(`unknown chat subcommand: ${op}\n\n${USAGE}`);
|
|
376
|
+
return 2;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
catch (err) {
|
|
380
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
381
|
+
process.stderr.write(`error: ${message}\n`);
|
|
382
|
+
return 1;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
//# sourceMappingURL=chat.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat.mjs","sourceRoot":"","sources":["../../../src/commands/chat/chat.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAA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,oBAAoB;IACpB,sBAAsB;IACtB,yBAAyB;IACzB,kBAAkB;IAClB,cAAc;IACd,iBAAiB;IACjB,sEAAsE;IACtE,0EAA0E;IAC1E,gEAAgE;IAChE,eAAe;IACf,gBAAgB;IAChB,aAAa;IACb,sBAAsB;IACtB,qBAAqB;CACtB,CAAC,CAAC;AAEH,MAAM,UAAU,cAAc;IAC5B,OAAO,CAAC,GAAG,gBAAgB,CAAC,CAAC;AAC/B,CAAC;AAED,MAAM,UAAU,kBAAkB;IAChC,OAAO,CAAC,GAAG,oBAAoB,CAAC,CAAC;AACnC,CAAC"}
|
|
1
|
+
{"version":3,"file":"skill-catalog.mjs","sourceRoot":"","sources":["../../src/lib/skill-catalog.mts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,+EAA+E;AAC/E,+EAA+E;AAC/E,0EAA0E;AAC1E,8CAA8C;AAE9C,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC5C,cAAc;IACd,kBAAkB;IAClB,YAAY;IACZ,gBAAgB;IAChB,eAAe;IACf,aAAa;IACb,gBAAgB;IAChB,eAAe;IACf,cAAc;IACd,qBAAqB;IACrB,wBAAwB;IACxB,eAAe;IACf,sBAAsB;IACtB,oBAAoB;CACrB,CAAC,CAAC;AAEH,2EAA2E;AAC3E,8EAA8E;AAC9E,+EAA+E;AAC/E,oCAAoC;AACpC,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,CAAC;IAChD,QAAQ;IACR,uBAAuB;IACvB,sBAAsB;IACtB,oBAAoB;IACpB,sBAAsB;IACtB,yBAAyB;IACzB,kBAAkB;IAClB,cAAc;IACd,iBAAiB;IACjB,sEAAsE;IACtE,0EAA0E;IAC1E,gEAAgE;IAChE,eAAe;IACf,gBAAgB;IAChB,aAAa;IACb,sBAAsB;IACtB,qBAAqB;CACtB,CAAC,CAAC;AAEH,MAAM,UAAU,cAAc;IAC5B,OAAO,CAAC,GAAG,gBAAgB,CAAC,CAAC;AAC/B,CAAC;AAED,MAAM,UAAU,kBAAkB;IAChC,OAAO,CAAC,GAAG,oBAAoB,CAAC,CAAC;AACnC,CAAC"}
|
package/docs/architecture.md
CHANGED
|
@@ -157,9 +157,9 @@ Runtime entry points are consolidated in Python packages. Bash and skills only c
|
|
|
157
157
|
- Host and provider registries remain separate: the active registered host owns the native lead session, while non-native providers run through their registered CLI wrappers.
|
|
158
158
|
- [`skills/okstra-setup/SKILL.md`](../skills/okstra-setup/SKILL.md) — **first-run bootstrap**. Runs `okstra install` and creates `project.json`.
|
|
159
159
|
- [`skills/okstra-run/SKILL.md`](../skills/okstra-run/SKILL.md) — host-aware in-session entry point that starts an okstra task in the current registered host session and calls `prepare_task_bundle` directly.
|
|
160
|
-
-
|
|
160
|
+
- Fourteen skills are user-invocable: `skills/okstra-setup/SKILL.md`, `skills/okstra-brief-gen/SKILL.md`, `skills/okstra-run/SKILL.md`, `skills/okstra-manager/SKILL.md`, `skills/okstra-memory/SKILL.md`, `skills/okstra-chat/SKILL.md`, `skills/okstra-inspect/SKILL.md`, `skills/okstra-rollup/SKILL.md`, `skills/okstra-usage/SKILL.md`, `skills/okstra-schedule-gen/SKILL.md`, `skills/okstra-container-build/SKILL.md`, `skills/okstra-pr-gen/SKILL.md`, `skills/okstra-user-response/SKILL.md`, and `skills/okstra-code-review/SKILL.md`. Only these are copied into the agent skill home. They cover brief authoring, phase execution, cross-project manager task coordination, global Memory Book storage/search, global chat rooms, read-side status/history/report/time/logs/cost/errors/recap, task-group-level aggregation of run results (rollup), project-wide historical resource usage, schedule support, local container deployment, PR description generation, clarification-response submission, and census-based code review of a stage or branch diff. `okstra-manager` uses `okstra manager` CLI JSON/launch packets as the source of truth, and stores manager-owned plans, assignments, directives, snapshots, and events under `~/.okstra/managers/<manager-id>/`. `okstra-rollup` is a read-side layer that fans the single-task aggregators from `okstra-inspect` (time/errors/recap) out to a task group or the whole project catalog. The `okstra rollup` CLI owns deterministic aggregation, while the skill (LLM) writes only the synthesized report summary. `okstra-usage` is a separate read-only resource snapshot grouped by lifecycle task type; it does not replace single-task `okstra-inspect` detail or the status/report digest from `okstra-rollup`. The canonical definition of `okstra-inspect` read-side facets is the subcommand table in `skills/okstra-inspect/SKILL.md`. `okstra-inspect logs` provides a read-only inventory and cleanup guidance for the live-log sidecars that the Codex/Antigravity wrappers write on every dispatch at the resolved `<run-dir>/prompts/<worker>-prompt-<phase>-<seq>.log`; for stage executions, the stage-qualified `run_dir` includes `stage-<N>/`. `okstra-inspect cost` summarizes `okstra context-cost`; `okstra-inspect errors` collects a task's okstra-run error logs into a timestamped Markdown error report and prints a summary; and `okstra-inspect recap` answers free-form questions about `.okstra` artifacts in addition to summarizing phases before and after each task run.
|
|
161
161
|
- Internal operating contracts—`context-loader` / `team-contract` / `convergence` / `report-writer` and the lead contract—have moved to `prompts/lead/*.md`. Language-specific coding preflight for implementation/verification workers has moved to `prompts/coding-preflight/*` (overview router + clean-code + three-stage language/framework/architecture selection). All are runtime resources installed under `~/.okstra/prompts/` and are not discoverable as skills. The generated launch prompt provides the lead with absolute paths, and reinstalling prunes the legacy exact-name skill directories `okstra-context-loader` / `okstra-team-contract` / `okstra-convergence` / `okstra-report-writer` / `okstra-coding-preflight` / `okstra`.
|
|
162
|
-
- Plugin manifest: [`../../.claude-plugin/plugin.json`](../.claude-plugin/plugin.json) — referenced by the supplementary `npx skills@latest add Devonshin/okstra` channel. Use `npx okstra@latest install` for normal setup. The plugin manifest exposes only the
|
|
162
|
+
- Plugin manifest: [`../../.claude-plugin/plugin.json`](../.claude-plugin/plugin.json) — referenced by the supplementary `npx skills@latest add Devonshin/okstra` channel. Use `npx okstra@latest install` for normal setup. The plugin manifest exposes only the fourteen user entry points (`okstra-setup`, `okstra-brief-gen`, `okstra-run`, `okstra-manager`, `okstra-memory`, `okstra-chat`, `okstra-inspect`, `okstra-rollup`, `okstra-usage`, `okstra-schedule-gen`, `okstra-container-build`, `okstra-pr-gen`, `okstra-user-response`, `okstra-code-review`).
|
|
163
163
|
- Installation location: `~/.claude/skills/<name>/SKILL.md` or `~/.agents/skills/<name>/SKILL.md`.
|
|
164
164
|
- Release procedure: [`../../RELEASING.md`](../RELEASING.md) — npm publish flow and release-please / manual fallback.
|
|
165
165
|
|
|
@@ -839,9 +839,10 @@ In Claude, use the `status` subflow of the seeded `okstra-inspect` skill to answ
|
|
|
839
839
|
Resume decision rules:
|
|
840
840
|
|
|
841
841
|
- Resume the current run: if `latestResumeCommandPath` exists, use that path first.
|
|
842
|
-
-
|
|
843
|
-
-
|
|
844
|
-
-
|
|
842
|
+
- Await user approval: if `workflow.awaitingApproval` is true, ask the user to approve the plan (`okstra-run` implementation wizard, or `--approve`). Do not start implementation as if the gate were already cleared, and do not re-run `implementation-planning`.
|
|
843
|
+
- Restart the current phase: run again with the same `task-key` and current `task-type` only when `awaitingApproval` is false and the pointer is not `ready`.
|
|
844
|
+
- Start the next phase: if `workflow.nextRecommendedPhase.status` is `ready` and `awaitingApproval` is false, prepare the next `okstra.sh` run with its `phase`.
|
|
845
|
+
- Additional material required: if that `status` is `pending` or `blocked`, the pointer carries no phase. Read its `rationale`. After planning, `blocked` means answer the named `C-NNN` rows with `okstra-user-response` first; do not re-run planning until those answers exist.
|
|
845
846
|
- Nothing left to run: `status` `terminal` means the lifecycle ended at this phase.
|
|
846
847
|
|
|
847
848
|
## Final report structure
|
|
@@ -886,7 +887,8 @@ Entry points:
|
|
|
886
887
|
- Python routing references: `scripts/okstra_ctl/report_views.py` owns the version split; `scripts/okstra_ctl/report_html/router.py` maps all v2 task types to dedicated view-model builders and templates. The HTML JavaScript response serializer remains byte-identical to Python `serialize_user_response`.
|
|
887
888
|
- CLI: `scripts/okstra-render-report-views.py <final-report.data.json|final-report.md>` or delegated Node wrapper `bin/okstra render-views <path>`.
|
|
888
889
|
- Validation: `validators/validate-report-views.py` checks schema/source/template digests, required human fields, form controls, external assets, SVG/table ID parity, and Response ID parity. The v2 renderer rejects an unknown task type instead of falling back to a generic page.
|
|
889
|
-
- User-response sidecar schema source of truth: `templates/reports/user-response.template.md`.
|
|
890
|
+
- User-response sidecar schema source of truth: `templates/reports/user-response.template.md`. The in-session skill reads `okstra user-response show-view`, then the cited `path:line` artifacts and linked plan items that view lists, before asking. The recorded answer still comes from `options[]` via `--option-number`. Task pick, each clarification, and the record confirmation use the current host's native question tool from the relay `native-single` mapping (`AskUserQuestion`, `ask_user_question`, or `request_user_input`). A numbered list is only the fallback when that tool is missing or the option count misses `nativeLimits`.
|
|
891
|
+
- In-run user confirmation before an approval blocker follows the same briefing order and the same host picker: the lead investigates cited plan items, worker findings, and files, then asks through the adapter `prompt_user` mapping (`prompts/lead/okstra-lead-contract.md`).
|
|
890
892
|
|
|
891
893
|
Generating a view never modifies the original final-report MD.
|
|
892
894
|
|
package/docs/cli.md
CHANGED
|
@@ -825,6 +825,7 @@ The `okstra` Node CLI (`bin/okstra`) provides both installer/admin commands and
|
|
|
825
825
|
| `okstra error-log append-observed --out <errors.jsonl> --task-key <key> --phase <phase> --agent <assigned-worker-id> --agent-role worker --model <model> --error-type tool-failure --command-file <markdown-file> --command-kind <kind> --message-file <markdown-file> [--cause <cause> --evidence-file <kind=file>]…` | Worker-facing typed error recording surface. Python validates and serializes the JSONL record; a worker supplies scalar identity fields plus Markdown files for free-form command, message, and probe content, never a JSON sidecar or JSON argument. `sandbox-denied` requires both `targetProbe` and `controlProbe` evidence files. |
|
|
826
826
|
| `okstra config <get\|set\|unset\|show> [key] [value] [--scope project\|global\|all]` | Manage persistent settings such as `pr-template-path` with atomic JSON writes |
|
|
827
827
|
| `okstra memory <add\|list\|search\|show\|archive>` | Manage global conversation memory in `~/.okstra/memory-book`, a user-home store separate from project `.okstra/` and the CLI basis of the `save this in okstra` natural-language skill |
|
|
828
|
+
| `okstra chat <rooms\|create\|join\|members\|send\|unread\|inbox\|log\|ack>` | Global rooms under `~/.okstra/chat`. Join takes an explicit `--name`. Send requires `--to` (`all` or a member). Unread is the inbox after the read cursor; `inbox` keeps arrivals after ack. CLI basis of the `okstra-chat` skill. |
|
|
828
829
|
| `okstra model-io active-context-input --project-root <dir> --run-manifest <path>` | Resolve the prior implementation-planning active context only through the current project and run authority, then emit fixed fields such as the executor base ref. Caller-supplied active-context paths are not accepted. |
|
|
829
830
|
| `okstra report-translate <source\|write\|check-data> --run-manifest <path> …` | Resolve the report data and translation sidecar from the run manifest. `source` emits a source digest with the fixed translation queue; `write` requires that digest and rejects a stale report; `check-data` verifies the derived sidecar. Models never choose the data or sidecar path. |
|
|
830
831
|
| `okstra convergence prepare-groups --run-manifest <path> --input <grouping.md>` | Parse fixed grouping Markdown, validate distinct per-worker evidence and group semantics against the run authority, then publish the schema-valid groups artifact at the run-owned path. |
|
|
@@ -836,7 +837,7 @@ The `okstra` Node CLI (`bin/okstra`) provides both installer/admin commands and
|
|
|
836
837
|
| `okstra worker-audit-check --run-dir <runs/<task-type>/> --task-type <type> --seq <nnn> [--worker <id>]` | Apply the Phase 7 worker audit-sidecar rules mid-run, while the worker session is still alive. For each of this run's `worker-results/<worker>-<task-type>-<seq>.md` it checks that the file carries no `## 0. Reading Confirmation` heading, that the matching audit sidecar exists, and — for prompts carrying the required-v1 evidence-ledger marker — that every backticked `path:line` citation has an Evidence read row in that sidecar. `--worker` scopes it to the role that just returned. Emits `{ok, failures[]}` and exits 2 when `failures[]` is non-empty. The rules come from the `okstra_ctl.worker_audit_ledger` SSOT shared with `validate-run.py`, so an early pass and the Phase 7 pass cannot disagree. Run it right after collecting a result: the same failure at Phase 7 leaves only a retroactive edit, which breaks the audit chain, or a failed run |
|
|
837
838
|
| `okstra log-report [--project-root <dir>] [--cwd <dir>] [--top <N>] [--json]` | Read-only inventory of wrapper transcript `.log` files and their sibling prompt `.md` files. Each ranked entry preserves `path` / `sizeBytes` for compatibility and also reports `transcriptPath`, `transcriptBytes`, `promptPath`, `promptBytes`, and `transcriptToPromptRatio`; totals distinguish prompt bytes from transcript bytes and count paired files. Ranking remains transcript-size descending |
|
|
838
839
|
| `okstra recap <assemble\|record\|note> <task-root\|task-key> …` | Backend for the okstra-inspect `recap` facet. `assemble` is read-only and prints a JSON summary of phase transitions across a task's runs. `record --kind <summary\|qa> --mode <artifact\|code> --answer <text> [--question <text>] [--citation <path:line> …]` appends one line to `<task-root>/recap/recap-log.jsonl` and never mutates other artifacts. `note --kind <verification-evidence\|decision-draft\|analysis-note> --slug <topic> --purpose <text> --scope-note <text> (--body <markdown>\|--body-file <path>)` writes an agent-authored note to `<task-root>/notes/` and prints its path plus the `--clarification-response` argument for feeding it into a later run |
|
|
839
|
-
| `okstra user-response <list-view\|show-view\|begin\|answer\|plan-decision\|legacy-report-authoring\|finalize> …` | Backend for the `/okstra-user-response` skill. `list-view` and `show-view --report <md\|data.json> --project-root <dir>` are fixed-text model views; `show-view` validates that the report belongs to the explicit project root. The legacy `list` and `show` JSON reads retain their automation-compatible fields. `begin --report <md\|data.json> --task-key <key>` returns an opaque transaction id. A predefined clarification choice uses `answer --transaction <id> --clarification-id <C-NNN> --kind <kind> --option-number <N>`; Python resolves the answer, disposition, reach, and scope effects from the validated report. Direct input instead uses `--disposition <answer\|reframe> --value-file <md> [--rationale-file <md>]`. Every value, rationale, and reason file must be a regular file under `<PROJECT_ROOT>/.okstra/tmp/user-response/`; external paths and symbolic links are rejected. `plan-decision` accepts `approved`, `revision-requested`, or `rejected`, validates any `--implementation-option` against the report candidates, and requires `--reason-file` for the latter two statuses. `legacy-report-authoring` is restricted to report contract 2.0. `finalize` validates the complete existing sidecar before a lossless merge, uses compare-and-swap under a run-local lock, and atomically publishes only the user-owned sidecar; exit 0 ok / 1 error. |
|
|
840
|
+
| `okstra user-response <list-view\|show-view\|begin\|answer\|plan-decision\|legacy-report-authoring\|finalize> …` | Backend for the `/okstra-user-response` skill. `list-view` and `show-view --report <md\|data.json> --project-root <dir>` are fixed-text model views; `show-view` validates that the report belongs to the explicit project root and prints each open row's why-asked line, linked plan items, and cited `path:line` artifacts so the skill can read them before asking. The legacy `list` and `show` JSON reads retain their automation-compatible fields. `begin --report <md\|data.json> --task-key <key>` returns an opaque transaction id. A predefined clarification choice uses `answer --transaction <id> --clarification-id <C-NNN> --kind <kind> --option-number <N>`; Python resolves the answer, disposition, reach, and scope effects from the validated report. Direct input instead uses `--disposition <answer\|reframe> --value-file <md> [--rationale-file <md>]`. Every value, rationale, and reason file must be a regular file under `<PROJECT_ROOT>/.okstra/tmp/user-response/`; external paths and symbolic links are rejected. `plan-decision` accepts `approved`, `revision-requested`, or `rejected`, validates any `--implementation-option` against the report candidates, and requires `--reason-file` for the latter two statuses. `legacy-report-authoring` is restricted to report contract 2.0. `finalize` validates the complete existing sidecar before a lossless merge, uses compare-and-swap under a run-local lock, and atomically publishes only the user-owned sidecar; exit 0 ok / 1 error. |
|
|
840
841
|
| `okstra pr <template\|branches\|gen> … [--json]` | Backend for the okstra-pr-gen skill. Git-only—no project registration required. `template list\|show <name\|default>\|add --name <name> (--content <text>\|--file <path>)\|path` manages PR body templates under `~/.okstra/template/pr/` (bundled fallback `src/commands/pr/default.md`); `branches` recommends a base branch; `gen --base <ref> [--template <name\|default>]` emits fixed `Base`, `Current branch`, `Template name`, `Commits`, `Diff stat`, and `Template` sections by default. `--json` preserves the machine bundle for automation. |
|
|
841
842
|
| `okstra migrate [--apply] [--cwd <dir>] [--quiet]` | One-time migration of the project artifact root from `.project-docs/okstra/` to `.okstra/`. It is a dry run by default; `--apply` performs the move with `git mv` in a Git worktree, removes an empty `.project-docs/`, and synchronizes the `<PROJECT>/CLAUDE.md` import line, `.gitignore`, the project's rows in `~/.okstra/{recent,active}.jsonl`, and `~/.okstra/worktrees/registry.json`. It exits 1 if `.okstra/` already exists or the legacy directory is absent. Scheduled for removal by the end of v0.x |
|
|
842
843
|
| `okstra task-list [--project-root <path>]` | Combine `list_project_tasks` and `read_latest_task` into JSON containing the task catalog and latest task |
|
package/docs/for-ai/README.md
CHANGED
|
@@ -25,6 +25,7 @@ This directory is a compressed manual for an AI to quickly select and precisely
|
|
|
25
25
|
| Project-wide recent run coverage, tokens, known cost, CPU, and wall-clock usage by task type | `okstra-usage` | [`skills/okstra-usage.md`](skills/okstra-usage.md) |
|
|
26
26
|
| Generate a client-facing work schedule for a whole task-group | `okstra-schedule-gen` | [`skills/okstra-schedule-gen.md`](skills/okstra-schedule-gen.md) |
|
|
27
27
|
| Store or search conversations/decisions/preferences/requirements in the global Memory Book | `okstra-memory` | [`skills/okstra-memory.md`](skills/okstra-memory.md) |
|
|
28
|
+
| Create or join a global room and send or read addressed messages across host sessions | `okstra-chat` | [`skills/okstra-chat.md`](skills/okstra-chat.md) |
|
|
28
29
|
| Manage the implementation-task worktree-based docker compose user-test environment | `okstra-container-build` | [`skills/okstra-container-build.md`](skills/okstra-container-build.md) |
|
|
29
30
|
| Answer the unresolved clarification questions an okstra run left behind in-session and record the approval gate | `okstra-user-response` | [`skills/okstra-user-response.md`](skills/okstra-user-response.md) |
|
|
30
31
|
| Register a PR body template or generate a PR description from a branch diff (global, git repository) | `okstra-pr-gen` | [`skills/okstra-pr-gen.md`](skills/okstra-pr-gen.md) |
|
|
@@ -35,7 +36,7 @@ This directory is a compressed manual for an AI to quickly select and precisely
|
|
|
35
36
|
1. Run commands as separate Bash calls whenever the source skill requires it. In particular, do not wrap `okstra preflight --runtime claude-code`, `okstra wizard ...`, or `okstra container ...` calls in `&&`, `||`, `$(...)`, a leading variable assignment, `eval`, or `export`.
|
|
36
37
|
2. An `okstra <subcmd>` call bootstraps its own Python path. Unless a skill states otherwise, do not build `okstra paths --shell` or `export PYTHONPATH=...`.
|
|
37
38
|
3. Most skills except `okstra-setup` do not use an `npx` fallback. If the runtime is missing, tell the user to run `/okstra-setup` and stop. But if it fails with `unknown command: <cmd>`, the `okstra` binary on PATH is older than the skill — point the user to `npm i -g okstra@latest` rather than `/okstra-setup`, and stop.
|
|
38
|
-
4. Project artifacts go under `<PROJECT_ROOT>/.okstra/` by default. The
|
|
39
|
+
4. Project artifacts go under `<PROJECT_ROOT>/.okstra/` by default. The exceptions are `okstra-memory` (`~/.okstra/memory-book/`) and `okstra-chat` (`~/.okstra/chat/`).
|
|
39
40
|
5. `runtime/` is build output. When fixing a source skill or template, edit the source under `skills/`, `templates/`, `validators/`, `scripts/`, `src/` and apply it via a build.
|
|
40
41
|
6. Do not guess the contents of a tracker, URL, file, report, log, zip, template, or validator. Use only what you have confirmed by reading or running with a tool.
|
|
41
42
|
7. Read-side skills also produce some artifacts. `okstra-inspect errors` produces an error report Markdown and `okstra-inspect error-zip` produces an anonymized zip. Even in these cases, keep the purpose-specific fixed CLI fields as the source of truth.
|
|
@@ -49,13 +50,14 @@ This directory is a compressed manual for an AI to quickly select and precisely
|
|
|
49
50
|
|
|
50
51
|
## Public Skill List
|
|
51
52
|
|
|
52
|
-
The public skills listed in this AI manual are the following
|
|
53
|
+
The public skills listed in this AI manual are the following 14:
|
|
53
54
|
|
|
54
55
|
- `okstra-setup`
|
|
55
56
|
- `okstra-brief-gen`
|
|
56
57
|
- `okstra-run`
|
|
57
58
|
- `okstra-manager`
|
|
58
59
|
- `okstra-memory`
|
|
60
|
+
- `okstra-chat`
|
|
59
61
|
- `okstra-inspect`
|
|
60
62
|
- `okstra-rollup`
|
|
61
63
|
- `okstra-usage`
|