# Agentic Prototype Trigger

> Use after a local Superpowers spec is written or materially revised and spec review closes, before plan writing, or when prototype artifacts may be stale against the current spec.

- Skill: `dolphinai2026/agentic-prototype-trigger` (Agent Skill, multi-file: 8 files)
- Install (CLI): `npx skillmds@latest add dolphinai2026/agentic-prototype-trigger`
- Raw SKILL.md: https://api.skillmd.com/api/skills/dolphinai2026/agentic-prototype-trigger/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: dolphinai2026 (https://skillmd.com/u/dolphinai2026)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/dolphinai2026/agentic-prototype-trigger

---


# Agentic Prototype Trigger

`agentic-prototype-trigger` is the prototype lifecycle workflow owner for local prototype production and refinement decisions.

## Workflow Ownership

`agentic-prototype-trigger` is the prototype lifecycle workflow owner. It owns operation classification, profile / refinement classification, Design Resource Palette activation, run-state creation, producer dispatch, handoff validation, packaging / doctor worker dispatch, critique worker dispatch, focused revision, and closure evidence.

The trigger never lets the main agent write strict staging bundle files. Strict bundle files must come from a selected producer subagent handoff.

Classification happens before strict artifact-production identifiers are required. If the request is `not_applicable`, the trigger may close on source-spec and routing evidence without producer dispatch.

Compatibility shim entrypoints such as `agentic-prototype-design`,
`agentic-dashboard-prototype`, `agentic-mobile-web-prototype`,
`agentic-landing-prototype`, `agentic-presentation-prototype`, and
`agentic-prototype-refinement` route artifact-producing requests here. The
trigger then applies `rules/routing.md` and keeps `agentic-prototype-critique`
as the read-only critique worker. Run `agentic-design prototype doctor` only
after the producer handoff is validated.

Do not create a new prototype contract when an existing shim profile and
`rules/routing.md` entry can route the request.

## Required Context

- Source spec path.
- Existing manifest path when present.
- Reviewer summary, derivation output, or critique diagnostics when present.
- Inputs needed to determine whether the request is `not_applicable` or artifact-producing, and if artifact-producing, to determine operation, selected profile, and focused revision scope.
- Only when classification leads to `create_new`, `regenerate`, or `refine_existing`: stable identifiers including `prototype_production_run_id`, `phase_id`, `prototype_id`, and `idempotency_key`.
- Only when classification leads to `create_new`, `regenerate`, or `refine_existing`: active design references required to build the Design Resource Palette.

## Structured Asset Context Budget

When a prototype request includes FS7 structured context artifacts, the trigger
must pass `context_budget_ref` and `context_slice_manifest_ref` through to the
producer handoff. Producer packets must prefer compact `prototype-structured-assets/v1`
rows plus refs/hashes over full Markdown asset bodies or full legacy `model`
subtrees.

If both compact rows and a full model body are loaded for the same fact source,
the trigger must surface `context_slice_duplicate_fact_source` as a blocking
diagnostic for prototype generation and refinement profiles.

## Workflow

1. Classify the request as `not_applicable` or artifact-producing.
2. Normalize artifact-producing requests to `create_new`, `regenerate`, or `refine_existing`. Critique repair, selected-element modification, and focused revision are represented to the producer as `refine_existing`.
3. Select the trigger profile and refinement mode using `rules/routing.md`.
4. If artifact-producing, activate the Design Resource Palette and record activated, skipped, and required design helpers in run state.
5. If artifact-producing, create run state and request metadata, including `prototype_production_run_id`.
6. If artifact-producing, dispatch the selected producer subagent with strict staging-bundle permissions.
7. Validate the producer subagent handoff before any downstream packaging.
8. Dispatch the packaging / doctor worker.
9. Dispatch the critique worker.
10. If critique or doctor returns actionable findings, route a focused revision through the same trigger-owned workflow.
11. Record closure evidence, blocked reasons, and plan-readiness status.

## Product Prototype Continuity

For the same generated product or application, phase tracking and prototype
tracking are separate concerns. Each phase may keep its own phase metadata,
manifest evidence, and page subset, but the visual prototype should converge on
one canonical product prototype unless the user explicitly asks for separate
prototypes.

When a later phase adds capability to an existing product prototype, the trigger
must dispatch `refine_existing` or `regenerate` against the existing
`prototype_id`. If upstream context still classifies the request as `create_new`,
the trigger request must include `canonical_prototype_id` with the existing
prototype id so the packaging worker updates the canonical prototype instead of
creating a phase-local sibling bundle.

