@bastani/atomic 0.8.23 → 0.8.24-alpha.1

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.
Files changed (70) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/builtin/intercom/CHANGELOG.md +7 -0
  3. package/dist/builtin/intercom/package.json +1 -1
  4. package/dist/builtin/mcp/CHANGELOG.md +7 -0
  5. package/dist/builtin/mcp/package.json +1 -1
  6. package/dist/builtin/subagents/CHANGELOG.md +22 -0
  7. package/dist/builtin/subagents/README.md +16 -0
  8. package/dist/builtin/subagents/agents/code-simplifier.md +2 -3
  9. package/dist/builtin/subagents/agents/codebase-analyzer.md +2 -3
  10. package/dist/builtin/subagents/agents/codebase-locator.md +2 -3
  11. package/dist/builtin/subagents/agents/codebase-online-researcher.md +2 -3
  12. package/dist/builtin/subagents/agents/codebase-pattern-finder.md +2 -3
  13. package/dist/builtin/subagents/agents/codebase-research-analyzer.md +2 -3
  14. package/dist/builtin/subagents/agents/codebase-research-locator.md +2 -3
  15. package/dist/builtin/subagents/agents/debugger.md +2 -3
  16. package/dist/builtin/subagents/package.json +1 -1
  17. package/dist/builtin/subagents/skills/subagent/SKILL.md +6 -0
  18. package/dist/builtin/subagents/src/agents/agent-serializer.ts +3 -0
  19. package/dist/builtin/subagents/src/agents/agents.ts +20 -1
  20. package/dist/builtin/subagents/src/runs/background/async-execution.ts +1 -1
  21. package/dist/builtin/subagents/src/runs/background/subagent-runner.ts +3 -1
  22. package/dist/builtin/subagents/src/runs/foreground/chain-clarify.ts +7 -7
  23. package/dist/builtin/subagents/src/runs/foreground/execution.ts +5 -1
  24. package/dist/builtin/subagents/src/runs/shared/model-fallback.ts +9 -10
  25. package/dist/builtin/subagents/src/shared/types.ts +1 -0
  26. package/dist/builtin/web-access/CHANGELOG.md +7 -0
  27. package/dist/builtin/web-access/package.json +1 -1
  28. package/dist/builtin/workflows/CHANGELOG.md +25 -0
  29. package/dist/builtin/workflows/README.md +38 -41
  30. package/dist/builtin/workflows/builtin/deep-research-codebase.d.ts +35 -0
  31. package/dist/builtin/workflows/builtin/deep-research-codebase.ts +11 -14
  32. package/dist/builtin/workflows/builtin/goal.d.ts +46 -0
  33. package/dist/builtin/workflows/builtin/goal.ts +10 -12
  34. package/dist/builtin/workflows/builtin/index.d.ts +136 -0
  35. package/dist/builtin/workflows/builtin/open-claude-design.d.ts +44 -0
  36. package/dist/builtin/workflows/builtin/open-claude-design.ts +19 -20
  37. package/dist/builtin/workflows/builtin/ralph.d.ts +36 -0
  38. package/dist/builtin/workflows/builtin/ralph.ts +20 -24
  39. package/dist/builtin/workflows/package.json +15 -5
  40. package/dist/builtin/workflows/src/authoring.ts +410 -0
  41. package/dist/builtin/workflows/src/extension/workflow-module-loader.ts +6 -12
  42. package/dist/builtin/workflows/src/extension/workflow-schema.ts +3 -2
  43. package/dist/builtin/workflows/src/index.ts +0 -5
  44. package/dist/builtin/workflows/src/runs/foreground/executor.ts +23 -9
  45. package/dist/builtin/workflows/src/runs/foreground/stage-runner.ts +33 -5
  46. package/dist/builtin/workflows/src/runs/shared/model-fallback.ts +61 -10
  47. package/dist/builtin/workflows/src/sdk-surface.ts +12 -2
  48. package/dist/builtin/workflows/src/shared/authoring-contract.ts +660 -0
  49. package/dist/builtin/workflows/src/shared/render-inputs-schema.ts +1 -1
  50. package/dist/builtin/workflows/src/shared/types.ts +65 -350
  51. package/dist/builtin/workflows/src/workflows/define-workflow.ts +59 -44
  52. package/dist/core/atomic-guide-command.d.ts.map +1 -1
  53. package/dist/core/atomic-guide-command.js +1 -1
  54. package/dist/core/atomic-guide-command.js.map +1 -1
  55. package/dist/modes/interactive/components/chat-message-renderer.d.ts +1 -0
  56. package/dist/modes/interactive/components/chat-message-renderer.d.ts.map +1 -1
  57. package/dist/modes/interactive/components/chat-message-renderer.js +13 -1
  58. package/dist/modes/interactive/components/chat-message-renderer.js.map +1 -1
  59. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  60. package/dist/modes/interactive/interactive-mode.js +1 -1
  61. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  62. package/dist/utils/changelog.d.ts.map +1 -1
  63. package/dist/utils/changelog.js +23 -16
  64. package/dist/utils/changelog.js.map +1 -1
  65. package/docs/extensions.md +2 -2
  66. package/docs/packages.md +8 -4
  67. package/docs/subagents.md +30 -0
  68. package/docs/workflows.md +39 -21
  69. package/package.json +1 -1
  70. package/dist/builtin/workflows/src/runs/shared/workflow-runner.ts +0 -335
