gentle-pi 4.6.0 → 4.7.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 +10 -11
- package/assets/agents/gentle-ai-explore.md +1 -0
- package/assets/agents/gentle-ai-verify.md +5 -2
- package/assets/agents/gentle-ai-worker.md +3 -0
- package/assets/agents/jd-fix-agent.md +1 -0
- package/assets/agents/jd-judge-a.md +1 -0
- package/assets/agents/jd-judge-b.md +1 -0
- package/assets/design-canvas/canvas.css +13 -1
- package/assets/design-canvas/canvas.js +11 -2
- package/assets/install-wizard/wizard.js +1 -0
- package/assets/migrations/agent-body-history.json +16 -1
- package/assets/orchestrator-delegation-reference.md +4 -4
- package/assets/orchestrator-delegation.md +1 -1
- package/assets/orchestrator-full-delegation-card.md +65 -0
- package/assets/orchestrator-full-delegation.md +34 -0
- package/assets/orchestrator-memory.md +3 -3
- package/assets/orchestrator-prompts.md +1 -1
- package/assets/orchestrator-skills.md +1 -1
- package/assets/orchestrator-verification.md +7 -5
- package/assets/orchestrator.md +3 -3
- package/bin/gentle-shell.mjs +164 -56
- package/docs/agent-status.md +61 -0
- package/docs/bundled-install.md +7 -5
- package/docs/delegated-verification.md +29 -7
- package/docs/gentle-agents-activity.md +14 -0
- package/docs/gentle-shell.md +54 -16
- package/docs/install-wizard.md +1 -1
- package/docs/permission-modes.md +9 -4
- package/docs/readme-reference.md +75 -30
- package/docs/render-cache-performance.md +11 -1
- package/docs/review-coordinator.md +33 -0
- package/docs/review-request-context.md +19 -0
- package/docs/review-windows-acl.md +18 -0
- package/docs/voice.md +6 -3
- package/docs/yolo-mode.md +5 -5
- package/extensions/ask-user-choice.ts +1 -0
- package/extensions/ask-user-question.ts +1 -0
- package/extensions/child-safety.ts +3 -0
- package/extensions/gentle-agent-status.ts +99 -0
- package/extensions/gentle-agents.ts +326 -34
- package/extensions/gentle-ai.ts +1496 -454
- package/extensions/gentle-shell.ts +293 -63
- package/extensions/gentle-todo.ts +18 -2
- package/extensions/gentle-tps.ts +48 -0
- package/extensions/quiet-tools.ts +38 -8
- package/extensions/skill-registry.ts +175 -18
- package/extensions/startup-banner.ts +30 -3
- package/lib/agent-profile-pin.ts +3 -3
- package/lib/agent-profiles.ts +160 -2
- package/lib/agent-status.ts +105 -0
- package/lib/agents-config.ts +46 -0
- package/lib/agents-history.ts +24 -5
- package/lib/agents-messaging.ts +47 -5
- package/lib/agents-runner.ts +183 -12
- package/lib/auto-permission-runtime.ts +1 -1
- package/lib/bounded-writer-admission.ts +13 -1
- package/lib/card-content-policy.ts +8 -6
- package/lib/command-palette.ts +133 -17
- package/lib/context-backstop.ts +14 -5
- package/lib/destructive-command-guard.ts +48 -4
- package/lib/execution-surface-guard.ts +20 -0
- package/lib/exploration-budget.ts +4 -2
- package/lib/gentle-ai-binary.ts +1 -1
- package/lib/gentle-design.ts +3 -0
- package/lib/gentle-shell-bundled.ts +6 -19
- package/lib/gentle-shell-launcher.ts +43 -8
- package/lib/herdr-activity.ts +14 -2
- package/lib/herdr-busy.ts +45 -0
- package/lib/image-attachments.ts +33 -0
- package/lib/image-disk-cache.ts +137 -0
- package/lib/inprocess-reviewer.ts +270 -140
- package/lib/jobs-view.ts +198 -11
- package/lib/model-routing-authority.ts +22 -4
- package/lib/native-choice-list.ts +20 -2
- package/lib/native-review-cli.ts +96 -19
- package/lib/orchestrator-mode-policy.ts +105 -0
- package/lib/questionnaire/questionnaire-view.ts +105 -12
- package/lib/rdd-mode-control.ts +32 -0
- package/lib/reply-language-anchor.ts +104 -0
- package/lib/review-blocker.ts +92 -0
- package/lib/review-candidate-symlink-scan.ts +136 -0
- package/lib/review-candidate-view-owner.ts +81 -44
- package/lib/review-continuation-registry.ts +99 -0
- package/lib/review-coordinator.ts +163 -0
- package/lib/review-failure-facts.ts +49 -0
- package/lib/review-host-relay.ts +46 -10
- package/lib/review-integration-v2.ts +7 -1
- package/lib/review-relay-phase-timing.ts +45 -0
- package/lib/review-start-context.ts +17 -0
- package/lib/session-profile-freeze.ts +4 -2
- package/lib/shell-bar.ts +140 -58
- package/lib/shell-changes.ts +2 -0
- package/lib/shell-panel.ts +17 -3
- package/lib/shell-sidebar-layout.ts +112 -40
- package/lib/shell-sidebar.ts +7 -0
- package/lib/shell-todo.ts +10 -3
- package/lib/verifier-admission.ts +1 -1
- package/lib/visual-customization-policy.ts +36 -16
- package/lib/visual-customize-view.ts +216 -21
- package/lib/visual-layout-preview.ts +9 -5
- package/lib/visual-profiles.ts +2 -2
- package/lib/windows-session-transport.ts +53 -2
- package/lib/yolo-session-policy.ts +40 -15
- package/package.json +2 -1
- package/runtime/gentle-ai-binary.mjs +1 -1
- package/runtime/gentle-shell-bundled.mjs +6 -19
- package/runtime/gentle-shell-launcher.mjs +42 -7
- package/runtime/native-review-cli.mjs +93 -16
- package/runtime/review-integration-v2.mjs +7 -1
- package/scripts/build-full-delegation-card.mjs +175 -0
- package/scripts/bundled-install.mjs +38 -8
- package/scripts/download-progress.mjs +68 -0
- package/scripts/gentle-ai-installer.mjs +41 -18
- package/scripts/gentle-ai-proxy.mjs +294 -0
- package/scripts/install-gentle-ai.mjs +14 -1
- package/scripts/installer-preflight.mjs +5 -5
- package/scripts/installer-runner.mjs +27 -12
- package/scripts/installer-server.mjs +8 -7
- package/scripts/render-cache-host.mjs +72 -0
- package/scripts/render-cache-performance-worker.mjs +5 -4
- package/scripts/render-cache-performance.mjs +6 -1
- package/scripts/run-test-suite.mjs +40 -28
- package/scripts/verify-package-files.mjs +12 -2
- package/scripts/voice-worker.cjs +32 -6
- package/skills/design/SKILL.md +11 -8
- package/skills/gentle-ai/SKILL.md +2 -2
- package/skills/gentle-ui-design/SKILL.md +46 -0
- package/skills/gentle-ui-design/references/adaptive-interfaces.md +46 -0
- package/skills/gentle-ui-design/references/browse-and-compare.md +62 -0
- package/skills/gentle-ui-design/references/composition-and-feedback.md +56 -0
- package/skills/gentle-ui-design/references/task-and-content.md +60 -0
- package/skills/skill-registry/SKILL.md +4 -2
- package/skills/work-unit-commits/SKILL.md +6 -7
- package/tests/agent-home.test.ts +28 -9
- package/tests/agent-profiles-workflow.test.ts +163 -0
- package/tests/agent-risk-escalation.test.ts +1 -1
- package/tests/agent-status.test.ts +143 -0
- package/tests/agents-config.test.ts +96 -0
- package/tests/agents-history.test.ts +31 -0
- package/tests/agents-jobs-frames.test.ts +93 -0
- package/tests/agents-prompt-lifecycle-runtime.test.ts +376 -0
- package/tests/agents-runner-drain.test.ts +193 -0
- package/tests/agents-runner.test.ts +178 -2
- package/tests/append-system-prompt-route.test.ts +4 -1
- package/tests/ask-user-choice.test.ts +4 -3
- package/tests/ask-user-question.test.ts +97 -0
- package/tests/auto-permission-runtime.test.ts +1 -1
- package/tests/autonomous-guard.test.ts +346 -10
- package/tests/bounded-stop-contract.test.ts +43 -3
- package/tests/bridge-cost.test.ts +19 -4
- package/tests/bundled-install.test.ts +30 -5
- package/tests/card-content-policy.test.ts +3 -3
- package/tests/chained-pr-skill.test.ts +8 -6
- package/tests/child-safety.test.ts +11 -0
- package/tests/codegraph-tools.test.ts +11 -5
- package/tests/command-palette.test.ts +284 -1
- package/tests/delegate-for-reason-contract.test.ts +3 -3
- package/tests/design-canvas-assets.test.ts +185 -2
- package/tests/destructive-command-guard.test.ts +52 -0
- package/tests/download-progress.test.ts +71 -0
- package/tests/execution-surface-guard.test.ts +55 -0
- package/tests/fixtures/primary-session-prompt/gentleman.golden.md +9 -5
- package/tests/fixtures/proxy-tls/proxy.crt +19 -0
- package/tests/fixtures/proxy-tls/proxy.key +28 -0
- package/tests/fixtures/session-profile-v1/gentle-ai-reviewer.ts +89 -0
- package/tests/fixtures/session-profile-v1/replay.ts +53 -6
- package/tests/full-delegation-closure.test.ts +131 -0
- package/tests/full-delegation-notices.test.ts +76 -0
- package/tests/generic-agent-tools.test.ts +3 -3
- package/tests/gentle-agent-status.test.ts +74 -0
- package/tests/gentle-agents-child-jobs.test.ts +237 -0
- package/tests/gentle-agents.test.ts +1070 -12
- package/tests/gentle-ai-binary.test.ts +3 -1
- package/tests/gentle-ai-elapsed-store.test.ts +19 -0
- package/tests/gentle-ai-exploration-budget.test.ts +18 -2
- package/tests/gentle-ai-installer.test.ts +134 -51
- package/tests/gentle-ai-proxy.test.ts +434 -0
- package/tests/gentle-ai.test.ts +113 -38
- package/tests/gentle-design.test.ts +21 -0
- package/tests/gentle-herdr-activity.test.ts +9 -6
- package/tests/gentle-shell-bin.test.ts +123 -0
- package/tests/gentle-shell-bundled.test.ts +207 -31
- package/tests/gentle-shell-launcher.test.ts +77 -10
- package/tests/gentle-shell.test.ts +899 -59
- package/tests/gentle-todo.test.ts +19 -2
- package/tests/gentle-tps.test.ts +123 -0
- package/tests/gentle-ui-design-skill.test.ts +59 -0
- package/tests/herdr-busy.test.ts +59 -0
- package/tests/herdr-task-summary-policy.test.ts +8 -4
- package/tests/image-disk-cache.test.ts +163 -0
- package/tests/independent-recovery-delivery.test.ts +83 -0
- package/tests/inprocess-reviewer.test.ts +176 -4
- package/tests/installer-posix-bootstrap.test.ts +1 -1
- package/tests/installer-preflight.test.ts +5 -4
- package/tests/installer-runner.test.ts +79 -44
- package/tests/installer-server.test.ts +14 -11
- package/tests/jobs-view.test.ts +260 -6
- package/tests/modal-mouse-boundaries.test.ts +136 -0
- package/tests/model-routing-authority.test.ts +178 -2
- package/tests/native-choice-list.test.ts +77 -2
- package/tests/native-review-capability-contract.test.ts +7 -1
- package/tests/native-review-cli.test.ts +269 -1
- package/tests/no-self-pause-contract.test.ts +4 -1
- package/tests/odd-routing-canonical-ratchet.test.ts +3 -3
- package/tests/orchestrator-budget.test.ts +7 -2
- package/tests/orchestrator-delegation-mode.test.ts +153 -0
- package/tests/orchestrator-mode-policy.test.ts +175 -0
- package/tests/orchestrator-prompt-budget.test.ts +3 -1
- package/tests/orchestrator-rdd-ownership.test.ts +2 -2
- package/tests/package-manifest.test.ts +11 -9
- package/tests/permission-allowlist.test.ts +202 -0
- package/tests/pi-update-launcher.test.ts +8 -0
- package/tests/pnpm-workspace-config.test.ts +58 -0
- package/tests/primary-session-prompt.test.ts +13 -0
- package/tests/profile-pin.test.ts +29 -2
- package/tests/profile-tier-footer.test.ts +5 -0
- package/tests/profiles-panel-delegation-mode.test.ts +422 -0
- package/tests/questionnaire-view.test.ts +115 -0
- package/tests/quiet-bash-runtime.test.ts +1 -1
- package/tests/quiet-tool-rendering.test.ts +48 -0
- package/tests/rdd-aware-verification-contract.test.ts +16 -11
- package/tests/rdd-customize.test.ts +287 -0
- package/tests/rdd-mode-cache.test.ts +450 -0
- package/tests/rdd-mode-control.test.ts +407 -0
- package/tests/rdd-mode-scope-regression.test.ts +137 -0
- package/tests/rdd-off-independent-regression.test.ts +69 -0
- package/tests/rdd-status-line.test.ts +18 -0
- package/tests/render-cache-performance.test.ts +171 -2
- package/tests/reply-language-anchor.test.ts +173 -0
- package/tests/review-agent-end-preflight.test.ts +1 -1
- package/tests/review-blocker.test.ts +193 -0
- package/tests/review-candidate-owner-retry.test.ts +1 -1
- package/tests/review-candidate-symlink-scan.test.ts +157 -0
- package/tests/review-candidate-view.test.ts +1 -1
- package/tests/review-candidate-windows-boundary.test.ts +131 -0
- package/tests/review-candidate-windows-probe.test.ts +63 -0
- package/tests/review-committed-restart-ack.test.ts +129 -0
- package/tests/review-continuation-registry.test.ts +76 -0
- package/tests/review-controller-native-routing.test.ts +261 -5
- package/tests/review-controller-workspace-root.test.ts +230 -3
- package/tests/review-controller.test.ts +96 -11
- package/tests/review-coordinator-runtime.test.ts +117 -0
- package/tests/review-coordinator.test.ts +195 -0
- package/tests/review-failure-facts.test.ts +87 -0
- package/tests/review-host-relay-routing.test.ts +258 -4
- package/tests/review-host-relay.test.ts +39 -0
- package/tests/review-integration-v2.test.ts +46 -3
- package/tests/review-json-arguments.test.ts +65 -10
- package/tests/review-last-event-closure.test.ts +68 -0
- package/tests/review-loadout-rdd-off-sdk.test.ts +65 -31
- package/tests/review-owner-identity.test.ts +60 -24
- package/tests/review-relay-phase-timing.test.ts +128 -0
- package/tests/review-relay-transport-agent.test.ts +12 -2
- package/tests/review-reviewer-evidence.test.ts +183 -0
- package/tests/review-risk-assessment.test.ts +74 -3
- package/tests/review-session-standing-permission-controller.test.ts +21 -1
- package/tests/review-start-context.test.ts +19 -0
- package/tests/review-tool-prose-budget.test.ts +121 -0
- package/tests/run-test-suite.test.ts +122 -1
- package/tests/runtime-harness.mjs +4 -1
- package/tests/sensitive-path-tools.test.ts +181 -5
- package/tests/session-profile-append-controller-pi.test.ts +60 -31
- package/tests/session-profile-binding.test.ts +19 -1
- package/tests/session-profile-disk-reader-pi.test.ts +58 -16
- package/tests/session-profile-v1-compat.test.ts +35 -1
- package/tests/shell-bar.test.ts +186 -42
- package/tests/shell-panel.test.ts +50 -22
- package/tests/shell-sidebar-fullscreen.test.ts +5 -5
- package/tests/shell-sidebar-layout.test.ts +294 -23
- package/tests/shell-sidebar-scroll-benchmark.test.ts +1 -1
- package/tests/shell-surface-transparent.test.ts +89 -0
- package/tests/shell-todo.test.ts +12 -0
- package/tests/skill-registry.test.ts +838 -5
- package/tests/startup-banner.test.ts +152 -1
- package/tests/startup-home-repo.test.ts +2 -0
- package/tests/support/review-coordinator-runtime.ts +69 -0
- package/tests/task-size-routing-contract.test.ts +5 -3
- package/tests/verifier-admission.test.ts +49 -0
- package/tests/verify-first-launch-contract.test.ts +78 -3
- package/tests/visual-customization-policy.test.ts +39 -6
- package/tests/visual-customize-view.test.ts +573 -9
- package/tests/visual-layout-preview.test.ts +15 -1
- package/tests/visual-profiles.test.ts +11 -0
- package/tests/voice-worker.test.ts +73 -2
- package/tests/windows-session-transport.test.ts +126 -0
- package/tests/work-continuity-contract.test.ts +28 -0
- package/tests/writer-feature-document-admission.test.ts +92 -0
- package/tests/yolo-customize.test.ts +27 -4
- package/tests/yolo-mode.test.ts +23 -18
- package/tests/yolo-session-policy.test.ts +270 -1
|
@@ -6,6 +6,7 @@ import { closeSync, ftruncateSync, openSync, readFileSync, readdirSync, realpath
|
|
|
6
6
|
import { cpus, loadavg } from "node:os";
|
|
7
7
|
import { basename, dirname, isAbsolute, relative, resolve, sep } from "node:path";
|
|
8
8
|
import { fileURLToPath } from "node:url";
|
|
9
|
+
import { validatePiRoot } from "./render-cache-host.mjs";
|
|
9
10
|
|
|
10
11
|
export function percentile(values, fraction) {
|
|
11
12
|
if (!values.length) return null;
|
|
@@ -60,6 +61,9 @@ async function main() {
|
|
|
60
61
|
const split = arg.indexOf("="); return [arg.slice(2, split), arg.slice(split + 1)];
|
|
61
62
|
}));
|
|
62
63
|
for (const key of ["baseline-root", "candidate-root", "pi-root", "output"]) assert.ok(options[key], `--${key} is required`);
|
|
64
|
+
// Refuse a bad host before hashing either worktree: the driver used to reach
|
|
65
|
+
// a bare ENOENT/ENOTDIR from hostFingerprint instead of the layout message.
|
|
66
|
+
validatePiRoot(resolve(options["pi-root"]));
|
|
63
67
|
const roots = { before: resolve(options["baseline-root"]), after: resolve(options["candidate-root"]) };
|
|
64
68
|
const initial = Object.fromEntries(Object.entries(roots).map(([key, root]) => [key, fingerprint(root)]));
|
|
65
69
|
assert.equal(initial.before.head, initial.after.head, "compare worktrees based on the same commit");
|
|
@@ -76,7 +80,8 @@ async function main() {
|
|
|
76
80
|
const report = { schema: "gentle-shell.render-performance/v1", started: new Date().toISOString(), node: process.version,
|
|
77
81
|
cpu: cpus()[0]?.model, loadAtStart: loadavg(), sources: initial, config, runs: [], comparisons: [] };
|
|
78
82
|
const worker = fileURLToPath(new URL("render-cache-performance-worker.mjs", import.meta.url));
|
|
79
|
-
const
|
|
83
|
+
const hostHost = fileURLToPath(new URL("render-cache-host.mjs", import.meta.url));
|
|
84
|
+
const instrumentationHash = () => createHash("sha256").update(readFileSync(fileURLToPath(import.meta.url))).update(readFileSync(worker)).update(readFileSync(hostHost)).digest("hex");
|
|
80
85
|
report.instrumentationSha256 = instrumentationHash();
|
|
81
86
|
report.host = hostFingerprint(config.piRoot);
|
|
82
87
|
const fd = outputDescriptor(options.output, [...Object.values(roots), config.piRoot, ...report.host.map((entry) => entry.root), resolve(dirname(fileURLToPath(import.meta.url)), "..")]);
|
|
@@ -22,35 +22,47 @@ export const DEFAULT_STAGES = Object.freeze([
|
|
|
22
22
|
]);
|
|
23
23
|
|
|
24
24
|
export async function runStage(stage) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const configHome = stage.name === "unit-tests" ? mkdtempSync(join(tmpdir(), "gentle-pi-unit-config-")) : undefined;
|
|
28
|
-
const env = configHome ? Object.fromEntries(Object.entries(process.env).filter(([key]) => {
|
|
29
|
-
const normalizedKey = key.toUpperCase();
|
|
30
|
-
return !normalizedKey.startsWith("GIT_") && !normalizedKey.startsWith("GENTLE_PI_AGENTS_") && normalizedKey !== "GENTLE_PI_CONFIG_HOME";
|
|
31
|
-
})) : process.env;
|
|
32
|
-
if (configHome) env.GENTLE_PI_CONFIG_HOME = configHome;
|
|
33
|
-
// Unit fixtures also get a private temp dir, removed with the stage, so a
|
|
34
|
-
// fixture that leaves a subagent unfinished cannot leave its TMPDIR behind.
|
|
35
|
-
const unitTmp = configHome ? mkdtempSync(join(tmpdir(), "gentle-pi-unit-tmp-")) : undefined;
|
|
36
|
-
if (unitTmp) env.TMPDIR = unitTmp;
|
|
37
|
-
// Stripping GIT_* environment still leaves Git's config files, which it reads
|
|
38
|
-
// by path: a host-level global ignore (e.g. ".agents/" in ~/.gitconfig or the
|
|
39
|
-
// XDG ignore file) made `git add -A` inside fixtures drop an untracked
|
|
40
|
-
// symlink target, so the candidate view materialized a dangling link and the
|
|
41
|
-
// suite saw an ENOENT (gentle-shell#2552). Pin every remaining config source
|
|
42
|
-
// to an empty file for the stage; fixtures that need identity pass -c flags.
|
|
43
|
-
if (configHome) {
|
|
44
|
-
const emptyGitConfig = join(configHome, "empty.gitconfig");
|
|
45
|
-
writeFileSync(emptyGitConfig, "");
|
|
46
|
-
env.GIT_CONFIG_GLOBAL = emptyGitConfig;
|
|
47
|
-
env.GIT_CONFIG_NOSYSTEM = "1";
|
|
48
|
-
// An empty GIT_CONFIG_GLOBAL does not disable Git's default ignore file:
|
|
49
|
-
// it still reads $XDG_CONFIG_HOME/git/ignore, so a host ignore (e.g.
|
|
50
|
-
// ".agents/") would keep dropping fixture files from `git add -A`.
|
|
51
|
-
env.XDG_CONFIG_HOME = configHome;
|
|
52
|
-
}
|
|
25
|
+
let configHome;
|
|
26
|
+
let unitTmp;
|
|
53
27
|
try {
|
|
28
|
+
// Unit fixtures must not inherit the terminal's Git overrides, child-session
|
|
29
|
+
// identity, launcher marker, or guardrails. Later stages retain their env.
|
|
30
|
+
configHome = stage.name === "unit-tests" ? mkdtempSync(join(tmpdir(), "gentle-pi-unit-config-")) : undefined;
|
|
31
|
+
const env = configHome ? Object.fromEntries(Object.entries(process.env).filter(([key]) => {
|
|
32
|
+
const normalizedKey = key.toUpperCase();
|
|
33
|
+
return !normalizedKey.startsWith("GIT_") && !normalizedKey.startsWith("GENTLE_PI_AGENTS_") &&
|
|
34
|
+
normalizedKey !== "GENTLE_PI_CONFIG_HOME" && normalizedKey !== "GENTLE_SHELL_CONFIG_HOME";
|
|
35
|
+
})) : process.env;
|
|
36
|
+
if (configHome) env.GENTLE_PI_CONFIG_HOME = configHome;
|
|
37
|
+
// Unix sockets have short path limits; an inherited TMPDIR can already be
|
|
38
|
+
// too long. Use the short system temp root on POSIX and a private directory
|
|
39
|
+
// on every platform, removed even when stage setup or execution fails.
|
|
40
|
+
unitTmp = configHome ? mkdtempSync(join(process.platform === "win32" ? tmpdir() : "/tmp", "gentle-pi-unit-tmp-")) : undefined;
|
|
41
|
+
if (unitTmp) {
|
|
42
|
+
env.TMPDIR = unitTmp;
|
|
43
|
+
// Node's Windows tmpdir() uses TEMP/TMP, not TMPDIR.
|
|
44
|
+
if (process.platform === "win32") {
|
|
45
|
+
for (const key of Object.keys(env)) if (["TEMP", "TMP"].includes(key.toUpperCase())) delete env[key];
|
|
46
|
+
env.TEMP = unitTmp;
|
|
47
|
+
env.TMP = unitTmp;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
// Stripping GIT_* environment still leaves Git's config files, which it reads
|
|
51
|
+
// by path: a host-level global ignore (e.g. ".agents/" in ~/.gitconfig or the
|
|
52
|
+
// XDG ignore file) made `git add -A` inside fixtures drop an untracked
|
|
53
|
+
// symlink target, so the candidate view materialized a dangling link and the
|
|
54
|
+
// suite saw an ENOENT (gentle-shell#2552). Pin every remaining config source
|
|
55
|
+
// to an empty file for the stage; fixtures that need identity pass -c flags.
|
|
56
|
+
if (configHome) {
|
|
57
|
+
const emptyGitConfig = join(configHome, "empty.gitconfig");
|
|
58
|
+
writeFileSync(emptyGitConfig, "");
|
|
59
|
+
env.GIT_CONFIG_GLOBAL = emptyGitConfig;
|
|
60
|
+
env.GIT_CONFIG_NOSYSTEM = "1";
|
|
61
|
+
// An empty GIT_CONFIG_GLOBAL does not disable Git's default ignore file:
|
|
62
|
+
// it still reads $XDG_CONFIG_HOME/git/ignore, so a host ignore (e.g.
|
|
63
|
+
// ".agents/") would keep dropping fixture files from `git add -A`.
|
|
64
|
+
env.XDG_CONFIG_HOME = configHome;
|
|
65
|
+
}
|
|
54
66
|
return await new Promise((resolve) => {
|
|
55
67
|
const child = spawn(stage.command, { shell: true, stdio: "inherit", env });
|
|
56
68
|
child.on("close", (code) => resolve({ name: stage.name, code: code ?? 1 }));
|
|
@@ -78,6 +78,8 @@ export const requiredPaths = [
|
|
|
78
78
|
"scripts/npm-pack-result.mjs",
|
|
79
79
|
"assets/orchestrator.md",
|
|
80
80
|
"assets/orchestrator-delegation.md",
|
|
81
|
+
"assets/orchestrator-full-delegation.md",
|
|
82
|
+
"assets/orchestrator-full-delegation-card.md",
|
|
81
83
|
"assets/orchestrator-delegation-reference.md",
|
|
82
84
|
"assets/orchestrator-tracking.md",
|
|
83
85
|
"assets/orchestrator-verification.md",
|
|
@@ -119,6 +121,8 @@ export const requiredPaths = [
|
|
|
119
121
|
"lib/gentle-shell-resume-hint.ts",
|
|
120
122
|
"lib/gentle-shell-import-pi.ts",
|
|
121
123
|
"lib/native-review-cli.ts",
|
|
124
|
+
"lib/review-coordinator.ts",
|
|
125
|
+
"lib/review-candidate-symlink-scan.ts",
|
|
122
126
|
"lib/status-timing-diagnostics.ts",
|
|
123
127
|
"lib/provider-contract-bundle.ts",
|
|
124
128
|
"lib/review-host-relay.ts",
|
|
@@ -144,6 +148,7 @@ export const requiredPaths = [
|
|
|
144
148
|
"runtime/review-relay-contract.mjs",
|
|
145
149
|
"runtime/telemetry-trigger.mjs",
|
|
146
150
|
"scripts/check-provider-contract.mjs",
|
|
151
|
+
"scripts/download-progress.mjs",
|
|
147
152
|
"scripts/gentle-ai-installer.mjs",
|
|
148
153
|
"scripts/install-gentle-ai.mjs",
|
|
149
154
|
"scripts/install-tui-mode-setting.mjs",
|
|
@@ -180,6 +185,11 @@ export const requiredPaths = [
|
|
|
180
185
|
"skills/cognitive-doc-design/SKILL.md",
|
|
181
186
|
"skills/comment-writer/SKILL.md",
|
|
182
187
|
"skills/design/SKILL.md",
|
|
188
|
+
"skills/gentle-ui-design/SKILL.md",
|
|
189
|
+
"skills/gentle-ui-design/references/task-and-content.md",
|
|
190
|
+
"skills/gentle-ui-design/references/browse-and-compare.md",
|
|
191
|
+
"skills/gentle-ui-design/references/composition-and-feedback.md",
|
|
192
|
+
"skills/gentle-ui-design/references/adaptive-interfaces.md",
|
|
183
193
|
"skills/gentle-ai/SKILL.md",
|
|
184
194
|
"skills/issue-creation/SKILL.md",
|
|
185
195
|
"skills/judgment-day/SKILL.md",
|
|
@@ -427,7 +437,7 @@ async function main() {
|
|
|
427
437
|
});
|
|
428
438
|
|
|
429
439
|
if (driftedContracts.length > 0) {
|
|
430
|
-
console.error("gentle-pi packaged review-integration/v1 and review-integration/v2 contract bytes drifted from the pinned v4.
|
|
440
|
+
console.error("gentle-pi packaged review-integration/v1 and review-integration/v2 contract bytes drifted from the pinned v4.4.0 runtime's vendored Gentle AI contract artifacts:");
|
|
431
441
|
for (const drift of driftedContracts) console.error(`- ${drift.relativePath}: expected ${drift.expected}, got ${drift.actual}`);
|
|
432
442
|
process.exit(1);
|
|
433
443
|
}
|
|
@@ -472,7 +482,7 @@ async function main() {
|
|
|
472
482
|
process.exit(1);
|
|
473
483
|
}
|
|
474
484
|
|
|
475
|
-
console.log(`gentle-pi package resource check passed (${requiredPaths.length} files; ${Object.keys(contractHashes).length} exact byte-pinned contract artifacts for the v4.
|
|
485
|
+
console.log(`gentle-pi package resource check passed (${requiredPaths.length} files; ${Object.keys(contractHashes).length} exact byte-pinned contract artifacts for the v4.4.0 runtime).`);
|
|
476
486
|
}
|
|
477
487
|
|
|
478
488
|
const isMainModule = process.argv[1] !== undefined && import.meta.url === pathToFileURL(process.argv[1]).href;
|
package/scripts/voice-worker.cjs
CHANGED
|
@@ -23,14 +23,20 @@ const { createHash } = require("node:crypto");
|
|
|
23
23
|
const { createReadStream } = require("node:fs");
|
|
24
24
|
const { lstat, readdir } = require("node:fs/promises");
|
|
25
25
|
const path = require("node:path");
|
|
26
|
+
const { release } = require("node:os");
|
|
26
27
|
const { addAbortSignal } = require("node:stream");
|
|
27
28
|
|
|
28
29
|
const SCHEMA = "gentle.voice/v1";
|
|
29
30
|
const TARGETS = ["darwin-x64", "darwin-arm64", "linux-x64", "linux-arm64", "win32-x64"];
|
|
30
31
|
const MODEL_ROLES = ["encoder", "decoder", "joiner", "tokens"];
|
|
31
|
-
// The only runtime files ever loaded;
|
|
32
|
+
// The only runtime files ever loaded; sherpa-onnx and the default capture
|
|
33
|
+
// facade must be listed as required files, the PulseAudio facade is required
|
|
34
|
+
// only where it is selected.
|
|
32
35
|
const SHERPA_ENTRY = "node_modules/sherpa-onnx-node/non-streaming-asr.js";
|
|
33
36
|
const CPAL_ENTRY = "node_modules/node-cpal/index.js";
|
|
37
|
+
// The PulseAudio facade loads its own native file: bin/backend-pulseaudio/<target>/index.node.
|
|
38
|
+
const PULSE_ENTRY = "node_modules/node-cpal/backend-pulseaudio.js";
|
|
39
|
+
const pulseNative = (target) => `node_modules/node-cpal/bin/backend-pulseaudio/${target}/index.node`;
|
|
34
40
|
const MAX_INPUT_LINE = 64 * 1024;
|
|
35
41
|
const MAX_TREE_ENTRIES = 256;
|
|
36
42
|
const MAX_TEXT = 16 * 1024;
|
|
@@ -127,9 +133,13 @@ function sha256(openRead, file, signal) {
|
|
|
127
133
|
});
|
|
128
134
|
}
|
|
129
135
|
|
|
130
|
-
|
|
136
|
+
/**
|
|
137
|
+
* Fails with `runtime-invalid` unless every file the request names, plus the
|
|
138
|
+
* `extraFiles` a selected backend needs, exists in the validated runtime tree.
|
|
139
|
+
*/
|
|
140
|
+
async function validateRuntime(runtime, uid, extraFiles = []) {
|
|
131
141
|
const files = await readTree(runtime.root, uid, "runtime-invalid");
|
|
132
|
-
for (const required of runtime.files) if (!files.has(required)) fail("runtime-invalid");
|
|
142
|
+
for (const required of [...runtime.files, ...extraFiles]) if (!files.has(required)) fail("runtime-invalid");
|
|
133
143
|
}
|
|
134
144
|
|
|
135
145
|
async function validateModel(model, uid, openRead, signal) {
|
|
@@ -267,17 +277,27 @@ class WorkerSession {
|
|
|
267
277
|
fail("invalid-request");
|
|
268
278
|
}
|
|
269
279
|
|
|
280
|
+
/**
|
|
281
|
+
* Validates the runtime, picks the capture backend for this kernel and opens
|
|
282
|
+
* the microphone; the model is verified later, while recording.
|
|
283
|
+
*/
|
|
270
284
|
async begin(request) {
|
|
271
285
|
this.state = "loading";
|
|
272
286
|
const { io } = this;
|
|
273
287
|
if (request.target !== `${io.platform}-${io.arch}`) fail("runtime-invalid");
|
|
288
|
+
// WSLg exposes audio through a PulseAudio server, not an ALSA device, so a
|
|
289
|
+
// Microsoft kernel selects node-cpal's PulseAudio facade. That facade falls
|
|
290
|
+
// back to the default binary when its own native file is missing, so the
|
|
291
|
+
// facade and its native file are validated before anything is loaded.
|
|
292
|
+
const usePulse = io.platform === "linux" && /microsoft/i.test(io.kernelRelease ?? "");
|
|
293
|
+
const captureEntry = usePulse ? PULSE_ENTRY : CPAL_ENTRY;
|
|
274
294
|
// A cancel can arrive during any await; each step re-checks before going on.
|
|
275
|
-
await validateRuntime(request.runtime, io.uid);
|
|
295
|
+
await validateRuntime(request.runtime, io.uid, usePulse ? [PULSE_ENTRY, pulseNative(request.target)] : []);
|
|
276
296
|
if (this.state !== "loading") return;
|
|
277
297
|
this.request = request;
|
|
278
298
|
let cpal;
|
|
279
299
|
try {
|
|
280
|
-
cpal = io.loadModule(this.fromRuntime(
|
|
300
|
+
cpal = io.loadModule(this.fromRuntime(captureEntry));
|
|
281
301
|
} catch {
|
|
282
302
|
fail("runtime-load");
|
|
283
303
|
}
|
|
@@ -347,7 +367,12 @@ class WorkerSession {
|
|
|
347
367
|
deviceId: device.deviceId,
|
|
348
368
|
config,
|
|
349
369
|
onData: (data) => this.onData(data),
|
|
350
|
-
|
|
370
|
+
// A buffer underrun or overrun drops some audio but the stream keeps
|
|
371
|
+
// running; WASAPI reports one at start on some devices.
|
|
372
|
+
onError: (error) => {
|
|
373
|
+
if (isRecord(error) && error.code === "XRUN") return;
|
|
374
|
+
void this.fail(new WorkerFailure("capture"));
|
|
375
|
+
},
|
|
351
376
|
autoStart: true,
|
|
352
377
|
queueCapacityBuffers: 64,
|
|
353
378
|
});
|
|
@@ -464,6 +489,7 @@ if (require.main === module) {
|
|
|
464
489
|
exit: (code) => process.stdout.write("", () => process.exit(code)),
|
|
465
490
|
loadModule: (file) => require(file),
|
|
466
491
|
platform: process.platform,
|
|
492
|
+
kernelRelease: release(),
|
|
467
493
|
arch: process.arch,
|
|
468
494
|
nodeVersion: process.versions.node,
|
|
469
495
|
uid: typeof process.getuid === "function" ? process.getuid() : undefined,
|
package/skills/design/SKILL.md
CHANGED
|
@@ -48,10 +48,11 @@ Run this gate before every new brief: call the `gentle_design` tool with `action
|
|
|
48
48
|
## Execution Steps
|
|
49
49
|
|
|
50
50
|
1. Take the brief: goal, layout, content, audience.
|
|
51
|
-
2.
|
|
52
|
-
3.
|
|
53
|
-
4.
|
|
54
|
-
5. Write `design/<slug>/
|
|
51
|
+
2. Load `gentle-ui-design`: read its `SKILL.md` and only the references that match the brief's audience, primary job, and success condition. This skill owns delivery; that one owns UX quality.
|
|
52
|
+
3. Choose a kebab-case slug from the brief.
|
|
53
|
+
4. Make the directions differ in structure or visual strategy, not only in color. Label each with the tradeoff it makes.
|
|
54
|
+
5. Write `design/<slug>/NN-<name>.html` per artboard (`01-…`, `02-…`; kebab-case name).
|
|
55
|
+
6. Write `design/<slug>/design.json`:
|
|
55
56
|
|
|
56
57
|
```json
|
|
57
58
|
{
|
|
@@ -65,9 +66,10 @@ Run this gate before every new brief: call the `gentle_design` tool with `action
|
|
|
65
66
|
}
|
|
66
67
|
```
|
|
67
68
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
7. Set `width`/`height` to the artboard's intended viewport in CSS pixels; keep the manifest in sync with the files on every change. Fields: `title`, `brief`, optional `feature`, and `artboards[]` with `file`, `title`, `tradeoff`, `width`, `height`.
|
|
70
|
+
8. ODD link: when the design comes from a tracked ODD feature (an existing `odd/tasks/<feature>.md` for the current work), set `feature` to that path and append one entry to that document's `## Log` naming `design/<slug>/` and its artboards. When an artboard of that design is handed off to implement, the Log entry also names the chosen artboard (the one handed off; `list` reports it as `Chosen`) and that the others are alternatives. For small untracked work, omit `feature` and leave the design standalone; never create a feature document just to link it.
|
|
71
|
+
9. UX self-check, for every artboard you finish: pass it against the `gentle-ui-design` composition-and-feedback (hierarchy, density, feedback) and adaptive-interfaces (narrow screens, input access, states) guidance, and fix every gap before you report.
|
|
72
|
+
10. After writing or changing artboards, call the `gentle_design` tool with `action: "open"` and the slug, unless the user said not to. When a canvas tab is already open it refreshes that tab instead of opening a new one, so call it after every change. Report the URL it returns.
|
|
71
73
|
|
|
72
74
|
## Design system sync
|
|
73
75
|
|
|
@@ -103,8 +105,9 @@ Never delete or reorder entries, and keep the file valid JSON: the canvas refuse
|
|
|
103
105
|
|
|
104
106
|
## Output Contract
|
|
105
107
|
|
|
106
|
-
Return: the slug, each artboard file with its title and tradeoff, which files changed in this turn, the comment ids resolved in this turn, and any open question. Give the canvas URL from step
|
|
108
|
+
Return: the slug, each artboard file with its title and tradeoff, which files changed in this turn, the comment ids resolved in this turn, and any open question. Give the canvas URL from step 10, or mention that `/gentle:design open <slug>` shows the canvas when you did not open it. For a sync, return the source paths read, the token counts per group, and whether the system is a proposed starter; after an automatic sync from "Before designing", say it ran and report it the same way.
|
|
107
109
|
|
|
108
110
|
## References
|
|
109
111
|
|
|
110
112
|
- `design/system.md` in the project, when present — the design tokens to follow.
|
|
113
|
+
- `gentle-ui-design` skill — UX quality guidance paired with every artboard.
|
|
@@ -17,7 +17,7 @@ When asked who or what you are, answer as el Gentleman: a Pi-specific coding-age
|
|
|
17
17
|
- Size every task by the orchestrator's Task Size section: understood, contained risk, and resumable from the original request plus `git diff`. Counts of files, commands, tests, or fixes never decide it. Track only large work in its task document and mirror.
|
|
18
18
|
- For behavior changes with applicable runnable deterministic tests and a clear expected outcome, use test-first by default: observe RED, GREEN, relevant alternate cases, then REFACTOR and record evidence. Test presence alone does not establish applicability. For passive documentation, non-testable changes, an unavailable runner, or no meaningful RED, state why and run proportionate ordinary functional or structural verification. Never invent RED/GREEN, skip checks, or require a chat/TUI toggle.
|
|
19
19
|
- Keep one parent session responsible for orchestration; child subagents should receive concrete phase work and must not spawn more subagents.
|
|
20
|
-
- Parent-only delegation triggers fire one mechanism at a time: an open decision (ask), understanding beyond the evidence budget (explore), a named high-risk item (independent verifier
|
|
20
|
+
- Parent-only delegation triggers fire one mechanism at a time: an open decision (ask), understanding beyond the evidence budget (explore), a named high-risk item (independent verifier; assess `escalate` when RDD is on or unknown), a large task (track), a writer reason (parallel units or context), tooling/worktree incidents, or a parent context past the context backstop.
|
|
21
21
|
- Parallel writers only with disjoint Allowed edit surfaces (runtime-enforced) or isolated worktrees.
|
|
22
22
|
- Forecast review workload before large changes; ask before producing oversized or multi-area diffs.
|
|
23
23
|
- Keep dangerous-command safety independent and authoritative.
|
|
@@ -45,7 +45,7 @@ Hard delegation triggers:
|
|
|
45
45
|
|
|
46
46
|
- **Evidence-budget rule**: read inline only when the evidence fits one parallel batch of at most 3 calls, ~10k tokens (grep and line ranges, never whole large files). Reassess cumulative discovery after each batch; do not reset the budget. When understanding needs more reading or more than ~5 sequential lookups, delegate one explorer that returns a handoff of at most ~2k tokens with `path:line` evidence. A fired trigger overrides initial task size; read-only restricts mutation, not exploration. Preparation for an already understood inline write stays inline, not further discovery. A known small targeted question within budget stays inline; do not re-read what the handoff covered beyond one spot check.
|
|
47
47
|
- **Writer rule**: a writer only for a reason (parallel units launched together, or context); size and file count never fire it.
|
|
48
|
-
- **Verification rule**: a change that touches a named high-risk item gets an independent verifier (assess `escalate`); otherwise the change's own focused test and suite run inline.
|
|
48
|
+
- **Verification rule**: a change that touches a named high-risk item gets an independent verifier (assess `escalate` when RDD is on or unknown); otherwise the change's own focused test and suite run inline.
|
|
49
49
|
- **Incident rule**: after wrong cwd, accidental worktree/repo mutation, merge recovery, confusing test command, or environment workaround, diagnose separately.
|
|
50
50
|
- **Context backstop**: when the runtime signals the context backstop (measured parent context past the smaller of an absolute cap and a fraction of the model's context window), pause and delegate the next bounded unit that needs several steps to a non-review subagent; small edits stay inline. Keep command output bounded (counts, `--stat`, `tail`).
|
|
51
51
|
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gentle-ui-design
|
|
3
|
+
description: "Trigger: product interface design, web UI, design critique, browsing experience, responsive layout. Guide usable interfaces for the current project."
|
|
4
|
+
license: Apache-2.0
|
|
5
|
+
metadata:
|
|
6
|
+
author: gentleman-programming
|
|
7
|
+
version: "1.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Activation Contract
|
|
11
|
+
|
|
12
|
+
Use for web and product interfaces when shaping, implementing, or assessing a user experience. Pair with `gentle-design` when producing artboards: gentle-design owns delivery, this skill owns UX quality. Use `gentle-ai-tui-design` for terminal interfaces.
|
|
13
|
+
|
|
14
|
+
## Hard Rules
|
|
15
|
+
|
|
16
|
+
- Keep a read-only critique read-only; do not install tools or dependencies for this guidance.
|
|
17
|
+
- Establish the user's job and success condition before appearance. Ask only when missing intent would materially change a decision.
|
|
18
|
+
- Reuse the project's brand, components, and platform conventions; avoid universal aesthetic bans.
|
|
19
|
+
- Do not invent evidence or conceal inaccessible controls. Model real content ranges and states; this guidance adds no hooks, detectors, or mandatory tool chains.
|
|
20
|
+
|
|
21
|
+
## Decision Gates
|
|
22
|
+
|
|
23
|
+
| Need or symptom | Load and apply |
|
|
24
|
+
| --- | --- |
|
|
25
|
+
| Unclear purpose, weak copy, or generic direction | `references/task-and-content.md` |
|
|
26
|
+
| Search, large collections, or difficult comparison | `references/browse-and-compare.md` |
|
|
27
|
+
| Flat hierarchy, clutter, or weak feedback | `references/composition-and-feedback.md` |
|
|
28
|
+
| Narrow screens, input access, or missing states | `references/adaptive-interfaces.md` |
|
|
29
|
+
|
|
30
|
+
## Execution Steps
|
|
31
|
+
|
|
32
|
+
1. Identify the audience, primary job, constraints, and likely content sizes; inspect existing project conventions when available.
|
|
33
|
+
2. Load only the relevant references and select defaults or justified exceptions for the task.
|
|
34
|
+
3. Apply the project's visual language and account for touch, keyboard, focus, contrast, and reduced motion.
|
|
35
|
+
4. Inspect visually when useful and authorized; report observations rather than implying an inspection occurred.
|
|
36
|
+
|
|
37
|
+
## Output Contract
|
|
38
|
+
|
|
39
|
+
Summarize design choices and tradeoffs, files changed if any, checks actually performed, and important unknowns.
|
|
40
|
+
|
|
41
|
+
## References
|
|
42
|
+
|
|
43
|
+
- `references/task-and-content.md` — purpose, information architecture, art direction, and truthful copy.
|
|
44
|
+
- `references/browse-and-compare.md` — search, collection scale, comparison, and navigation state.
|
|
45
|
+
- `references/composition-and-feedback.md` — hierarchy, density, color, type, and visual feedback.
|
|
46
|
+
- `references/adaptive-interfaces.md` — responsive behavior, accessible interaction, and states.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Adaptive interfaces
|
|
2
|
+
|
|
3
|
+
## Design the states people encounter
|
|
4
|
+
|
|
5
|
+
| State | Show | Avoid |
|
|
6
|
+
| --- | --- | --- |
|
|
7
|
+
| Empty collection | What belongs here and a first action when permitted | Pretending a search failed when no records exist |
|
|
8
|
+
| No results | The active query or filters and a clear way to broaden them | Erasing the user's criteria or presenting a blank panel |
|
|
9
|
+
| Loading | What is being loaded and stable space for content where useful | A blank screen that looks broken or blocking unrelated tasks |
|
|
10
|
+
| Partial or stale | Which information is incomplete or when it was last updated, if known | Presenting an old total as a current fact |
|
|
11
|
+
| Error | What failed, whether data was saved, and an available recovery action | A generic error that leaves the outcome ambiguous |
|
|
12
|
+
| Zero or missing | A real `0` for zero; a clear missing or unavailable label otherwise | Inventing data or treating missing values as zero |
|
|
13
|
+
|
|
14
|
+
For example, `No bookings yet` can offer `Create booking`, while `No bookings match “lathe”` can offer `Clear search`.
|
|
15
|
+
If a save fails, retain the user's input when possible and say whether a retry is safe.
|
|
16
|
+
Do not claim an action succeeded until the result is known.
|
|
17
|
+
|
|
18
|
+
## Reorganize for the context
|
|
19
|
+
|
|
20
|
+
A desktop navigation rail squeezed into a phone can leave neither navigation nor content usable.
|
|
21
|
+
Replace it with a clearly labeled navigation control or a compact top-level pattern appropriate to the platform;
|
|
22
|
+
keep the active location and core action reachable. A persistent rail remains useful when the available width supports it.
|
|
23
|
+
For a wide comparison table, prioritize identifying fields and the most important comparison in a stacked mobile row,
|
|
24
|
+
or allow clearly indicated horizontal scrolling when preserving column comparison is essential.
|
|
25
|
+
Do not silently hide the data required for a decision.
|
|
26
|
+
|
|
27
|
+
Allow long names, translated labels, and text at 200% zoom to wrap or reflow without clipping essential content.
|
|
28
|
+
A fixed-height action button that truncates its label is not a reliable shortcut; allow its height to grow.
|
|
29
|
+
Keep meaningful order in the DOM aligned with the reading and keyboard order when layouts rearrange.
|
|
30
|
+
Visual inspection at representative sizes can reveal awkward reflow, but no particular tool chain or inspection ceremony is required by this guidance.
|
|
31
|
+
|
|
32
|
+
## Make interaction accessible
|
|
33
|
+
|
|
34
|
+
Use semantic links for navigation, buttons for actions, and labeled form controls for input.
|
|
35
|
+
Ensure keyboard access to essential actions; do not depend on hover to reveal them.
|
|
36
|
+
Keep focus visible and distinct from selection. When an overlay opens, move focus to an appropriate control;
|
|
37
|
+
when it closes, return focus to its trigger when possible. Where a dialog supports Escape, make that behavior predictable and avoid discarding work without warning.
|
|
38
|
+
Expose errors and status changes to assistive technology in context without repeatedly announcing unchanged content.
|
|
39
|
+
|
|
40
|
+
A practical touch target goal is approximately 44 by 44 CSS pixels when space permits.
|
|
41
|
+
WCAG 2.2 AA's target-size criterion uses a 24 by 24 CSS-pixel minimum with defined spacing and other exceptions;
|
|
42
|
+
these dimensions alone do not establish compliance. If a compact control is necessary, preserve adequate separation and an accessible name.
|
|
43
|
+
Do not rely on a tiny icon's painted size to imply an equally tiny hit area.
|
|
44
|
+
|
|
45
|
+
Respect `prefers-reduced-motion` for nonessential movement and avoid making animation the only signal of a state change.
|
|
46
|
+
A reduced-motion setting can remove travel or use an immediate state change while preserving the same information and functionality.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Browse and compare
|
|
2
|
+
|
|
3
|
+
## Choose a representation
|
|
4
|
+
|
|
5
|
+
The representation should expose the property that makes a choice possible.
|
|
6
|
+
|
|
7
|
+
| User need | Default | Why | Useful exception |
|
|
8
|
+
| --- | --- | --- | --- |
|
|
9
|
+
| Compare several attributes | Compact aligned rows or a table | Values remain in predictable positions | Use cards when records have genuinely different structures |
|
|
10
|
+
| Judge appearance | Previews with names and selection state | The visual is part of the decision | Rows can work when a small thumbnail is sufficient |
|
|
11
|
+
| Scan mixed summaries | Cards with a meaningful shared structure | Each record can carry a short explanation and action | Do not wrap every field in its own card |
|
|
12
|
+
|
|
13
|
+
Keep identifying text, important status, and the selection or detail action visible.
|
|
14
|
+
Do not hide an essential attribute behind hover or require opening every record to compare it.
|
|
15
|
+
When compact rows become cramped on mobile, keep the identifier, most important value, and primary action visible;
|
|
16
|
+
move secondary fields into a readable second line or detail view, not an inaccessible horizontal strip.
|
|
17
|
+
|
|
18
|
+
## Search and filter without surprises
|
|
19
|
+
|
|
20
|
+
State what search covers when scope is not obvious: `Search titles and authors` is clearer than an unlabeled magnifying glass.
|
|
21
|
+
Distinguish a relevance-ranked result set from a date- or name-sorted list with a visible sort label.
|
|
22
|
+
Do not imply that a partial client-side subset is the entire catalog.
|
|
23
|
+
Where results can be filtered, put relevant controls next to the results, show a count when available, and expose active filters as removable chips or equivalent controls.
|
|
24
|
+
Provide a reset action when filters can prevent recovery.
|
|
25
|
+
On no results, retain the query and filters, explain that no matches were found, and offer a way to broaden or clear them.
|
|
26
|
+
An empty catalog is a different state: show how to add or obtain the first item when the user can do so.
|
|
27
|
+
|
|
28
|
+
## Choose how results are loaded
|
|
29
|
+
|
|
30
|
+
| Pattern | Good fit | Cost and required context |
|
|
31
|
+
| --- | --- | --- |
|
|
32
|
+
| Pagination | Comparing or returning to a known portion of results | Expose current page and navigation; restore the selected page on return |
|
|
33
|
+
| Load more | Sequential exploration when users may want to keep earlier results | Make loading explicit and retain the existing list; offer a way back to the prior position |
|
|
34
|
+
| Virtualized list | Many visible or loaded rows where rendering cost matters | Preserve keyboard access, focus, accessible item semantics, and a stable return position |
|
|
35
|
+
| Infinite scroll | A continuous feed where exact return positions matter less | Make restoration reliable and keep footer or other essential controls reachable; otherwise prefer explicit loading |
|
|
36
|
+
|
|
37
|
+
Bound the rendered items to what the interface can use; separately decide whether the data source should query and return only the needed subset.
|
|
38
|
+
Virtualizing a list can reduce rendered elements without reducing data transferred or backend work.
|
|
39
|
+
Use the actual architecture and measurements to choose; these patterns do not promise a particular performance result.
|
|
40
|
+
For planning, 10,000 entries is an illustrative scale, not a claim about a project or a mandatory fixture.
|
|
41
|
+
|
|
42
|
+
## Worked example: a large collection
|
|
43
|
+
|
|
44
|
+
Before: a supply catalog loads every item, draws a separate card for each one, hides unmatched cards after filtering,
|
|
45
|
+
and opens details without remembering the list. A user cannot tell which search fields were used or where they were on return.
|
|
46
|
+
|
|
47
|
+
After: search names its scope, a visible count and removable material filter describe the result set,
|
|
48
|
+
and compact rows align name, availability, and location. The server supplies a page of matching records when supported;
|
|
49
|
+
the interface renders that page and labels the current page and sort order. Opening a record retains the query and filters.
|
|
50
|
+
On return, restore the page, scroll position, and focus to the originating item when possible; if the item vanished, return focus to the results heading and explain the change.
|
|
51
|
+
This is a design for a hypothetical catalog, not a claim about its implementation or performance.
|
|
52
|
+
|
|
53
|
+
On a narrow screen, place search first, expose filters through a labeled control with an active-filter count,
|
|
54
|
+
and stack each row's secondary fields below its name. Keep availability and the detail action visible without hover.
|
|
55
|
+
Use a full table or persistent filter rail instead when the viewport and task genuinely support them.
|
|
56
|
+
|
|
57
|
+
## Preserve navigational context
|
|
58
|
+
|
|
59
|
+
Encode shareable query, filter, sort, and page state in the URL where the product supports it.
|
|
60
|
+
Browser back and a return from detail should recover the user's place rather than silently resetting the list.
|
|
61
|
+
Scroll and focus may be local history state rather than shareable URL parameters; restore both deliberately.
|
|
62
|
+
For changing datasets, handle missing pages or items honestly instead of presenting a stale count as current.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Composition and feedback
|
|
2
|
+
|
|
3
|
+
## Establish hierarchy
|
|
4
|
+
|
|
5
|
+
Give each text role a job: page title identifies the place, section headings describe groups,
|
|
6
|
+
body text carries information, and labels name controls. Make these roles visibly distinct using the existing type system.
|
|
7
|
+
When every line is bold and oversized, users cannot tell which element leads; reserve the strongest emphasis for the current task or heading.
|
|
8
|
+
A dense incident list may need compact headings; a long policy explanation needs more comfortable measure and line-height.
|
|
9
|
+
Do not replace the project's fonts merely to follow a trend.
|
|
10
|
+
|
|
11
|
+
Use alignment to make relationships visible. Align comparable numeric columns consistently,
|
|
12
|
+
and keep units and precision understandable; do not make `9`, `12`, and `105` difficult to compare through inconsistent placement.
|
|
13
|
+
Use a consistent left edge for related labels and values unless the content or reading direction calls for another arrangement.
|
|
14
|
+
Allow headings to wrap naturally instead of forcing an arbitrary line count.
|
|
15
|
+
|
|
16
|
+
For a hypothetical interface, a 16px body with a 24px line-height and a modestly larger section heading can be a starting example,
|
|
17
|
+
not a brand token or universal scale. Check the actual font, content, platform, and viewport.
|
|
18
|
+
Likewise, repeated 8px and 16px spacing might create a useful rhythm in one project;
|
|
19
|
+
use existing tokens first and adjust the relationship when the content needs it.
|
|
20
|
+
Optically balance the whole composition: a short title and a dense table need different surrounding space,
|
|
21
|
+
without enforcing arbitrary percentages or symmetrical empty areas.
|
|
22
|
+
|
|
23
|
+
## Group without visual noise
|
|
24
|
+
|
|
25
|
+
Place related elements closer together than unrelated groups; use headings and alignment before adding containers.
|
|
26
|
+
Nested cards around each label, value, and action make the structure harder to scan and consume space.
|
|
27
|
+
Replace them with one meaningful group and aligned content. A nested boundary is useful when it separates a distinct interactive region or changes the interpretation of the contents.
|
|
28
|
+
|
|
29
|
+
Use borders, surfaces, and shadows to reveal actual boundaries or elevation, not to make every element equally prominent.
|
|
30
|
+
A clear table header and row separators may be enough for comparison; a card may be useful when each item is a standalone task.
|
|
31
|
+
Match density to frequency and consequence: repeated expert work often benefits from compact rows,
|
|
32
|
+
while infrequent or consequential choices may need more explanation and spacing.
|
|
33
|
+
|
|
34
|
+
Decorative KPI tiles can push the task off screen while answering no question.
|
|
35
|
+
For a room-booking tool, show **Next available: 14:30** if it changes a decision;
|
|
36
|
+
do not add invented trend tiles merely to make the page look like a dashboard.
|
|
37
|
+
An overview metric is appropriate when users can act on it and understand its scope and freshness.
|
|
38
|
+
Avoid turning every word into a pill, badge, or icon: use these for meaningful state or recognition,
|
|
39
|
+
and retain labels when icons alone would be ambiguous. An icon-only control needs an accessible name.
|
|
40
|
+
|
|
41
|
+
## Color and feedback
|
|
42
|
+
|
|
43
|
+
Use color roles to distinguish actions, information, and states within the existing palette.
|
|
44
|
+
Do not convey status only by color: add a readable label, shape, or other cue.
|
|
45
|
+
As accessibility targets, normal text generally needs at least 4.5:1 contrast;
|
|
46
|
+
large text generally needs 3:1, and visual information needed to identify controls and states generally needs 3:1 against adjacent colors, subject to applicable exceptions.
|
|
47
|
+
These ratios alone do not establish accessibility or standards conformance. Decorative elements are not the same as required control boundaries.
|
|
48
|
+
Tiny, low-contrast metadata is especially easy to lose; increase contrast or make the information less prominent by placement rather than making it unreadable.
|
|
49
|
+
|
|
50
|
+
Show selected, disabled, hover, and keyboard focus as distinct states. Focus must remain visible against its surroundings and must not be confused with selection.
|
|
51
|
+
Explain why an action is unavailable when the reason is not apparent and give a path to resolve it when possible.
|
|
52
|
+
Use the platform's disabled behavior intentionally: a disabled control may not receive keyboard focus, so put necessary explanation where it can be found.
|
|
53
|
+
|
|
54
|
+
Use movement to clarify a change or preserve orientation, not to delay routine work.
|
|
55
|
+
Avoid animating every row or adding a pause merely to suggest polish; a short transition can be useful when it makes a change easier to follow.
|
|
56
|
+
Honor reduced-motion preferences and keep the result understandable without animation.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Task and content
|
|
2
|
+
|
|
3
|
+
## Start with the job
|
|
4
|
+
|
|
5
|
+
Choose the first screen by what the person needs to do, not by a favorite page template.
|
|
6
|
+
A single product may contain several of these jobs; identify the leading job for the current surface.
|
|
7
|
+
|
|
8
|
+
| Job | Give priority to | A useful outcome |
|
|
9
|
+
| --- | --- | --- |
|
|
10
|
+
| Find | Search scope, filters, recognizable results | Reach the intended item without inspecting every entry |
|
|
11
|
+
| Compare | Shared attributes and a stable order | Understand meaningful differences before choosing |
|
|
12
|
+
| Act | Current state, the primary action, and consequences | Complete the operation without losing context |
|
|
13
|
+
| Read | A clear heading, readable text, and wayfinding | Understand the information and find a passage again |
|
|
14
|
+
| Decide | The proposition, relevant evidence, and next step | Make a choice with the information available |
|
|
15
|
+
|
|
16
|
+
For a work surface, put the working controls and current material in the initial viewport.
|
|
17
|
+
A large promotional hero ahead of an existing user's records makes a routine action take longer.
|
|
18
|
+
A compact orientation banner can help a new user, but it should not permanently displace the work.
|
|
19
|
+
For a public introduction, a prominent opening can instead explain what the offering does and for whom.
|
|
20
|
+
|
|
21
|
+
Arrange navigation around the objects and tasks people recognize.
|
|
22
|
+
For example, a shared workshop app could group **Reservations**, **Tools**, and **Members** rather than burying them under internal department names.
|
|
23
|
+
Keep the main action near its object: **Reserve tool** belongs with availability, not inside an unrelated settings menu.
|
|
24
|
+
If an action has an irreversible consequence, show that consequence before it is committed.
|
|
25
|
+
Avoid showing several equally prominent primary actions when one is the normal next step; preserve alternatives as clearly labeled secondary actions.
|
|
26
|
+
|
|
27
|
+
## Specific, truthful content
|
|
28
|
+
|
|
29
|
+
Use exact labels that predict the outcome and match what the system actually does.
|
|
30
|
+
A generic label forces the user to open or guess; a specific one makes the choice legible.
|
|
31
|
+
|
|
32
|
+
| Weak | Better when accurate | Why |
|
|
33
|
+
| --- | --- | --- |
|
|
34
|
+
| `Continue` | `Review reservation` | Names the next stage without promising completion |
|
|
35
|
+
| `Manage` | `Change pickup time` | Explains which operation is available |
|
|
36
|
+
| `Something went wrong` | `Reservation not saved. Try again.` | States the consequence and a useful next action |
|
|
37
|
+
| `The future of shared spaces` | `Book workshop tools for your next project` | Identifies the audience's activity |
|
|
38
|
+
|
|
39
|
+
Do not invent customer identities, quotes, usage figures, charts, or claims of measured results.
|
|
40
|
+
Use real evidence only when it is available and appropriate to disclose.
|
|
41
|
+
Label illustrative records as demonstration data and avoid presenting them as actual customers or outcomes.
|
|
42
|
+
If no evidence exists, explain the capability plainly instead of manufacturing social proof.
|
|
43
|
+
When the actual next action depends on missing product intent, ask that focused question rather than assembling a broad questionnaire.
|
|
44
|
+
|
|
45
|
+
## Give the interface a reasoned visual idea
|
|
46
|
+
|
|
47
|
+
Take a cue from the subject and make it useful across the surface, not just in a headline.
|
|
48
|
+
For a workshop booking page, a calm timetable with clear availability can express the practical, shared nature of the service;
|
|
49
|
+
for a reading archive, a quiet index and legible excerpts may communicate its purpose more effectively.
|
|
50
|
+
Use the project's established palette, type, shapes, and components as the starting vocabulary.
|
|
51
|
+
A coherent direction comes from decisions about emphasis, content, and layout, not merely from removing shadows or decoration.
|
|
52
|
+
|
|
53
|
+
Inventory authentic material already available before deciding that a design needs prominent imagery.
|
|
54
|
+
An accurate diagram, product image, or real document can explain an offering; a fabricated screenshot or unrelated stock image can mislead.
|
|
55
|
+
When suitable assets are unavailable, use a purposeful text-led composition instead of pretending the product has imagery it does not.
|
|
56
|
+
Do not fetch remote assets automatically. If sourcing is explicitly authorized, track the relevant usage rights.
|
|
57
|
+
|
|
58
|
+
Let content dictate whether sections vary or repeat.
|
|
59
|
+
A narrative can change rhythm when its subject changes; a sequence of comparable options benefits from the same structure.
|
|
60
|
+
Neither a different layout for every section nor identical blocks everywhere is a universal rule.
|
|
@@ -15,9 +15,10 @@ Use this skill after installing, removing, creating, moving, or renaming skills,
|
|
|
15
15
|
|
|
16
16
|
- The registry is an index, not a compiler or summary. `SKILL.md` remains the source of truth.
|
|
17
17
|
- Do not generate or inject compact rules by default; preserve author intent by passing exact skill paths to subagents.
|
|
18
|
-
- Always write `.atl/skill-registry.md
|
|
18
|
+
- Always write `.atl/skill-registry.md`.
|
|
19
19
|
- Save the registry to Engram as `topic_key: skill-registry` when available, with `capture_prompt: false`.
|
|
20
20
|
- Skip `sdd-*`, `_shared`, and `skill-registry`; deduplicate by skill name, preferring project-level skills over user-level skills.
|
|
21
|
+
- The registry mirrors Pi's runtime-resolved skill set (`before_agent_start.systemPromptOptions.skills`) as the authority for skill name, scope, and disablement. The loose scan still walks the known agent roots, which include the Pi-managed `~/.pi/agent/skills` and `.pi/skills`; every path Pi resolved is suppressed from the loose results, so a skill Pi hides (`disableModelInvocation` or an excluded name) is never re-indexed as active. Never rescan `node_modules` or reparse `pi.skills` yourself.
|
|
21
22
|
- Add `.atl/` to `.gitignore` when possible unless explicitly disabled.
|
|
22
23
|
|
|
23
24
|
## Decision Gates
|
|
@@ -25,13 +26,14 @@ Use this skill after installing, removing, creating, moving, or renaming skills,
|
|
|
25
26
|
| Situation | Action |
|
|
26
27
|
| --- | --- |
|
|
27
28
|
| Same skill exists globally and in project | Keep the project-level skill |
|
|
29
|
+
| Pi-resolved skill and loose scan share a path | Keep the Pi-resolved record (exact path and source metadata); when Pi filtered that path out, suppress it instead of indexing it as an active row |
|
|
28
30
|
| Same skill exists in multiple global locations | Keep the first source in scan order |
|
|
29
31
|
| No skills found | Write an empty registry so agents stop searching blindly |
|
|
30
32
|
| Agent will delegate work | Select matching registry rows and pass their `SKILL.md` paths |
|
|
31
33
|
|
|
32
34
|
## Execution Steps
|
|
33
35
|
|
|
34
|
-
1. Scan
|
|
36
|
+
1. Scan the known user and project loose-scan directories for `*/SKILL.md`, including the Pi-managed `~/.pi/agent/skills` and `.pi/skills`; the runtime capture suppresses every path Pi already resolved, so a Pi-hidden skill never becomes an active row. npm-package and package-declared (`pi.skills`) skills arrive through the extension's runtime capture, not through this scan.
|
|
35
37
|
2. Read frontmatter only as needed to extract `name` and `description` trigger text.
|
|
36
38
|
3. Render `.atl/skill-registry.md` with scanned sources, registry contract, skill name, trigger/description, scope, and exact path.
|
|
37
39
|
4. Persist to Engram when available using `title: skill-registry`, `topic_key: skill-registry`, `type: config`, and `capture_prompt: false`.
|