mixdog 1.4.1 → 1.4.2
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/package.json +3 -2
- package/scripts/build-shipped-history.mjs +115 -33
- package/scripts/gate-local.mjs +172 -61
- package/scripts/lib/gate-scheduler.mjs +138 -32
- package/scripts/lib/gate-timing-reporter.mjs +16 -0
- package/scripts/lib/run-node-tests.mjs +54 -29
- package/scripts/lib/scoped-temp.mjs +1 -0
- package/scripts/lib/test-failure-records.mjs +14 -1
- package/scripts/lib/test-failure-summary.mjs +16 -4
- package/scripts/lib/test-spawn-ledger.mjs +12 -3
- package/scripts/pptx-kit-index.mjs +5 -6
- package/scripts/suite-health.mjs +110 -28
- package/scripts/test.mjs +9 -14
- package/src/agents/advisor/AGENT.md +4 -4
- package/src/agents/advisor/agent.json +1 -1
- package/src/agents/explore/AGENT.md +22 -0
- package/src/agents/explore/agent.json +6 -0
- package/src/cli.mjs +7 -0
- package/src/defaults/agents.json +7 -0
- package/src/defaults/shipped-history.json +18 -2
- package/src/defaults/skills/browser-use/SKILL.md +4 -1
- package/src/defaults/skills/code-tidy/SKILL.md +71 -102
- package/src/defaults/skills/code-tidy/references/agent-cleanup.md +66 -114
- package/src/defaults/skills/code-tidy/references/cleanup-report.md +19 -35
- package/src/defaults/skills/code-tidy/references/dead-code.md +3 -9
- package/src/defaults/skills/code-tidy/references/test-suite-slop.md +16 -27
- package/src/defaults/skills/computer-use/SKILL.md +12 -2
- package/src/defaults/skills/goal-management/SKILL.md +1 -1
- package/src/defaults/skills/setup/references/actions.md +12 -6
- package/src/defaults/skills/setup/references/surfaces.md +2 -2
- package/src/defaults/skills/setup-guide/SKILL.md +5 -2
- package/src/defaults/skills/setup-guide/model-recommendations.json +13 -0
- package/src/defaults/skills/skill-creator/SKILL.md +85 -190
- package/src/defaults/skills/skill-creator/references/design.md +70 -162
- package/src/defaults/skills/skill-creator/references/evaluation.md +33 -92
- package/src/defaults/skills/test-suite/SKILL.md +194 -0
- package/src/defaults/skills/test-suite/references/case-management.md +51 -0
- package/src/defaults/skills/test-suite/references/flaky-policy.md +39 -0
- package/src/defaults/skills/test-suite/references/reliability.md +49 -0
- package/src/defaults/skills/test-suite/references/suite-design.md +78 -0
- package/src/defaults/skills/test-suite/scripts/inventory.mjs +335 -0
- package/src/defaults/skills/visualize/SKILL.md +6 -2
- package/src/lib/rules-builder.cjs +6 -30
- package/src/rules/lead/LEAD.md +3 -3
- package/src/rules/shared/20-research.md +3 -6
- package/src/rules/shared/40-editing.md +1 -0
- package/src/rules/shared/60-verification.md +10 -9
- package/src/rules/shared/70-delivery.md +4 -3
- package/src/runtime/agent/orchestrator/agent-runtime/agent-dispatch/abort-link.mjs +5 -1
- package/src/runtime/agent/orchestrator/agent-runtime/agent-dispatch.mjs +10 -1
- package/src/runtime/agent/orchestrator/agent-runtime/agent-progress-watchdog.mjs +130 -21
- package/src/runtime/agent/orchestrator/agent-runtime/cache-strategy.mjs +13 -0
- package/src/runtime/agent/orchestrator/agent-runtime/maintenance-route.mjs +4 -1
- package/src/runtime/agent/orchestrator/config.mjs +12 -7
- package/src/runtime/agent/orchestrator/context/deferred-tools.mjs +7 -7
- package/src/runtime/agent/orchestrator/context/role-instructions.mjs +5 -26
- package/src/runtime/agent/orchestrator/internal-agents.mjs +3 -14
- package/src/runtime/agent/orchestrator/mcp/agent-connectors.mjs +122 -12
- package/src/runtime/agent/orchestrator/mcp/child-tree.mjs +5 -3
- package/src/runtime/agent/orchestrator/mcp/client-config.mjs +13 -2
- package/src/runtime/agent/orchestrator/mcp/client-transport.mjs +152 -58
- package/src/runtime/agent/orchestrator/mcp/client.mjs +51 -18
- package/src/runtime/agent/orchestrator/mcp/oauth-login.mjs +83 -52
- package/src/runtime/agent/orchestrator/mcp/oauth.mjs +42 -26
- package/src/runtime/agent/orchestrator/providers/account-pool.mjs +43 -8
- package/src/runtime/agent/orchestrator/providers/anthropic-api-request.mjs +30 -28
- package/src/runtime/agent/orchestrator/providers/anthropic-oauth-client-version.mjs +1 -1
- package/src/runtime/agent/orchestrator/providers/anthropic-oauth-credentials.mjs +31 -21
- package/src/runtime/agent/orchestrator/providers/antigravity-oauth-login.mjs +3 -1
- package/src/runtime/agent/orchestrator/providers/antigravity-oauth-tokens.mjs +2 -2
- package/src/runtime/agent/orchestrator/providers/codex-client-meta.mjs +1 -1
- package/src/runtime/agent/orchestrator/providers/command-code-oauth.mjs +1 -1
- package/src/runtime/agent/orchestrator/providers/custom-provider-config.mjs +40 -0
- package/src/runtime/agent/orchestrator/providers/custom-provider-keys.mjs +34 -0
- package/src/runtime/agent/orchestrator/providers/custom-provider.mjs +3 -0
- package/src/runtime/agent/orchestrator/providers/devin-auth.mjs +14 -7
- package/src/runtime/agent/orchestrator/providers/devin-wire-transport.mjs +3 -2
- package/src/runtime/agent/orchestrator/providers/gemini-response.mjs +2 -2
- package/src/runtime/agent/orchestrator/providers/gemini-stream.mjs +4 -1
- package/src/runtime/agent/orchestrator/providers/grok-oauth-login.mjs +48 -31
- package/src/runtime/agent/orchestrator/providers/lib/oauth-page.mjs +0 -18
- package/src/runtime/agent/orchestrator/providers/lib/oauth-token-utils.mjs +138 -6
- package/src/runtime/agent/orchestrator/providers/mimo-oauth.mjs +1 -1
- package/src/runtime/agent/orchestrator/providers/model-cache.mjs +100 -33
- package/src/runtime/agent/orchestrator/providers/muse-code-oauth.mjs +1 -1
- package/src/runtime/agent/orchestrator/providers/oauth-secret-fields.fixtures.mjs +45 -0
- package/src/runtime/agent/orchestrator/providers/openai-oauth-login.mjs +26 -28
- package/src/runtime/agent/orchestrator/providers/openai-ws-stream/event-switch.mjs +3 -1
- package/src/runtime/agent/orchestrator/providers/openai-ws-watchdogs.mjs +1 -0
- package/src/runtime/agent/orchestrator/providers/opencode-go-oauth.mjs +1 -1
- package/src/runtime/agent/orchestrator/providers/opencode-go.mjs +3 -1
- package/src/runtime/agent/orchestrator/providers/registry.mjs +33 -2
- package/src/runtime/agent/orchestrator/providers/vertex-ai-auth.mjs +622 -0
- package/src/runtime/agent/orchestrator/providers/vertex-ai-maas.mjs +185 -0
- package/src/runtime/agent/orchestrator/providers/vertex-ai-models.mjs +445 -0
- package/src/runtime/agent/orchestrator/providers/vertex-ai.mjs +567 -0
- package/src/runtime/agent/orchestrator/runtime-core/builtin-features.mjs +2 -0
- package/src/runtime/agent/orchestrator/runtime-core/orchestration.mjs +2 -1
- package/src/runtime/agent/orchestrator/runtime-core/tool-catalog-data.mjs +3 -0
- package/src/runtime/agent/orchestrator/runtime-core/tool-defs.mjs +3 -0
- package/src/runtime/agent/orchestrator/runtime-core/workflow/context.mjs +14 -5
- package/src/runtime/agent/orchestrator/runtime-core/workflow-ids.mjs +1 -0
- package/src/runtime/agent/orchestrator/session/agent-room.d.mts +30 -5
- package/src/runtime/agent/orchestrator/session/agent-room.mjs +171 -37
- package/src/runtime/agent/orchestrator/session/cache-warm.mjs +94 -10
- package/src/runtime/agent/orchestrator/session/conversation-import/claude.mjs +3 -3
- package/src/runtime/agent/orchestrator/session/conversation-import/codex.mjs +10 -5
- package/src/runtime/agent/orchestrator/session/conversation-import/convert.mjs +5 -5
- package/src/runtime/agent/orchestrator/session/conversation-import/turns.mjs +11 -1
- package/src/runtime/agent/orchestrator/session/eager-dispatch.mjs +4 -3
- package/src/runtime/agent/orchestrator/session/human-gate/requests.mjs +36 -6
- package/src/runtime/agent/orchestrator/session/loop/fresh-context.mjs +5 -3
- package/src/runtime/agent/orchestrator/session/loop/tool-exec/before-hook.mjs +21 -2
- package/src/runtime/agent/orchestrator/session/loop/tool-exec/dispatch.mjs +2 -0
- package/src/runtime/agent/orchestrator/session/loop/tool-exec.mjs +23 -1
- package/src/runtime/agent/orchestrator/session/loop/turn-limits.mjs +13 -8
- package/src/runtime/agent/orchestrator/session/manager/ask-session.mjs +50 -28
- package/src/runtime/agent/orchestrator/session/manager/prompt-utils.mjs +1 -0
- package/src/runtime/agent/orchestrator/session/manager/rules-cache.mjs +3 -4
- package/src/runtime/agent/orchestrator/session/manager/runtime-liveness.mjs +2 -0
- package/src/runtime/agent/orchestrator/session/manager/session-close.mjs +7 -0
- package/src/runtime/agent/orchestrator/session/manager/session-crud.mjs +15 -0
- package/src/runtime/agent/orchestrator/session/manager/session-lifecycle.mjs +25 -14
- package/src/runtime/agent/orchestrator/session/manager/session-prompt-composition.mjs +17 -14
- package/src/runtime/agent/orchestrator/session/manager/session-scratch-environment.mjs +70 -0
- package/src/runtime/agent/orchestrator/session/manager/session-tool-surface.mjs +0 -3
- package/src/runtime/agent/orchestrator/session/manager/tool-resolution.mjs +7 -3
- package/src/runtime/agent/orchestrator/session/manager/turn-interruption.mjs +47 -29
- package/src/runtime/agent/orchestrator/session/manager/turn-reap.mjs +125 -0
- package/src/runtime/agent/orchestrator/session/mixy-name.mjs +11 -5
- package/src/runtime/agent/orchestrator/session/restart-prefix-parity.fixture.mjs +1 -1
- package/src/runtime/agent/orchestrator/session/store-summary-reader.mjs +243 -38
- package/src/runtime/agent/orchestrator/session/store-transcript-cache.mjs +163 -64
- package/src/runtime/agent/orchestrator/session/store-transcript-projection.mjs +164 -4
- package/src/runtime/agent/orchestrator/session/store-transcript-worker.mjs +142 -18
- package/src/runtime/agent/orchestrator/tools/builtin/bash-tool/completed-result.mjs +6 -2
- package/src/runtime/agent/orchestrator/tools/builtin/git-command-tool.mjs +36 -26
- package/src/runtime/agent/orchestrator/tools/builtin/git-worktree-tool.mjs +3 -5
- package/src/runtime/agent/orchestrator/tools/builtin/lib/shell-job-records.mjs +58 -20
- package/src/runtime/agent/orchestrator/tools/builtin/runtime-capabilities.mjs +20 -15
- package/src/runtime/agent/orchestrator/tools/builtin/shell-jobs.mjs +96 -20
- package/src/runtime/agent/orchestrator/tools/builtin/task-tool.mjs +59 -10
- package/src/runtime/agent/orchestrator/tools/graph-manifest.json +13 -13
- package/src/runtime/agent/orchestrator/tools/lib/native-spawn-client.mjs +99 -2
- package/src/runtime/agent/orchestrator/tools/lib/owned-shell-trees.mjs +2 -0
- package/src/runtime/agent/orchestrator/tools/lib/shell-descendants.mjs +103 -13
- package/src/runtime/agent/orchestrator/tools/lib/shell-run-background/promote-job.mjs +3 -1
- package/src/runtime/agent/orchestrator/tools/lib/shell-run-settle.mjs +49 -15
- package/src/runtime/agent/orchestrator/tools/lib/shell-run-spawn.mjs +45 -27
- package/src/runtime/agent/orchestrator/tools/lib/shell-run-state.mjs +34 -10
- package/src/runtime/agent/orchestrator/tools/lib/shell-warm-standby.mjs +2 -0
- package/src/runtime/agent/orchestrator/tools/lib/wait-until-fixture.mjs +26 -0
- package/src/runtime/agent/orchestrator/tools/shell-command.mjs +7 -2
- package/src/runtime/agent/orchestrator/tools/spawn-manifest.json +13 -13
- package/src/runtime/channels/lib/whisper-port.mjs +19 -10
- package/src/runtime/channels/lib/whisper-server.mjs +10 -1
- package/src/runtime/connectors/connector-accounts-mcp.mjs +236 -103
- package/src/runtime/connectors/gmail-app-password.mjs +3 -3
- package/src/runtime/explore/explorer.mjs +93 -0
- package/src/runtime/explore/tool-defs.mjs +35 -0
- package/src/runtime/explore/tool.mjs +123 -0
- package/src/runtime/memory/index.mjs +4 -0
- package/src/runtime/memory/lib/embedding-provider.mjs +4 -1
- package/src/runtime/memory/lib/embedding-worker.mjs +4 -0
- package/src/runtime/office/quality/assurance-structure-docx.mjs +1 -1
- package/src/runtime/shared/agent-route-config.mjs +17 -2
- package/src/runtime/shared/atomic-file.mjs +103 -2
- package/src/runtime/shared/background-tasks.mjs +15 -6
- package/src/runtime/shared/connector-accounts.mjs +5 -5
- package/src/runtime/shared/connector-catalog.d.mts +11 -4
- package/src/runtime/shared/connector-catalog.mjs +60 -52
- package/src/runtime/shared/custom-provider-keys.mjs +20 -0
- package/src/runtime/shared/file-has-data.mjs +26 -2
- package/src/runtime/shared/file-lock.mjs +13 -15
- package/src/runtime/shared/git-launch.d.mts +9 -0
- package/src/runtime/shared/git-launch.mjs +213 -0
- package/src/runtime/shared/git-runner-worker.mjs +2 -1
- package/src/runtime/shared/llm/cost.mjs +6 -1
- package/src/runtime/shared/llm/http-agent.mjs +313 -29
- package/src/runtime/shared/llm/model-catalog-projection.mjs +3 -2
- package/src/runtime/shared/llm/model-catalog.mjs +46 -6
- package/src/runtime/shared/llm/provider-catalog-registry.mjs +3 -0
- package/src/runtime/shared/llm/system-proxy.mjs +452 -0
- package/src/runtime/shared/provider-accounts.mjs +52 -2
- package/src/runtime/shared/staged-install-worker.mjs +5 -0
- package/src/runtime/shared/staged-update.mjs +47 -2
- package/src/runtime/shared/tool-surface.mjs +110 -36
- package/src/runtime/shared/tool-work-units.mjs +4 -0
- package/src/runtime/shared/turn-worktree-snapshot.mjs +414 -54
- package/src/runtime/shared/worktrees/activity-gate.mjs +215 -318
- package/src/runtime/shared/worktrees/activity-ledger-worker.mjs +56 -0
- package/src/runtime/shared/worktrees/activity-ledger.mjs +391 -0
- package/src/runtime/shared/worktrees/branch-management.mjs +9 -3
- package/src/runtime/shared/worktrees/git.mjs +57 -0
- package/src/runtime/shared/worktrees/manager.mjs +205 -137
- package/src/runtime/tidy/install.mjs +95 -15
- package/src/runtime/tidy/languages.mjs +17 -15
- package/src/runtime/tidy/process.mjs +7 -4
- package/src/runtime/tidy/resolve.mjs +19 -16
- package/src/runtime/tidy/runners/biome.mjs +3 -3
- package/src/runtime/tidy/tool.mjs +1 -1
- package/src/runtime/tidy/worktree.mjs +10 -6
- package/src/runtime/visualize-bridge/client.mjs +4 -1
- package/src/runtime/visualize-bridge/tool-defs.mjs +7 -2
- package/src/runtime/web-search/index.mjs +1 -1
- package/src/session-runtime/agent-task-sessions.mjs +410 -353
- package/src/session-runtime/boot/tools.mjs +2 -0
- package/src/session-runtime/bot-status.mjs +103 -103
- package/src/session-runtime/connector-merge-migration.mjs +18 -15
- package/src/session-runtime/conversation-import/discovery.mjs +159 -40
- package/src/session-runtime/conversation-import/service.mjs +9 -3
- package/src/session-runtime/handoff-attachments.mjs +1 -1
- package/src/session-runtime/held-requests.mjs +3 -1
- package/src/session-runtime/internal-tool-executor/feature-tools.mjs +2 -0
- package/src/session-runtime/internal-tool-executor/knowledge-tools.mjs +8 -0
- package/src/session-runtime/internal-tool-executor/workspace-tools.mjs +143 -116
- package/src/session-runtime/lifecycle/teardown/session-close.mjs +6 -1
- package/src/session-runtime/lifecycle/teardown.mjs +1 -1
- package/src/session-runtime/mcp-glue/server-catalog.mjs +16 -10
- package/src/session-runtime/mcp-glue/server-input.mjs +4 -1
- package/src/session-runtime/mixy-heartbeat.mjs +1 -1
- package/src/session-runtime/provider-auth/login.mjs +2 -2
- package/src/session-runtime/resource-mcp-api.mjs +98 -35
- package/src/session-runtime/resource-mcp-connector-accounts.mjs +44 -31
- package/src/session-runtime/resource-mcp-secrets.mjs +28 -11
- package/src/session-runtime/resource-mcp-servers.mjs +5 -4
- package/src/session-runtime/services/agent-tool/send-flow.mjs +10 -2
- package/src/session-runtime/services/agent-tool/spawn-flow/spawn-prep.mjs +8 -3
- package/src/session-runtime/services/agent-tool/spawn-flow/spawn-run.mjs +4 -1
- package/src/session-runtime/services/agent-watchdog-registry.mjs +32 -4
- package/src/session-runtime/services/channel-worker/daemon-spawn.mjs +2 -0
- package/src/session-runtime/services/daemon-candidate.mjs +4 -1
- package/src/session-runtime/services/memory-runtime-proxy/daemon-spawn.mjs +4 -0
- package/src/session-runtime/services/plugin-admin.mjs +10 -6
- package/src/session-runtime/services/provider-admin.mjs +281 -10
- package/src/session-runtime/session-turn-api.mjs +2 -0
- package/src/session-runtime/settings-builtin-tools-api.mjs +4 -1
- package/src/session-runtime/settings-system-api.mjs +1 -1
- package/src/session-runtime/setup-tool/agent-settings-actions.mjs +13 -3
- package/src/session-runtime/setup-tool/connector-widen-approval.mjs +96 -0
- package/src/session-runtime/setup-tool/executor.mjs +6 -2
- package/src/session-runtime/setup-tool/tool-defs.mjs +2 -1
- package/src/session-runtime/turn/agent-ops.mjs +23 -0
- package/src/session-runtime/workflow-agents-api/agent-connectors.mjs +49 -11
- package/src/session-runtime/workflow-agents-api/agent-route.mjs +10 -1
- package/src/session-runtime/workspace/activity-guards.mjs +176 -0
- package/src/session-runtime/workspace/session-view.mjs +149 -0
- package/src/session-runtime/workspace/side-checkouts.mjs +203 -0
- package/src/session-runtime/workspace/transition-runner.mjs +188 -0
- package/src/session-runtime/workspace/transitions.mjs +108 -1066
- package/src/session-runtime/workspace/workspace-merge.mjs +132 -0
- package/src/session-runtime/workspace/worktree-intents.mjs +242 -0
- package/src/session-runtime/workspace/worktree-maintenance.mjs +80 -0
- package/src/session-runtime/workspace/worktree-setup.mjs +85 -0
- package/src/session-runtime/workspace/worktree-tool.mjs +54 -54
- package/src/standalone/daemon-desktop-runtime.mjs +2 -0
- package/src/standalone/daemon-session-control.mjs +151 -136
- package/src/standalone/daemon.mjs +7 -0
- package/src/standalone/desktop-service-registry.mjs +9 -0
- package/src/standalone/local-session-runtime.mjs +5 -1
- package/src/standalone/session-client/daemon-unavailable.mjs +3 -0
- package/src/standalone/session-client.mjs +5 -1
- package/src/standalone/session-frame-stream.mjs +83 -11
- package/src/standalone/session-protocol.mjs +4 -0
- package/src/standalone/session-service/agent-tree.mjs +45 -9
- package/src/standalone/session-service/projection/transcript-window.mjs +700 -64
- package/src/standalone/session-service/session-calls/session-views.mjs +160 -104
- package/src/standalone/session-service/stored-reader.mjs +127 -40
- package/src/tui/App.jsx +154 -164
- package/src/tui/app/app-view/floating-panel.jsx +3 -0
- package/src/tui/app/app-view/text-entry-labels.mjs +1 -0
- package/src/tui/app/clipboard.mjs +21 -10
- package/src/tui/app/prompt-handlers/use-prompt-history-nav.mjs +1 -1
- package/src/tui/app/prompt-handlers/use-prompt-interrupt.mjs +3 -0
- package/src/tui/app/prompt-submit/provider-prompts.mjs +3 -1
- package/src/tui/app/provider-setup/api-key-actions.mjs +31 -1
- package/src/tui/app/provider-setup/oauth-actions.mjs +25 -6
- package/src/tui/app/provider-setup-picker.mjs +20 -13
- package/src/tui/app/shell-layout/row-budgets.mjs +12 -10
- package/src/tui/app/slash-commands.mjs +1 -0
- package/src/tui/app/slash-dispatch/session-commands.mjs +46 -0
- package/src/tui/app/slash-dispatch.mjs +1 -1
- package/src/tui/app/use-btw-panel.mjs +29 -0
- package/src/tui/app/use-context-panel-refresh.mjs +31 -0
- package/src/tui/app/use-model-catalog-cache.mjs +13 -10
- package/src/tui/app/use-mouse-input.mjs +11 -0
- package/src/tui/app/use-onboarding-start.mjs +8 -3
- package/src/tui/app/use-panel-transition.mjs +10 -1
- package/src/tui/app/use-pasted-buffers.mjs +28 -20
- package/src/tui/app/use-prompt-draft-flow.mjs +7 -0
- package/src/tui/app/use-prompt-layout-rows.mjs +3 -3
- package/src/tui/app/use-prompt-queue-history.mjs +3 -2
- package/src/tui/app/use-selection-focus.mjs +11 -2
- package/src/tui/app/use-selection-geometry.mjs +18 -9
- package/src/tui/app/use-selection-paint.mjs +4 -4
- package/src/tui/app/use-selection-stitch.mjs +3 -3
- package/src/tui/app/use-slash-palette.mjs +62 -0
- package/src/tui/app/use-terminal-chrome.mjs +2 -2
- package/src/tui/app/use-transcript-activity.mjs +47 -32
- package/src/tui/app/use-transcript-follow.mjs +12 -4
- package/src/tui/app/use-transcript-scroll.mjs +46 -17
- package/src/tui/app/use-transcript-swap-reset.mjs +27 -0
- package/src/tui/app/use-transcript-window/geometry.mjs +19 -5
- package/src/tui/app/use-transcript-window/instance-state.mjs +4 -0
- package/src/tui/app/use-transcript-window/selection-shift.mjs +5 -1
- package/src/tui/app/use-transcript-window.mjs +21 -11
- package/src/tui/app/use-tui-ready.mjs +18 -0
- package/src/tui/app/use-welcome-prompt-hint.mjs +5 -0
- package/src/tui/app/use-workflow-tab-cycle.mjs +5 -3
- package/src/tui/components/Picker.jsx +27 -3
- package/src/tui/components/SignInUrl.jsx +68 -0
- package/src/tui/components/TextEntryPanel.jsx +76 -46
- package/src/tui/components/sign-in-url-layout.mjs +24 -0
- package/src/tui/dist/index.mjs +1896 -1341
- package/src/tui/session/goal-turn-state.mjs +6 -2
- package/src/tui/session/session-api/controls.mjs +4 -0
- package/src/tui/session/session-api/extensions.mjs +8 -0
- package/src/tui/session/session-api/intake/abort.mjs +2 -1
- package/src/tui/session/session-api/intake.mjs +2 -0
- package/src/tui/session/session-api/integrations.mjs +2 -2
- package/src/tui/session/session-api/routes-agent-definitions.mjs +1 -0
- package/src/tui/session/session-api/settings.mjs +2 -2
- package/src/tui/session/transcript-spill/spill-writer.mjs +15 -0
- package/src/tui/session/transcript-spill.mjs +92 -4
- package/src/tui/session/transcript-store.mjs +2 -0
- package/src/defaults/skills/skill-creator/references/source-review.md +0 -94
|
@@ -1,203 +1,111 @@
|
|
|
1
1
|
# Skill design
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
skill.
|
|
3
|
+
## One owner
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
Before writing, name the result the skill makes more reliable, the decisions
|
|
6
|
+
the agent misses without it, the evidence that proves completion, the failures
|
|
7
|
+
that need recovery, and the nearby request it must leave alone.
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
Extend an existing skill that owns the outcome; create a new one only for a
|
|
10
|
+
distinct trigger, workflow and verification. Avoid skills that redirect to
|
|
11
|
+
other skills, several skills competing for one request, one skill covering a
|
|
12
|
+
whole technology, and product features written as prose.
|
|
9
13
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
- What evidence proves completion?
|
|
13
|
-
- Which failures need recovery rather than a hard stop?
|
|
14
|
-
- Which adjacent task must remain outside this skill?
|
|
15
|
-
|
|
16
|
-
A skill earns its context cost by supplying judgement or procedure that changes
|
|
17
|
-
results. Generic encouragement and tool documentation do not qualify.
|
|
18
|
-
|
|
19
|
-
## Pick one owner
|
|
20
|
-
|
|
21
|
-
Prefer extending an existing skill when it already owns the outcome. Create a
|
|
22
|
-
new skill when it has a distinct trigger, workflow, and verification boundary.
|
|
23
|
-
|
|
24
|
-
Avoid:
|
|
25
|
-
|
|
26
|
-
- umbrella skills that merely redirect to narrower skills;
|
|
27
|
-
- several skills competing for the same user intent;
|
|
28
|
-
- one skill that attempts to cover an entire profession or technology family;
|
|
29
|
-
- product features represented as prose because implementing code is harder.
|
|
30
|
-
|
|
31
|
-
## Choose where it lives
|
|
32
|
-
|
|
33
|
-
| Scope | Use when |
|
|
34
|
-
|---|---|
|
|
35
|
-
| Machine-global | The user wants the workflow available across Projects |
|
|
36
|
-
| Plugin | The workflow depends on and ships with an extension |
|
|
37
|
-
| Built-in | The workflow is broadly useful, stable, and inexpensive to expose |
|
|
38
|
-
|
|
39
|
-
A workflow specific to one repository may be better owned by project
|
|
40
|
-
documentation than by a machine-global skill.
|
|
14
|
+
System instructions and tool schemas outrank a skill: it explains when and how
|
|
15
|
+
to use tools, never redefines their arguments or permissions.
|
|
41
16
|
|
|
42
17
|
## Frontmatter
|
|
43
18
|
|
|
44
|
-
|
|
19
|
+
- `name`: lowercase letters, digits and hyphens, no leading, trailing or
|
|
20
|
+
repeated hyphen, at most 64 characters, equal to the folder name.
|
|
21
|
+
- `description`: one plain capability sentence for the UI, at most 100
|
|
22
|
+
characters. The model never sees it.
|
|
23
|
+
- `when_to_use`: the trigger (Listing line below).
|
|
24
|
+
- `dependencies.tools`: tools loaded with the skill. `type: tool` takes an
|
|
25
|
+
exact tool name, `type: mcp` a connected server's name. A missing or
|
|
26
|
+
disabled tool is reported, never installed or enabled, and nothing grants
|
|
27
|
+
permissions. Leave optional tools out.
|
|
45
28
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
29
|
+
```yaml
|
|
30
|
+
dependencies:
|
|
31
|
+
tools:
|
|
32
|
+
- type: tool
|
|
33
|
+
value: office
|
|
34
|
+
```
|
|
49
35
|
|
|
50
|
-
|
|
36
|
+
- `metadata.requires`: a Mixdog built-in feature the skill cannot work without.
|
|
51
37
|
|
|
52
|
-
|
|
53
|
-
the skill, then the boundary against the nearest neighbour.
|
|
54
|
-
|
|
55
|
-
Optional portable fields include `license`, `compatibility`, `metadata`, and
|
|
56
|
-
`allowed-tools`. A parsed field is not automatically an implemented feature.
|
|
57
|
-
Confirm runtime support before assigning it operational meaning.
|
|
58
|
-
|
|
59
|
-
Declare mandatory tools in `dependencies.tools`, either in `SKILL.md`
|
|
60
|
-
frontmatter or an imported `agents/openai.yaml`:
|
|
61
|
-
|
|
62
|
-
```yaml
|
|
63
|
-
dependencies:
|
|
64
|
-
tools:
|
|
65
|
-
- type: tool
|
|
66
|
-
value: office
|
|
67
|
-
- type: mcp
|
|
68
|
-
value: existing-server
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
`mcp` resolves the available tools of an already connected server. Missing,
|
|
72
|
-
disabled, and policy-blocked tools are reported, never installed or enabled.
|
|
73
|
-
|
|
74
|
-
The skill editor keeps tool-link overrides in Mixdog's data directory so
|
|
75
|
-
updating a downloaded skill does not erase local links or rewrite its source.
|
|
76
|
-
An empty override disconnects all tools; restoring the declaration removes
|
|
77
|
-
the override. Changing the instruction text still requires an editable skill.
|
|
38
|
+
Other fields have no effect in Mixdog.
|
|
78
39
|
|
|
79
40
|
## Listing line
|
|
80
41
|
|
|
81
|
-
The model
|
|
82
|
-
one listing line per skill:
|
|
42
|
+
The model sees one line per skill and loads the body only by calling `Skill`:
|
|
83
43
|
|
|
84
44
|
```text
|
|
85
45
|
- <name>: <when_to_use> [tools: <linked tool names>]
|
|
86
46
|
```
|
|
87
47
|
|
|
88
|
-
The
|
|
89
|
-
many skills share the listing
|
|
90
|
-
|
|
91
|
-
handwritten trigger text; `mcp:<server>` denotes a server's tools. Keep these
|
|
92
|
-
three responsibilities separate:
|
|
93
|
-
|
|
94
|
-
| Field | Job | Budget | Write | Avoid |
|
|
95
|
-
|---|---|---|---|---|
|
|
96
|
-
| `description` | UI-only summary | ≤ 100 chars | One plain capability sentence | Operating rules or selection conditions found nowhere else |
|
|
97
|
-
| `when_to_use` | When to load the skill | ≤ 100 chars, core in the first 60 | English descriptions of user intents across languages, implicit situations, then `not …` naming the neighbouring owner | How to use it — procedures, rules, constraints, commands, tool arguments; translated keyword lists |
|
|
98
|
-
| Body | Loaded operating instructions | As needed | Capability, prerequisites, procedure, constraints, recovery, and verification | Depending on UI copy to supply an instruction |
|
|
48
|
+
The trigger is cut at 100 characters on a word boundary, and shrinks evenly
|
|
49
|
+
toward 60 when many skills share the listing; text past the cut never selects
|
|
50
|
+
the skill. The tool suffix comes from `dependencies`, never from the trigger.
|
|
99
51
|
|
|
100
|
-
|
|
101
|
-
|
|
52
|
+
| Field | Job | Write | Avoid |
|
|
53
|
+
|---|---|---|---|
|
|
54
|
+
| `when_to_use` | When to load the skill; core in the first 60 characters | The user intents and situations, strongest first, in English for every language, then `not …` naming the nearest other owner | How to do it: steps, rules, commands, tool arguments; translated keyword lists |
|
|
55
|
+
| Body | Everything after selection | Capability, prerequisites, procedure, recovery, verification | Relying on the trigger or the UI description for an instruction |
|
|
102
56
|
|
|
103
|
-
|
|
57
|
+
Never summarise the procedure in the trigger: a model that reads a workflow
|
|
58
|
+
there may follow it instead of loading the body. Add the `not …` boundary only
|
|
59
|
+
when a nearby skill or a plain tool could plausibly win the request.
|
|
104
60
|
|
|
105
61
|
```yaml
|
|
106
|
-
|
|
107
|
-
when_to_use: 'Deploy, redeploy, or update the installed app, VPS, or a live release; not builds or tests alone.'
|
|
62
|
+
when_to_use: 'Deploy or update the installed app or a live release; not builds or tests alone.'
|
|
108
63
|
```
|
|
109
64
|
|
|
110
65
|
## Body
|
|
111
66
|
|
|
112
|
-
|
|
113
|
-
left out. Use only the sections the workflow needs, in this order:
|
|
67
|
+
Only the sections the workflow needs, in this order:
|
|
114
68
|
|
|
115
|
-
1. **Intro** — two or three sentences: what
|
|
116
|
-
not do, and the key dependency stance.
|
|
69
|
+
1. **Intro** — two or three sentences: what it produces and what it does not.
|
|
117
70
|
2. **Boundary or mode selection** — the decision that picks a path or hands
|
|
118
71
|
the request to another owner.
|
|
119
|
-
3. **Prerequisites** — exact tools,
|
|
72
|
+
3. **Prerequisites** — exact tools, environment and approvals.
|
|
120
73
|
4. **Procedure** — numbered steps; each important step ends with the
|
|
121
|
-
observable result that proves it
|
|
122
|
-
|
|
74
|
+
observable result that proves it, and an irreversible step names the user
|
|
75
|
+
checkpoint before it.
|
|
123
76
|
5. **Pitfalls** — observed failures and their recovery, not generic caution.
|
|
124
77
|
6. **Verification** — the check that proves the outcome.
|
|
125
|
-
7. **Resource links** — each
|
|
126
|
-
condition for reading or running it.
|
|
78
|
+
7. **Resource links** — each file with the condition for reading or running it.
|
|
127
79
|
|
|
128
|
-
Write in the imperative
|
|
129
|
-
|
|
80
|
+
Write in the imperative; give a reason only when it changes behaviour, and drop
|
|
81
|
+
rules the model already follows. About 100 lines for a simple workflow, about
|
|
82
|
+
200 for a complex one, never over 500. Split by loading condition, not by
|
|
83
|
+
length.
|
|
130
84
|
|
|
131
|
-
|
|
132
|
-
below 500 in every case. Split content because it has a different loading
|
|
133
|
-
condition, not simply because the file became long.
|
|
85
|
+
## Resources
|
|
134
86
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
Use `scripts/` for deterministic repeated work. Every executable should:
|
|
146
|
-
|
|
147
|
-
- validate inputs before side effects;
|
|
148
|
-
- operate on explicit paths;
|
|
149
|
-
- bound time, memory, retries, and output;
|
|
150
|
-
- return actionable errors and a non-zero failure status;
|
|
151
|
-
- avoid hidden network, installation, deletion, or credential behavior;
|
|
152
|
-
- work on every claimed platform or declare the limitation;
|
|
153
|
-
- have a behavioral test separate from the prose.
|
|
154
|
-
|
|
155
|
-
Reference executable paths through `${MIXDOG_SKILL_DIR}` so installation
|
|
156
|
-
location does not matter.
|
|
157
|
-
|
|
158
|
-
### Assets
|
|
159
|
-
|
|
160
|
-
Use `assets/` for templates and static material consumed by outputs. Guidance
|
|
161
|
-
belongs in Markdown, not in files that the agent will not load as instructions.
|
|
162
|
-
|
|
163
|
-
## Portability audit
|
|
164
|
-
|
|
165
|
-
Inspect prose and scripts for:
|
|
166
|
-
|
|
167
|
-
- POSIX-only commands or paths on Windows;
|
|
168
|
-
- Windows-only shell syntax on other platforms;
|
|
169
|
-
- machine-specific absolute paths;
|
|
170
|
-
- undeclared external programs and environment variables;
|
|
171
|
-
- assumptions about a vendor CLI, model, or authentication state;
|
|
172
|
-
- output paths that overwrite user files by default.
|
|
173
|
-
|
|
174
|
-
Prefer portable implementation first. Restrict compatibility only when the
|
|
175
|
-
dependency cannot reasonably be removed.
|
|
176
|
-
|
|
177
|
-
## Editing discipline
|
|
178
|
-
|
|
179
|
-
- Preserve identity and public behavior unless change is requested.
|
|
180
|
-
- Replace outdated guidance instead of appending exceptions.
|
|
181
|
-
- Keep safety and recovery behavior during simplification.
|
|
182
|
-
- Do not duplicate a rule across the body, reference, script help, and tool
|
|
183
|
-
schema; choose the component that owns it.
|
|
184
|
-
- End with a pass that removes instructions that did not influence outcomes.
|
|
87
|
+
- `references/` — detailed rules read only in some cases. Link each directly
|
|
88
|
+
from `SKILL.md` with its read condition; no file points to another.
|
|
89
|
+
- `scripts/` — deterministic work that would otherwise be redone each time.
|
|
90
|
+
Validate inputs before side effects, use explicit paths, bound time, output
|
|
91
|
+
and retries, fail with an actionable message and a non-zero status, and do
|
|
92
|
+
no hidden network, installs, deletion or credential access. Give it a
|
|
93
|
+
behavioural test, and call it through `${MIXDOG_SKILL_DIR}`.
|
|
94
|
+
- `assets/` — templates and static material the output uses; guidance stays
|
|
95
|
+
in Markdown.
|
|
185
96
|
|
|
186
97
|
## Audit checklist
|
|
187
98
|
|
|
188
|
-
Apply to every skill when asked to audit, review, or tidy the skill set.
|
|
189
|
-
|
|
190
99
|
| Check | Failure looks like | Fix |
|
|
191
100
|
|---|---|---|
|
|
192
|
-
|
|
|
193
|
-
| Trigger
|
|
194
|
-
|
|
|
195
|
-
|
|
|
196
|
-
|
|
|
197
|
-
| Duplication |
|
|
198
|
-
| Staleness | Paths, tools
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
this
|
|
203
|
-
|
|
101
|
+
| Fields | `description` or `when_to_use` over 100 characters; an instruction found only in metadata | Short UI summary, selection in the trigger, execution in the body |
|
|
102
|
+
| Trigger | Empty while a neighbour competes; says how instead of when | The phrases users write plus the `not …` boundary; move the how to the body |
|
|
103
|
+
| Body | Out of order, a "when to use" section, steps without a result | Reorder, delete body triggers, add the observable result |
|
|
104
|
+
| Resources | A missing file, a chain of references, a script without input checks | Fix the path, flatten, validate inputs |
|
|
105
|
+
| Side effects | External programs, network, secrets or irreversible steps (commit, deploy, publish, restart) not visible or not waiting for the user | Name them in prerequisites; checkpoint before the step |
|
|
106
|
+
| Duplication | One rule in the body, a reference and a script's help | Keep it in its owner, delete the copies |
|
|
107
|
+
| Staleness | Paths, tools or flags that no longer exist | Replace or remove |
|
|
108
|
+
| Value | A rule or section that no scenario needed | Delete it |
|
|
109
|
+
|
|
110
|
+
The validator checks fields, fences and resource paths; the rest is a read
|
|
111
|
+
against this table.
|
|
@@ -1,111 +1,52 @@
|
|
|
1
1
|
# Evaluating a skill
|
|
2
2
|
|
|
3
|
-
Use
|
|
4
|
-
|
|
3
|
+
Use after a draft exists or when a skill misbehaves. A passing validator
|
|
4
|
+
proves structure only, never behaviour.
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## Scenarios
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Two to five realistic requests, with the context a real user would give:
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|---|---|
|
|
12
|
-
| Selection | Does the description attract relevant requests and reject close alternatives? |
|
|
13
|
-
| Execution | Does the loaded workflow produce the required outcome? |
|
|
14
|
-
| Integration | Do resources, paths, tools, and feature gates resolve? |
|
|
15
|
-
| Recovery | Do failures remain bounded and actionable? |
|
|
16
|
-
| Efficiency | Does the skill remove repeated work without adding ritual? |
|
|
17
|
-
|
|
18
|
-
Passing a frontmatter check proves none of the execution questions.
|
|
19
|
-
|
|
20
|
-
## Scenario set
|
|
21
|
-
|
|
22
|
-
Use two to five realistic requests:
|
|
23
|
-
|
|
24
|
-
1. a normal request that names the intent;
|
|
10
|
+
1. a request that names the intent;
|
|
25
11
|
2. an implicit request that should still select the skill;
|
|
26
|
-
3. an
|
|
27
|
-
4. a
|
|
28
|
-
|
|
12
|
+
3. an edge or failure condition that matters;
|
|
13
|
+
4. a near-miss negative: shares the skill's words but belongs to another
|
|
14
|
+
owner;
|
|
15
|
+
5. a subjective artifact, when taste or domain judgement decides.
|
|
29
16
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
An optional record shape:
|
|
34
|
-
|
|
35
|
-
```json
|
|
36
|
-
{
|
|
37
|
-
"id": "short-purpose",
|
|
38
|
-
"prompt": "Realistic user request",
|
|
39
|
-
"expected_owner": "skill-name or none",
|
|
40
|
-
"observable_result": "What must become true",
|
|
41
|
-
"inputs": []
|
|
42
|
-
}
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Keep evaluation artifacts outside the distributable directory unless the
|
|
46
|
-
packaging process explicitly excludes them.
|
|
17
|
+
Never use "load this skill" as a positive case. Keep scenario files outside
|
|
18
|
+
the skill's folder.
|
|
47
19
|
|
|
48
20
|
## Baseline
|
|
49
21
|
|
|
50
|
-
Before
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
draft from the baseline. Otherwise report a smoke test rather than implying a
|
|
56
|
-
controlled A/B result.
|
|
57
|
-
|
|
58
|
-
The evaluation harness must remain uniform. Do not add task-specific routing,
|
|
59
|
-
timeouts, prompt clues, retries, or scoring exceptions to make one version win.
|
|
22
|
+
Before changing a skill, keep a copy of the prior version and run the same
|
|
23
|
+
prompts, inputs, model and tools against both. A new skill with no runnable
|
|
24
|
+
baseline gets a smoke test, not a claimed comparison. Keep the harness the
|
|
25
|
+
same for both: no task-specific hints, retries, timeouts or scoring
|
|
26
|
+
exceptions.
|
|
60
27
|
|
|
61
28
|
## Evidence
|
|
62
29
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
- malformed input fails with useful guidance;
|
|
69
|
-
- resource and retry limits hold;
|
|
70
|
-
- an irreversible action waits for approval;
|
|
71
|
-
- prohibited side effects do not occur.
|
|
72
|
-
|
|
73
|
-
Do not test exact prose, source strings, internal algorithms, or snapshots whose
|
|
74
|
-
expected behavior has intentionally changed.
|
|
75
|
-
|
|
76
|
-
Use user review for clarity, visual quality, writing taste, and domain
|
|
77
|
-
judgement. Present the full-size persisted output rather than a description of
|
|
78
|
-
it.
|
|
30
|
+
- Mechanical outcomes get deterministic checks: files exist and open, fields
|
|
31
|
+
are valid, references resolve, bad input fails with useful guidance, an
|
|
32
|
+
irreversible step waits for approval, no forbidden side effect happens.
|
|
33
|
+
- Never assert exact prose or internal steps.
|
|
34
|
+
- Clarity, taste and domain judgement go to the user, shown the real output.
|
|
79
35
|
|
|
80
36
|
## Diagnose before revising
|
|
81
37
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
Edit the component that owns the failure. More prompt text does not repair a
|
|
92
|
-
broken tool, and body changes cannot fix a description that never selects the
|
|
93
|
-
skill.
|
|
38
|
+
| Class | Where the fix goes |
|
|
39
|
+
|---|---|
|
|
40
|
+
| Selection | Trigger or the neighbour's boundary |
|
|
41
|
+
| Instruction | A missing decision, step order or completion result in the body |
|
|
42
|
+
| Resource | The broken script, reference, asset or path |
|
|
43
|
+
| Integration | The unavailable tool, feature or dependency |
|
|
44
|
+
| Harness | The test setup, not the skill |
|
|
45
|
+
| Capability | The tool or product; the skill cannot deliver it |
|
|
94
46
|
|
|
95
47
|
## Improve without sediment
|
|
96
48
|
|
|
97
|
-
After each revision
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
3. retain safety, recovery, and bounded execution;
|
|
102
|
-
4. remove rules superseded by the fix;
|
|
103
|
-
5. check whether the change generalizes beyond the failing example.
|
|
104
|
-
|
|
105
|
-
Look for tests that always pass, high variance, repeated helper work, excessive
|
|
106
|
-
token or time cost, and rules that change no outcome. Those are signals to
|
|
107
|
-
improve the evaluation or simplify the skill.
|
|
108
|
-
|
|
109
|
-
Stop when required behavior passes, subjective review is accepted, and further
|
|
110
|
-
edits no longer produce meaningful gains.
|
|
111
|
-
|
|
49
|
+
After each revision, rerun the affected scenarios, validate, keep safety and
|
|
50
|
+
recovery, delete the rules the fix superseded, and check that the fix is not
|
|
51
|
+
tailored to one example. Stop when the required behaviour passes, the user
|
|
52
|
+
accepts the subjective parts, and further edits stop paying off.
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: test-suite
|
|
3
|
+
description: Write, run, diagnose, prune and audit a project's tests without overloading the machine.
|
|
4
|
+
when_to_use: 'Write, fix, run, diagnose, prune or audit tests, flaky failures, suite health; not live UI checks.'
|
|
5
|
+
dependencies:
|
|
6
|
+
tools:
|
|
7
|
+
- type: tool
|
|
8
|
+
value: read
|
|
9
|
+
- type: tool
|
|
10
|
+
value: shell
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Test suite
|
|
14
|
+
|
|
15
|
+
Owns how tests in any project are written, run during a change, diagnosed when
|
|
16
|
+
they fail intermittently, pruned and audited. The project's own
|
|
17
|
+
commands, lanes and conventions win over every default here; this skill
|
|
18
|
+
supplies the judgement and procedure around them. Driving a running app or
|
|
19
|
+
device by hand is outside it.
|
|
20
|
+
|
|
21
|
+
## Pick the mode
|
|
22
|
+
|
|
23
|
+
| Request | Mode |
|
|
24
|
+
|---|---|
|
|
25
|
+
| Add a test, fix a bug test-first | Write |
|
|
26
|
+
| Check a change while editing | Run |
|
|
27
|
+
| A test fails sometimes, only in a full run, only in CI, only on this machine | Diagnose |
|
|
28
|
+
| Duplicate, dead, obsolete or worthless tests | Prune |
|
|
29
|
+
| Review the suite's health or a whole area | Audit |
|
|
30
|
+
|
|
31
|
+
## Prerequisites: find the project's own way
|
|
32
|
+
|
|
33
|
+
Before the first run, look for the project's focused test command in this
|
|
34
|
+
order, and stop at the first source that gives it plus any constraint that
|
|
35
|
+
affects the change (lane, setup, needed service): `AGENTS.md` or `CLAUDE.md`,
|
|
36
|
+
`docs/testing*`, `CONTRIBUTING*`, package scripts (`package.json`, `Makefile`,
|
|
37
|
+
`pyproject.toml`, `Cargo.toml`), then CI workflows. Do not survey every
|
|
38
|
+
manifest or CI lane. Result: one focused command, copied from the project,
|
|
39
|
+
never invented; a broader command only when the change is broad. When nothing
|
|
40
|
+
is documented, fall back to the
|
|
41
|
+
runner's own selection: `node --test <file>`, `vitest run <file>`,
|
|
42
|
+
`jest <file>`, `pytest <file>::<test>`, `go test -run <Name> ./<pkg>`,
|
|
43
|
+
`cargo test <name>`.
|
|
44
|
+
|
|
45
|
+
## Machine rules
|
|
46
|
+
|
|
47
|
+
Tests run on the user's working machine. These hold in every mode.
|
|
48
|
+
|
|
49
|
+
- The Verification section of your system rules owns the evidence budget,
|
|
50
|
+
reruns, fix attempts, heavy runs and stopping what you started; follow it.
|
|
51
|
+
- Never loop a test to "reproduce" flakiness here, and never shard in
|
|
52
|
+
parallel locally; repetition belongs to CI history.
|
|
53
|
+
- Confirm by PID or command line that detached processes you started are gone.
|
|
54
|
+
|
|
55
|
+
## Write
|
|
56
|
+
|
|
57
|
+
What a change gets:
|
|
58
|
+
|
|
59
|
+
| Change | New tests |
|
|
60
|
+
|---|---|
|
|
61
|
+
| Bug fix | One regression test for the reported behaviour |
|
|
62
|
+
| New behaviour | One per observable behaviour the requirement names (its success and its stated rejections) |
|
|
63
|
+
| Refactor, rename, move | None; the existing tests must still pass unchanged |
|
|
64
|
+
| Removal | None; delete the removed behaviour's tests, never assert the absence |
|
|
65
|
+
| Docs, copy, style, config values | None |
|
|
66
|
+
|
|
67
|
+
Only a test owning a lasting contract joins the suite and its CI lane.
|
|
68
|
+
Reproductions, probes and one-off checks are scratch: they live in a temp
|
|
69
|
+
directory outside the repository, are never committed, and are deleted when
|
|
70
|
+
the task ends. A scratch reproduction that proves a bug becomes the
|
|
71
|
+
regression test above or is deleted, never both kept.
|
|
72
|
+
|
|
73
|
+
1. Name the behaviour and its owner: the one contract this test owns, beside
|
|
74
|
+
the code it exercises. If a test already owns it, extend that test
|
|
75
|
+
(`references/suite-design.md`). Result: one file and test name chosen.
|
|
76
|
+
2. Name the production change that would make the test fail; if you cannot,
|
|
77
|
+
redesign it around an observable behaviour (`references/suite-design.md`).
|
|
78
|
+
Write the test through the user's interface (caller, CLI,
|
|
79
|
+
HTTP, rendered output) with the expected value from the requirement, not
|
|
80
|
+
from running the code. For a new regression test, show it failing first:
|
|
81
|
+
the failure names the missing behaviour. An existing failing test already
|
|
82
|
+
counts as that evidence.
|
|
83
|
+
3. Apply `references/reliability.md` for any time, process, port, file,
|
|
84
|
+
environment, locale or platform dependency. Result: no fixed sleep, no
|
|
85
|
+
fixed port, no unrestored global, no host-locale assumption.
|
|
86
|
+
4. Make it pass with the smallest change, then rerun the same file. Result:
|
|
87
|
+
a new regression test's fail-before and pass-after pair goes into the
|
|
88
|
+
report. Add no further
|
|
89
|
+
tests unless the user asks.
|
|
90
|
+
5. Put it in the lane its duration and needs call for (`suite-design.md`).
|
|
91
|
+
|
|
92
|
+
## Run
|
|
93
|
+
|
|
94
|
+
1. Run the covering file(s) only. Result: the selected count matches the files
|
|
95
|
+
you meant.
|
|
96
|
+
2. On failure read the full log before editing; do not rerun to see if it
|
|
97
|
+
passes.
|
|
98
|
+
3. Run a broader lane once after the last edit only if the change touches a
|
|
99
|
+
shared contract or an integration point; otherwise stop at the covering
|
|
100
|
+
file. Reuse an earlier pass only when no later edit touched the code it
|
|
101
|
+
checks.
|
|
102
|
+
4. After two evidence-backed fix attempts, report what was tried and the log.
|
|
103
|
+
|
|
104
|
+
## Diagnose
|
|
105
|
+
|
|
106
|
+
An intermittent failure is a defect in the test or the product, never noise
|
|
107
|
+
(`references/flaky-policy.md`).
|
|
108
|
+
|
|
109
|
+
1. Collect evidence without reruns: the failing assertion, the full log, what
|
|
110
|
+
else was running, the OS and locale. Result: the failing line and the
|
|
111
|
+
condition it waited on.
|
|
112
|
+
2. Classify the cause with the table in `references/reliability.md`. Result:
|
|
113
|
+
one named cause with the line that assumes it.
|
|
114
|
+
3. Propose the fix: in the test, or in the product when real users can hit
|
|
115
|
+
the same race. A longer timeout, a retry or a skip is not a fix.
|
|
116
|
+
|
|
117
|
+
Diagnose ends at a report: cause, evidence, proposed fix. Only when the user
|
|
118
|
+
asked for a fix, apply it and prove it with the focused file plus a
|
|
119
|
+
deterministic trigger of the cause (a held promise, a fake clock, a localized
|
|
120
|
+
fixture), not by looping. It never becomes an open-ended fix loop. Never
|
|
121
|
+
skip or disable a failing test; when the fix cannot land now, report it and
|
|
122
|
+
leave that decision to the user. Only a capability skip (a platform or tool
|
|
123
|
+
the test needs is absent) is allowed, and its reason names that capability.
|
|
124
|
+
|
|
125
|
+
## Prune
|
|
126
|
+
|
|
127
|
+
First tell redundant coverage from removing a supported behaviour, and keep
|
|
128
|
+
distinct observable success, rejection, error and compatibility cases.
|
|
129
|
+
Removing a behaviour with its tests needs evidence independent of those tests
|
|
130
|
+
(current requirements, real callers, a specification); a test existing only
|
|
131
|
+
for a branch, or a fallback and test justifying each other, is no evidence,
|
|
132
|
+
and unresolved intent blocks deletion.
|
|
133
|
+
|
|
134
|
+
- Delete a test only when it is dominated (same branch and result as a
|
|
135
|
+
stronger test), tautological (cannot fail), a permutation crossing no new
|
|
136
|
+
branch, or verification theater (verifier and producer share one failure
|
|
137
|
+
domain). Name the test that still owns the contract.
|
|
138
|
+
- Deleting a contract test needs the user's approval.
|
|
139
|
+
- Same contract owned twice → merge the unique cases into the owner at the
|
|
140
|
+
user's interface.
|
|
141
|
+
- Asserts that something was removed, restates a constant, copies production
|
|
142
|
+
logic or source text into the test, or pins internals no user observes →
|
|
143
|
+
delete it, or rewrite it at the interface when a real contract is behind it.
|
|
144
|
+
- Passes only alone → Diagnose; never mark it serial to hide it.
|
|
145
|
+
|
|
146
|
+
Prune as you go: a change that touches a test file applies these rules to that
|
|
147
|
+
file only. A whole-suite sweep is an Audit the user asked for.
|
|
148
|
+
|
|
149
|
+
Result: each removal names the owning test that still covers the contract, or
|
|
150
|
+
states that the contract is gone.
|
|
151
|
+
|
|
152
|
+
## Audit
|
|
153
|
+
|
|
154
|
+
1. Run `node ${MIXDOG_SKILL_DIR}/scripts/inventory.mjs <project-root>`
|
|
155
|
+
(`--json` for data). Result: per-area counts, lanes, languages, risk
|
|
156
|
+
markers, and defect skips for JS/TS, Python, Go and Rust.
|
|
157
|
+
2. Read `references/case-management.md` and rank findings by impact: defect
|
|
158
|
+
skips, risky markers in the fast lane, duplicate owners.
|
|
159
|
+
3. Report one table (area, finding, count, proposed action) and wait for the
|
|
160
|
+
user's choice of batches. Audit ends at this report; fix only the batches
|
|
161
|
+
the user picks, one or two at a time, each verified by its covering files.
|
|
162
|
+
|
|
163
|
+
## Pitfalls
|
|
164
|
+
|
|
165
|
+
- Parsing localized tool output (a console in another language, a busy host
|
|
166
|
+
dropping rows) passed on the author's machine and failed elsewhere. Query a
|
|
167
|
+
structured source.
|
|
168
|
+
- Fixed sleeps passed alone and failed in bulk when other work ran.
|
|
169
|
+
- A load generator or server started by an agent was detached, outlived the
|
|
170
|
+
agent and froze the machine. Nothing detached survives a report.
|
|
171
|
+
- Render tests passed while the real screen hid a row: assert the rendered
|
|
172
|
+
output, not the inputs.
|
|
173
|
+
- Full lanes that take many minutes fail under load; selection, not more
|
|
174
|
+
retries, fixes that.
|
|
175
|
+
|
|
176
|
+
## Verification
|
|
177
|
+
|
|
178
|
+
- Write/fix: the focused file passes; a new regression test also failed
|
|
179
|
+
before, and the report quotes both.
|
|
180
|
+
- Diagnose: the named cause and its evidence. Only when the user asked for a
|
|
181
|
+
fix: the deterministic trigger and its passing run.
|
|
182
|
+
- Every mode: no process you started is still running.
|
|
183
|
+
|
|
184
|
+
## Resources
|
|
185
|
+
|
|
186
|
+
- `references/reliability.md` — read when a test touches time, processes,
|
|
187
|
+
ports, files, environment, locale or the platform, or when diagnosing.
|
|
188
|
+
- `references/flaky-policy.md` — read when a failure is intermittent.
|
|
189
|
+
- `references/suite-design.md` — read when writing a test, choosing its lane
|
|
190
|
+
or file, or reviewing how a suite is organized.
|
|
191
|
+
- `references/case-management.md` — read for Audit, or when adding a new
|
|
192
|
+
area.
|
|
193
|
+
- `scripts/inventory.mjs` — run for Audit; read-only, bounded, Markdown or
|
|
194
|
+
`--json`.
|