-
p1- ID:cpt-{system}-featstatus-{feature-slug}-implemented
-
p2-cpt-{system}-feature-{slug}
{Brief overview of what this feature does — 1-2 sentences.}
{Why this feature exists, what PRD requirements or DESIGN element it addresses.}
Requirements: cpt-{system}-fr-{slug}, cpt-{system}-nfr-{slug}
Principles: cpt-{system}-principle-{slug}
| Actor | Role in Feature |
|---|---|
cpt-{system}-actor-{slug} |
{What this actor does in this feature} |
User-facing interactions that start with an actor (human or external system) and describe the end-to-end flow of a use case. Each flow has a triggering actor and shows how the system responds to actor actions.
Use cases: cpt-{system}-usecase-{slug}
CDSL pseudo-code is optional. Use detailed steps for early-stage projects, complex domains, or when you need to clearly communicate expected behavior. Skip for mature teams or simple features to avoid documentation overhead.
-
p1- ID:cpt-{system}-flow-{feature-slug}-{slug}
Actor: cpt-{system}-actor-{slug}
Success Scenarios:
- {Scenario 1}
Error Scenarios:
- {Error scenario 1}
Steps:
- -
p1- {Actor action} -inst-{step-id} - -
p1- {API: METHOD /path (request/response summary)} -inst-{step-id} - -
p1- {DB: OPERATION table(s) (key columns/filters)} -inst-{step-id} - -
p1- IF {condition} -inst-{step-id}- -
p1- {Action if true} -inst-{step-id}
- -
- -
p1- ELSE -inst-{step-id}- -
p1- {Action if false} -inst-{step-id}
- -
- -
p1- RETURN {result} -inst-{step-id}
Internal system functions and procedures that do not interact with actors directly. Examples: database layer operations, authorization logic, middleware, validation routines, library functions, background jobs. These are reusable building blocks called by Actor Flows or other processes.
CDSL pseudo-code is optional. Same guidance as Actor Flows — use when clarity matters, skip when it becomes overhead.
-
p2- ID:cpt-{system}-algo-{feature-slug}-{slug}
Input: {Input description}
Output: {Output description}
Steps:
- -
p1- {Parse/normalize input} -inst-{step-id} - -
p1- {DB: OPERATION table(s) (key columns/filters)} -inst-{step-id} - -
p1- {API: METHOD /path (request/response summary)} -inst-{step-id} - -
p1- FOR EACH {item} in {collection} -inst-{step-id}- -
p1- {Process item} -inst-{step-id}
- -
- -
p1- TRY -inst-{step-id}- -
p1- {Risky operation} -inst-{step-id}
- -
- -
p1- CATCH {error} -inst-{step-id}- -
p1- {Handle error} -inst-{step-id}
- -
- -
p1- RETURN {result} -inst-{step-id}
Optional: Include when entities have explicit lifecycle states.
-
p2- ID:cpt-{system}-state-{feature-slug}-{slug}
States: {State1}, {State2}, {State3}
Initial State: {State1}
Transitions:
- -
p1- FROM {State1} TO {State2} WHEN {condition} -inst-{step-id} - -
p1- FROM {State2} TO {State3} WHEN {condition} -inst-{step-id}
Specific implementation tasks derived from flows/algorithms above.
-
p1- ID:cpt-{system}-dod-{feature-slug}-{slug}
The system MUST {clear description of what to implement}.
Implements:
cpt-{system}-flow-{feature-slug}-{slug}
Constraints: cpt-{system}-constraint-{slug}
Touches:
- API:
{METHOD} {/path} - DB:
{table} - Entities:
{EntityName}
- {Testable criterion for this feature}
- {Another testable criterion}