Create the code design layer for a sssdd project from the full upstream specification stack and write file-level markdown contracts under 40-code-design/. Use when the user asks for code design, wants /sssdd.code behavior, or explicitly mentions $sssdd-code.
Read the upstream layers and write file-level code design specs under 40-code-design/**/*.md.
Map module design into concrete code units and responsibilities.
This layer must satisfy 1 code file = 1 md.
Move from module hierarchy to file hierarchy deliberately. Show the intended file tree first when the split is large or non-obvious, then write the per-file contracts.
Determine the target project under specs/.
Read:
00-requirements.md01-glossary.md when present10-design/20-detail-design/30-architecture/35-module-design/Draft the file tree before writing markdown.
Ask at most 3 short questions only if the answer changes:
Create one markdown file for each intended code file.
40-code-design/ using a path that mirrors the target code path.src/application/create_loan.py becomes 40-code-design/src/application/create_loan.py.mdWrite each file with this structure:
# Code Design: <target file>
## Metadata
- Layer: code-design
- Node ID: CODE-<target-path-slug>
- Parents:
- ../35-module-design/<parent>.md
- References:
- <relative-path-to-project-root>/01-glossary.md
- Target File: <path/to/code/file>
## Parent Coverage
## Directory / Package Shape
## File Responsibility
## Public Interfaces
## Data Structures
## Dependencies
## Operational Notes
## Test Strategy
## Open Questions
## Assumptions
## Exit Checks
1 code file = 1 md.Parent Coverage should explain the role this file plays inside its parent module or package.01-glossary.md, using and refining any shared type/class, variable/field, or other identifier hints when they become stable for the tree.Operational Notes should capture concrete file-level obligations implied by upstream non-functional requirements, such as logging hooks, audit fields, timeout handling, rate limiting seams, retry boundaries, or metrics emission.Open Questions only for issues that remain unresolved after the current discussion pass.Assumptions only for temporary working assumptions adopted after discussion.Public Interfaces, Dependencies, and Test Strategy should be specific enough that implementation can proceed without redesigning file responsibilities.Exit Checks should confirm that the target file scope, dependency direction, and test surface are all explicit.Report:
$sssdd-test