Canonical user-story catalog. Used for Playwright tests + Claude Design input.
Scope: Premium agent builder — spec → template → generate → compile → test → deploy pipeline. Unit-test surface covered: test/** (66 tests).
Persona: Engineering team creating production agent from SpecPrompt SPEC.md
Goal: Transform SPEC.md into compiled, tested, deployable agent code automatically
Prerequisite: SPEC.md validated; ampersand.json present; framework template pinned
Steps:
Create agent in Studio: agent_create with name + spec_path + ampersand_path + framework
Status: draft → building
Build pipeline: parse SPEC.md → resolve template → generate source → compile
Pin template_version + template_hash for deterministic rebuilds
Build completes with artifact_hash
Success: Same {spec_hash, template_hash} → identical artifact_hash (reproducible)
Covers: Agents.create, Build.run_pipeline, Generator.from_spec_and_template, Compiler.compile — ~20 unit tests
UI status: exists-today (Studio)
Claude Design hook: Build console with parse → generate → compile stages + timing + code diff preview
Persona: QA engineer validating agent behavior against acceptance criteria
Goal: Execute tests derived from spec without hand-writing test code
Prerequisite: Build succeeded; compiled_tests_hash present; agent in testing status
Steps:
Call agent_test MCP tool with agent_id + build_id
Pulls approved compiled tests from SpecPrompt registry
For each test: set up mocked tool state → send input → capture output + tool calls
Validate against assertions (contains, tool_called, constraint_respected)
Return TestRun with pass/fail per test + coverage summary
Success: All tests pass; spec constraints validated; regression suite cached
Covers: Testing.TestRunner.run, Mock.setup_tool_state, Assertion.validate_output — ~18 unit tests
UI status: exists-today
Claude Design hook: Test results dashboard with per-test trace viewer + mocked tool call history + constraint violation inspector
Persona: DevOps engineer deploying agent to staging
Goal: Deploy with governance validation but no human approval (staging only)
Prerequisite: Build passed tests; agent status deployable
Steps:
Call agent_deploy with environment=staging, autonomy_level=observe
Delegatic policy check (staging doesn't require approval)
OpenSentience deploys manifest with capability tokens
Status: deploying → active
Agent in observe mode; tool calls logged but sandboxed
Success: Agent live in staging; isolated from prod; all permissions enforced
Covers: Deploy.deploy_to_environment, Deploy.validate_delegatic_policy, deployment records — ~15 unit tests
UI status: exists-today
Claude Design hook: Deploy pipeline UI with environment picker + autonomy level selector + approval status
Persona: Engineering lead approving production rollout
Goal: Manually gate production; ensure tests passed + policy approved
Prerequisite: Agent tested in staging; governance_policy_hash computed
Steps:
Call agent_deploy with environment=production, autonomy_level=act
System requires approval field
Lead reviews build pass/fail, coverage, policy hash
Approve with reason
Record approved_by + approval_reason in Deployments table
Success: Production agent live; human approval recorded; audit trail preserved
Covers: Deploy.require_approval_for_production, Deploy.validate_approver_role, record_approval_decision — ~10 unit tests
UI status: exists-today
Claude Design hook: Approval modal with build summary + policy checklist + approval reason textarea + timestamp
Persona: Engineer debugging why a test failed
Goal: View detailed trace of test execution — mocked tool calls + assertion failures
Prerequisite: Test run failed
Steps:
Click failed test result card
Call test_explain with test_run_id + test_index
System returns: given / expected / actual / tool_calls trace / assertion failures
Engineer sees mock setup + why assertion failed
Success: Clear root cause identified; assertion failure inspectable
Covers: Testing.explain_failure, TestResult.format_trace, Assertion.explain_mismatch — ~8 unit tests
UI status: exists-today
Claude Design hook: Collapsible trace viewer — mock setup / input / output / tool calls / assertion breakdown
Note: Agentelic's web UI at agentelic.fly.dev/ currently returns 404 (MCP+API only). Stories 1-5 all need a Studio UI built. Strong Claude Design candidate.
Tests to implement first: once a Studio landing exists, start with Story 1 (build) + Story 2 (test). Until then, all 5 are mcp-only.