@@ -2,7 +2,7 @@
2
2
 
3
3
  <p align="center">
4
4
  <b>Turn coding agents into reliable engineering workflows.</b><br>
5
- An open-source pi extension: install it, author workflows in TypeScript, run them from chat.
5
+ An open-source Atomic workflow extension: install it, author workflows in TypeScript, run them from chat.
6
6
  </p>
7
7
 
8
8
  <p align="center">
@@ -507,49 +507,28 @@ Press **F2** while a workflow is running to open the DAG overlay for the active
507
507
 
508
508
  ### Execution model
509
509
 
510
- `@bastani/workflows` follows pi's package/extension model: pi loads `src/extension/index.ts` from the package `pi.extensions` manifest, then the extension registers the `workflow` tool, `/workflow` slash command, renderers, widget, and lifecycle hooks in-process.
510
+ `@bastani/workflows` follows Atomic's package/extension model: Atomic loads `src/extension/index.ts` from the package `atomic.extensions` manifest, with legacy `pi.extensions` still supported, then the extension registers the `workflow` tool, `/workflow` slash command, renderers, widget, and lifecycle hooks in-process.
511
511
 
512
512
  For interactive use, run workflows through `/workflow <name> [key=value ...]` or let the LLM call the `workflow` tool. In non-interactive (`-p` / `--print` / `--mode json`) sessions, `/workflow <name> key=value` and LLM calls to the `workflow` tool remain available for deterministic workflows. The input picker and graph picker are disabled, top-level `ctx.ui.*` is unavailable, and stage child sessions exclude `ask_user_question`. Named workflow dispatch waits for the terminal run snapshot before returning.
513
513
 
514
514
  Because human input is runtime-only and workflows no longer carry a declaration-time HIL marker, headless dispatch does not reject a workflow just because its source contains `ctx.ui.*`. If you copy the HIL example above into a non-interactive session, it can pass dispatch and then fail when execution reaches the prompt with an error such as `atomic-workflows: HIL ctx.ui.confirm is unavailable because Atomic runtime did not provide a UI adapter` (the primitive name varies). Run those workflows interactively, or guard/remove runtime `ctx.ui.*` calls before using headless mode.
515
515
 
516
- For library or scripted use, you can also call the explicit programmatic runner:
516
+ For library or package authoring, define reusable workflows with the builder and export the compiled definition. Hand-written objects with `__piWorkflow: true` are rejected by discovery and composition; `defineWorkflow(...).compile()` is the public authoring surface. Standalone TypeScript workflow packages can import `defineWorkflow` and `Type` from `@bastani/workflows` directly with no local `.d.ts` file or `declare module` shim. The former imperative `runWorkflow` object-form API is removed; use compiled workflow definitions with the exported `run()` / registry helpers for programmatic execution.
517
517
 
518
518
  ```ts
519
- import { runWorkflow, type WorkflowOptions } from "@bastani/workflows";
520
-
521
- const definition = {
522
- mode: "workflow",
523
- workflow: "deep-research-codebase",
524
- inputs: {
525
- prompt: "Investigate the auth module",
526
- max_partitions: 6,
527
- max_concurrency: 4,
528
- },
529
- } as const;
530
-
531
- const options: WorkflowOptions = {};
532
-
533
- await runWorkflow(definition, options);
534
-
535
- await runWorkflow({
536
- mode: "parallel",
537
- task: "Audit auth changes",
538
- tasks: [
539
- { name: "security", task: "Review security risks" },
540
- { name: "runtime", task: "Review runtime risks" },
541
- ],
542
- concurrency: 2,
543
- reads: ["research/context.md"],
544
- output: "research/auth-audit.md",
545
- outputMode: "file-only",
546
- worktree: false,
547
- maxOutput: { lines: 2000 },
548
- artifacts: true,
549
- });
519
+ import { defineWorkflow, Type } from "@bastani/workflows";
520
+
521
+ export default defineWorkflow("audit-auth")
522
+ .input("prompt", Type.String({ default: "Investigate the auth module" }))
523
+ .output("summary", Type.String())
524
+ .run(async (ctx) => {
525
+ const result = await ctx.task("audit", { prompt: ctx.inputs.prompt });
526
+ return { summary: result.text };
527
+ })
528
+ .compile();
550
529
  ```
551
530
 
552
- The programmatic definition object mirrors the workflow tool: named workflow runs, single-task runs, parallel `tasks`, and mixed `chain` runs accept the same direct options (`reads`, `output`, `outputMode`, `worktree`, `gitWorktreeDir`, `baseBranch`, `maxOutput`, `artifacts`, `concurrency`, `failFast`, and stage/session options such as `cwd`, `agentDir`, `model`, `tools`, `context`, and `sessionDir`). `chainDir` is chain-only: it provides the shared artifact directory for chain reads, outputs, and worktree diffs.
531
+ The `workflow` tool still supports direct one-off `task`, `tasks`, and `chain` modes for agent-initiated orchestration. Those direct modes are runtime tool inputs, not workflow definition files.
553
532
 
554
533
  For large handoffs, prefer artifact paths over prompt injection: write stage output to `output`, set `outputMode: "file-only"` when the parent only needs the path, pass paths with `reads`, and instruct downstream agents explicitly with wording like `Read the file at <path>...`. Reserve `previous`/`{previous}` for compact summaries; avoid passing full session histories, all prior stage outputs, or every review round directly into the next model prompt. In review loops, save JSON review artifacts and pass only the latest review-round artifact, with a ledger or index file linking older rounds when needed.
