5.3 KiB
| name | description |
|---|---|
| up-code-generate | Generate production-grade backend services, frontend views/screens, database migrations, API contracts, and integration adapters for the stories in the current iteration's backlog, with explicit delivery-surface coverage across portal/frontend, API, data, integration, infrastructure, and QA. Use this after up-wireframe-spec and up-test-model-generate have produced the iteration's screens, surface matrix, and test cases. Covers Stage 13 (Construction) of the UP-AI v1.0 Process (00_prompts/AI_Native_Unified_Process_v1.md). |
up-code-generate — Stage 13 (Construction, per iteration)
Objective
Implement the current iteration's stories as production-grade code — backend services, frontend screens/views, database migrations, API contracts, and integration adapters — adhering to the technology stack configured in tech-profile.yaml and requirement-driven development principles.
When to invoke
- After
up-wireframe-specandup-test-model-generatehave produced this iteration's screens and test cases. - Repeatedly within an iteration, once per story or logical group of related stories.
Read first
tech-profile.yaml(specifies backend language, framework, ORM, migrations, frontend framework, auth provider, and sandboxes)- Current iteration's
04_generated_documentation/05_iteration_planning/iterations/iteration-NN/iteration_backlog.md(STORY-xxx list) - Current iteration's
iteration_surface_matrix.md(required delivery surfaces and owners) - Current iteration's
parallel_work_plan.md(if parallel lanes are active) - Owning
04_generated_documentation/04_architecture_design/lld/LLD-0xx_*.md(API/table/event contracts) - Owning use case's
functional-reqs.md(acceptance criteria, validation, audit requirements) - This iteration's wireframes (
04_generated_documentation/06_wireframes/) and test cases (04_generated_documentation/07_test_design/) 04_generated_documentation/06_wireframes/DESIGN.mdor active design system tokensarchitecture_spike_report.md(service template conventions)
Procedure
Pick the next STORY-xxx with status "Ready" from the iteration backlog. Implement only that story (or related group) per invocation:
Confirm every applicable surface in iteration_surface_matrix.md has an owner and repository path. If the story requires a frontend screen, frontend code is mandatory unless an approved CR-xxx/DEC-xxx explicitly defers it.
Backend service generation: Implement against the LLD API contract exactly — request/response shapes, status codes, error format, RBAC checks, tenant-context propagation, validation, and audit logging. Use the backend language/framework specified in tech-profile.yaml. Write unit and integration tests covering the story's acceptance criteria. Add or update API collections (Bruno .bru or OpenAPI spec) for added/changed endpoints.
Frontend screen generation: Implement against the iteration's wireframe/field-level spec — fields, validation, navigation, error states. Reuse DESIGN.md component library and tokens. Write corresponding component and browser-E2E tests (e.g. Playwright) tagged with UC-xxx/FR-xxx/STORY-xxx.
Database implementation: Generate migrations matching the LLD table definitions via the migration tool in tech-profile.yaml (e.g. Alembic, Prisma, Flyway); do not hand-edit schema outside migrations.
Integration adapters: Implement external API triggers, requests, and failure handling against the contracts in tech-profile.yaml. Consume and verify against the Wave 0 Sandbox/Mock adapters so test suites run 100% deterministically and offline without external API dependencies.
Rules (apply to every story):
- Do not introduce unrelated changes or refactor unrelated files.
- Write unit/integration/contract/smoke/browser-E2E tests assigned to this story by
up-test-model-generate. - Implement validation, error handling, structured logging, and audit trails where the FR requires it.
- Enforce tenant isolation and authorization per the architecture spike's validated pattern.
- Update
iteration_surface_matrix.mdwith implementation status and verification evidence. - Do not place secrets, live tokens, or production credentials in code, fixtures, logs, or commits.
- Automated Test Coverage Budgets: Ensure code meets the thresholds configured in
tech-profile.yaml:- Backend Domain & FSMs: ≥95.0% statement and branch coverage.
- Integration Adapters: ≥90.0% against Wave 0 sandboxes.
- Frontend UI Components: ≥80.0% component branch coverage + mandatory Playwright browser-E2E tests for primary user journeys. Exercise Happy Path, Alternate/Boundary, Failure, and FSM Invariant scenarios.
Output expected
Source code changes; updated OpenAPI / Bruno specs; DB migrations; frontend portal artifacts; updated iteration_surface_matrix.md; execution log.
Exit criteria
Story implemented per LLD contract and screen spec across every applicable surface; API, data, integration, and frontend artifacts are synchronized; tests achieve configured coverage thresholds; ready for up-defect-fix and Gate 14.1.
Related skills
Previous: up-wireframe-spec, up-test-model-generate. Next: up-defect-fix (code review, defect handling), then up-traceability-gate (Gate 14.1).