RunLogosRunLogos
中文EN

Phase 07 · Code Generation

Code Generation is where the Spec Chain pays off. You hand the AI the complete context — requirements, prototype, scenarios, API spec, schema, and test cases — and it generates business code that is correct by construction.

What goes in

The Code Skill assembles the following context automatically:

FilePurpose
requirements.mdWhat to build and why
2-product-design/*.htmlVisual reference
2-scenario-implementation/*.mdInteraction flows
openapi.yamlExact endpoint contracts
schema.sqlData model
test/*.mdDefinition of "correct"

What comes out

logos/resources/implementation/ — production-ready code organized by your project's architecture (routes, services, repositories, etc.), plus test files that implement the cases from Phase 06.

Running in batches

For large projects, the Code Skill can be run scenario-by-scenario. Each batch must include:

  1. Business code for the scenario
  2. Unit and integration test code (with IDs matching Phase 06)
  3. OpenLogos reporter calls that write results to logos/resources/verify/test-results.jsonl

Never defer all tests to the final batch.

Prompt template

Use this prompt to invoke the Code Skill for a batch:

Please execute Phase 3 Step 4 for scenarios S01–S03. Split into batches if needed, but each batch must deliver: (1) business code, (2) matching UT/IT test code with IDs from logos/resources/test/, (3) OpenLogos reporter writing to logos/resources/verify/test-results.jsonl. List the test case IDs covered before outputting code.

Next step

Phase 08 · Verification