@ouro.bot/cli 0.1.0-alpha.1555 → 0.1.0-alpha.1557
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/changelog.json +12 -0
- package/deploy/unraid/sanctuary.ouro/bundle-meta.json +1 -1
- package/deploy/unraid/sanctuary.xml +1 -1
- package/desk.lock.json +3 -3
- package/dist/mind/diary.js +7 -3
- package/dist/repertoire/tools-notes.js +4 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/vendor/desk/.claude-plugin/plugin.json +1 -1
- package/vendor/desk/.ouro-desk.json +3 -3
- package/vendor/desk/CHANGELOG.md +600 -0
- package/vendor/desk/activation/copilot-root.flattened-bundle.json +2 -2
- package/vendor/desk/activation/desk.activation.json +5 -5
- package/vendor/desk/agency.json +1 -1
- package/vendor/desk/docs/sessions.md +1 -1
- package/vendor/desk/hooks/lib/boot-checks.cjs +1 -1
- package/vendor/desk/hooks/lib/child-agent.cjs +2 -2
- package/vendor/desk/hooks/lib/factory-end.cjs +4 -1
- package/vendor/desk/mcp/README.md +6 -0
- package/vendor/desk/mcp/bootstrap.cjs +64 -38
- package/vendor/desk/mcp/idle-proxy.cjs +14 -6
- package/vendor/desk/mcp/scripts/crew.js +3 -3
- package/vendor/desk/mcp/scripts/drains-launcher.mjs +6 -5
- package/vendor/desk/mcp/scripts/factory.js +15 -6
- package/vendor/desk/mcp/scripts/resolve-desk-root.js +1 -2
- package/vendor/desk/mcp/src/actions/desk-session.actions.mts +16 -1
- package/vendor/desk/mcp/src/actions/desk.actions.mts +2 -2
- package/vendor/desk/mcp/src/actions/generated/desk/actions.json +36 -1
- package/vendor/desk/mcp/src/actions/generated/desk/mcp.json +34 -1
- package/vendor/desk/mcp/src/activation/superpowers-context.js +9 -0
- package/vendor/desk/mcp/src/crew/workspace.js +30 -4
- package/vendor/desk/mcp/src/desk/card-commit-guard.js +3 -2
- package/vendor/desk/mcp/src/desk/content-home.js +16 -0
- package/vendor/desk/mcp/src/indexer/discover.js +8 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/ax-claims.ts +2 -1
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/ax-command.ts +20 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/mcp.ts +1 -1
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/xray.ts +40 -2
- package/vendor/desk/mcp/src/runtime/boot.js +0 -1
- package/vendor/desk/mcp/src/runtime/deliver.js +42 -5
- package/vendor/desk/mcp/src/runtime/drains-cli.js +9 -1
- package/vendor/desk/mcp/src/runtime/drains.js +7 -4
- package/vendor/desk/mcp/src/runtime/hosted.js +5 -3
- package/vendor/desk/mcp/src/runtime/pending-migrations.js +5 -1
- package/vendor/desk/mcp/src/runtime/pr-publication.js +55 -29
- package/vendor/desk/mcp/src/runtime/relays.js +10 -1
- package/vendor/desk/mcp/src/runtime/remote-identity.js +22 -0
- package/vendor/desk/mcp/src/runtime/sessions-cli.js +6 -6
- package/vendor/desk/mcp/src/runtime/sync-worker.js +10 -8
- package/vendor/desk/mcp/src/runtime/unmerged-saves.js +29 -3
- package/vendor/desk/mcp/src/server.js +3 -2
- package/vendor/desk/mcp/src/tool-names.js +0 -2
- package/vendor/desk/mcp/src/tool-schemas.js +3 -8
- package/vendor/desk/mcp/src/tools/archive-links.js +3 -0
- package/vendor/desk/mcp/src/tools/desk-save.js +8 -3
- package/vendor/desk/mcp/src/tools/move.js +32 -3
- package/vendor/desk/mcp/src/tools/sibling-desk.js +10 -4
- package/vendor/desk/mcp/src/tools/status.js +9 -6
- package/vendor/desk/mcp/src/tools/task-log.js +6 -2
- package/vendor/desk/mcp/src/tools/task.js +17 -5
- package/vendor/desk/mcp/src/util/citations.js +54 -0
- package/vendor/desk/mcp/web-auth.cjs +17 -0
- package/vendor/desk/mcp/web-sso.cjs +52 -0
- package/vendor/desk/plugin.json +2 -2
- package/vendor/desk/skills/add-workspace-mcp/SKILL.md +2 -2
- package/vendor/desk/skills/archive-workflow/SKILL.md +1 -1
- package/vendor/desk/skills/coordinating-lanes/SKILL.md +24 -0
- package/vendor/desk/skills/evidence-discipline/SKILL.md +8 -12
- package/vendor/desk/skills/git-hygiene/SKILL.md +6 -0
- package/vendor/desk/skills/interaction-style/SKILL.md +4 -2
- package/vendor/desk/skills/live-ui-iteration/SKILL.md +35 -0
- package/vendor/desk/skills/operator-voice-comments/SKILL.md +4 -0
- package/vendor/desk/skills/outside-approval/SKILL.md +10 -0
- package/vendor/desk/skills/pr-feedback-on-own-pr/SKILL.md +5 -1
- package/vendor/desk/skills/pr-reviewer-audit/SKILL.md +1 -1
- package/vendor/desk/skills/pr-reviewer-audit/helpers/audit.py +19 -1
- package/vendor/desk/skills/pr-reviewer-audit/helpers/test_audit.py +37 -1
- package/vendor/desk/skills/pr-self-review/SKILL.md +1 -1
- package/vendor/desk/skills/pr-surface-hygiene/SKILL.md +28 -4
- package/vendor/desk/skills/pr-surface-hygiene/check-visual-proof.cjs +27 -14
- package/vendor/desk/skills/prior-art/SKILL.md +14 -0
- package/vendor/desk/skills/runtime-symptom-investigation/SKILL.md +5 -1
- package/vendor/desk/skills/session-resumption/SKILL.md +3 -1
- package/vendor/desk/skills/using-desk/SKILL.md +3 -3
- package/vendor/desk/skills/using-superpowers-with-desk/SKILL.md +2 -0
- package/vendor/desk/skills/visual-proof/SKILL.md +42 -0
- package/vendor/desk/skills/work-orchestration/SKILL.md +17 -2
|
@@ -97,15 +97,18 @@ export function desk_status(request) {
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
async function statusCall({ deskRoot, person, statusContext = {}, signal, env = process.env }) {
|
|
100
|
+
// Internal fixture seam: no collector, timers or output on the ordinary status path.
|
|
101
|
+
const stage = typeof statusContext.statusStages === "function" ? statusContext.statusStages : null
|
|
100
102
|
const writeScope = writeScopeOf(deskRoot, person, statusContext.member ?? null)
|
|
101
103
|
const reader = createStatusInspection(deskRoot, { signal })
|
|
102
104
|
try {
|
|
103
|
-
const root = await reader.inspect("root", statusContext.root)
|
|
105
|
+
const root = await (stage ? stage("root_inspection", () => reader.inspect("root", statusContext.root)) : reader.inspect("root", statusContext.root))
|
|
104
106
|
// The sync section comes last; its worker thread starts while the inspections run.
|
|
105
107
|
if (root.valid) warmStatusGitReads()
|
|
106
108
|
const runtime = runtimeStatus(statusContext.runtime ?? {}, env)
|
|
107
109
|
const activation = activationStatus(statusContext.activation)
|
|
108
|
-
const search = await searchStatus(statusContext.search)
|
|
110
|
+
const search = await (stage ? stage("search_status", () => searchStatus(statusContext.search)) : searchStatus(statusContext.search))
|
|
111
|
+
const factoryOptions = { env, deskRoot: root.valid ? root.path : null, signal }
|
|
109
112
|
|
|
110
113
|
return {
|
|
111
114
|
status: root.valid ? "ok" : "error",
|
|
@@ -115,13 +118,13 @@ async function statusCall({ deskRoot, person, statusContext = {}, signal, env =
|
|
|
115
118
|
search,
|
|
116
119
|
write_scope: writeScope,
|
|
117
120
|
// The redacted active-task listing session start and status render (./desk/active-tasks.js).
|
|
118
|
-
active_tasks: root.valid ? await activeTasks(root.path) : null,
|
|
119
|
-
factory: await
|
|
120
|
-
sync: root.valid ? await syncStatus({ deskRoot: root.path, env, signal }) : null,
|
|
121
|
+
active_tasks: root.valid ? await (stage ? stage("active_tasks", () => activeTasks(root.path)) : activeTasks(root.path)) : null,
|
|
122
|
+
factory: await (stage ? stage("factory_status", () => factoryStatusAsync(factoryOptions)) : factoryStatusAsync(factoryOptions)),
|
|
123
|
+
sync: root.valid ? await (stage ? stage("sync_status", () => syncStatus({ deskRoot: root.path, env, signal })) : syncStatus({ deskRoot: root.path, env, signal })) : null,
|
|
121
124
|
summary: summaryFor({ root, activation, search }),
|
|
122
125
|
}
|
|
123
126
|
} finally {
|
|
124
|
-
await reader.close()
|
|
127
|
+
await (stage ? stage("reader_close", () => reader.close()) : reader.close())
|
|
125
128
|
}
|
|
126
129
|
}
|
|
127
130
|
|
|
@@ -24,7 +24,10 @@ const stamp = (date) => `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad
|
|
|
24
24
|
* and the note that says no git is needed. Throws before writing anything when the task does not exist or the purpose policy
|
|
25
25
|
* refuses; `admission` is the receipt `admitContent` gave this call, which has checked the base.
|
|
26
26
|
*/
|
|
27
|
-
export async function appendCardLog({ deskRoot, person, track, slug, text, admission, search, schedulePush, now = new Date() }) {
|
|
27
|
+
export async function appendCardLog({ deskRoot, person, track, slug, text, childSession, admission, search, schedulePush, now = new Date() }) {
|
|
28
|
+
if (childSession !== undefined && !(typeof childSession === "string" && /^[\w.:-]{4,128}$/u.test(childSession))) {
|
|
29
|
+
throw Object.assign(new Error("task_update: Pass `child_session` as the child's session id, 4 to 128 letters, digits, dots, colons, dashes or underscores: that is not a session id; nothing was changed"), { code: "task_update_child_session_is_not_a_session_id" })
|
|
30
|
+
}
|
|
28
31
|
const card = await resolveWriteTarget({ deskRoot, person, segments: [track, slug, "task.md"] })
|
|
29
32
|
if (!(await pathExists(card))) {
|
|
30
33
|
throw Object.assign(new Error(`task_update: Check the track and slug, then try again: task does not exist at ${deskRelativePath(deskRoot, card)}`), { code: "task_update_task_does_not_exist_at" })
|
|
@@ -32,7 +35,8 @@ export async function appendCardLog({ deskRoot, person, track, slug, text, admis
|
|
|
32
35
|
const file = path.join(path.dirname(card), LOG_FILE)
|
|
33
36
|
const rel = deskRelativePath(deskRoot, file)
|
|
34
37
|
assertCleanContentTarget(deskRoot, rel, admission, "task_update", written.get(file))
|
|
35
|
-
const
|
|
38
|
+
const owner = childSession === undefined ? "" : `Child session: ${childSession}\n\n`
|
|
39
|
+
const entry = `\n## ${stamp(now)}\n\n${owner}${text.trim()}\n`
|
|
36
40
|
if (existsSync(file)) appendFileSync(file, entry)
|
|
37
41
|
else writeFileSync(file, `# Log: ${track}/${slug}\n\nAppend-only record for this task, oldest first: rulings, decisions and where the evidence is. Write entries with task_update's \`log\`.\n${entry}`)
|
|
38
42
|
written.set(file, digest(file))
|
|
@@ -347,7 +347,7 @@ const OPTIONAL_RUNTIME_FIELDS = [
|
|
|
347
347
|
// __tests__/tool_schema_parity.test.js checks these against the tool's
|
|
348
348
|
// declared schema in tool-schemas.js.
|
|
349
349
|
export const TASK_CREATE_FIELDS = ["track", "slug", "title", "status", "body", "focus", "steps", "intake_proposal", "display_label", "desk", ...OPTIONAL_RUNTIME_FIELDS]
|
|
350
|
-
export const TASK_UPDATE_FIELDS = ["track", "slug", "status", "frontmatter", "body_append", "note", "next_step", "evidence", "repos_removed_reason", "return_reason", "step", "resource", "display_label", "replace_section", "content_home", "log", "resources", "desk"]
|
|
350
|
+
export const TASK_UPDATE_FIELDS = ["track", "slug", "status", "frontmatter", "body_append", "note", "next_step", "evidence", "repos_removed_reason", "return_reason", "step", "resource", "display_label", "replace_section", "content_home", "log", "child_session", "resources", "desk"]
|
|
351
351
|
export const TASK_ARCHIVE_FIELDS = ["track", "slug", "evidence", "outcome", "desk"]
|
|
352
352
|
|
|
353
353
|
// The three outcome records are written only by the task tools; a caller never supplies them.
|
|
@@ -1058,19 +1058,31 @@ export async function task_update({ deskRoot, input, person = null, search, stat
|
|
|
1058
1058
|
) {
|
|
1059
1059
|
throw Object.assign(new Error("task_update: Pass `track` and `slug`: `track` and `slug` are required"), { code: "task_update_track_and_slug_are_required" })
|
|
1060
1060
|
}
|
|
1061
|
-
const
|
|
1061
|
+
const admitUpdate = (declaration) => admitContent({
|
|
1062
1062
|
deskRoot,
|
|
1063
1063
|
tool: "task_update",
|
|
1064
|
-
declaration
|
|
1064
|
+
declaration,
|
|
1065
1065
|
subjects: Object.entries(values)
|
|
1066
1066
|
.filter(([key, value]) => !["track", "slug", "display_label", "content_home"].includes(key) && value !== undefined)
|
|
1067
1067
|
.map(([id, value]) => ({ id, content: typeof value === "string" ? value : JSON.stringify(value) })),
|
|
1068
1068
|
})
|
|
1069
|
+
// A call that only records progress (`log`, `child_session`) is coordination content, so a repository that requires `content_home` gets that declaration when the caller left it out.
|
|
1070
|
+
const progressOnly = Object.keys(values).every((key) => ["track", "slug", "display_label", "log", "child_session"].includes(key))
|
|
1071
|
+
let contentAdmission
|
|
1072
|
+
try {
|
|
1073
|
+
contentAdmission = admitUpdate(values.content_home)
|
|
1074
|
+
} catch (error) {
|
|
1075
|
+
if (!/content_home_required/u.test(error.message) || !progressOnly) throw error
|
|
1076
|
+
contentAdmission = admitUpdate({ purpose: "coordination", lifecycle: "current" })
|
|
1077
|
+
}
|
|
1069
1078
|
// `log` goes to log.md beside the card by the cheap append path. Alone, it is the whole call; with other fields, the rest of the call follows it.
|
|
1070
1079
|
let logged = null
|
|
1080
|
+
if (values.child_session !== undefined && values.log === undefined) {
|
|
1081
|
+
throw Object.assign(new Error("task_update: Pass `log` with `child_session`: the child's session id is recorded in the log entry that says what was delegated; nothing was changed. Example: {\"track\": \"t\", \"slug\": \"s\", \"child_session\": \"<its session id>\", \"log\": \"Delegated S2 to S4\"}."), { code: "task_update_child_session_needs_log" })
|
|
1082
|
+
}
|
|
1071
1083
|
if (values.log !== undefined) {
|
|
1072
|
-
logged = await appendCardLog({ deskRoot, person, track, slug, text: requiredText(values.log, "log"), admission: contentAdmission, search, schedulePush })
|
|
1073
|
-
if (Object.keys(values).every((key) => ["track", "slug", "display_label", "content_home", "log"].includes(key))) {
|
|
1084
|
+
logged = await appendCardLog({ deskRoot, person, track, slug, text: requiredText(values.log, "log"), childSession: values.child_session, admission: contentAdmission, search, schedulePush })
|
|
1085
|
+
if (Object.keys(values).every((key) => ["track", "slug", "display_label", "content_home", "log", "child_session"].includes(key))) {
|
|
1074
1086
|
if (contentAdmission !== null) logged.content_admission = contentAdmission
|
|
1075
1087
|
return logged
|
|
1076
1088
|
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// Shared JSON records under `_shared/` and `pages/` cite task folders by desk path ("track/slug/task.md"). A move changes that path, so these
|
|
2
|
+
// helpers find the citing records and rewrite the cited path; Markdown links are handled separately by archive-links.js.
|
|
3
|
+
import { promises as fs } from "node:fs"
|
|
4
|
+
import * as path from "node:path"
|
|
5
|
+
|
|
6
|
+
const SKIP_DIRS = new Set(["node_modules", ".git", ".state", "_cache"])
|
|
7
|
+
const CITING_ROOTS = ["_shared", "pages"]
|
|
8
|
+
const escape = (text) => text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")
|
|
9
|
+
|
|
10
|
+
async function jsonFiles(dir, out) {
|
|
11
|
+
let entries
|
|
12
|
+
try {
|
|
13
|
+
entries = await fs.readdir(dir, { withFileTypes: true })
|
|
14
|
+
} catch {
|
|
15
|
+
return out
|
|
16
|
+
}
|
|
17
|
+
for (const entry of entries) {
|
|
18
|
+
const file = path.join(dir, entry.name)
|
|
19
|
+
if (entry.isDirectory()) {
|
|
20
|
+
if (!SKIP_DIRS.has(entry.name)) await jsonFiles(file, out)
|
|
21
|
+
} else if (entry.isFile() && entry.name.endsWith(".json")) out.push(file)
|
|
22
|
+
}
|
|
23
|
+
return out
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** `text` with every whole-path citation of `sourcePrefix` (or a file under it) changed to `destinationPrefix`, and how many. */
|
|
27
|
+
function rewriteCitations(text, sourcePrefix, destinationPrefix) {
|
|
28
|
+
let count = 0
|
|
29
|
+
const after = text.replace(new RegExp(`(^|[^A-Za-z0-9_./-])${escape(sourcePrefix)}(?=$|[^A-Za-z0-9_.-])`, "g"), (_, lead) => {
|
|
30
|
+
count += 1
|
|
31
|
+
return `${lead}${destinationPrefix}`
|
|
32
|
+
})
|
|
33
|
+
return { text: after, count }
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** The JSON records under `_shared/` and `pages/` that cite a path of `pairs` (`[from, to]`, applied in order), as `[{ file, rel, before, after, rewritten }]`; `before` is a Buffer. */
|
|
37
|
+
export async function planCitationRewrites({ root, pairs }) {
|
|
38
|
+
const planned = []
|
|
39
|
+
for (const top of CITING_ROOTS) {
|
|
40
|
+
for (const file of await jsonFiles(path.join(root, top), [])) {
|
|
41
|
+
const before = await fs.readFile(file)
|
|
42
|
+
let text = before.toString("utf8")
|
|
43
|
+
if (!Buffer.from(text, "utf8").equals(before)) continue
|
|
44
|
+
let rewritten = 0
|
|
45
|
+
for (const [from, to] of pairs) {
|
|
46
|
+
const linked = rewriteCitations(text, from, to)
|
|
47
|
+
text = linked.text
|
|
48
|
+
rewritten += linked.count
|
|
49
|
+
}
|
|
50
|
+
if (rewritten > 0) planned.push({ file, rel: path.relative(root, file).split(path.sep).join("/"), before, after: text, rewritten })
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return planned
|
|
54
|
+
}
|
|
@@ -4,6 +4,7 @@ var fs = require("fs");
|
|
|
4
4
|
var path = require("path");
|
|
5
5
|
var crypto = require("crypto");
|
|
6
6
|
var launch = require("./web-launch.cjs");
|
|
7
|
+
var sso = require("./web-sso.cjs");
|
|
7
8
|
var failures = new WeakMap();
|
|
8
9
|
// Each read's look (see lookOf), for telling what an action or a wait changed. Never part of a reply.
|
|
9
10
|
var looks = new WeakMap();
|
|
@@ -1634,6 +1635,21 @@ function create(context, outputDir, timeoutMs, runtimePolicy, options) {
|
|
|
1634
1635
|
outcome.appLaunch = launch.report({ schemes: schemesOf(fresh), host: last.host, how: how, option: option, url: outcome.page.url, problem: problem });
|
|
1635
1636
|
return outcome;
|
|
1636
1637
|
}
|
|
1638
|
+
// GitHub's enterprise SSO page: its Continue is pressed once and the reply says whether Entra renewed the session.
|
|
1639
|
+
async function followSso(reader, outcome) {
|
|
1640
|
+
var option = sso.isSsoPage(addressOf(reader.page.url())) ? sso.continueIn(outcome.snapshot) : null;
|
|
1641
|
+
if (!option) return outcome;
|
|
1642
|
+
try { outcome = await execute(["click", option.ref], true); } catch (error) { return outcome; }
|
|
1643
|
+
var end = Date.now() + Math.min(WEB_PATH_WAIT_MS, Math.floor(timeoutMs / 4));
|
|
1644
|
+
var url = addressOf(reader.page.url());
|
|
1645
|
+
while ((sso.isSsoPage(url) || sso.onEntra(url)) && Date.now() < end) {
|
|
1646
|
+
await sleep(WEB_PATH_POLL_MS); checkRuntime(); url = addressOf(reader.page.url());
|
|
1647
|
+
}
|
|
1648
|
+
outcome = await settled(reader, false, true);
|
|
1649
|
+
url = addressOf(reader.page.url());
|
|
1650
|
+
outcome.sso = sso.report(sso.onEntra(url) ? "needs_person" : sso.isSsoPage(url) ? "stalled" : "renewed");
|
|
1651
|
+
return outcome;
|
|
1652
|
+
}
|
|
1637
1653
|
// A read never acts: a launch it finds that no reply has told yet is reported with the page's web option and its click.
|
|
1638
1654
|
function reportLaunch(reader, outcome) {
|
|
1639
1655
|
var rec = recorderFor(reader.page);
|
|
@@ -1839,6 +1855,7 @@ function create(context, outputDir, timeoutMs, runtimePolicy, options) {
|
|
|
1839
1855
|
}
|
|
1840
1856
|
if (typed) outcome.typed = typed;
|
|
1841
1857
|
if (!inner && (command === "click" || NAVIGATIONS.indexOf(command) !== -1)) outcome = await followLaunch(reader, command, outcome, mark);
|
|
1858
|
+
if (!inner && (command === "click" || NAVIGATIONS.indexOf(command) !== -1)) outcome = await followSso(reader, outcome);
|
|
1842
1859
|
else if (!inner) reportLaunch(reader, outcome);
|
|
1843
1860
|
reportChange(command, seen, outcome);
|
|
1844
1861
|
return outcome;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// Enterprise SSO for the owned browser: GitHub sends a managed (EMU) account's page to an SSO page whose one
|
|
2
|
+
// "Continue" button goes through Entra and comes back to the page. desk-web presses it once, and says in the reply
|
|
3
|
+
// whether the person's Entra session renewed by itself or Entra asked for a person.
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
|
|
7
|
+
var SSO_PATH = /^\/enterprises\/[^/]+\/sso\/?$/u;
|
|
8
|
+
var ENTRA_HOSTS = ["login.microsoftonline.com", "login.windows.net"];
|
|
9
|
+
|
|
10
|
+
function isSsoPage(url) {
|
|
11
|
+
return !!url && url.hostname === "github.com" && SSO_PATH.test(url.pathname);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function onEntra(url) {
|
|
15
|
+
return !!url && ENTRA_HOSTS.indexOf(url.hostname) !== -1;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function nameOf(node) {
|
|
19
|
+
if (node.name) return node.name;
|
|
20
|
+
var words = [];
|
|
21
|
+
(function collect(n) {
|
|
22
|
+
if (n.role === "text") { if (typeof n.text === "string" && n.text !== "[redacted]") words.push(n.text); return; }
|
|
23
|
+
(n.children || []).forEach(collect);
|
|
24
|
+
})(node);
|
|
25
|
+
return words.join(" ");
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// The SSO page's Continue button in a snapshot tree: { ref, name }, or null.
|
|
29
|
+
function continueIn(tree) {
|
|
30
|
+
var found = null;
|
|
31
|
+
(function walk(node) {
|
|
32
|
+
if (found) return;
|
|
33
|
+
if (node.ref && node.visible !== false && node.role === "button" && /^continue$/iu.test(String(nameOf(node)).replace(/\s+/g, " ").trim())) found = { ref: node.ref, name: "Continue" };
|
|
34
|
+
(node.children || []).forEach(walk);
|
|
35
|
+
})(tree);
|
|
36
|
+
return found;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// `state` is "renewed" (back on GitHub), "needs_person" (Entra asked for a sign-in) or "stalled" (neither).
|
|
40
|
+
function report(state) {
|
|
41
|
+
if (state === "renewed") return { state: state, note: "desk-web pressed the enterprise SSO page's Continue; Entra renewed the session without a person and GitHub returned to the page." };
|
|
42
|
+
if (state === "needs_person") {
|
|
43
|
+
return {
|
|
44
|
+
state: state,
|
|
45
|
+
note: "desk-web pressed the enterprise SSO page's Continue, but Entra did not accept this profile copy's session and asked to sign in. That needs the person once (a sign-in or MFA in their own browser); desk-web never types a password or copies a token.",
|
|
46
|
+
keepWorking: "work on pages that do not need the enterprise account, or read the same content through the API; after the person signs in, open a new context with browser_context so the copy has it"
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
return { state: state, note: "desk-web pressed the enterprise SSO page's Continue, and the page did not leave it in time.", keepWorking: "run [\"wait\",\"3\"] and read the page again, or press Continue once more" };
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
module.exports = { isSsoPage: isSsoPage, onEntra: onEntra, continueIn: continueIn, report: report };
|
package/vendor/desk/plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "desk",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.546",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "ourostack",
|
|
6
6
|
"url": "https://github.com/ourostack/desk"
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"plain-language": {
|
|
45
45
|
"path": "../plain-language",
|
|
46
|
-
"version": "0.2.
|
|
46
|
+
"version": "0.2.17",
|
|
47
47
|
"resolution": "flattened",
|
|
48
48
|
"bundleMetadata": "plugins/desk/activation/copilot-root.flattened-bundle.json"
|
|
49
49
|
}
|
|
@@ -35,7 +35,7 @@ This applies equally to plugin defaults and operator workspace config: both auto
|
|
|
35
35
|
|
|
36
36
|
### 1. Confirm the `~/<runtime>.toml` link is in place
|
|
37
37
|
|
|
38
|
-
This is `desk:session-start`
|
|
38
|
+
This is `desk:session-start`'s "Workspace MCP link" section (`details.md`)'s job (symlink → hardlink → copy fallback per platform). Detect current state:
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
41
|
readlink "$HOME/<runtime>.toml" 2>/dev/null
|
|
@@ -175,6 +175,6 @@ Added [<alias>] to $DESK/<runtime>.toml. Next launch will load it.
|
|
|
175
175
|
|
|
176
176
|
## Cross-references
|
|
177
177
|
|
|
178
|
-
- `desk:session-start`
|
|
178
|
+
- `desk:session-start`'s "Workspace MCP link" section (`details.md`) — `~/<runtime>.toml` link auto-creation + platform fallback.
|
|
179
179
|
- `desk:git-hygiene` — commit + push cadence.
|
|
180
180
|
- `<runtime> mcp <name> --help` (runtime CLI) — per-builtin arg surface, source of truth for builtin schema.
|
|
@@ -129,4 +129,4 @@ search reaches every surface — the active desk and the back-of-the-room shelve
|
|
|
129
129
|
|
|
130
130
|
## The archive is read-only
|
|
131
131
|
|
|
132
|
-
don't
|
|
132
|
+
don't edit archived tasks in place. if a cancelled task needs to be restarted, create a new task instead of un-archiving it. the only reopening is for delivered work that needs a sign-off or a refusal handled, which goes through `task_update` with `unarchive: true` (see "Archiving a delivered task"). the archive is the historical record; resurrecting a directory in place loses the "this was abandoned then restarted" signal that a fresh task preserves.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: coordinating-lanes
|
|
3
|
+
description: Use when you are a lead or coordinator session running lanes, child sessions or subagents, and whenever a lane reports a result, a blocker, a failure or something it says needs the human.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Coordinating lanes
|
|
7
|
+
|
|
8
|
+
A coordinator's job is to keep every lane moving and to tell the human what is true. `work-orchestration` has the mechanics: briefs in "Choosing and briefing agents", supervision in "Waiting for children".
|
|
9
|
+
|
|
10
|
+
## Delegate; don't do the work
|
|
11
|
+
|
|
12
|
+
A lead or coordinator session (one set up to run lanes or other sessions) hands investigation, fixes and builds to child sessions or subagents, then verifies what they return and reports the result. It doesn't investigate or fix inline, not even something small: while it works, nobody watches the lanes and the human waits on it. Only when it has no way to delegate, or the human chose inline execution, does it do the work itself, and it says so.
|
|
13
|
+
|
|
14
|
+
## Verify a lane's claim before you relay it
|
|
15
|
+
|
|
16
|
+
Before telling the human that a lane is blocked, that something is broken, or that something needs them, check the claim yourself against a primary source: the lane's evidence, the screen or status it names, a log it links. Anything that needs running code or tests to confirm goes to a lane too. For example, a lane says the account isn't signed in, so open the account switcher and look. A claim relayed unchecked hands the human your review. A picture a lane produced follows `visual-proof` before it reaches them.
|
|
17
|
+
|
|
18
|
+
## Never park
|
|
19
|
+
|
|
20
|
+
A coordinator doesn't stop because its lanes have finished or the next milestone waits on someone else. When a lane frees up, start the next most valuable item within existing go: a red default branch, the human's open asks, the plan's next ready item, then polish. New work still gets its alignment note first, and an explicit stop or pause holds at its scope. Keep as many lanes running as the work and the host allow.
|
|
21
|
+
|
|
22
|
+
## Mechanisms, not reminders
|
|
23
|
+
|
|
24
|
+
What you set up to keep lanes moving (watchdog automations, queue refills, gates) must work on any host the work moves to, never on one machine's paths or state. When something slips, fix the mechanism that let it slip rather than leaving yourself a note (`lesson-capture`).
|
|
@@ -83,6 +83,8 @@ This section is the one statement of the rule; `operator-voice-comments` ("No fa
|
|
|
83
83
|
Never test, reproduce or measure on the human's real data or account: not read-only, not through a copy of their local store, not through a probe signed in as them, not by asking their permission and not through a script you hand them to run. Access on their machine is not permission, and a deadline does not change this. If the human themselves, unprompted, directs a specific check on their own account, that is their decision: do exactly that check and nothing broader.
|
|
84
84
|
|
|
85
85
|
- **Offline:** evaluate on synthetic data shaped like theirs: their sizes, kinds and edge cases, generated rather than copied. When real use shows a problem the synthetic data missed, add that shape to the generator, reproduce it offline, then fix it.
|
|
86
|
+
- **Start where they start.** Run the scenario from the state a real person is usually in, not a fresh install or a clean snapshot: hours stale after a night away, on data the size of theirs, through launch, wake, update and a dropped network. Fail on any stale view, stall or silent action.
|
|
87
|
+
- **Isolate test copies by construction.** A test copy of an app gets its own app identity, data folder and settings built into the copy, never only through environment variables: the operating system can relaunch a copy without them, and it then runs on the person's real data.
|
|
86
88
|
- **Online:** judge real use from counts-only telemetry of their normal use: counts and timings, no content and no identifiers beyond what the product already records. A change that should move something they feel ships with the telemetry that will show whether it did.
|
|
87
89
|
|
|
88
90
|
A repository rule or gate that requires a check against the human's real account is a conflict: raise it with the repository's owner and propose an offline case; do not run it on their account, and do not remove or bypass the gate yourself.
|
|
@@ -111,9 +113,13 @@ Clean up the processes you spawned by lineage, never by name alone. Use a tracke
|
|
|
111
113
|
|
|
112
114
|
Before a prompt, plan or brief says "this extends PR #1234's pattern" or "we already migrated X to Y", check that the precedent is in HEAD: `git show <ref> -- <file>`, `git log --all --grep "<feature>"`, or a grep of current source for its claimed effect. What a PR proposed and what landed often differ. If HEAD disagrees, narrow the claim, pick another precedent or drop it before anyone builds on it.
|
|
113
115
|
|
|
116
|
+
## A test earns its place
|
|
117
|
+
|
|
118
|
+
Before adding or substantially changing a test, name the concrete regression it catches that existing tests miss. Then prove it: revert the fix or break the behavior, and watch the test fail for that reason. A test that still passes catches nothing; drop it or fix it. Prefer strengthening an existing test to adding a test, fixture, mock or harness. Don't test what the compiler, types or a schema already enforce, the same contract twice at layers that fail together, or only that a mock was called with some arguments, unless that call is itself the contract. "No new test" is an acceptable outcome, and an instruction to write tests doesn't waive this gate. Adapted from Tim Clem's [Test Quality Gate](https://github.com/tclem/dotfiles/blob/main/copilot/copilot-instructions.md#test-quality-gate).
|
|
119
|
+
|
|
114
120
|
## Test coverage: seven categories
|
|
115
121
|
|
|
116
|
-
When writing or auditing tests for a change,
|
|
122
|
+
When writing or auditing tests for a change, check each category for a regression worth a test ("A test earns its place") or mark it `N/A` with a reason (for example `N/A: pure function, no state`):
|
|
117
123
|
|
|
118
124
|
1. **Happy path:** the normal input, asserting the value and side effects.
|
|
119
125
|
2. **Edge cases:** boundaries such as zero, maximum and minimum length, each as its own test.
|
|
@@ -127,17 +133,7 @@ Name tests `{Given}_{When}_{Method}_{Assertion}`, for example `GivenValidPayload
|
|
|
127
133
|
|
|
128
134
|
## Visual proof
|
|
129
135
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
Every picture says what to notice. Give each one a short caption: where to look, and what changed or what it proves, in plain words. For example: "Bottom card: a reply in the thread now notifies you; before, only @mentions did." Mark the spot with a box or an arrow when that's easy, and crop to what matters. A picture without a "what to notice" caption isn't proof.
|
|
133
|
-
|
|
134
|
-
### Privacy-safe rendered proof
|
|
135
|
-
|
|
136
|
-
If a real capture would expose private messages, identities, customer data or secrets, do not upload it. Reproduce the changed surface through the actual product renderer with safe, owned, made-up data in an isolated fixture or test account already authorized for this work, then capture that real render. Prefer a bounded crop that excludes private content when it still proves the claim. Check the pixels and metadata before sharing; do not copy private content into fixtures.
|
|
137
|
-
|
|
138
|
-
Label the inline capture `Synthetic-data capture` and state what it demonstrates and what it does not: for example, “Synthetic-data capture: the changed renderer with made-up entries; does not verify private account integration.” Keep test/log evidence for behavior outside that scope. A drawing, AI-generated mock, reconstructed screenshot or screenshot of a different implementation is not proof of the running product. A synthetic render cannot prove a private live run, installed state, merge or rollout.
|
|
139
|
-
|
|
140
|
-
If neither a safe bounded capture nor a real synthetic-data render is possible, record the reason and the strongest safe alternative, but do not call the visual claim verified. PR creation and readiness remain subject to [`pr-surface-hygiene` PSH-010](../pr-surface-hygiene/SKILL.md#psh-010--visual-proof-blocks-creation-and-readiness); a visible change stays blocked rather than acquiring a false `No visual change` reason.
|
|
136
|
+
Visual proof, including looking at a capture before you show it, is the `visual-proof` skill.
|
|
141
137
|
|
|
142
138
|
## Delivery receipt
|
|
143
139
|
|
|
@@ -88,6 +88,8 @@ The discipline:
|
|
|
88
88
|
The worktree isolates the work: parallel units never collide in the working tree, and the canonical clone's resting state is never perturbed.
|
|
89
89
|
3. **Clean up after yourself only at the recorded endpoint.** For an authorized merge, confirm the source-system PR state and actual merged source first; for GitHub, `gh pr view <id> --json state --jq .state` must return `MERGED`. This is necessary, not sufficient: apply every exact-owned cleanup gate above before `git worktree remove <path>` or deleting the specific branch. Do not chain removal unconditionally after merge or let a merge command's automatic branch deletion bypass these gates. Reconcile the canonical clone through the recorded repository policy afterward. An alpha or PR-only endpoint instead preserves or transfers the exact refs/worktree with a named owner and trigger. The end state has zero unaccounted-for resources, not zero deliberately retained branches. If merge failed or ownership/absence is uncertain, preserve the work and keep cleanup pending.
|
|
90
90
|
|
|
91
|
+
4. **Spend disk like money.** Reuse one clone per repository and a worktree per unit of work; never make a fresh full clone for each review, fix or child session. For a large repository, use a partial clone (`--filter=blob:none`) and a sparse checkout of only the folders the work touches. Remove a worktree as soon as its endpoint is reached (step 3), and stop any preview or dev server you started, by its process ID, when its review ends.
|
|
92
|
+
|
|
91
93
|
**Why:** the clone's checked-out state is cattle, not a pet — only `main` and the remote are durable. This is the working-copy layer of "Never leave state behind" (below) and the branch → PR → merge drive-to-merge motion: branch in a worktree → PR → merge → delete branch → remove worktree → clone back on clean `main`, no residue at any layer.
|
|
92
94
|
|
|
93
95
|
### Verify before delete — cleanup is not destroy
|
|
@@ -198,6 +200,8 @@ At session start, if git status in any repo shows unexpected uncommitted changes
|
|
|
198
200
|
|
|
199
201
|
Never move a branch ref in place with `git update-ref` or an equivalent under a dirty checkout. In a desk, run `git pull --rebase --autostash` and commit only your own paths; other sessions' unfinished files stay where they are. In a code repository, start from a clean temporary worktree based on the current remote destination, replay only the exact task-owned change, stage only an explicit staged-path allowlist, inspect `git diff --cached --name-status` against that allowlist, then inspect the full staged diff before commit.
|
|
200
202
|
|
|
203
|
+
Never run `git stash` in a shared checkout or a checkout another session might use: another session's uncommitted work can vanish into a stash nobody owns. To set work aside, use a detached worktree instead. Git's own `--autostash`, which reapplies the stash in the same command, is the exception. If that reapply reports a conflict, the stash is yours: resolve it and `git stash pop` it in the same turn; never drop it or leave it behind.
|
|
204
|
+
|
|
201
205
|
(overlay users: consumer overlays often ship a state-repo-specific anti-pattern note — never branch or open a PR on a state repo to get around a denied push to `main`; the denial is a permission setting to fix, not a workflow to route around.)
|
|
202
206
|
|
|
203
207
|
## Commit identity and secrets
|
|
@@ -206,6 +210,8 @@ If the operator lists a commit address for the repository's owner, set the repos
|
|
|
206
210
|
|
|
207
211
|
Do not store secrets, credentials or private tokens in the desk.
|
|
208
212
|
|
|
213
|
+
Never put a credential where it can be seen: not in a typed terminal line, a terminal multiplexer's send-keys or environment argument, a command-line flag, a `git -c` credential helper or extra header, a URL, a file or a capture. Let the inner shell or a credential wrapper fetch it at the point of use, and redact anything token-shaped (`gh[opsu]_…` and the like) from text before publishing it.
|
|
214
|
+
|
|
209
215
|
## Pre-commit scans (authorship, diff-scope)
|
|
210
216
|
|
|
211
217
|
Run both scans before every commit. They are procedures, not shipped hooks; an operator may install a local `commit-msg` hook built from the same pattern.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: interaction-style
|
|
3
|
-
description: Invoke when new input arrives mid-work, before returning control or stopping short of scope, before a blocking wait, when presenting several decisions, when organizing tracks or tasks, when the human steps away, when the collaboration slips, when the host nudges about its task list or memory, or before acting on standing authority.
|
|
3
|
+
description: Invoke when new input arrives mid-work, when the operator asks how something works or whether something is true, before returning control or stopping short of scope, before a blocking wait, when presenting several decisions, when organizing tracks or tasks, when the human steps away, when the collaboration slips, when the host nudges about its task list or memory, or before acting on standing authority.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Interaction style
|
|
@@ -83,6 +83,8 @@ When you can name the right call and why the alternatives are worse, do it; do n
|
|
|
83
83
|
|
|
84
84
|
New input from the operator is evaluated, not reactively executed, so the first response to it is usually words: a clarifying question, a proposal or a push-back, not a burst of edits. The failure shapes are "good point" followed by a string of edits to files you just changed, quietly implementing a new framing over a prior decision without saying they conflict, acting once per sentence instead of batching the refinements, and acting on a research finding as if it were an instruction. Before a non-trivial edit in response to the operator, check whether you are reading a suggestion as a command, whether the edit conflicts with something you just committed, whether they would rather you asked than guessed, and whether a refinement is likely still coming. If any answer is yes, reply in words first.
|
|
85
85
|
|
|
86
|
+
A question is not a request to act. When the operator asks how something works, why it is the way it is, or whether something is true, answer that question. Don't start work to change what they asked about, propose changing it or queue it; they may be asking out of curiosity or to understand how it interacts with something else. If the answer shows a real problem, say so in one line with your recommendation and carry on with the work you were doing. Act only when they ask you to.
|
|
87
|
+
|
|
86
88
|
When the operator reviews a draft, page or other artifact and gives feedback as they go, collect the whole round before editing, and change only what the feedback touches. Prose they already wrote stays as it is unless they asked for a rewrite (Ari, 2026-11-11 11:58 PT: "do not fix as i give you feedback. we'll work through the whole page, and only once i have no more feedback to give on current iteration will you go back and do next iteration"; 12:03: "please do not unnecessarily rewrite prose that i already had...i dont want to give you "put this back" feedback").
|
|
87
89
|
|
|
88
90
|
For a material requirement change, that first reply names the earlier test runs, review passes or validations the change invalidates, or says none has run or none is invalidated. A later task note is not a substitute for telling the human. Record the same evidence boundary on the task card and continue the same outcome through `work-orchestration`.
|
|
@@ -184,7 +186,7 @@ Every question to the operator carries the recommendation you will follow if the
|
|
|
184
186
|
|
|
185
187
|
### Fix the tooling; don't hand mechanical work to the operator
|
|
186
188
|
|
|
187
|
-
When a tool fails or is too slow mid-task (an MCP that will not authenticate, a browser surface that will not drive, a missing capability), fix the tooling: reconfigure it, ask for a relaunch with a different setup, build a small wrapper or switch identity. The operator supplies judgment, not hands: never hand them a step, chore, install, sign-in, deploy or check to run, not even one click to approve, and never ask them to do one on an agent's behalf. This is about execution: the gates `using-desk` lists (a send in their voice, money, an irreversible act, a decision that is theirs) still reach them, as a decision with your recommendation, never as a task. Deploy and run sign-in flows yourself; never type a password or
|
|
189
|
+
When a tool fails or is too slow mid-task (an MCP that will not authenticate, a browser surface that will not drive, a missing capability), fix the tooling: reconfigure it, ask for a relaunch with a different setup, build a small wrapper or switch identity. The operator supplies judgment, not hands: never hand them a step, chore, install, sign-in, deploy or check to run, not even one click to approve, and never ask them to do one on an agent's behalf. This is about execution: the gates `using-desk` lists (a send in their voice, money, an irreversible act, a decision that is theirs) still reach them, as a decision with your recommendation, never as a task. Deploy and run sign-in flows yourself; never type a password into a page or put a secret in context, a log, a transcript or Git (piping one from a page or the clipboard into its store, unread, is fine), or open side-route sign-ins (`az`, `open <url>`); only a password, MFA or consent screen you hit is the human's. An expired token or a missing permission is a route problem, not their task: deploy through CI with a stored secret, run the sign-in yourself in Desk's browser where an existing session forwards you, or give the step to a lane or agent that has the access. A child that cannot finish a step names the exact blocking screen or error to its coordinator, never to the person; the coordinator finds another route. Only a screen you actually reach that demands the operator's own identity proof (a password, an MFA prompt or a new consent) goes to them, once, as a blocker that names that screen, never as instructions and never in advance on the guess that one will appear. If the tooling cannot be fixed this session, record friction and keep automating what you can. The operator delegates outcomes, not steps: after go, when an approach fails, step back and try a different one until the outcome is reached, rather than asking them to choose or approve the replacement; a replacement that reverses a decision agreed at go or changes architecture or scope is a stop under "Ask only when blocked", raised with your recommendation. "Go slow" or "no rush" means think harder, never hand over a step.
|
|
188
190
|
|
|
189
191
|
## 7. Brevity in response prose to the operator
|
|
190
192
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: live-ui-iteration
|
|
3
|
+
description: Use when you iterate on a UI with a person, such as being asked for feedback on a screen, polishing a screen with them, showing them a design or prototype, or receiving their notes on how something looks, moves or feels.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Live UI iteration
|
|
7
|
+
|
|
8
|
+
Iterate on a UI with the person watching it change, not by sending them screenshots. A screenshot is a round trip they have to open, judge and answer; a live page they already have open shows each edit in about a second, and their notes arrive while they look.
|
|
9
|
+
|
|
10
|
+
## Set up the loop
|
|
11
|
+
|
|
12
|
+
1. **Run a live mock where they already look.** Keep a hot-reload dev server running on made-up data (never their real data or account). Give each state a URL parameter, such as place, theme and chrome, so any state is one link away. If the app needs native chrome, add a dev-only stand-in so headless runs render the whole window. Open the URL in the panel beside their chat, or hand it to whoever holds their screen (a lead session opens it for a lane); each save then reaches their eyes without a message.
|
|
13
|
+
2. **Keep your own run apart from their view.** Run checks on a second server and daemon with their own ports and home. Drive it headless. Never open a window on the person's screen and never click or type in the view they are watching: a headless click once typed a stray "e" into someone's live page.
|
|
14
|
+
3. **Veil what isn't designed.** Cover states and widths nobody has designed with a "not designed yet" veil, so the person never judges a layout you haven't made. Fit by measurement, not breakpoints: put the veil below the narrowest designed width.
|
|
15
|
+
|
|
16
|
+
## Run the loop
|
|
17
|
+
|
|
18
|
+
- **One note, one small edit, one-line reply.** Land each edit in under a minute and say in one line what changed. Never batch notes: a full stylesheet rewrite once dropped its own tail and brought back what the person had rejected.
|
|
19
|
+
- **Every decision becomes a check.** When the person decides something ("the gap is 12", "the header stays pinned"), write it as a deterministic check that runs on every edit, in the repository's own test or lint suite. Run the suite after every edit, so nothing approved regresses. Never ask an agent to check by eye what a check can measure (`visual-proof`).
|
|
20
|
+
- **Critics judge taste only, in the background.** Start critic agents on the live result for what no check can judge (does it make sense, feel right, match the intent). They never block an edit, and what they find becomes a note you weigh like any other.
|
|
21
|
+
- **Believe their eye over your number.** Measure motion from the person's own recording: pull the frames with `ffmpeg` at full rate, track the region frame by frame and fit the curve. Where the measurement and their eye disagree, the eye wins and the number moves: a band measured 90% done by 400 ms still read "way too slow" at 500 ms.
|
|
22
|
+
|
|
23
|
+
## Ouro apps
|
|
24
|
+
|
|
25
|
+
For an app built on Ouro, the watch mode that reruns the checks on every edit, decisions recorded in `ouro-check.json` and the not-designed veil are in the "Live iteration" section of the [Ouro design-craft guide](https://ui.ouroboros.bot/docs/design-craft/). Follow it instead of rebuilding them.
|
|
26
|
+
|
|
27
|
+
## Red flags
|
|
28
|
+
|
|
29
|
+
| Thought | Reality |
|
|
30
|
+
|---|---|
|
|
31
|
+
| "I'll send a screenshot and ask what they think" | That is the round trip this skill removes. Give them the live URL. |
|
|
32
|
+
| "I'll open the page for them" | Never open windows on their screen. Hand the URL to whoever holds their view. |
|
|
33
|
+
| "Several notes touch the same file, I'll do them together" | One note, one edit, one reply. Batches drop things and bring back rejected ones. |
|
|
34
|
+
| "I'll eyeball the spacing after each edit" | A decision about spacing is a check. Write it once. |
|
|
35
|
+
| "My measurement says it's fine" | If their eye disagrees, the eye wins. |
|
|
@@ -17,6 +17,10 @@ Anything sent or scheduled in the operator's name — a chat message, an email,
|
|
|
17
17
|
|
|
18
18
|
Before you show a draft, check it with a zero-context reviewer (below), so the operator sees a clean draft and any open judgment call at once. The review never replaces the approval.
|
|
19
19
|
|
|
20
|
+
## Relaying is not sending as them
|
|
21
|
+
|
|
22
|
+
When you pass the operator's views, feedback or decisions to someone else, you are not sending as the operator. Write as yourself, label it as your reading ("Here's generally what Ari was thinking, as I understood it"), and name the operator as the person to ask about anything unclear. Never write it in their first person or as "in my words". Use the operator's voice only for text they send themselves or approve for sending in their name, under the approval rule above.
|
|
23
|
+
|
|
20
24
|
## Surfaces in scope
|
|
21
25
|
|
|
22
26
|
In scope: replies in reviewer threads, top-level PR comments, PR descriptions you draft or audit, work-item comments and descriptions, group-chat messages, and emails and calendar invitations in the operator's name. Out of scope: skill, planning and doing prose, commit messages, your own replies to the operator, friction entries and cards.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: outside-approval
|
|
3
|
+
description: Use when work would need approval, sign-off, a registration, an exception or a review from someone outside the operator's own authority, such as another team, an admin, a policy owner or a partner, before you start, propose or ask about it.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Work that waits on outside approval
|
|
7
|
+
|
|
8
|
+
Defer it. Don't start, propose or ask about work that needs approval from people outside the operator's own authority (another team's sign-off, an identity or app registration, a policy exception) unless the operator asks for it. A review the repository requires before merging is not outside approval: request it as `work-orchestration` "Merging and the terminal state" says. Record the options you researched where the work's owner will find them (an issue or the task card), mark the work deferred and carry on with what needs nobody else. The operator's own decisions are not outside approval.
|
|
9
|
+
|
|
10
|
+
Deferring is not stopping. Pick up the next item that needs nobody else in the same turn. Don't ask the operator whether to contact the other party, and don't draft the request for later: either is starting the work. If the operator does ask for it, sending anything to another person in their name still goes through `operator-voice-comments`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pr-feedback-on-own-pr
|
|
3
|
-
description: Work through requested review feedback on the operator's own pull request and route fixes to the implementation owner. Not for another author's PR.
|
|
3
|
+
description: Work through requested review feedback on the operator's own pull request and route fixes to the implementation owner. Use also before accepting, dismissing, replying to or resolving any review item on it. Not for another author's PR.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# pr-feedback-on-own-pr
|
|
@@ -33,6 +33,10 @@ pr_feedback_prefs:
|
|
|
33
33
|
thread_close_policy: agent-closes-when-addressed # or: agent-replies-operator-closes; the operator can override per thread
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
+
## Each review item is a hypothesis
|
|
37
|
+
|
|
38
|
+
Treat every review item, from a person, a bot or `pr-self-review`, as a claim to test: neither an order to follow nor noise to clear. Name the invariant or question it tests; a question can expose a real problem even when its suggested fix is wrong. Accept or dismiss it only with evidence that fits the claim: a reproduction, a failing test, a traced code path or the governing contract. A dismissal needs evidence at least as strong as an acceptance; a plausible story or two sampled call sites is not proof. When the comment or your answer makes a claim about a whole set ("all", "none", "only", "no other caller"), bound the set, check every member and list what you checked in the reply. Record each item as accepted, accepted with a different fix, open, or dismissed with proof, and before dismissing a high-impact or cross-cutting one, ask an independent reviewer to try to prove the reviewer right. Every thread gets a reply (phase 9), and a thread is resolved only when the evidence supports its outcome; an open one stays active. Adapted from Tim Clem's [`pr-review-reply`](https://github.com/tclem/dotfiles/blob/main/copilot/skills/pr-review-reply/SKILL.md).
|
|
39
|
+
|
|
36
40
|
## Buckets
|
|
37
41
|
|
|
38
42
|
| Bucket | What it is | Operator confirms? |
|
|
@@ -9,7 +9,7 @@ description: Work out which reviewers a PR requires, by files touched, and who a
|
|
|
9
9
|
|
|
10
10
|
When a PR has been sitting without movement, the operator needs to know **who is structurally required to approve** (by the host's branch-policy required-reviewer rules, scoped by file path) and **who is actually reviewing the PR today**. This skill is the platform-agnostic recipe.
|
|
11
11
|
|
|
12
|
-
> **Overlay users:** platform-specific runnable implementations (auth preamble, tenant-sniff checks, REST endpoints, required-reviewer policy-type identifiers, and any group-expansion lore for the host's identity system) typically live in a consumer overlay's PR-toolbox skill. The conceptual recipe below applies to any platform.
|
|
12
|
+
> **Overlay users:** platform-specific runnable implementations (auth preamble, tenant-sniff checks, REST endpoints, required-reviewer policy-type identifiers, and any group-expansion lore for the host's identity system) typically live in a consumer overlay's PR-toolbox skill. The conceptual recipe below applies to any platform; the shipped `helpers/audit.py` implements it for Azure DevOps only.
|
|
13
13
|
|
|
14
14
|
## Recipe
|
|
15
15
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
# ax: read-only. It only runs az account show, gets a bearer token and sends Azure DevOps GET requests; it writes nothing.
|
|
1
2
|
"""ADO PR reviewer audit — 4-step recipe from ``../SKILL.md``.
|
|
2
3
|
|
|
3
4
|
Implements the file→required-groups map + approver ranking for a
|
|
@@ -289,13 +290,19 @@ def main(
|
|
|
289
290
|
project: str,
|
|
290
291
|
repo_id: str,
|
|
291
292
|
pr_id: str,
|
|
293
|
+
refusals: list[str] | None = None,
|
|
292
294
|
) -> dict[str, Any]:
|
|
293
295
|
"""Run the 4-step recipe and return the result dict.
|
|
294
296
|
|
|
295
297
|
Return shape: ``{"file_to_groups": {...}, "approver_ranking": [...]}``.
|
|
298
|
+
When it returns the empty result because it could not start, it appends
|
|
299
|
+
the reason's code (``tenant-mismatch`` or ``token-unavailable``) to
|
|
300
|
+
``refusals`` so the command line can report it.
|
|
296
301
|
"""
|
|
302
|
+
refusals = [] if refusals is None else refusals
|
|
297
303
|
tenant_ok = ensure_tenant()
|
|
298
304
|
if not tenant_ok:
|
|
305
|
+
refusals.append("tenant-mismatch")
|
|
299
306
|
logger.warning(
|
|
300
307
|
"proceeding with tenant-mismatch sentinel; no ADO requests will be issued"
|
|
301
308
|
)
|
|
@@ -304,6 +311,7 @@ def main(
|
|
|
304
311
|
try:
|
|
305
312
|
token = _get_bearer_token()
|
|
306
313
|
except RuntimeError as exc:
|
|
314
|
+
refusals.append("token-unavailable")
|
|
307
315
|
logger.warning("could not acquire ADO bearer token: %s", exc)
|
|
308
316
|
return {"file_to_groups": {}, "approver_ranking": []}
|
|
309
317
|
|
|
@@ -325,9 +333,19 @@ def main(
|
|
|
325
333
|
def _cli_main(argv: list[str] | None = None) -> int:
|
|
326
334
|
logging.basicConfig(level=logging.INFO, format="%(levelname)s %(name)s: %(message)s")
|
|
327
335
|
ns = parse_args(argv)
|
|
328
|
-
|
|
336
|
+
refusals: list[str] = []
|
|
337
|
+
try:
|
|
338
|
+
result = main(ns.org, ns.project, ns.repo_id, ns.pr_id, refusals)
|
|
339
|
+
except requests.HTTPError as exc:
|
|
340
|
+
sys.stderr.write(f"http-error: {exc}\n")
|
|
341
|
+
return 1
|
|
329
342
|
json.dump(result, sys.stdout, indent=2, default=str)
|
|
330
343
|
sys.stdout.write("\n")
|
|
344
|
+
if refusals:
|
|
345
|
+
sys.stderr.write(
|
|
346
|
+
f"{refusals[0]}: the result above is empty because no Azure DevOps request was sent\n"
|
|
347
|
+
)
|
|
348
|
+
return 3
|
|
331
349
|
return 0
|
|
332
350
|
|
|
333
351
|
|