555
534
 
@@ -636,13 +615,15 @@ Child workflow outputs: `output_type`, `design_system`, `artifact`, `handoff`, `
636
615
 
637
616
  ## Custom workflow discovery
638
617
 
639
- `@bastani/workflows` automatically discovers workflow files from three locations:
618
+ `@bastani/workflows` discovers workflow files from project-local paths, user-global paths, configured workflow paths, installed Atomic package resources, and bundled workflows:
640
619
 
641
- | Location | Scope | Example path |
642
- | --------------------------------- | ---------- | ------------------------------------------ |
643
- | `.atomic/workflows/*.ts` | Project | `.atomic/workflows/my-workflow.ts` |
644
- | `~/.atomic/agent/workflows/*.ts` | User | `~/.atomic/agent/workflows/my-workflow.ts` |
645
- | `workflows.<name>.path` in config | Configured | see config example below |
620
+ | Location | Scope | Example path |
621
+ | ---------------------------------- | ---------- | -------------------------------------------------------------------------------------- |
622
+ | `.atomic/workflows/*.ts` | Project | `.atomic/workflows/my-workflow.ts` |
623
+ | `~/.atomic/agent/workflows/*.ts` | User | `~/.atomic/agent/workflows/my-workflow.ts` |
624
+ | `workflows.<name>.path` in config | Configured | see config example below |
625
+ | Installed Atomic package workflows | Package | `atomic.workflows`, legacy `pi.workflows`, or `workflows/` / `workflow/` directories |
626
+ | Bundled workflows | Built-in | shipped with `@bastani/workflows` |
646
627
 
647
628
  Config-based discovery (`~/.atomic/agent/extensions/workflow/config.json` or `.atomic/extensions/workflow/config.json`):
648
629
 
@@ -667,3 +648,19 @@ MIT — see [LICENSE](LICENSE).
667
648
  ---
668
649
 
669
650
  **Development:** see [DEV_SETUP.md](../../DEV_SETUP.md) for setup, testing, layout, and the local-extension dev loop.
651
+
652
+ ## Model reasoning levels
653
+
654
+ Workflow stage `model` and `fallbackModels` strings support suffix-first reasoning levels using the `model_name:thinking_effort` syntax: append `:off`, `:minimal`, `:low`, `:medium`, `:high`, or `:xhigh` to the model id (for example `openai/gpt-5:high` or `anthropic/claude-haiku-4-5:off`). A suffix on a fallback candidate controls only that retry attempt, so fallback chains can mix reasoning levels.
655
+
656
+ The older `thinkingLevel` stage option remains accepted as a deprecated default for candidates without a suffix. If both are present, the model suffix wins. Migrate legacy `thinkingLevel` stages by folding the effort into the model strings:
657
+
658
+ ```diff
659
+ - model: "openai/gpt-5.5",
660
+ - fallbackModels: ["anthropic/claude-opus-4-8"],
661
+ - thinkingLevel: "high",
662
+ + model: "openai/gpt-5.5:high",
663
+ + fallbackModels: ["anthropic/claude-opus-4-8:high"],
664
+ ```
665
+
666
+ `fallbackThinkingLevels` is an optional compatibility helper aligned by index to `fallbackModels`; it is used only for fallback entries that do not already include a suffix.
@@ -0,0 +1,35 @@
1
+ import type { WorkflowDefinition, WorkflowInputValues, WorkflowOutputValues } from "../src/authoring.js";
2
+
3
+ export type DeepResearchCodebaseWorkflowInputs = WorkflowInputValues & {
4
+ readonly prompt: string;
5
+ readonly max_partitions: number;
6
+ readonly max_concurrency: number;
7
+ };
8
+
9
+ export type DeepResearchCodebaseWorkflowRunInputs = WorkflowInputValues & {
10
+ readonly prompt: string;
11
+ readonly max_partitions?: number;
12
+ readonly max_concurrency?: number;
13
+ };
14
+
15
+ export type DeepResearchCodebaseWorkflowOutputs = WorkflowOutputValues & {
16
+ readonly result?: string;
17
+ readonly findings?: string;
18
+ readonly research_doc_path?: string;
19
+ readonly artifact_dir?: string;
20
+ readonly manifest_path?: string;
21
+ readonly partitions?: string[];
22
+ readonly explorer_count?: number;
23
+ readonly specialist_count?: number;
24
+ readonly max_concurrency?: number;
25
+ readonly history?: string;
26
+ };
27
+
28
+ export type DeepResearchCodebaseWorkflowDefinition = WorkflowDefinition<
29
+ DeepResearchCodebaseWorkflowInputs,
30
+ DeepResearchCodebaseWorkflowOutputs,
31
+ DeepResearchCodebaseWorkflowRunInputs
32
+ >;
33
+
34
+ declare const workflow: DeepResearchCodebaseWorkflowDefinition;
35
+ export default workflow;
@@ -15,7 +15,6 @@ import { defineWorkflow } from "../src/workflows/define-workflow.js";
15
15
  import { Type } from "typebox";
16
16
  import type {
17
17
  WorkflowOutputMode,
18
- WorkflowOutputValues,
19
18
  WorkflowTaskResult,
20
19
  WorkflowTaskStep,
21
20
  } from "../src/shared/types.js";
@@ -30,7 +29,7 @@ const GIT_LS_FILES_TIMEOUT_MS = 2_000;
30
29
 
31
30
  type PromptSection = readonly [tag: string, content: string];
32
31
 
33
- interface DeepResearchCodebaseResult extends WorkflowOutputValues {
32
+ interface DeepResearchCodebaseResult {
34
33
  readonly result: string;
35
34
  readonly findings: string;
36
35
  readonly research_doc_path: string;
@@ -413,26 +412,24 @@ export default defineWorkflow("deep-research-codebase")
413
412
  );
414
413
 
415
414
  const plannerModelConfig = {
416
- model: "openai/gpt-5.5",
415
+ model: "openai/gpt-5.5:xhigh",
417
416
  fallbackModels: [
418
- "openai-codex/gpt-5.5",
419
- "github-copilot/gpt-5.5",
420
- "anthropic/claude-opus-4-8",
421
- "github-copilot/claude-opus-4.7",
417
+ "openai-codex/gpt-5.5:xhigh",
418
+ "github-copilot/gpt-5.5:xhigh",
419
+ "anthropic/claude-opus-4-8:xhigh",
420
+ "github-copilot/claude-opus-4.8:medium",
422
421
  ],
423
- thinkingLevel: "high" as const,
424
422
  excludedTools: ["ask_user_question"],
425
423
  };
426
424
 
427
425
  const explorerModelConfig = {
428
- model: "openai/gpt-5.4-mini",
426
+ model: "openai/gpt-5.4-mini:low",
429
427
  fallbackModels: [
430
- "openai-codex/gpt-5.4-mini",
431
- "github-copilot/gpt-5.4-mini",
432
- "anthropic/claude-haiku-4-5",
433
- "github-copilot/claude-haiku-4.5",
428
+ "openai-codex/gpt-5.4-mini:low",
429
+ "github-copilot/gpt-5.4-mini:low",
430
+ "anthropic/claude-haiku-4-5:low",
431
+ "github-copilot/claude-haiku-4.5:low",
434
432
  ],
435
- thinkingLevel: "low" as const,
436
433
  excludedTools: ["ask_user_question"],
437
434
  };
438
435
 
@@ -0,0 +1,46 @@
1
+ import type { WorkflowDefinition, WorkflowInputValues, WorkflowOutputValues } from "../src/authoring.js";
2
+
3
+ export type GoalWorkflowStatus = "active" | "complete" | "blocked" | "needs_human";
4
+
5
+ export type GoalWorkflowReceipt = {
6
+ readonly turn: number;
7
+ readonly stage: string;
8
+ readonly artifact_path: string;
9
+ readonly summary: string;
10
+ };
11
+
12
+ export type GoalWorkflowInputs = WorkflowInputValues & {
13
+ readonly objective: string;
14
+ readonly max_turns: number;
15
+ readonly base_branch: string;
16
+ };
17
+
18
+ export type GoalWorkflowRunInputs = WorkflowInputValues & {
19
+ readonly objective: string;
20
+ readonly max_turns?: number;
21
+ readonly base_branch?: string;
22
+ };
23
+
24
+ export type GoalWorkflowOutputs = WorkflowOutputValues & {
25
+ readonly result?: string;
26
+ readonly status?: GoalWorkflowStatus;
27
+ readonly approved?: boolean;
28
+ readonly goal_id?: string;
29
+ readonly objective?: string;
30
+ readonly ledger_path?: string;
31
+ readonly turns_completed?: number;
32
+ readonly iterations_completed?: number;
33
+ readonly receipts?: GoalWorkflowReceipt[];
34
+ readonly remaining_work?: string;
35
+ readonly review_report?: string;
36
+ readonly review_report_path?: string;
37
+ };
38
+
39
+ export type GoalWorkflowDefinition = WorkflowDefinition<
40
+ GoalWorkflowInputs,
41
+ GoalWorkflowOutputs,
42
+ GoalWorkflowRunInputs
43
+ >;
44
+
45
+ declare const workflow: GoalWorkflowDefinition;
46
+ export default workflow;
@@ -1026,26 +1026,24 @@ export default defineWorkflow("goal")
1026
1026
  const { ledger, ledgerPath, artifactDir } = await createGoalLedger(objective);
1027
1027
 
1028
1028
  const workerModelConfig = {
1029
- model: "openai/gpt-5.5",
1029
+ model: "openai/gpt-5.5:medium",
1030
1030
  fallbackModels: [
1031
- "openai-codex/gpt-5.5",
1032
- "github-copilot/gpt-5.5",
1033
- "anthropic/claude-sonnet-4-7",
1034
- "github-copilot/claude-sonnet-4.7",
1031
+ "openai-codex/gpt-5.5:medium",
1032
+ "github-copilot/gpt-5.5:medium",
1033
+ "anthropic/claude-sonnet-4-8:medium",
1034
+ "github-copilot/claude-sonnet-4.8:medium",
1035
1035
  ],
1036
- thinkingLevel: "low" as const,
1037
1036
  tools: goalRunnerTools,
1038
1037
  };
1039
1038
 
1040
1039
  const reviewerModelConfig = {
1041
- model: "openai/gpt-5.5",
1040
+ model: "openai/gpt-5.5:xhigh",
1042
1041
  fallbackModels: [
1043
- "openai-codex/gpt-5.5",
1044
- "github-copilot/gpt-5.5",
1045
- "anthropic/claude-sonnet-4-7",
1046
- "github-copilot/claude-sonnet-4.7",
1042
+ "openai-codex/gpt-5.5:xhigh",
1043
+ "github-copilot/gpt-5.5:xhigh",
1044
+ "anthropic/claude-sonnet-4-8:xhigh",
1045
+ "github-copilot/claude-sonnet-4.8:medium",
1047
1046
  ],
1048
- thinkingLevel: "high" as const,
1049
1047
  tools: [...goalRunnerTools, reviewDecisionTool.name],
1050
1048
  customTools: [reviewDecisionTool],
1051
1049
  };
@@ -0,0 +1,136 @@
1
+ import type { WorkflowDefinition, WorkflowInputValues, WorkflowOutputValues } from "../src/authoring.js";
2
+
3
+ export type DeepResearchCodebaseWorkflowInputs = WorkflowInputValues & {
4
+ readonly prompt: string;
5
+ readonly max_partitions: number;
6
+ readonly max_concurrency: number;
7
+ };
8
+ export type DeepResearchCodebaseWorkflowRunInputs = WorkflowInputValues & {
9
+ readonly prompt: string;
10
+ readonly max_partitions?: number;
11
+ readonly max_concurrency?: number;
12
+ };
13
+ export type DeepResearchCodebaseWorkflowOutputs = WorkflowOutputValues & {
14
+ readonly result?: string;
15
+ readonly findings?: string;
16
+ readonly research_doc_path?: string;
17
+ readonly artifact_dir?: string;
18
+ readonly manifest_path?: string;
19
+ readonly partitions?: string[];
20
+ readonly explorer_count?: number;
21
+ readonly specialist_count?: number;
22
+ readonly max_concurrency?: number;
23
+ readonly history?: string;
24
+ };
25
+ export type DeepResearchCodebaseWorkflowDefinition = WorkflowDefinition<
26
+ DeepResearchCodebaseWorkflowInputs,
27
+ DeepResearchCodebaseWorkflowOutputs,
28
+ DeepResearchCodebaseWorkflowRunInputs
29
+ >;
30
+
31
+ export type GoalWorkflowStatus = "active" | "complete" | "blocked" | "needs_human";
32
+ export type GoalWorkflowReceipt = {
33
+ readonly turn: number;
34
+ readonly stage: string;
35
+ readonly artifact_path: string;
36
+ readonly summary: string;
37
+ };
38
+ export type GoalWorkflowInputs = WorkflowInputValues & {
39
+ readonly objective: string;
40
+ readonly max_turns: number;
41
+ readonly base_branch: string;
42
+ };
43
+ export type GoalWorkflowRunInputs = WorkflowInputValues & {
44
+ readonly objective: string;
45
+ readonly max_turns?: number;
46
+ readonly base_branch?: string;
47
+ };
48
+ export type GoalWorkflowOutputs = WorkflowOutputValues & {
49
+ readonly result?: string;
50
+ readonly status?: GoalWorkflowStatus;
51
+ readonly approved?: boolean;
52
+ readonly goal_id?: string;
53
+ readonly objective?: string;
54
+ readonly ledger_path?: string;
55
+ readonly turns_completed?: number;
56
+ readonly iterations_completed?: number;
57
+ readonly receipts?: GoalWorkflowReceipt[];
58
+ readonly remaining_work?: string;
59
+ readonly review_report?: string;
60
+ readonly review_report_path?: string;
61
+ };
62
+ export type GoalWorkflowDefinition = WorkflowDefinition<
63
+ GoalWorkflowInputs,
64
+ GoalWorkflowOutputs,
65
+ GoalWorkflowRunInputs
66
+ >;
67
+
68
+ export type RalphWorkflowInputs = WorkflowInputValues & {
69
+ readonly prompt: string;
70
+ readonly max_loops: number;
71
+ readonly base_branch: string;
72
+ readonly git_worktree_dir: string;
73
+ };
74
+ export type RalphWorkflowRunInputs = WorkflowInputValues & {
75
+ readonly prompt: string;
76
+ readonly max_loops?: number;
77
+ readonly base_branch?: string;
78
+ readonly git_worktree_dir?: string;
79
+ };
80
+ export type RalphWorkflowOutputs = WorkflowOutputValues & {
81
+ readonly result?: string;
82
+ readonly plan?: string;
83
+ readonly plan_path?: string;
84
+ readonly implementation_notes_path?: string;
85
+ readonly pr_report?: string;
86
+ readonly approved?: boolean;
87
+ readonly iterations_completed?: number;
88
+ readonly review_report?: string;
89
+ readonly review_report_path?: string;
90
+ };
91
+ export type RalphWorkflowDefinition = WorkflowDefinition<
92
+ RalphWorkflowInputs,
93
+ RalphWorkflowOutputs,
94
+ RalphWorkflowRunInputs
95
+ >;
96
+
97
+ export type OpenClaudeDesignOutputType = "prototype" | "wireframe" | "page" | "component" | "theme" | "tokens";
98
+ export type OpenClaudeDesignWorkflowInputs = WorkflowInputValues & {
99
+ readonly prompt: string;
100
+ readonly reference?: string;
101
+ readonly output_type: OpenClaudeDesignOutputType;
102
+ readonly design_system?: string;
103
+ readonly max_refinements: number;
104
+ };
105
+ export type OpenClaudeDesignWorkflowRunInputs = WorkflowInputValues & {
106
+ readonly prompt: string;
107
+ readonly reference?: string;
108
+ readonly output_type?: OpenClaudeDesignOutputType;
109
+ readonly design_system?: string;
110
+ readonly max_refinements?: number;
111
+ };
112
+ export type OpenClaudeDesignWorkflowOutputs = WorkflowOutputValues & {
113
+ readonly output_type?: string;
114
+ readonly design_system?: string;
115
+ readonly artifact?: string;
116
+ readonly handoff?: string;
117
+ readonly approved_for_export?: boolean;
118
+ readonly refinements_completed?: number;
119
+ readonly import_context?: string;
120
+ readonly run_id?: string;
121
+ readonly artifact_dir?: string;
122
+ readonly preview_path?: string;
123
+ readonly preview_file_url?: string;
124
+ readonly spec_path?: string;
125
+ readonly spec_file_url?: string;
126
+ };
127
+ export type OpenClaudeDesignWorkflowDefinition = WorkflowDefinition<
128
+ OpenClaudeDesignWorkflowInputs,
129
+ OpenClaudeDesignWorkflowOutputs,
130
+ OpenClaudeDesignWorkflowRunInputs
131
+ >;
132
+
133
+ export declare const deepResearchCodebase: DeepResearchCodebaseWorkflowDefinition;
134
+ export declare const goal: GoalWorkflowDefinition;
135
+ export declare const ralph: RalphWorkflowDefinition;
136
+ export declare const openClaudeDesign: OpenClaudeDesignWorkflowDefinition;
@@ -0,0 +1,44 @@
1
+ import type { WorkflowDefinition, WorkflowInputValues, WorkflowOutputValues } from "../src/authoring.js";
2
+
3
+ export type OpenClaudeDesignOutputType = "prototype" | "wireframe" | "page" | "component" | "theme" | "tokens";
4
+
5
+ export type OpenClaudeDesignWorkflowInputs = WorkflowInputValues & {
6
+ readonly prompt: string;
7
+ readonly reference?: string;
8
+ readonly output_type: OpenClaudeDesignOutputType;
9
+ readonly design_system?: string;
10
+ readonly max_refinements: number;
11
+ };
12
+
13
+ export type OpenClaudeDesignWorkflowRunInputs = WorkflowInputValues & {
14
+ readonly prompt: string;
15
+ readonly reference?: string;
16
+ readonly output_type?: OpenClaudeDesignOutputType;
17
+ readonly design_system?: string;
18
+ readonly max_refinements?: number;
19
+ };
20
+
21
+ export type OpenClaudeDesignWorkflowOutputs = WorkflowOutputValues & {
22
+ readonly output_type?: string;
23
+ readonly design_system?: string;
24
+ readonly artifact?: string;
25
+ readonly handoff?: string;
26
+ readonly approved_for_export?: boolean;
27
+ readonly refinements_completed?: number;
28
+ readonly import_context?: string;
29
+ readonly run_id?: string;
30
+ readonly artifact_dir?: string;
31
+ readonly preview_path?: string;
32
+ readonly preview_file_url?: string;
33
+ readonly spec_path?: string;
34
+ readonly spec_file_url?: string;
35
+ };
36
+
37
+ export type OpenClaudeDesignWorkflowDefinition = WorkflowDefinition<
38
+ OpenClaudeDesignWorkflowInputs,
39
+ OpenClaudeDesignWorkflowOutputs,
40
+ OpenClaudeDesignWorkflowRunInputs
41
+ >;
42
+
43
+ declare const workflow: OpenClaudeDesignWorkflowDefinition;
44
+ export default workflow;
@@ -226,13 +226,12 @@ export default defineWorkflow("open-claude-design")
226
226
  const specFileUrl = `file://${specPath}`;
227
227
 
228
228
  const designModelConfig = {
229
- model: "anthropic/claude-opus-4-8",
229
+ model: "anthropic/claude-opus-4-8:xhigh",
230
230
  fallbackModels: [
231
- "github-copilot/claude-opus-4.7",
232
- "anthropic/claude-sonnet-4-6",
233
- "github-copilot/claude-sonnet-4.6",
231
+ "github-copilot/claude-opus-4.8:medium",
232
+ "anthropic/claude-sonnet-4-6:xhigh",
233
+ "github-copilot/claude-sonnet-4.6:medium",
234
234
  ],
235
- thinkingLevel: "high" as const,
236
235
  };
237
236
 
238
237
  let designSystem: string;
@@ -243,7 +242,7 @@ export default defineWorkflow("open-claude-design")
243
242
  prompt: taggedPrompt([
244
243
  [
245
244
  "role",
246
- "You are an impeccable design-system analyst. Apply the impeccable `document` sub-skill (https://github.com/pbakaus/impeccable/blob/main/site/content/skills/document.md) to read an existing DESIGN.md / PRODUCT.md (or equivalent) and re-emit it in the six-section Google Stitch DESIGN.md format so the rest of this workflow can rely on it.",
245
+ "You are an impeccable design-system analyst. Apply the impeccable `document` sub-skill to read an existing DESIGN.md / PRODUCT.md (or equivalent) and re-emit it in the six-section Google Stitch DESIGN.md format so the rest of this workflow can rely on it.",
247
246
  ],
248
247
  [
249
248
  "objective",
@@ -289,7 +288,7 @@ export default defineWorkflow("open-claude-design")
289
288
  task: taggedPrompt([
290
289
  [
291
290
  "role",
292
- "You are an impeccable design-system locator. Apply the impeccable `extract` sub-skill (https://github.com/pbakaus/impeccable/blob/main/site/content/skills/extract.md) to find design-system evidence already living in this codebase.",
291
+ "You are an impeccable design-system locator. Apply the impeccable `extract` sub-skill to find design-system evidence already living in this codebase.",
293
292
  ],
294
293
  [
295
294
  "objective",
@@ -320,7 +319,7 @@ export default defineWorkflow("open-claude-design")
320
319
  task: taggedPrompt([
321
320
  [
322
321
  "role",
323
- "You are an impeccable UI architecture auditor. Apply the impeccable `audit` sub-skill (https://github.com/pbakaus/impeccable/blob/main/site/content/skills/audit.md) to score the project's UI implementation across five dimensions.",
322
+ "You are an impeccable UI architecture auditor. Apply the impeccable `audit` sub-skill to score the project's UI implementation across five dimensions.",
324
323
  ],
325
324
  [
326
325
  "objective",
@@ -360,7 +359,7 @@ export default defineWorkflow("open-claude-design")
360
359
  task: taggedPrompt([
361
360
  [
362
361
  "role",
363
- "You are an impeccable pattern miner. Apply the impeccable `extract` sub-skill (https://github.com/pbakaus/impeccable/blob/main/site/content/skills/extract.md) to harvest reusable design and component patterns, plus the anti-patterns to avoid.",
362
+ "You are an impeccable pattern miner. Apply the impeccable `extract` sub-skill to harvest reusable design and component patterns, plus the anti-patterns to avoid.",
364
363
  ],
365
364
  [
366
365
  "objective",
@@ -394,7 +393,7 @@ export default defineWorkflow("open-claude-design")
394
393
  prompt: taggedPrompt([
395
394
  [
396
395
  "role",
397
- "You are an impeccable design-system author. Apply the impeccable `document` sub-skill (https://github.com/pbakaus/impeccable/blob/main/site/content/skills/document.md) to synthesize a project-specific DESIGN.md in the six-section Google Stitch format from the three onboarding analyses.",
396
+ "You are an impeccable design-system author. Apply the impeccable `document` sub-skill to synthesize a project-specific DESIGN.md in the six-section Google Stitch format from the three onboarding analyses.",
398
397
  ],
399
398
  [
400
399
  "objective",
@@ -442,7 +441,7 @@ export default defineWorkflow("open-claude-design")
442
441
  task: taggedPrompt([
443
442
  [
444
443
  "role",
445
- "You are an impeccable reference extractor for live web pages. Apply the impeccable `extract` sub-skill (https://github.com/pbakaus/impeccable/blob/main/site/content/skills/extract.md) to pull only the design traits that should transfer into the project — never just clone the source.",
444
+ "You are an impeccable reference extractor for live web pages. Apply the impeccable `extract` sub-skill to pull only the design traits that should transfer into the project — never just clone the source.",
446
445
  ],
447
446
  [
448
447
  "objective",
@@ -478,7 +477,7 @@ export default defineWorkflow("open-claude-design")
478
477
  task: taggedPrompt([
479
478
  [
480
479
  "role",
481
- "You are an impeccable reference parser for local design files. Apply the impeccable `extract` sub-skill (https://github.com/pbakaus/impeccable/blob/main/site/content/skills/extract.md) to lift concrete, citable requirements out of supplied references.",
480
+ "You are an impeccable reference parser for local design files. Apply the impeccable `extract` sub-skill to lift concrete, citable requirements out of supplied references.",
482
481
  ],
483
482
  [
484
483
  "objective",
@@ -520,7 +519,7 @@ export default defineWorkflow("open-claude-design")
520
519
  prompt: taggedPrompt([
521
520
  [
522
521
  "role",
523
- "You are an impeccable design-and-build engineer. Apply the impeccable `craft` sub-skill (https://github.com/pbakaus/impeccable/blob/main/site/content/skills/craft.md) to ship a production-quality HTML artifact that traces back to the synthesized DESIGN.md.",
522
+ "You are an impeccable design-and-build engineer. Apply the impeccable `craft` sub-skill to ship a production-quality HTML artifact that traces back to the synthesized DESIGN.md.",
524
523
  ],
525
524
  [
526
525
  "objective",
@@ -609,7 +608,7 @@ export default defineWorkflow("open-claude-design")
609
608
  prompt: taggedPrompt([
610
609
  [
611
610
  "role",
612
- "You are an impeccable design reviewer collecting actionable refinement feedback from the user about the rendered HTML preview. Apply the impeccable `critique` sub-skill (https://github.com/pbakaus/impeccable/blob/main/site/content/skills/critique.md) to decide whether the artifact is ready.",
611
+ "You are an impeccable design reviewer collecting actionable refinement feedback from the user about the rendered HTML preview. Apply the impeccable `critique` sub-skill to decide whether the artifact is ready.",
613
612
  ],
614
613
  [
615
614
  "objective",
@@ -653,7 +652,7 @@ export default defineWorkflow("open-claude-design")
653
652
  task: taggedPrompt([
654
653
  [
655
654
  "role",
656
- "You are an impeccable design critic. Apply the impeccable `critique` sub-skill (https://github.com/pbakaus/impeccable/blob/main/site/content/skills/critique.md) to run the formal two-pass review against the live HTML preview.",
655
+ "You are an impeccable design critic. Apply the impeccable `critique` sub-skill to run the formal two-pass review against the live HTML preview.",
657
656
  ],
658
657
  [
659
658
  "objective",
@@ -696,7 +695,7 @@ export default defineWorkflow("open-claude-design")
696
695
  task: taggedPrompt([
697
696
  [
698
697
  "role",
699
- "You are an impeccable visual QA specialist for the rendered HTML preview. Apply the impeccable `audit` (https://github.com/pbakaus/impeccable/blob/main/site/content/skills/audit.md) plus `live` (https://github.com/pbakaus/impeccable/blob/main/site/content/skills/live.md) sub-skills to validate the rendered output against breakpoints, states, and accessibility.",
698
+ "You are an impeccable visual QA specialist for the rendered HTML preview. Apply the impeccable `audit` plus `live` sub-skills to validate the rendered output against breakpoints, states, and accessibility.",
700
699
  ],
701
700
  [
702
701
  "objective",
@@ -742,7 +741,7 @@ export default defineWorkflow("open-claude-design")
742
741
  prompt: taggedPrompt([
743
742
  [
744
743
  "role",
745
- "You are an impeccable design polisher. Apply the impeccable `polish` sub-skill (https://github.com/pbakaus/impeccable/blob/main/site/content/skills/polish.md) — the meticulous final pass between good and great — to revise the HTML preview in place.",
744
+ "You are an impeccable design polisher. Apply the impeccable `polish` — the meticulous final pass between good and great — to revise the HTML preview in place.",
746
745
  ],
747
746
  [
748
747
  "objective",
@@ -828,7 +827,7 @@ export default defineWorkflow("open-claude-design")
828
827
  prompt: taggedPrompt([
829
828
  [
830
829
  "role",
831
- "You are an impeccable pre-release gate. Apply the impeccable `audit` sub-skill (https://github.com/pbakaus/impeccable/blob/main/site/content/skills/audit.md) one final time to block export only for concrete, evidence-backed issues.",
830
+ "You are an impeccable pre-release gate. Apply the impeccable `audit` sub-skill one final time to block export only for concrete, evidence-backed issues.",
832
831
  ],
833
832
  [
834
833
  "objective",
@@ -864,7 +863,7 @@ export default defineWorkflow("open-claude-design")
864
863
  prompt: taggedPrompt([
865
864
  [
866
865
  "role",
867
- "You are an impeccable production-readiness hardener. Apply the impeccable `harden` sub-skill (https://github.com/pbakaus/impeccable/blob/main/site/content/skills/harden.md) to remove blocking findings without redesigning.",
866
+ "You are an impeccable production-readiness hardener. Apply the impeccable `harden` sub-skill to remove blocking findings without redesigning.",
868
867
  ],
869
868
  [
870
869
  "objective",
@@ -903,7 +902,7 @@ export default defineWorkflow("open-claude-design")
903
902
  prompt: taggedPrompt([
904
903
  [
905
904
  "role",
906
- "You are an impeccable design documenter. Apply the impeccable `document` sub-skill (https://github.com/pbakaus/impeccable/blob/main/site/content/skills/document.md) to produce a RICH HTML SPEC that bundles the approved preview together with implementation guidance for Claude Code / frontend engineers.",
905
+ "You are an impeccable design documenter. Apply the impeccable `document` sub-skill to produce a RICH HTML SPEC that bundles the approved preview together with implementation guidance for a design/frontend engineer.",
907
906
  ],
908
907
  [
909
908
  "objective",
@@ -0,0 +1,36 @@
1
+ import type { WorkflowDefinition, WorkflowInputValues, WorkflowOutputValues } from "../src/authoring.js";
2
+
3
+ export type RalphWorkflowInputs = WorkflowInputValues & {
4
+ readonly prompt: string;
5
+ readonly max_loops: number;
6
+ readonly base_branch: string;
7
+ readonly git_worktree_dir: string;
8
+ };
9
+
10
+ export type RalphWorkflowRunInputs = WorkflowInputValues & {
11
+ readonly prompt: string;
12
+ readonly max_loops?: number;
13
+ readonly base_branch?: string;
14
+ readonly git_worktree_dir?: string;
15
+ };
16
+
17
+ export type RalphWorkflowOutputs = WorkflowOutputValues & {
18
+ readonly result?: string;
19
+ readonly plan?: string;
20
+ readonly plan_path?: string;
21
+ readonly implementation_notes_path?: string;
22
+ readonly pr_report?: string;
23
+ readonly approved?: boolean;
24
+ readonly iterations_completed?: number;
25
+ readonly review_report?: string;
26
+ readonly review_report_path?: string;
27
+ };
28
+
29
+ export type RalphWorkflowDefinition = WorkflowDefinition<
30
+ RalphWorkflowInputs,
31
+ RalphWorkflowOutputs,
32
+ RalphWorkflowRunInputs
33
+ >;
34
+
35
+ declare const workflow: RalphWorkflowDefinition;
36
+ export default workflow;