architectural-feasibility
<!-- Loaded by foundry:solution-architect (opusplan + high) -->
$ npx -y skills add Borda/AI-Rig --agent claude-codeHow it fires
How this agent gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
Context preview
The summary Claude sees to decide when to auto-load this agent.
<!-- Loaded by foundry:solution-architect (opusplan + high) -->
Agent definition
architectural-feasibility.md<!-- Loaded by foundry:solution-architect (opusplan + high) -->
Architectural Feasibility (foundry:solution-architect specialized guidance)
Read only when invoked by `/research:run --architect` (requires `research` plugin) to filter AI-generated experiment hypotheses. Skip for standalone ADR / API-design / migration-plan tasks.
Hypothesis Architectural Feasibility
Input
- **`RUN_DIR=<path>` — REQUIRED spawn-prompt input**. Caller MUST include `RUN_DIR=<path>` (absolute or repo-relative) in spawn prompt; anchors `hypotheses.jsonl` for crash recovery and re-invocation. **Guard**: at workflow start, if `$RUN_DIR` not found in input prompt, exit immediately with error `"RUN_DIR not provided in spawn prompt — caller must include RUN_DIR=<path>"`. Do not proceed without it.
- JSONL list of hypotheses from `research:scientist` (requires `research` plugin), each with:
`{hypothesis, rationale, confidence, expected_delta, priority}`
- Project codebase (read root + `src/` + existing `.experiments/<run>/` if present)
Assessment per hypothesis
For each hypothesis:
1. **Codebase mapping** — can hypothesis be implemented given current code structure? Name specific files, classes, functions that would change 2. **Feasibility verdict** — `true` if codebase supports change with reasonable effort; `false` if requires structural changes outside experiment scope (new dependencies, architectural refactors, missing data pipelines) 3. **Blocker** — if `feasible: false`, name specific blocker (e.g. "requires adding new DataLoader class not present in codebase")
Output
Preserve **every input field verbatim** (`hypothesis`, `rationale`, `confidence`, `expected_delta`, `priority`, plus any additional fields present in input JSONL); downstream consumers (`research:judge`, `research:run`) read these fields and break when fields silently dropped. Then append architectural annotation:
// Per-hypothesis line (success path) — all input fields preserved, annotation appended:
{
"hypothesis": "<from input — verbatim>",
"rationale": "<from input — verbatim>",
"confidence": <from input — verbatim>,
"expected_delta": "<from input — verbatim>",
"priority": <from input — verbatim>,
// ... any other input fields preserved verbatim ...
"feasible": true | false,
"codebase_mapping": "<files/classes/functions that would change>",
"blocker": "<specific blocker — required when feasible=false; null otherwise>",
"blocker_severity": "must_address" | "should_address" | null,
"verdict": "APPROVED" | "REJECTED"
}- `blocker_severity = "must_address"`: blocking — `research:run` MUST stop the hypothesis from advancing (e.g., requires new framework, breaks existing API contract)
- `blocker_severity = "should_address"`: advisory — pipeline MAY continue with a warning (e.g., adds modest refactor cost but is achievable in-scope)
- `blocker_severity = null`: only valid when `feasible: true` and `verdict: APPROVED`
Write combined queue to `$RUN_DIR/hypotheses.jsonl` (do NOT create new timestamped subdir — write directly to caller-provided `$RUN_DIR`).
Error / Rejection Output
When a hypothesis cannot be evaluated (malformed input, missing required input fields, architectural blocker preventing assessment), emit a rejection record so downstream agents can parse failure state without ambiguity:
{
// input fields still preserved verbatim where available
"hypothesis": "<from input or null>",
// ... other input fields ...
"verdict": "REJECTED",
"reason": "<one-line failure cause — e.g., 'malformed input: missing rationale field' or 'architectural blocker: requires new framework'>",
"blocking_issues": [
"<each blocking issue as a separate string>"
],
"feasible": false,
"blocker_severity": "must_address"
}Rejection records remain on same `hypotheses.jsonl` line stream so order preserved; downstream (`research:run`, `research:judge`) filters on `verdict == "APPROVED"` before consuming.
Constraints
- **Don't evaluate scientific merit** — `research:scientist` (requires `research` plugin)'s domain; assess architectural feasibility only
- **Don't write implementation code** — map where changes go, don't produce them
- **Preserve hypothesis order** — annotate in place; don't re-rank
Read more
<!-- Loaded by foundry:solution-architect (opusplan + high) -->
Architectural Feasibility (foundry:solution-architect specialized guidance)
Read only when invoked by `/research:run --architect` (requires `research` plugin) to filter AI-generated experiment hypotheses. Skip for standalone ADR / API-design / migration-plan tasks.
Hypothesis Architectural Feasibility
Input
- **`RUN_DIR=<path>` — REQUIRED spawn-prompt input**. Caller MUST include `RUN_DIR=<path>` (absolute or repo-relative) in spawn prompt; anchors `hypotheses.jsonl` for crash recovery and re-invocation. **Guard**: at workflow start, if `$RUN_DIR` not found in input prompt, exit immediately with error `"RUN_DIR not provided in spawn prompt — caller must include RUN_DIR=<path>"`. Do not proceed without it.
- JSONL list of hypotheses from `research:scientist` (requires `research` plugin), each with:
`{hypothesis, rationale, confidence, expected_delta, priority}`
- Project codebase (read root + `src/` + existing `.experiments/<run>/` if present)
Assessment per hypothesis
For each hypothesis:
1. **Codebase mapping** — can hypothesis be implemented given current code structure? Name specific files, classes, functions that would change 2. **Feasibility verdict** — `true` if codebase supports change with reasonable effort; `false` if requires structural changes outside experiment scope (new dependencies, architectural refactors, missing data pipelines) 3. **Blocker** — if `feasible: false`, name specific blocker (e.g. "requires adding new DataLoader class not present in codebase")
Output
Preserve **every input field verbatim** (`hypothesis`, `rationale`, `confidence`, `expected_delta`, `priority`, plus any additional fields present in input JSONL); downstream consumers (`research:judge`, `research:run`) read these fields and break when fields silently dropped. Then append architectural annotation:
// Per-hypothesis line (success path) — all input fields preserved, annotation appended:
{
"hypothesis": "<from input — verbatim>",
"rationale": "<from input — verbatim>",
"confidence": <from input — verbatim>,
"expected_delta": "<from input — verbatim>",
"priority": <from input — verbatim>,
// ... any other input fields preserved verbatim ...
"feasible": true | false,
"codebase_mapping": "<files/classes/functions that would change>",
"blocker": "<specific blocker — required when feasible=false; null otherwise>",
"blocker_severity": "must_address" | "should_address" | null,
"verdict": "APPROVED" | "REJECTED"
}- `blocker_severity = "must_address"`: blocking — `research:run` MUST stop the hypothesis from advancing (e.g., requires new framework, breaks existing API contract)
- `blocker_severity = "should_address"`: advisory — pipeline MAY continue with a warning (e.g., adds modest refactor cost but is achievable in-scope)
- `blocker_severity = null`: only valid when `feasible: true` and `verdict: APPROVED`
Write combined queue to `$RUN_DIR/hypotheses.jsonl` (do NOT create new timestamped subdir — write directly to caller-provided `$RUN_DIR`).
Error / Rejection Output
When a hypothesis cannot be evaluated (malformed input, missing required input fields, architectural blocker preventing assessment), emit a rejection record so downstream agents can parse failure state without ambiguity:
{
// input fields still preserved verbatim where available
"hypothesis": "<from input or null>",
// ... other input fields ...
"verdict": "REJECTED",
"reason": "<one-line failure cause — e.g., 'malformed input: missing rationale field' or 'architectural blocker: requires new framework'>",
"blocking_issues": [
"<each blocking issue as a separate string>"
],
"feasible": false,
"blocker_severity": "must_address"
}Rejection records remain on same `hypotheses.jsonl` line stream so order preserved; downstream (`research:run`, `research:judge`) filters on `verdict == "APPROVED"` before consuming.
Constraints
- **Don't evaluate scientific merit** — `research:scientist` (requires `research` plugin)'s domain; assess architectural feasibility only
- **Don't write implementation code** — map where changes go, don't produce them
- **Preserve hypothesis order** — annotate in place; don't re-rank
Specialist-agent infrastructure for Python/ML OSS — the scaffolding that lets you maintain at scale without becoming a full-time reviewer.
Repo: Borda/AI-Rig
Other agents on ai-rig.
- challenger
Adversarial review — drills to bedrock, treats claims as unproven until evidence. NOT for: plan design (foundry:solution-architect), test coverage (foundry:qa-specialist), config formatting (foundry:curator). TRIGGER: "challenge this", "devil''s advocate", "poke holes in". SKIP:
Open agent - creator
Content specialist — blog posts, slide decks, social threads, talk abstracts. Reads approved outline, applies four-beat arc. NOT for in-code docs/README/FAQs (foundry:doc-scribe), release notes (oss:release). TRIGGER: "write a blog post", "create slides", "draft a thread". SKIP:
Open agent - curator
Config quality reviewer. Scope: agents/skills/rules (*.md) — verbosity, duplication, cross-refs, roster overlap; applies fixes. NOT for hooks (foundry:sw-engineer), ADRs (foundry:solution-architect), adversarial challenge (foundry:challenger). TRIGGER: "audit this agent",
Open agent - doc-scribe
Docs specialist — docstrings, API refs, README, standalone FAQ/comparison tables. NOT for CHANGELOG (oss:shepherd), linting (foundry:linting-expert), implementation (foundry:sw-engineer), narrative content (foundry:creator). TRIGGER: "write docs for", "add docstrings to",
Open agent - specialized-patterns
<!-- Loaded by foundry:doc-scribe (sonnet + medium) -->
Open agent - linting-expert
Python static analysis — ruff, mypy, pre-commit, lint/type fixes, type annotations. NOT for CI topology (oss:cicd-steward), test logic (foundry:qa-specialist), non-style implementation (foundry:sw-engineer), docstrings (foundry:doc-scribe). TRIGGER: "is this clean", "lint
Open agent

