docs: ops-harbor automation pipeline design spec#43
docs: ops-harbor automation pipeline design spec#43
Conversation
Design spec for replacing the single-runner automation system with a Typed Phase Pipeline + ActionExecutor<K> architecture. Covers pipeline phases, type system, provider abstraction, user configuration, DDD domain model, FSD module structure, and scalability considerations. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Address all P0/P1/P2 findings from Codex architecture review: - Close TriggerKind union (remove `| string` escape hatch) with boundary validation - Fix 6 internal inconsistencies (argsTemplate/args, config ActionKind leak, etc.) - Correct DDD labels (plan → Application Service, ActivityEvent → Domain Event) - Define Alert/Trigger derivation relationship and notify_user vs finalize split - Add Phase<I,O> type constraint, PhaseError, retry policy, and failure propagation - Promote rate limiting to P0 and per-PR worktree to P1 in scalability table Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughA new architectural specification document has been added that defines the redesign of the ops-harbor automation pipeline using a typed phase-based pattern with ActionExecutor pattern, covering a 6-phase sequential pipeline (ingest, enrich, evaluate, plan, execute, finalize) with discriminated union types for Triggers and Actions. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
docs/superpowers/specs/2026-04-06-ops-harbor-automation-pipeline-design.md (2)
33-35: Add language specifier to fenced code block.For consistency and better syntax highlighting, specify the language for code blocks.
📝 Suggested fix
-``` +```text ingest → enrich → evaluate → plan → execute → finalize</details> <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against the current code and only fix it if needed.
In
@docs/superpowers/specs/2026-04-06-ops-harbor-automation-pipeline-design.md
around lines 33 - 35, The fenced code block containing the pipeline string
"ingest → enrich → evaluate → plan → execute → finalize" lacks a language
specifier; update the triple-backtick fence to include a language (e.g.,text orplain) so Markdown renderers apply consistent syntax highlighting for that
block, keeping the block content unchanged.</details> --- `169-169`: **Consider adding a comment to explain the `string & {}` pattern.** The type `"claude" | "codex" | (string & {})` is a valid TypeScript pattern for providing autocomplete for built-in tools while allowing arbitrary custom tool names. However, this pattern may be unfamiliar to some developers. <details> <summary>📝 Suggested clarification</summary> ```diff -type ToolName = "claude" | "codex" | (string & {}); // builtin + custom CLI names +// ToolName provides autocomplete for built-in tools ("claude" | "codex") +// while allowing arbitrary custom CLI tool names via (string & {}) +type ToolName = "claude" | "codex" | (string & {}); ``` </details> <details> <summary>🤖 Prompt for AI Agents</summary> ``` Verify each finding against the current code and only fix it if needed. In `@docs/superpowers/specs/2026-04-06-ops-harbor-automation-pipeline-design.md` at line 169, Add an inline comment next to the ToolName alias explaining that the union "claude" | "codex" provides IDE autocomplete for known tool names while the (string & {}) part allows arbitrary custom tool names without collapsing the union to plain string; mention that (string & {}) is an open string type used specifically to preserve literal completion for the built-ins while accepting any other string. Reference the ToolName type and the (string & {}) pattern so future readers know why that intersection is used and what would change if it were replaced with plain string. ``` </details> </blockquote></details> </blockquote></details> <details> <summary>🤖 Prompt for all review comments with AI agents</summary>Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In@docs/superpowers/specs/2026-04-06-ops-harbor-automation-pipeline-design.md:
- Around line 33-35: The fenced code block containing the pipeline string
"ingest → enrich → evaluate → plan → execute → finalize" lacks a language
specifier; update the triple-backtick fence to include a language (e.g.,text orplain) so Markdown renderers apply consistent syntax highlighting for that
block, keeping the block content unchanged.- Line 169: Add an inline comment next to the ToolName alias explaining that the
union "claude" | "codex" provides IDE autocomplete for known tool names while
the (string & {}) part allows arbitrary custom tool names without collapsing the
union to plain string; mention that (string & {}) is an open string type used
specifically to preserve literal completion for the built-ins while accepting
any other string. Reference the ToolName type and the (string & {}) pattern so
future readers know why that intersection is used and what would change if it
were replaced with plain string.</details> --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: Organization UI **Review profile**: CHILL **Plan**: Pro **Run ID**: `a4e6274a-5605-4db1-857d-b9048b759e5f` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 1ffedea7fdc9aebade453da0116f0f106c7e0aca and 40f2da9a3beebd0adbd76ee83231667b1b7164ea. </details> <details> <summary>📒 Files selected for processing (1)</summary> * `docs/superpowers/specs/2026-04-06-ops-harbor-automation-pipeline-design.md` </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
Summary
Key Design Elements
ingest → enrich → evaluate → plan → execute → finalizeActionExecutor<K>+ExecutorRegistry(Required mapped type で登録漏れをコンパイルエラーに)TriggerKindunion (境界バリデーションで未知入力を reject)Phase<I,O>型制約、PhaseError+ retry policy、rate limit budgetTest plan
🤖 Generated with Claude Code
Summary by CodeRabbit