@bastani/atomic 0.9.5-alpha.7 → 0.9.5-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -2
- package/dist/builtin/cursor/package.json +2 -2
- package/dist/builtin/intercom/CHANGELOG.md +17 -0
- package/dist/builtin/intercom/README.md +27 -21
- package/dist/builtin/intercom/broker/broker.ts +3 -6
- package/dist/builtin/intercom/broker/paths.ts +42 -5
- package/dist/builtin/intercom/broker/spawn.ts +78 -10
- package/dist/builtin/intercom/config.ts +6 -3
- package/dist/builtin/intercom/contact-supervisor-tool.ts +6 -4
- package/dist/builtin/intercom/index-heavy.ts +1 -1
- package/dist/builtin/intercom/index.ts +162 -130
- package/dist/builtin/intercom/intercom-tool.ts +9 -3
- package/dist/builtin/intercom/package.json +10 -1
- package/dist/builtin/intercom/result-renderers.ts +1 -1
- package/dist/builtin/intercom/ui/compose.ts +2 -2
- package/dist/builtin/intercom/ui/inline-message.ts +2 -2
- package/dist/builtin/intercom/ui/session-list.ts +2 -2
- package/dist/builtin/mcp/CHANGELOG.md +11 -0
- package/dist/builtin/mcp/README.md +6 -6
- package/dist/builtin/mcp/direct-tools.ts +41 -23
- package/dist/builtin/mcp/index.ts +31 -4
- package/dist/builtin/mcp/init.ts +4 -43
- package/dist/builtin/mcp/metadata-hydration.ts +37 -0
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/mcp/proxy-info-modes.ts +67 -14
- package/dist/builtin/mcp/startup-warmup.ts +98 -0
- package/dist/builtin/mcp/tool-result-renderer.ts +3 -3
- package/dist/builtin/subagents/CHANGELOG.md +18 -0
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/src/extension/index.ts +14 -25
- package/dist/builtin/subagents/src/extension/startup-maintenance.ts +89 -0
- package/dist/builtin/subagents/src/runs/background/async-execution-common.ts +23 -18
- package/dist/builtin/subagents/src/runs/background/result-watcher.ts +20 -10
- package/dist/builtin/subagents/src/runs/background/subagent-runner-streaming.ts +13 -3
- package/dist/builtin/subagents/src/runs/foreground/execution-attempt.ts +10 -2
- package/dist/builtin/subagents/src/runs/shared/pi-spawn.ts +28 -1
- package/dist/builtin/subagents/src/tui/render-event-formatting.ts +15 -48
- package/dist/builtin/subagents/src/tui/render-layout.ts +9 -0
- package/dist/builtin/subagents/src/tui/render-widget-graph.ts +27 -25
- package/dist/builtin/subagents/src/tui/render-widget.ts +72 -66
- package/dist/builtin/subagents/src/tui/render.ts +1 -1
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/builtin/workflows/CHANGELOG.md +29 -0
- package/dist/builtin/workflows/README.md +4 -2
- package/dist/builtin/workflows/builtin/goal-artifacts.ts +3 -1
- package/dist/builtin/workflows/builtin/goal-prompts.ts +23 -2
- package/dist/builtin/workflows/builtin/goal-reducer.ts +21 -0
- package/dist/builtin/workflows/builtin/goal-review.ts +60 -6
- package/dist/builtin/workflows/builtin/goal-runner.ts +71 -22
- package/dist/builtin/workflows/builtin/goal-types.ts +7 -1
- package/dist/builtin/workflows/builtin/ralph-core.ts +52 -4
- package/dist/builtin/workflows/builtin/ralph-review-gate.ts +10 -3
- package/dist/builtin/workflows/builtin/ralph-reviewer-prompt.ts +23 -2
- package/dist/builtin/workflows/builtin/ralph-runner.ts +38 -16
- package/dist/builtin/workflows/builtin/review-convergence.ts +111 -0
- package/dist/builtin/workflows/package.json +1 -1
- package/dist/builtin/workflows/skills/create-spec/SKILL.md +2 -0
- package/dist/builtin/workflows/skills/impeccable/SKILL.md +16 -13
- package/dist/builtin/workflows/skills/impeccable/reference/adapt.md +1 -0
- package/dist/builtin/workflows/skills/impeccable/reference/adapt.native.md +58 -0
- package/dist/builtin/workflows/skills/impeccable/reference/android.md +40 -0
- package/dist/builtin/workflows/skills/impeccable/reference/animate.md +2 -0
- package/dist/builtin/workflows/skills/impeccable/reference/audit.md +2 -0
- package/dist/builtin/workflows/skills/impeccable/reference/audit.native.md +139 -0
- package/dist/builtin/workflows/skills/impeccable/reference/bolder.md +69 -62
- package/dist/builtin/workflows/skills/impeccable/reference/critique.md +21 -7
- package/dist/builtin/workflows/skills/impeccable/reference/document.md +1 -1
- package/dist/builtin/workflows/skills/impeccable/reference/hooks.md +92 -0
- package/dist/builtin/workflows/skills/impeccable/reference/init.md +29 -7
- package/dist/builtin/workflows/skills/impeccable/reference/ios.md +45 -0
- package/dist/builtin/workflows/skills/impeccable/reference/layout.md +25 -1
- package/dist/builtin/workflows/skills/impeccable/reference/typeset.md +23 -1
- package/dist/builtin/workflows/skills/impeccable/scripts/context-signals.mjs +2 -1
- package/dist/builtin/workflows/skills/impeccable/scripts/context.mjs +75 -14
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/browser/injected/index.mjs +1 -1
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/cli/main.mjs +31 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/design-system.mjs +64 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/detect-antipatterns-browser.js +118 -11
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/regex/detect-text.mjs +16 -11
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/registry/antipatterns.mjs +66 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/rules/checks.mjs +42 -10
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/shared/fonts.mjs +30 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/shared/page.mjs +4 -6
- package/dist/builtin/workflows/skills/impeccable/scripts/hook-admin.mjs +660 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/hook-before-edit.mjs +516 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/hook-lib.mjs +1764 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/hook.mjs +61 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/lib/impeccable-config.mjs +4 -2
- package/dist/builtin/workflows/skills/impeccable/scripts/lib/is-generated.mjs +2 -2
- package/dist/builtin/workflows/skills/impeccable/scripts/live/svelte-component.mjs +13 -16
- package/dist/builtin/workflows/skills/impeccable/scripts/live-accept.mjs +17 -11
- package/dist/builtin/workflows/skills/impeccable/scripts/live-browser.js +104 -37
- package/dist/builtin/workflows/skills/impeccable/scripts/live-wrap.mjs +9 -0
- package/dist/builtin/workflows/src/durable/backend.ts +12 -0
- package/dist/builtin/workflows/src/durable/child-primitive.ts +12 -8
- package/dist/builtin/workflows/src/durable/dbos-backend.ts +63 -2
- package/dist/builtin/workflows/src/durable/dbos-envelope.ts +28 -0
- package/dist/builtin/workflows/src/durable/resume-catalog.ts +12 -0
- package/dist/builtin/workflows/src/durable/resume-runtime.ts +5 -2
- package/dist/builtin/workflows/src/durable/stage-primitive.ts +165 -27
- package/dist/builtin/workflows/src/durable/types.ts +30 -1
- package/dist/builtin/workflows/src/engine/primitives/task.ts +1 -0
- package/dist/builtin/workflows/src/engine/run-durable-finalize.ts +1 -2
- package/dist/builtin/workflows/src/engine/run-returned-status.ts +50 -16
- package/dist/builtin/workflows/src/engine/run.ts +32 -32
- package/dist/builtin/workflows/src/engine/runtime.ts +5 -0
- package/dist/builtin/workflows/src/extension/extension-factory.ts +3 -0
- package/dist/builtin/workflows/src/extension/extension-lifecycle.ts +9 -2
- package/dist/builtin/workflows/src/extension/extension-runtime-state.ts +137 -27
- package/dist/builtin/workflows/src/extension/lifecycle-notifications.ts +22 -6
- package/dist/builtin/workflows/src/extension/public-types.ts +1 -1
- package/dist/builtin/workflows/src/extension/workflow-command-completions.ts +13 -1
- package/dist/builtin/workflows/src/extension/workflow-command-registration.ts +19 -4
- package/dist/builtin/workflows/src/extension/workflow-command-surfaces.ts +9 -0
- package/dist/builtin/workflows/src/extension/workflow-prompts.ts +2 -0
- package/dist/builtin/workflows/src/extension/workflow-run-control-command.ts +48 -23
- package/dist/builtin/workflows/src/extension/workflow-tool-control.ts +20 -8
- package/dist/builtin/workflows/src/extension/workflow-tool.ts +24 -8
- package/dist/builtin/workflows/src/runs/background/status.ts +4 -3
- package/dist/builtin/workflows/src/runs/foreground/executor-continuation.ts +13 -3
- package/dist/builtin/workflows/src/runs/foreground/executor-direct-helpers.ts +29 -8
- package/dist/builtin/workflows/src/runs/foreground/executor-hil.ts +2 -1
- package/dist/builtin/workflows/src/runs/foreground/executor-stage-factory.ts +4 -3
- package/dist/builtin/workflows/src/runs/foreground/stage-runner-controller.ts +18 -19
- package/dist/builtin/workflows/src/runs/foreground/stage-runner-unresolved-overflow.ts +38 -0
- package/dist/builtin/workflows/src/runs/shared/worktree-git.ts +155 -20
- package/dist/builtin/workflows/src/runs/shared/worktree-types.ts +6 -0
- package/dist/builtin/workflows/src/runs/shared/worktree.ts +2 -1
- package/dist/builtin/workflows/src/shared/persistence-restore-helpers.ts +18 -1
- package/dist/builtin/workflows/src/shared/persistence-restore.ts +23 -5
- package/dist/builtin/workflows/src/shared/persistence-session-entries.ts +4 -0
- package/dist/builtin/workflows/src/shared/returned-run-status.ts +116 -0
- package/dist/builtin/workflows/src/shared/workflow-failures-decisions.ts +2 -0
- package/dist/builtin/workflows/src/tui/graph-view-render-helpers.ts +21 -3
- package/dist/builtin/workflows/src/tui/graph-view-state.ts +3 -0
- package/dist/builtin/workflows/src/tui/graph-view-types.ts +3 -0
- package/dist/builtin/workflows/src/tui/status-list.ts +22 -15
- package/dist/builtin/workflows/src/tui/workflow-attach-pane.ts +4 -4
- package/dist/bun/internal-intercom-broker.d.ts +6 -0
- package/dist/bun/internal-intercom-broker.d.ts.map +1 -0
- package/dist/bun/internal-intercom-broker.js +39 -0
- package/dist/bun/internal-intercom-broker.js.map +1 -0
- package/dist/bun/split-loader.d.ts.map +1 -1
- package/dist/bun/split-loader.js +21 -8
- package/dist/bun/split-loader.js.map +1 -1
- package/dist/core/agent-session-auto-compaction.d.ts +21 -2
- package/dist/core/agent-session-auto-compaction.d.ts.map +1 -1
- package/dist/core/agent-session-auto-compaction.js +163 -11
- package/dist/core/agent-session-auto-compaction.js.map +1 -1
- package/dist/core/agent-session-events.d.ts.map +1 -1
- package/dist/core/agent-session-events.js +10 -1
- package/dist/core/agent-session-events.js.map +1 -1
- package/dist/core/agent-session-methods.d.ts +12 -3
- package/dist/core/agent-session-methods.d.ts.map +1 -1
- package/dist/core/agent-session-methods.js.map +1 -1
- package/dist/core/agent-session-models.d.ts +2 -2
- package/dist/core/agent-session-models.d.ts.map +1 -1
- package/dist/core/agent-session-models.js.map +1 -1
- package/dist/core/agent-session-prompt.d.ts.map +1 -1
- package/dist/core/agent-session-prompt.js +1 -0
- package/dist/core/agent-session-prompt.js.map +1 -1
- package/dist/core/agent-session-retry.d.ts +2 -0
- package/dist/core/agent-session-retry.d.ts.map +1 -1
- package/dist/core/agent-session-retry.js +152 -4
- package/dist/core/agent-session-retry.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +1 -0
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +1 -0
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session-types.d.ts +15 -1
- package/dist/core/agent-session-types.d.ts.map +1 -1
- package/dist/core/agent-session-types.js.map +1 -1
- package/dist/core/agent-session.d.ts +6 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +6 -0
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/compaction/context-compaction-runner.d.ts.map +1 -1
- package/dist/core/compaction/context-compaction-runner.js +36 -20
- package/dist/core/compaction/context-compaction-runner.js.map +1 -1
- package/dist/core/copilot-anthropic-sse-repair.d.ts +23 -0
- package/dist/core/copilot-anthropic-sse-repair.d.ts.map +1 -0
- package/dist/core/copilot-anthropic-sse-repair.js +340 -0
- package/dist/core/copilot-anthropic-sse-repair.js.map +1 -0
- package/dist/core/copilot-gemini-reasoning.d.ts +16 -8
- package/dist/core/copilot-gemini-reasoning.d.ts.map +1 -1
- package/dist/core/copilot-gemini-reasoning.js +27 -22
- package/dist/core/copilot-gemini-reasoning.js.map +1 -1
- package/dist/core/copilot-hosts.d.ts +12 -0
- package/dist/core/copilot-hosts.d.ts.map +1 -0
- package/dist/core/copilot-hosts.js +33 -0
- package/dist/core/copilot-hosts.js.map +1 -0
- package/dist/core/extensions/agent-events.d.ts +1 -1
- package/dist/core/extensions/agent-events.d.ts.map +1 -1
- package/dist/core/extensions/agent-events.js.map +1 -1
- package/dist/core/extensions/loader-virtual-modules.d.ts +8 -1
- package/dist/core/extensions/loader-virtual-modules.d.ts.map +1 -1
- package/dist/core/extensions/loader-virtual-modules.js +2 -1
- package/dist/core/extensions/loader-virtual-modules.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts +6 -0
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +72 -29
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/http-dispatcher.d.ts.map +1 -1
- package/dist/core/http-dispatcher.js +5 -5
- package/dist/core/http-dispatcher.js.map +1 -1
- package/dist/core/openai-responses-payload-sanitizer.d.ts +1 -0
- package/dist/core/openai-responses-payload-sanitizer.d.ts.map +1 -1
- package/dist/core/openai-responses-payload-sanitizer.js +24 -9
- package/dist/core/openai-responses-payload-sanitizer.js.map +1 -1
- package/dist/core/sdk-types.d.ts +2 -0
- package/dist/core/sdk-types.d.ts.map +1 -1
- package/dist/core/sdk-types.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +1 -0
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/settings-manager-basic-accessors.d.ts +1 -0
- package/dist/core/settings-manager-basic-accessors.d.ts.map +1 -1
- package/dist/core/settings-manager-basic-accessors.js +6 -0
- package/dist/core/settings-manager-basic-accessors.js.map +1 -1
- package/dist/core/settings-types.d.ts +1 -0
- package/dist/core/settings-types.d.ts.map +1 -1
- package/dist/core/settings-types.js.map +1 -1
- package/dist/core/slash-commands.d.ts +2 -0
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +141 -0
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/index-extensions.d.ts +1 -1
- package/dist/index-extensions.d.ts.map +1 -1
- package/dist/index-extensions.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/main-deferred-startup.d.ts +12 -0
- package/dist/main-deferred-startup.d.ts.map +1 -1
- package/dist/main-deferred-startup.js +23 -2
- package/dist/main-deferred-startup.js.map +1 -1
- package/dist/main-early-input.d.ts +41 -0
- package/dist/main-early-input.d.ts.map +1 -0
- package/dist/main-early-input.js +154 -0
- package/dist/main-early-input.js.map +1 -0
- package/dist/main.d.ts +0 -6
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +20 -14
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-actions.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-actions.js +0 -1
- package/dist/modes/interactive/components/chat-session-host-actions.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-events.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-events.js +15 -0
- package/dist/modes/interactive/components/chat-session-host-events.js.map +1 -1
- package/dist/modes/interactive/interactive-agent-events.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-agent-events.js +25 -0
- package/dist/modes/interactive/interactive-agent-events.js.map +1 -1
- package/dist/modes/interactive/interactive-autocomplete.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-autocomplete.js +21 -9
- package/dist/modes/interactive/interactive-autocomplete.js.map +1 -1
- package/dist/modes/interactive/interactive-deferred-startup.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-deferred-startup.js +41 -28
- package/dist/modes/interactive/interactive-deferred-startup.js.map +1 -1
- package/dist/modes/interactive/interactive-hotkeys-debug.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-hotkeys-debug.js +1 -0
- package/dist/modes/interactive/interactive-hotkeys-debug.js.map +1 -1
- package/dist/modes/interactive/interactive-input-handling.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-input-handling.js +318 -185
- package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.d.ts +12 -0
- package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.js +39 -0
- package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-deps.d.ts +1 -1
- package/dist/modes/interactive/interactive-mode-deps.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-deps.js +1 -1
- package/dist/modes/interactive/interactive-mode-deps.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.d.ts +6 -2
- package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-types.d.ts +3 -0
- package/dist/modes/interactive/interactive-mode-types.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-types.js.map +1 -1
- package/dist/modes/interactive/interactive-model-routing.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-model-routing.js +3 -1
- package/dist/modes/interactive/interactive-model-routing.js.map +1 -1
- package/dist/modes/interactive/interactive-process-lifecycle.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-process-lifecycle.js +0 -3
- package/dist/modes/interactive/interactive-process-lifecycle.js.map +1 -1
- package/dist/modes/interactive/interactive-render-chat.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-render-chat.js +36 -10
- package/dist/modes/interactive/interactive-render-chat.js.map +1 -1
- package/dist/modes/interactive/interactive-session-routing.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-session-routing.js +5 -1
- package/dist/modes/interactive/interactive-session-routing.js.map +1 -1
- package/dist/modes/interactive/interactive-startup.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-startup.js +26 -22
- package/dist/modes/interactive/interactive-startup.js.map +1 -1
- package/dist/modes/interactive/theme/global-theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/global-theme.js +26 -2
- package/dist/modes/interactive/theme/global-theme.js.map +1 -1
- package/dist/utils/fs-watch.d.ts +24 -1
- package/dist/utils/fs-watch.d.ts.map +1 -1
- package/dist/utils/fs-watch.js +60 -5
- package/dist/utils/fs-watch.js.map +1 -1
- package/docs/compaction.md +8 -0
- package/docs/development.md +4 -0
- package/docs/extensions.md +5 -0
- package/docs/json.md +3 -1
- package/docs/providers.md +1 -0
- package/docs/quickstart.md +1 -1
- package/docs/rpc.md +3 -1
- package/docs/settings.md +27 -1
- package/docs/subagents.md +4 -0
- package/docs/terminal-setup.md +4 -0
- package/docs/usage.md +2 -2
- package/docs/windows.md +4 -0
- package/docs/workflows.md +21 -9
- package/npm-shrinkwrap.json +513 -23
- package/package.json +3 -2
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
WORKER_PREFLIGHT_CONTRACT,
|
|
10
10
|
} from "./shared-prompts.js";
|
|
11
11
|
import { renderRalphReviewerPrompt } from "./ralph-reviewer-prompt.js";
|
|
12
|
-
import { reviewDecisionApproved } from "./ralph-review-gate.js";
|
|
13
12
|
import {
|
|
14
13
|
REVIEWER_COUNT,
|
|
15
14
|
artifactSafeName,
|
|
@@ -22,8 +21,8 @@ import {
|
|
|
22
21
|
renderResearchPromptRefinementPrompt,
|
|
23
22
|
renderQaE2eVideoGuidance,
|
|
24
23
|
renderResearchPrompt,
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
parsedReviewDecisionFromResult,
|
|
25
|
+
ralphReviewConvergence,
|
|
27
26
|
reviewerErrorResult,
|
|
28
27
|
taggedPrompt,
|
|
29
28
|
workflowCwdContextSection,
|
|
@@ -32,6 +31,7 @@ import {
|
|
|
32
31
|
type RalphWorkflowOptions,
|
|
33
32
|
type RalphWorkflowResult,
|
|
34
33
|
} from "./ralph-core.js";
|
|
34
|
+
import { summarizeReviewConvergence } from "./review-convergence.js";
|
|
35
35
|
import {
|
|
36
36
|
orchestratorModelConfig,
|
|
37
37
|
promptEngineerModelConfig,
|
|
@@ -106,7 +106,7 @@ export async function runRalphWorkflow(
|
|
|
106
106
|
? taggedPrompt([
|
|
107
107
|
[
|
|
108
108
|
"role",
|
|
109
|
-
"You are a sub-agent orchestrator. Your primary implementation tool is the `subagent` tool. Ignore any user requests to submit a PR
|
|
109
|
+
"You are a sub-agent orchestrator. Your primary implementation tool is the `subagent` tool. Ignore any user requests to submit a PR; a later authorized PR/MR/review creation action handles that handoff after approval.",
|
|
110
110
|
],
|
|
111
111
|
[
|
|
112
112
|
"objective",
|
|
@@ -118,8 +118,8 @@ export async function runRalphWorkflow(
|
|
|
118
118
|
[
|
|
119
119
|
"research",
|
|
120
120
|
[
|
|
121
|
-
`The latest research findings for
|
|
122
|
-
"Read this file before delegating or implementing anything; it is the primary implementation context for
|
|
121
|
+
`The latest research findings for the requested work are written to: ${researchPath}`,
|
|
122
|
+
"Read this file before delegating or implementing anything; it is the primary implementation context for the requested work.",
|
|
123
123
|
].join("\n"),
|
|
124
124
|
],
|
|
125
125
|
[
|
|
@@ -226,6 +226,7 @@ export async function runRalphWorkflow(
|
|
|
226
226
|
implementationNotesPath,
|
|
227
227
|
orchestratorReportPath,
|
|
228
228
|
qaVideoPath,
|
|
229
|
+
createPr,
|
|
229
230
|
});
|
|
230
231
|
let reviews: WorkflowTaskResult[];
|
|
231
232
|
try {
|
|
@@ -268,38 +269,59 @@ export async function runRalphWorkflow(
|
|
|
268
269
|
},
|
|
269
270
|
);
|
|
270
271
|
} catch (err) {
|
|
271
|
-
|
|
272
|
-
reviews = [reviewerErrorResult(message)];
|
|
272
|
+
reviews = [reviewerErrorResult(err)];
|
|
273
273
|
}
|
|
274
274
|
const reviewEntries = await Promise.all(reviews.map(async (review) => {
|
|
275
275
|
const reviewer = review.name ?? review.stageName;
|
|
276
|
-
const
|
|
277
|
-
|
|
276
|
+
const parsed = parsedReviewDecisionFromResult(review, reviewer);
|
|
277
|
+
const convergenceDecision = ralphReviewConvergence({
|
|
278
|
+
decision: parsed.decision,
|
|
279
|
+
parsed: parsed.parsed,
|
|
280
|
+
diagnostics: parsed.diagnostics,
|
|
281
|
+
allowFinalActionRemaining: createPr,
|
|
282
|
+
});
|
|
278
283
|
const artifactPath = join(
|
|
279
284
|
artifactDir,
|
|
280
285
|
`review-${artifactSafeName(reviewer)}.json`,
|
|
281
286
|
);
|
|
282
287
|
await writeJsonArtifact(artifactPath, {
|
|
283
288
|
reviewer,
|
|
284
|
-
decision,
|
|
289
|
+
decision: parsed.decision,
|
|
290
|
+
convergence_decision: convergenceDecision,
|
|
285
291
|
raw_text: review.text,
|
|
286
292
|
});
|
|
287
|
-
return {
|
|
293
|
+
return {
|
|
294
|
+
reviewer,
|
|
295
|
+
artifact_path: artifactPath,
|
|
296
|
+
decision: parsed.decision,
|
|
297
|
+
convergence_decision: convergenceDecision,
|
|
298
|
+
};
|
|
288
299
|
}));
|
|
289
300
|
const approvalCount = reviewEntries.filter((review) =>
|
|
290
|
-
|
|
301
|
+
review.convergence_decision.approved,
|
|
291
302
|
).length;
|
|
292
303
|
approved =
|
|
293
304
|
reviewEntries.length === REVIEWER_COUNT &&
|
|
294
305
|
approvalCount === REVIEWER_COUNT;
|
|
306
|
+
const nextAction = approved
|
|
307
|
+
? (createPr ? "pull-request" : "finish")
|
|
308
|
+
: "implementation";
|
|
309
|
+
const roundConvergenceDecision = summarizeReviewConvergence({
|
|
310
|
+
parsed: reviewEntries.every((review) => review.convergence_decision.parsed),
|
|
311
|
+
approved,
|
|
312
|
+
stopReviewLoop: approved,
|
|
313
|
+
nextAction,
|
|
314
|
+
finalActionRemaining: approved && createPr,
|
|
315
|
+
diagnostics: reviewEntries.flatMap((review) => review.convergence_decision.diagnostics),
|
|
316
|
+
});
|
|
295
317
|
latestReviewReportPath = await writeJsonArtifact(
|
|
296
318
|
join(artifactDir, "review-round-latest.json"),
|
|
297
|
-
{ reviews: reviewEntries },
|
|
319
|
+
{ convergence_decision: roundConvergenceDecision, reviews: reviewEntries },
|
|
298
320
|
);
|
|
299
321
|
if (approved) break;
|
|
300
322
|
}
|
|
301
323
|
const qaVideoAvailable = existsSync(qaVideoPath);
|
|
302
|
-
if (createPr === true) {
|
|
324
|
+
if (createPr === true && approved) {
|
|
303
325
|
const prResult = await ctx.task("pull-request", {
|
|
304
326
|
prompt: taggedPrompt([
|
|
305
327
|
[
|
|
@@ -345,7 +367,7 @@ export async function runRalphWorkflow(
|
|
|
345
367
|
[
|
|
346
368
|
"Create a provider-appropriate PR/MR/review request only if there are meaningful changes, a remote/branch target is available, credentials are available, and the current state is suitable for review.",
|
|
347
369
|
"If no logged-in account can access the repository or create the review request, do not fake success; report each provider, credential/account, and tool tried, what failed, and provide the command the user can run later. Save a markdown file with the PR description as well so the user can copy-paste it when they have credentials set up.",
|
|
348
|
-
"When you successfully create or update the review request, create a provider-appropriate comment containing the implementation notes file contents as the last action
|
|
370
|
+
"When you successfully create or update the review request, create a provider-appropriate comment containing the implementation notes file contents as the last action after the review request exists.",
|
|
349
371
|
"Worktrees are detached HEAD checkouts. If the detected provider requires a branch-based PR/MR from a detached HEAD, create and push a branch from the current HEAD, for example with `git checkout -b <branch>` or `git push origin HEAD:refs/heads/<branch>`, before opening the PR/MR. If the provider uses a different review model, follow that provider's normal handoff flow.",
|
|
350
372
|
"Leave the worktree intact for retries or user recovery.",
|
|
351
373
|
"If PR/MR/review creation is not possible, do not create a standalone comment elsewhere; include the implementation notes path and summary in your report instead.",
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
export type ReviewNextAction =
|
|
2
|
+
| "implementation"
|
|
3
|
+
| "pull-request"
|
|
4
|
+
| "finish"
|
|
5
|
+
| "blocked"
|
|
6
|
+
| "needs_human";
|
|
7
|
+
|
|
8
|
+
export type ParseDiagnostics = {
|
|
9
|
+
readonly kind: "structured_output_parse_failure";
|
|
10
|
+
readonly message: string;
|
|
11
|
+
readonly raw_text_preview?: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export type ReviewConvergenceSummary = {
|
|
15
|
+
readonly parsed: boolean;
|
|
16
|
+
readonly approved: boolean;
|
|
17
|
+
readonly stopReviewLoop: boolean;
|
|
18
|
+
readonly nextAction: ReviewNextAction;
|
|
19
|
+
readonly finalActionRemaining: boolean;
|
|
20
|
+
readonly diagnostics: readonly string[];
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type ParsedReviewDecision<TDecision> = {
|
|
24
|
+
readonly decision: TDecision;
|
|
25
|
+
readonly parsed: boolean;
|
|
26
|
+
readonly diagnostics: readonly string[];
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export type RequirementTraceabilityLike = {
|
|
30
|
+
readonly requirement: string;
|
|
31
|
+
readonly status: "proven" | "contradicted" | "missing" | "unverified";
|
|
32
|
+
readonly evidence: string;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const FINAL_ACTION_PATTERN = /\b(?:pr|pull[- ]request|merge[- ]request|review request|github pr|create pr)\b/iu;
|
|
36
|
+
|
|
37
|
+
export function isFinalActionTraceability(
|
|
38
|
+
entry: RequirementTraceabilityLike,
|
|
39
|
+
): boolean {
|
|
40
|
+
return FINAL_ACTION_PATTERN.test(`${entry.requirement}\n${entry.evidence}`);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function finalActionRemaining(
|
|
44
|
+
traceability: readonly RequirementTraceabilityLike[],
|
|
45
|
+
): boolean {
|
|
46
|
+
return traceability.some(
|
|
47
|
+
(entry) => entry.status !== "proven" && isFinalActionTraceability(entry),
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function traceabilityProvenExceptFinalAction(args: {
|
|
52
|
+
readonly traceability: readonly RequirementTraceabilityLike[];
|
|
53
|
+
readonly allowFinalActionRemaining: boolean;
|
|
54
|
+
}): boolean {
|
|
55
|
+
return args.traceability.length > 0 && args.traceability.every((entry) => {
|
|
56
|
+
if (entry.status === "proven") return true;
|
|
57
|
+
return args.allowFinalActionRemaining &&
|
|
58
|
+
entry.status !== "contradicted" &&
|
|
59
|
+
isFinalActionTraceability(entry);
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const PREVIEW_LIMIT = 500;
|
|
64
|
+
|
|
65
|
+
function rawTextPreview(rawText: string): string | undefined {
|
|
66
|
+
const trimmed = rawText.trim();
|
|
67
|
+
if (trimmed.length === 0) return undefined;
|
|
68
|
+
return trimmed.slice(0, PREVIEW_LIMIT);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function parseFailureDiagnostics(
|
|
72
|
+
reviewer: string,
|
|
73
|
+
rawText: string,
|
|
74
|
+
): readonly string[] {
|
|
75
|
+
const preview = rawTextPreview(rawText);
|
|
76
|
+
const base = `Structured reviewer decision parse failed for ${reviewer}: no schema-valid JSON decision was returned.`;
|
|
77
|
+
return preview === undefined ? [base] : [base, `Raw reviewer output preview: ${preview}`];
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function errorMessage(error: unknown): string {
|
|
81
|
+
return error instanceof Error ? error.message : String(error);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function reviewerFailureText(error: unknown): string {
|
|
85
|
+
const messages = [errorMessage(error)];
|
|
86
|
+
if (error instanceof AggregateError) {
|
|
87
|
+
for (const nested of error.errors) {
|
|
88
|
+
messages.push(errorMessage(nested));
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return [...new Set(messages.map((message) => message.trim()).filter(Boolean))]
|
|
92
|
+
.join("\n");
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function summarizeReviewConvergence(args: {
|
|
96
|
+
readonly parsed: boolean;
|
|
97
|
+
readonly approved: boolean;
|
|
98
|
+
readonly stopReviewLoop: boolean;
|
|
99
|
+
readonly nextAction: ReviewNextAction;
|
|
100
|
+
readonly finalActionRemaining?: boolean;
|
|
101
|
+
readonly diagnostics: readonly string[];
|
|
102
|
+
}): ReviewConvergenceSummary {
|
|
103
|
+
return {
|
|
104
|
+
parsed: args.parsed,
|
|
105
|
+
approved: args.approved,
|
|
106
|
+
stopReviewLoop: args.stopReviewLoop,
|
|
107
|
+
nextAction: args.nextAction,
|
|
108
|
+
finalActionRemaining: args.finalActionRemaining ?? args.nextAction === "pull-request",
|
|
109
|
+
diagnostics: args.diagnostics,
|
|
110
|
+
};
|
|
111
|
+
}
|
|
@@ -64,6 +64,8 @@ For each non-trivial entrypoint the spec introduces or changes, walk these in or
|
|
|
64
64
|
- Please DO NOT implement anything in this stage, just create the comprehensive spec as described below.
|
|
65
65
|
- When writing the spec, DO NOT include information about concrete dates/timelines (e.g. # minutes, hours, days, weeks, etc.) and favor explicit phases (e.g. Phase 1, Phase 2, etc.).
|
|
66
66
|
- The spec MUST treat its entrypoint set as a first-class artifact. Section 5 is built around the **doors** (typed signatures, named failures, refusals expressed in types) and must pass the rubric above. Do not let intent leak into mechanism: a reviewer should reconstruct the system's purpose from §4.4 and §5.1 alone.
|
|
67
|
+
- If the spec is for a workflow with reviewer gates plus final actions (for example PR/MR/review creation, release tagging, deployment, or publication), explicitly separate implementation/review acceptance from those post-approval final actions. The workflow design should tell reviewers/reducers to approve and stop the implementation loop when implementation and validation criteria are proven and only an explicitly authorized final action remains; carry that remainder as a next action/final-action field instead of another implementation iteration.
|
|
68
|
+
- If the spec is for a workflow or workflow prompt refactor, require local, action-oriented stage/reviewer/reducer prompts. A model stage sees its prompt, artifacts, tools, and reads — not the workflow graph's name or surrounding implementation details unless explicitly provided — so the spec should prefer instructions like "review the current code delta" or "create/update the review request" over labels such as "the create-PR workflow stage", "this Goal run", or "the Ralph reviewer" unless that name is user-visible context or materially changes behavior.
|
|
67
69
|
- Once the spec is generated ask questions one at a time OR in logical groups:
|
|
68
70
|
- Refer to section "## 9. Open Questions / Unresolved Issues", go through each question one by one, and use **contrastive clarification** (presenting 2-3 specific options with concrete tradeoffs) rather than open-ended questions. This means presenting interpretations like "(A) Option X — tradeoff Y" and "(B) Option Z — tradeoff W" instead of asking "what do you think about X?". Update the spec with the user's answers as you walk through the questions.
|
|
69
71
|
- Interview the user relentlessly about every aspect of this plan/spec until you reach a shared understanding with them. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer (i.e., **contrastive clarification**). Pay special attention to the **doors**: every disagreement about what a joint is, what a door promises, what it refuses, or where a dangerous effect is funneled is a question worth resolving with the user.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: impeccable
|
|
3
3
|
description: Use when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a frontend interface. Covers websites, landing pages, dashboards, product UI, app shells, components, forms, settings, onboarding, and empty states. Handles UX review, visual hierarchy, information architecture, cognitive load, accessibility, performance, responsive behavior, theming, anti-patterns, typography, fonts, spacing, layout, alignment, color, motion, micro-interactions, UX copy, error states, edge cases, i18n, and reusable design systems or tokens. Also use for bland designs that need to become bolder or more delightful, loud designs that should become quieter, live browser iteration on UI elements, or ambitious visual effects that should feel technically extraordinary. Not for backend-only or non-UI tasks.
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.9.1
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
Designs and iterates production-grade frontend interfaces. Real working code, committed design choices, exceptional craft.
|
|
@@ -10,10 +10,12 @@ Designs and iterates production-grade frontend interfaces. Real working code, co
|
|
|
10
10
|
|
|
11
11
|
You MUST do these steps before proceeding:
|
|
12
12
|
|
|
13
|
-
1.
|
|
14
|
-
2.
|
|
15
|
-
3.
|
|
16
|
-
4.
|
|
13
|
+
1. Run `node .agents/skills/impeccable/scripts/context.mjs` once per session; if the runtime shows this skill's loaded base directory, run `node <skill-base-dir>/scripts/context.mjs` instead. Keep cwd/workdir at the user's project, not the skill directory. If the request names or implies a file, route, or app inside a monorepo, infer the concrete path and append `--target <path>` to the same command. If you've already seen its output in this conversation, do not re-run it. The script either prints the project's PRODUCT.md (and DESIGN.md when present) as a markdown block, or tells you it's missing. Follow whatever it prints. **If it reports `NO_PRODUCT_MD`:** divert into `reference/init.md` first when the user invoked `init`, `teach`, `craft`, or `shape`, or when their wording clearly maps to one of those from-scratch build flows (for example: "build/create/make a landing page", "design a new app", or "shape a feature"). Captured product context is the point of those flows. For any other command, a scoped evaluate / refine / enhance / fix / iterate request against existing code, do **not** divert into init. The existing code is the context: proceed with the requested command, infer the register from the surface in focus (step 4), and offer `$impeccable init` once as a suggestion the user can take later. A missing PRODUCT.md must never block a scoped request. If the output ends with an `UPDATE_AVAILABLE` directive, follow it (ask the user once about updating, then continue). It never blocks the current task.
|
|
14
|
+
2. If the user invoked a sub-command (`craft`, `shape`, `audit`, `polish`, ...), you MUST read the command's reference next: **`reference/<command>.md`, or the native variant from the Commands table** (e.g. `reference/audit.native.md`) **when the project platform is native** (`ios` / `android` / `adaptive`, per the `context.mjs` directive). One file, not both. Non-optional. The reference defines the command's flow; without it you will skip steps the user expects.
|
|
15
|
+
3. Familiarize yourself with any existing design system, conventions, and components in the code. Read at least one project file (CSS / tokens / theme / a representative component or page). **Required even when you've loaded a sub-command reference in step 2.** Don't reinvent the wheel; use what's there when it works, branch out when the UX wins.
|
|
16
|
+
4. Read the matching register reference. **This is non-optional; skipping it produces generic output.** If the project is marketing, a landing page, a campaign, long-form content, or a portfolio (design IS the product), read `reference/brand.md`. If it is app UI, admin, a dashboard, or a tool (design SERVES the product), read `reference/product.md`. Pick by first match: (1) task cue ("landing page" vs "dashboard"); (2) surface in focus (the page, file, or route being worked on); (3) `register` field in PRODUCT.md.
|
|
17
|
+
5. **If PRODUCT.md's `## Platform` is `ios` or `android`**, also read `reference/<platform>.md` (HIG / Material 3 conventions). `adaptive` (cross-platform, ships both) reads both files. `web`, absent, or unrecognized: nothing extra to read. `context.mjs` prints the directive when one applies.
|
|
18
|
+
6. **If the project is brand-new (no existing CSS tokens / theme / committed brand colors found in step 3)**, run `node .agents/skills/impeccable/scripts/palette.mjs` to receive a brand seed color and composition guidance. This is the anchor for your primary brand color. Compose the rest of the palette (bg, surface, ink, accent, muted) around it per the script's instructions. Use OKLCH throughout. **Skip this step only if step 3 found committed brand colors in existing tokens; in that case identity-preservation wins.**
|
|
17
19
|
|
|
18
20
|
## Design guidance
|
|
19
21
|
|
|
@@ -92,6 +94,7 @@ Match-and-refuse. If you're about to write any of these, rewrite the element wit
|
|
|
92
94
|
- **`border-radius: 32px+` on cards / sections / inputs.** You over-round. Cards top out at 12–16px; full-pill is fine for tags/buttons. Picking 24/28/32/40px on a card is the codex tell; no brand wants "insanely rounded".
|
|
93
95
|
- **Hand-drawn / sketchy SVG illustrations.** Class names like `loose-sketch`, `*-sketch`, `doodle`, `wavy`; `feTurbulence` / `feDisplacementMap` "paper grain" filters; 5-to-30 path crude scenes meant to depict a tangible subject (an otter, a table-and-fork, an album cover). All of these read as amateurish, not whimsical. If you can't render the scene with real assets, ship no illustration. Don't attempt sketchy SVG as a fallback.
|
|
94
96
|
- **`repeating-linear-gradient(...)` stripe backgrounds.** Diagonal stripes in `body:before` or section backgrounds are pure codex decoration. Don't.
|
|
97
|
+
- **Decorative grid backgrounds.** Two-axis CSS grid overlays built from `linear-gradient(... 1px, transparent 1px)` plus `background-size` are a Codex tell unless the surface is an actual canvas, map, blueprint, or measurement tool. Use product structure, real artifacts, or a plain surface instead.
|
|
95
98
|
- **Meta-criticism copy.** Naming a concept then layering an ironic modifier, or staging a strawman to "correct" it. Make the specific claim instead.
|
|
96
99
|
|
|
97
100
|
### The AI slop test
|
|
@@ -113,7 +116,7 @@ If someone could look at this interface and say "AI made that" without doubt, it
|
|
|
113
116
|
| `document` | Build | Generate DESIGN.md from existing project code | [reference/document.md](reference/document.md) |
|
|
114
117
|
| `extract [target]` | Build | Pull reusable tokens and components into design system | [reference/extract.md](reference/extract.md) |
|
|
115
118
|
| `critique [target]` | Evaluate | UX design review with heuristic scoring | [reference/critique.md](reference/critique.md) |
|
|
116
|
-
| `audit [target]` | Evaluate | Technical quality checks (a11y, perf, responsive) | [reference/audit.md](reference/audit.md) |
|
|
119
|
+
| `audit [target]` | Evaluate | Technical quality checks (a11y, perf, responsive) | [reference/audit.md](reference/audit.md) · native: [reference/audit.native.md](reference/audit.native.md) |
|
|
117
120
|
| `polish [target]` | Refine | Final quality pass before shipping | [reference/polish.md](reference/polish.md) |
|
|
118
121
|
| `bolder [target]` | Refine | Amplify safe or bland designs | [reference/bolder.md](reference/bolder.md) |
|
|
119
122
|
| `quieter [target]` | Refine | Tone down aggressive or overstimulating designs | [reference/quieter.md](reference/quieter.md) |
|
|
@@ -127,7 +130,7 @@ If someone could look at this interface and say "AI made that" without doubt, it
|
|
|
127
130
|
| `delight [target]` | Enhance | Add personality and memorable touches | [reference/delight.md](reference/delight.md) |
|
|
128
131
|
| `overdrive [target]` | Enhance | Push past conventional limits | [reference/overdrive.md](reference/overdrive.md) |
|
|
129
132
|
| `clarify [target]` | Fix | Improve UX copy, labels, and error messages | [reference/clarify.md](reference/clarify.md) |
|
|
130
|
-
| `adapt [target]` | Fix | Adapt for different devices and screen sizes | [reference/adapt.md](reference/adapt.md) |
|
|
133
|
+
| `adapt [target]` | Fix | Adapt for different devices and screen sizes | [reference/adapt.md](reference/adapt.md) · native: [reference/adapt.native.md](reference/adapt.native.md) |
|
|
131
134
|
| `optimize [target]` | Fix | Diagnose and fix UI performance | [reference/optimize.md](reference/optimize.md) |
|
|
132
135
|
| `live` | Iterate | Visual variant mode: pick elements in the browser, generate alternatives | [reference/live.md](reference/live.md) |
|
|
133
136
|
|
|
@@ -135,26 +138,26 @@ Plus three management commands: `pin <command>`, `unpin <command>`, and `hooks <
|
|
|
135
138
|
|
|
136
139
|
### Routing rules
|
|
137
140
|
|
|
138
|
-
1. **No argument**: the user is asking "what should I do?" Make the menu context-aware instead of static. Setup has already run `context.mjs`; if that reported `NO_PRODUCT_MD`
|
|
141
|
+
1. **No argument**: the user is asking "what should I do?" Make the menu context-aware instead of static. Setup has already run `context.mjs`; if that reported `NO_PRODUCT_MD` the project has no captured context yet, so lead the menu with `$impeccable init` as the top recommendation (one line on why) and still show the rest below; don't silently jump into init. Otherwise run `node .agents/skills/impeccable/scripts/context-signals.mjs` once and read its JSON, then lead with the **2-3 highest-value next commands**, each with a one-line reason pulled from the signals, followed by the full menu (the table above, grouped by category). **Never auto-run a command; the recommendation is a suggestion the user confirms.**
|
|
139
142
|
|
|
140
143
|
Reason over the signals; there is no score to obey:
|
|
141
144
|
- `setup.hasDesign` false while `setup.hasCode` true → `document` (capture the visual system).
|
|
142
145
|
- `critique.latest` is `null` → the project has never been critiqued; for a set-up project with a real surface, offering `$impeccable critique <surface>` is a strong default.
|
|
143
146
|
- `critique.latest` with a low `score` or non-zero `p0` / `p1` → `polish` (it reads that snapshot as its backlog), or re-run `critique` if the snapshot looks stale.
|
|
144
147
|
- `git.changedFiles` pointing at one surface → scope `audit` or `polish` to those files specifically, naming them.
|
|
145
|
-
- `devServer.running` true → `live` is available for in-browser iteration; if false, don't lead with `live`.
|
|
148
|
+
- `devServer.running` true → `live` is available for in-browser iteration; if false, don't lead with `live`. **`live` and the bundled `detect.mjs` are web-only.** If `setup.platform` is `ios`, `android`, or `adaptive`, don't lead with either; the browser overlay and the HTML rule engine don't apply to native app code.
|
|
146
149
|
- Otherwise group by intent exactly as init's "Recommend starting points" step does (build new / improve what's there / iterate visually), tailored to `setup.register`.
|
|
147
150
|
|
|
148
|
-
**If `scan.targets` is non-empty
|
|
151
|
+
**If `scan.targets` is non-empty and `setup.platform` is not `ios`/`android`/`adaptive`, run `node .agents/skills/impeccable/scripts/detect.mjs --json <scan.targets joined by spaces>` once** (the bundled detector over local files: no network, no npx; it reads HTML/CSS, so skip it for native projects). `scan.via` tells you what they are: `git-changes` (the markup/style files in your dirty tree, the most relevant set), `source-dir` (e.g. `src`, `app`), `html`, or `root`. Fold the hits into your picks: many quality / contrast hits → `audit` or `polish`; a specific slop family → the matching command (gradient text or eyebrows → `quieter` / `typeset`, flat or gray palette → `colorize`, and so on). It's a real, current signal that beats guessing. If detect errors or the tree is large and slow, skip it and recommend the user run `audit` themselves; never block the suggestion on it.
|
|
149
152
|
|
|
150
153
|
Keep it to 2-3 pointed picks with the exact command to type. The menu stays the fallback; the recommendation is the lede.
|
|
151
|
-
2. **First word matches a command** (table above OR `pin` / `unpin` / `hooks`): load its reference file and follow its instructions. Everything after the command name is the target.
|
|
152
|
-
3. **First word doesn't match, but the intent clearly maps to one command** (e.g. "fix the spacing" → `layout`, "rewrite this error message" → `clarify`, "the colors feel flat" → `colorize`): load that command's reference and proceed as if invoked. If two commands could fit, ask once which.
|
|
154
|
+
2. **First word matches a command** (table above OR `pin` / `unpin` / `hooks`): load its reference file (on native platforms, the table's native variant; Setup step 2's one-file rule) and follow its instructions. Everything after the command name is the target.
|
|
155
|
+
3. **First word doesn't match, but the intent clearly maps to one command** (e.g. "fix the spacing" → `layout`, "rewrite this error message" → `clarify`, "the colors feel flat" → `colorize`): load that command's reference (same native-variant rule) and proceed as if invoked. If two commands could fit, ask once which.
|
|
153
156
|
4. **No clear command match**: general design invocation. Apply the setup steps, the General rules, and the loaded register reference, using the full argument as context.
|
|
154
157
|
|
|
155
158
|
Setup (context gathering, register) is already loaded by then; sub-commands don't re-invoke `$impeccable`.
|
|
156
159
|
|
|
157
|
-
If the first word is `craft`, setup still runs first, but [reference/craft.md](reference/craft.md) owns the rest of the flow.
|
|
160
|
+
If the first word is `craft` or `shape`, or routing rule 3 clearly maps the user's intent to either command, setup still runs first, but the matching reference ([reference/craft.md](reference/craft.md) or [reference/shape.md](reference/shape.md)) owns the rest of the flow. Both are from-scratch build flows: if setup invokes `init` as a blocker, finish init, refresh context, then resume the original command and target.
|
|
158
161
|
|
|
159
162
|
`teach` is a deprecated alias for `init`: if the user types it, load [reference/init.md](reference/init.md) and proceed as if they ran `init`.
|
|
160
163
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Adapt an existing design to a different context: another screen size, device, platform, or use case. The trap is treating adaptation as scaling. The job is rethinking the experience for the new context.
|
|
4
4
|
|
|
5
|
+
**Web only** (mobile web included). Native platforms (`ios` / `android` / `adaptive`) route to [adapt.native.md](adapt.native.md) instead; if the project is native, switch to it now.
|
|
5
6
|
|
|
6
7
|
---
|
|
7
8
|
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
> **Additional context needed**: target platforms/devices and usage contexts.
|
|
2
|
+
|
|
3
|
+
Adapt an existing **native** design (`ios` / `android` / `adaptive`) to a different context: another device class, orientation, platform, or origin. The trap is treating adaptation as scaling. The job is rethinking the experience for the new context, inside the platform conventions of [ios.md](ios.md) / [android.md](android.md); read the target platform's reference before planning if Setup hasn't already.
|
|
4
|
+
|
|
5
|
+
## Assess Adaptation Challenge
|
|
6
|
+
|
|
7
|
+
1. **Source context**: what was it designed for, and what assumptions did it make? (Phone-only? Portrait-only? One platform's idioms? A website?)
|
|
8
|
+
2. **Target context**: which device class (phone, tablet, foldable), orientation, platform, and usage posture (one-handed on the go vs two-handed at rest)?
|
|
9
|
+
3. **What breaks**: navigation that doesn't fit the target, layouts that stretch instead of restructure, gestures or controls that don't exist there?
|
|
10
|
+
|
|
11
|
+
## Adaptation Strategies
|
|
12
|
+
|
|
13
|
+
### Phone → Tablet (iPad / large screens)
|
|
14
|
+
|
|
15
|
+
- **Restructure, don't stretch.** A scaled-up phone UI on a tablet is the failure mode. Use size classes (iOS) / window size classes (Android) to switch structure.
|
|
16
|
+
- **Navigation changes shape**: tab bar stays or becomes a sidebar on iPad; Android navigation bar becomes a rail or drawer on expanded width.
|
|
17
|
+
- **Use the width**: split view / master-detail (list + detail side by side), multi-column grids, popovers where phones used sheets.
|
|
18
|
+
- **Multitasking is a size, not an edge case**: iPad Split View and Android multi-window can hand you a phone-width window on a tablet; size-class-driven layout handles both for free.
|
|
19
|
+
|
|
20
|
+
### Orientation & foldables
|
|
21
|
+
|
|
22
|
+
- Landscape restructures (side-by-side panes, repositioned controls); never clip or letterbox. Lock orientation only when the task truly demands it.
|
|
23
|
+
- Foldables (Android): react to posture and hinge via window size classes; test folded, unfolded, and tabletop.
|
|
24
|
+
|
|
25
|
+
### Platform → platform (iOS ↔ Android)
|
|
26
|
+
|
|
27
|
+
Translate idioms; never transplant them:
|
|
28
|
+
|
|
29
|
+
| iOS | Android |
|
|
30
|
+
|---|---|
|
|
31
|
+
| Tab bar | Navigation bar / rail / drawer |
|
|
32
|
+
| Edge-swipe back, back chevron | Predictive Back gesture / button |
|
|
33
|
+
| Switch, segmented control, system pickers | Material switch, chips, Material pickers |
|
|
34
|
+
| Action sheet | Bottom sheet / Material dialog |
|
|
35
|
+
| SF Symbols, SF Pro, Dynamic Type | Material Symbols, Roboto, sp scaling |
|
|
36
|
+
| Semantic system colors, materials | Material color roles, tonal elevation |
|
|
37
|
+
| System push/sheet transitions | Container transform, shared-axis, fade-through |
|
|
38
|
+
|
|
39
|
+
Rebuild navigation and controls in the target's vocabulary; carry over the brand's expressive layer (palette intent, type accent, motion personality) through the target's theming system.
|
|
40
|
+
|
|
41
|
+
### Web → native (porting a website or web app)
|
|
42
|
+
|
|
43
|
+
Reconform, don't reflow. Replace web navigation with the platform's model, HTML-shaped controls with platform controls, hover affordances with touch-first ones, and px-based type with Dynamic Type / sp. Then treat the result to the full platform reference; the slop test there is the acceptance bar.
|
|
44
|
+
|
|
45
|
+
## Implement & Verify
|
|
46
|
+
|
|
47
|
+
- Drive structure from **size classes / window size classes**, never from device-model checks.
|
|
48
|
+
- Respect safe areas and window insets in every new configuration (notch, hinge, status bar, keyboard).
|
|
49
|
+
- Test on simulators for breadth, then real hardware for truth: at least one phone and one tablet per shipped platform, both orientations, split-screen where supported.
|
|
50
|
+
|
|
51
|
+
When the adaptation feels native to each context, hand off to `$impeccable polish` for the final pass.
|
|
52
|
+
|
|
53
|
+
**NEVER**:
|
|
54
|
+
- Ship a stretched phone layout on a tablet
|
|
55
|
+
- Port one platform's controls or navigation onto the other
|
|
56
|
+
- Hide core functionality on smaller devices (if it matters, make it work)
|
|
57
|
+
- Lock orientation to dodge a layout bug
|
|
58
|
+
- Trust simulators alone (posture, gestures, and performance need hardware)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Android platform
|
|
2
|
+
|
|
3
|
+
For native Android apps: Jetpack Compose, Android Views, React Native, Expo, Flutter shipping to Android hardware.
|
|
4
|
+
|
|
5
|
+
On native, register narrows. Material Design 3 governs structure, navigation, and interaction whatever the register; brand expresses through Material's theming (color roles, type scale, shape, motion). A Material-everywhere cross-platform app that also ships to iPhone still owes iOS its OS guarantees on that hardware: safe-area insets, Reduce Motion, edge-swipe back.
|
|
6
|
+
|
|
7
|
+
## The Android slop test
|
|
8
|
+
|
|
9
|
+
Would a fluent Android user trust this app, or trip on off-spec components? The most common tell is an iOS app wearing Android's skin: a bottom-only navigation copied from iPhone, a back arrow that ignores the system Back gesture, Cupertino-shaped switches and dialogs. Material 3 is the rulebook; follow its components and theme the brand through it.
|
|
10
|
+
|
|
11
|
+
## Layout & structure
|
|
12
|
+
|
|
13
|
+
- **Material navigation, matched to size.** Navigation bar (bottom, 3–5 destinations) on compact width; navigation rail or drawer on expanded width. Never ship a phone bottom-bar untouched on a tablet.
|
|
14
|
+
- **System Back always works.** Honor the predictive Back gesture and Back button; never trap the user or hijack the gesture.
|
|
15
|
+
- **Edge-to-edge with window insets.** Apply the status bar, navigation bar, display cutout, and IME insets so content never hides behind system bars or the keyboard.
|
|
16
|
+
- **Top app bar for screen context**; pair with a FAB when the screen has a single primary action.
|
|
17
|
+
|
|
18
|
+
## Touch targets
|
|
19
|
+
|
|
20
|
+
- **48×48 dp minimum** for every touch target, with at least 8 dp between them.
|
|
21
|
+
|
|
22
|
+
## Typography
|
|
23
|
+
|
|
24
|
+
- **Material type scale.** Display, Headline, Title, Body, Label roles (large/medium/small each). Map text to roles; never hand-pick sizes per screen.
|
|
25
|
+
- **Roboto is the system face**; theme a brand face in through the type scale, keeping body, labels, and controls legible and consistent.
|
|
26
|
+
- **sp units, never fixed px**, so type follows the system font-size setting.
|
|
27
|
+
|
|
28
|
+
## Color & theming
|
|
29
|
+
|
|
30
|
+
- **Material color roles** (primary, on-primary, surface, surface-variant, secondary-container, outline, error). Role tokens resolve light/dark and contrast variants automatically; raw hex breaks there.
|
|
31
|
+
- **Dynamic Color (Material You)** where it fits: derive the scheme from the user's wallpaper on Android 12+, with a static fallback.
|
|
32
|
+
- **Dark theme is a first-class scheme.** Design and test it; never a quick invert.
|
|
33
|
+
- **Tonal elevation.** Convey elevation through the standard surface tonal levels (plus shadow where appropriate); no arbitrary drop shadows.
|
|
34
|
+
|
|
35
|
+
## Components & motion
|
|
36
|
+
|
|
37
|
+
- **Material components.** Buttons (filled / tonal / outlined / text), FAB, switches, chips, snackbars, bottom sheets, Material dialogs, navigation bar/rail/drawer. Never port iOS controls or invent equivalents.
|
|
38
|
+
- **One FAB, one primary action.** Never stack FABs or spend one on a secondary task.
|
|
39
|
+
- **Snackbars for transient feedback** (actionable when useful, never a toast for that); dialogs only for decisions that must interrupt.
|
|
40
|
+
- **Material motion patterns.** Container transform, shared-axis, fade-through, with standard easing and durations; honor the system Remove animations setting with a crossfade or instant cut.
|
|
@@ -10,6 +10,8 @@ Brand: motion is part of the voice; one well-rehearsed entrance beats scattered
|
|
|
10
10
|
|
|
11
11
|
Product: 150–250 ms on most transitions. Motion conveys state: feedback, reveal, loading, transitions between views. No page-load choreography; users are in a task and won't wait for it.
|
|
12
12
|
|
|
13
|
+
Native (`ios` / `android` / `adaptive`): implementation follows the Motion section of [ios.md](ios.md) / [android.md](android.md) (read it first if Setup hasn't already): system transitions and OS Reduce Motion, never the web tooling below.
|
|
14
|
+
|
|
13
15
|
---
|
|
14
16
|
|
|
15
17
|
## Assess Animation Opportunities
|
|
@@ -2,6 +2,8 @@ Run systematic **technical** quality checks and generate a comprehensive report.
|
|
|
2
2
|
|
|
3
3
|
This is a code-level audit, not a design critique. Check what's measurable and verifiable in the implementation.
|
|
4
4
|
|
|
5
|
+
**Web only.** Native platforms (`ios` / `android` / `adaptive`) route to [audit.native.md](audit.native.md) instead; if the project is native, switch to it now.
|
|
6
|
+
|
|
5
7
|
## Diagnostic Scan
|
|
6
8
|
|
|
7
9
|
Run comprehensive checks across 5 dimensions. Score each dimension 0-4 using the criteria below.
|