ccpe-system/.codex/skills/ccpe-forge/templates/ccpe-runtime.spec.md

365 lines
4.7 KiB
Markdown

---
artifact_type: ccpe-runtime
name:
runtime_id:
author:
version:
created:
updated:
status: draft
runtime_type:
target_platform:
based_on: CCPE System
related_agents:
related_skills:
related_models:
---
# {Runtime Name}
## 1. Runtime Overview
### 1.1 Purpose
<!-- What workflow or operating system does this Runtime define? -->
### 1.2 Runtime Type
Use one:
```text
interactive-runtime
automation-runtime
hybrid-runtime
```
### 1.3 Operating Mode
Use one:
```text
expert-mode
workshop-mode
automation-mode
hybrid-mode
```
### 1.4 Success Criteria
<!-- What makes this Runtime successful? -->
### 1.5 Non-Goals
<!-- What this Runtime should not do. -->
## 2. Participants
### 2.1 Human Role
<!-- What does the human user own or decide? -->
### 2.2 Agents
```text
- agent_id:
role:
responsibility:
invocation_condition:
```
### 2.3 Skills
```text
- skill_id:
purpose:
invocation_condition:
```
### 2.4 Tools
```text
- tool_name:
purpose:
permission:
```
## 3. Context Layer
### 3.1 Input Contract
<!-- What starts the Runtime? -->
### 3.2 Required Context
<!-- What context is required? -->
### 3.3 Optional Context
<!-- What context improves performance? -->
### 3.4 Shared Context
<!-- What context is shared across participants? -->
### 3.5 Source Policy
<!-- How does the Runtime treat retrieved, uploaded, or user-provided material? -->
## 4. Authority Layer
### 4.1 Autonomous Actions
<!-- What can run automatically? -->
### 4.2 Actions Requiring Confirmation
<!-- What needs approval? -->
### 4.3 Forbidden Actions
<!-- What must never happen? -->
### 4.4 Human Decision Gates
```text
Gate 1:
- Trigger:
- Human decision required:
- Possible outcomes:
Gate 2:
- Trigger:
- Human decision required:
- Possible outcomes:
```
### 4.5 Risk Levels
```text
Low:
Medium:
High:
Critical:
```
## 5. Workflow Layer
### 5.1 Runtime Stages
```text
Stage 1:
- Purpose:
- Actor:
- Input:
- Output:
- Human gate:
Stage 2:
- Purpose:
- Actor:
- Input:
- Output:
- Human gate:
```
### 5.2 Main Workflow
```text
1.
2.
3.
4.
5.
```
### 5.3 Branch Logic
<!-- How does the Runtime branch based on task type or result? -->
### 5.4 Loop Rules
<!-- When should stages repeat? -->
### 5.5 Stop Conditions
<!-- When is the Runtime complete? -->
### 5.6 Escalation Conditions
<!-- When should the Runtime stop and ask the user? -->
## 6. State Layer
### 6.1 Working State
<!-- What state is tracked during a run? -->
### 6.2 Persistent State
<!-- What state persists across runs? -->
### 6.3 Decision Log
<!-- What decisions must be recorded? -->
### 6.4 Artifact Log
<!-- What files or outputs are produced? -->
### 6.5 Resume Rules
<!-- How to resume after interruption. -->
## 7. Collaboration Layer
### 7.1 Handoff Protocol
<!-- What gets handed from one participant to another? -->
### 7.2 Role Differentiation
<!-- How do different Agents avoid duplicating each other? -->
### 7.3 Conflict Resolution
<!-- What happens when Agents disagree? -->
### 7.4 Synthesis Rules
<!-- How are outputs combined? -->
## 8. Output Layer
### 8.1 Runtime Outputs
<!-- What final artifacts are produced? -->
### 8.2 Intermediate Outputs
<!-- What intermediate artifacts are produced? -->
### 8.3 Output Format
```md
# {Runtime Output Title}
## 1. Run Summary
## 2. Stage Outputs
## 3. Decisions
## 4. Final Result
## 5. Open Questions
## 6. Archive Notes
```
### 8.4 Archival Rules
<!-- Where should outputs be stored? -->
## 9. Evaluation Layer
### 9.1 Validation Checklist
```text
Objective fulfilled?
Stages completed?
Human gates respected?
Outputs validated?
State updated?
Errors handled?
Artifacts archived?
```
### 9.2 Quality Rubric
<!-- Runtime-specific quality criteria. -->
### 9.3 Failure Modes
<!-- Common ways this Runtime can fail. -->
### 9.4 Recovery Rules
<!-- What to do after failure. -->
## 10. Runtime Environment
### 10.1 Platform
<!-- Codex / Claude Code / OpenClaw / manual / platform-neutral -->
### 10.2 File Access
<!-- What files can be read or written? -->
### 10.3 Tool Access
<!-- What tools are available? -->
### 10.4 Network Access
<!-- If relevant. -->
### 10.5 Logging
<!-- What should be logged? -->
### 10.6 Versioning
<!-- How versions are tracked. -->
## 11. Automation Boundary
### 11.1 Allowed Automation
```text
-
-
-
```
### 11.2 Requires Confirmation
```text
-
-
-
```
### 11.3 Forbidden Automation
```text
-
-
-
```
## 12. Deployment Notes
### 12.1 Codex
<!-- How this Runtime should be used inside Codex. -->
### 12.2 Claude Code
<!-- How this Runtime should be adapted to Claude Code. -->
### 12.3 OpenClaw
<!-- How this Runtime should be adapted to OpenClaw. -->
### 12.4 Manual Operation
<!-- How the user can run this manually. -->
## 13. Version Notes
```text
v0.1:
- Initial draft.
```