Do not infer `canonical_prototype_id` from loose string similarity. Use an
existing manifest, asset-index entry, explicit product/app context, or a user
decision. If the canonical target is missing or ambiguous, block and ask for a
selection rather than creating another product prototype by default.

## Structured Asset Refinement Context

For `refine_existing`, a business semantic change may dispatch the producer only when upstream context contains `schema_version: structured-asset-refinement-context/v1`, `asset_patch_ref`, `structured_asset_payload_ref`, `structured_asset_payload_hash`, and `source_coverage_delta_ref`.

Block producer dispatch on `classification_state: clarification_required`, `refinement_clarification_required`, `refinement_asset_patch_required`, `refinement_asset_patch_invalid`, `refinement_asset_patch_stale`, or `refinement_legacy_structured_update_unconverted`.

## Worker Model

- `agentic-design-frontend-design` is the general producer subagent that writes staged HTML/CSS/JS bundle files.
- `agentic-design-enterprise-system-producer` is the enterprise-system producer subagent for admin consoles, dense business record workflows, approval queues, governance tools, and similar enterprise UI artifacts.
- The trigger owns `producer_selection`; producer subagents never self-select.
- Packaging / doctor worker converts the strict staged bundle into validated prototype outputs and runs doctor checks.
- `agentic-prototype-critique` is the critique worker and remains read-only.

## Producer Selection

For every UI artifact-producing request, write `producer_selection` into run state and the dispatch packet.

- Use `agentic-design-enterprise-system-producer` when enterprise-system signals reach `high` or `medium` confidence.
- Use `agentic-design-frontend-design` when signals are absent, non-enterprise, or `low` confidence.
- Record `producer_selection_ambiguous` as a warning for low-confidence enterprise signals.
- Return `producer_unavailable` when the selected enterprise producer is unavailable.
- Return `producer_contract_mismatch` when request, report, and closure evidence disagree about the selected producer.

## Blocking Rules

- Missing producer contract fields, missing profile selection inputs, or missing handoff files block packaging.
- A producer subagent handoff that writes outside the staging bundle root is invalid.
- Doctor or critique failures block closure when prototype outputs are required implementation inputs.
- CLI, backend, infra, docs-only, or other non-UI work may still close as `not_applicable` with explicit evidence.

## Prototype Visual Foundation Quality Gate

Run this ordered operation chain exactly once producer handoff validation has passed:

`load_seed_design_system -> select_exemplar_template -> copy_seed_foundation_to_staging -> write_producer_report_fields -> run_design_quality_lint -> run_design_critic -> persist_quality_closure`

Required closure statuses for this gate are:

- `lint_failed` when deterministic lint fails.
- `critic_failed` when lint passes but critic does not pass.
- `blocked_no_plan` when the bundle cannot be promoted to `implementation_ready` because plan inputs are missing.
- `quality_blocked` when quality evidence exists but `allowed_to_close` is not true, deterministic blockers remain, or critic closure is not pass.
- `quality_passed` only when deterministic lint and critic both pass and closure evidence is persisted.

Quality closure is allowed only when deterministic lint and critic both pass. Do not write phase lifecycle target evidence or reusable target evidence before `quality_passed`.

Persist closure evidence under `quality_evidence.design_quality`, including deterministic blocking details, critic status, and the final allowed-to-close decision.

Phase 6.5 paths only record/read evidence from this gate and leave closeout ownership to Phase 6.5. They do not take over trigger-owned closure decisions.

## Prototype Quality / Implementation Readiness Split

Artifact-producing flows must emit `prototype_gate_state.stage` as one of
`prototype_draft`, `prototype_quality_passed`, or `implementation_ready`.
`prototype_quality_passed is not implementation_ready`: it allows user review
and prototype refinement only. `superpowers:writing-plans`, CodegenPlan, and
Phase 6.5 quality evidence consumers require `implementation_ready`.
Implementation readiness is the only plan-readiness state.

Focused repair is capped:

```yaml
max_repair_attempts: 1
```

## Closure Evidence

Return closure evidence with:

- `prototype_production_run_id`
- selected profile and operation
- Design Resource Palette activation summary
- producer subagent handoff status
- packaging / doctor worker status
- critique worker status
- focused revision status when used
- blocked reason or skip reason
- allowed-to-plan decision

