Skip to main content

Project Lifecycle Specification

Version: 1.0.0 Status: DRAFT Created: 2026-01-27 Epic: Integration from RCSD Pipeline + Protocol Stack

RFC 2119 Conformance

The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in BCP 14 [RFC 2119] [RFC 8174] when, and only when, they appear in all capitals.

Part 1: Preamble

1.1 Purpose

This specification defines the Project Lifecycle - the end-to-end workflow for taking an idea from research through release. It integrates:
  • RCSD Pipeline (Research → Consensus → Specification → Decomposition)
  • Protocol Stack (7 conditional protocols for subagent work)
  • Release Workflow (automated release management)

1.2 Scope

This specification is AUTHORITATIVE for:
  • Lifecycle stage definitions and transitions
  • Protocol selection per lifecycle stage
  • Release workflow integration
  • Orchestrator coordination patterns
This specification DEFERS TO:

Part 2: Lifecycle Stages

2.1 Full Lifecycle Diagram

┌─────────────────────────────────────────────────────────────────────────────┐
│                         PROJECT LIFECYCLE                                   │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                             │
│  ┌────────────────── RCSD PIPELINE ──────────────────┐                      │
│  │                                                    │                      │
│  │  ┌──────────┐   ┌───────────┐   ┌──────────────┐  │   ┌──────────────┐   │
│  │  │ RESEARCH │ → │ CONSENSUS │ → │SPECIFICATION │  │ → │ DECOMPOSITION│   │
│  │  │          │   │           │   │              │  │   │              │   │
│  │  │ Protocol:│   │ Protocol: │   │ Protocol:    │  │   │ Protocol:    │   │
│  │  │ research │   │ consensus │   │ specification│  │   │ decomposition│   │
│  │  └──────────┘   └───────────┘   └──────────────┘  │   └──────────────┘   │
│  │                                                    │                      │
│  └────────────────────────────────────────────────────┘                      │
│                              │                                               │
│                              ▼                                               │
│  ┌───────────────── EXECUTION PHASE ─────────────────┐                      │
│  │                                                    │                      │
│  │  ┌───────────────┐   ┌──────────────┐   ┌───────┐ │                      │
│  │  │IMPLEMENTATION │ → │ CONTRIBUTION │ → │RELEASE│ │                      │
│  │  │               │   │              │   │       │ │                      │
│  │  │ Protocol:     │   │ Protocol:    │   │Script:│ │                      │
│  │  │implementation │   │ contribution │   │release│ │                      │
│  │  │               │   │              │   │-version│                       │
│  │  └───────────────┘   └──────────────┘   └───────┘ │                      │
│  │                                                    │                      │
│  └────────────────────────────────────────────────────┘                      │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘

2.2 Stage Definitions

StagePhaseProtocolPurposeOutput
Researchsetupprotocols/research.mdGather information, explore optionsResearch findings, sources
Consensussetupprotocols/consensus.mdValidate claims, resolve disputesVoting records, verdicts
Specificationsetupprotocols/specification.mdDefine requirements formallyRFC 2119 spec document
Decompositionsetupprotocols/decomposition.mdBreak into atomic tasksTask hierarchy, waves
Implementationcoreprotocols/implementation.mdBuild functionalityCode, tests
Contributioncoreprotocols/contribution.mdTrack multi-agent workContribution records
Releasepolishprotocols/release.md + cleo release shipVersion, changelog, publishTagged release

2.3 Protocol Selection Matrix

Task TypeKeywordsAuto-Selected Protocol
Researchresearch, investigate, explore, surveyresearch
Planningepic, plan, decompose, architectdecomposition
Specificationspec, rfc, protocol, contractspecification
Implementationimplement, build, execute, createimplementation
Validationvalidate, verify, audit, complianceconsensus
Releaserelease, version, publish, deployrelease

Part 3: Protocol Stack Architecture

3.1 Two-Tier Structure

┌─────────────────────────────────────────────────────────────┐
│ BASE PROTOCOL (Always Active)                               │
│ - OUT-001: Write findings to OUTPUT_DIR                     │
│ - OUT-002: Append ONE line to MANIFEST.jsonl                │
│ - OUT-003: Return ONLY summary message                      │
│ - OUT-004: MUST NOT return content in response              │
├─────────────────────────────────────────────────────────────┤
│ CONDITIONAL PROTOCOLS (Max 3 Active)                        │
│ - Selected based on task type/keywords                      │
│ - Injected via skill_prepare_spawn()                        │
│ - Defines stage-specific requirements                       │
└─────────────────────────────────────────────────────────────┘

3.2 Seven Conditional Protocols

ProtocolFileagent_typeTrigger Keywords
Researchprotocols/research.mdresearchresearch, investigate, explore
Consensusprotocols/consensus.mdanalysisvote, decide, validate claim
Specificationprotocols/specification.mdspecificationspec, rfc, define protocol
Decompositionprotocols/decomposition.mdanalysisepic, plan, decompose
Implementationprotocols/implementation.mdimplementationimplement, build, code
Contributionprotocols/contribution.mdimplementationPR, merge, shared resource
Releaseprotocols/release.mddocumentationrelease, version, publish

3.3 Protocol Interactions

Research ──┬──→ Specification ──→ Implementation ──→ Contribution ──→ Release
           │                           │
           └──→ Consensus ─────────────┘

           Decomposition ──→ (feeds task list)

Part 4: Release Workflow Integration

4.1 Release Commands

CommandPurposeWhen to Use
cleo release create <version>Register a new release, assign tasksStart of release cycle
cleo release plan <version>Modify tasks, add notesAdjust release scope
cleo release ship <version>Full release: bump, changelog, commit, tag, pushShip the release
dev/bump-version.shUpdates VERSION + README onlyVersion bump without release
IMPORTANT: dev/release-version.sh is DEPRECATED (since v0.78.0). Use cleo release ship.

4.2 Release Protocol + CLI Integration

The release protocol defines requirements; cleo release ship automates execution:
┌─────────────────────────────────────────────────────────────┐
│ RELEASE PROTOCOL (protocols/release.md)                     │
├─────────────────────────────────────────────────────────────┤
│ RLSE-001: MUST follow semver                                │
│ RLSE-002: MUST update changelog                             │
│ RLSE-003: MUST pass validation gates                        │
│ RLSE-004: MUST tag release                                  │
│ RLSE-005: MUST document breaking changes                    │
│ RLSE-006: MUST verify version consistency                   │
│ RLSE-007: MUST set agent_type: "documentation"              │
└─────────────────────────────────────────────────────────────┘


┌─────────────────────────────────────────────────────────────┐
│ cleo release ship (Implementation)                          │
├─────────────────────────────────────────────────────────────┤
│ 1. Auto-discover tasks (populate_release_tasks)             │
│ 2. Bump version (--bump-version calls bump-version.sh)      │
│ 3. Generate changelog + Mintlify output                     │
│ 4. Run validation gates (cleo validate)                     │
│ 5. Set status=released (before commit)                      │
│ 6. Create git commit                                        │
│ 7. Create git tag (--create-tag)                            │
│ 8. Push to remote (--push)                                  │
└─────────────────────────────────────────────────────────────┘

4.3 Release Workflow Commands

# Create a release with specific tasks
cleo release create v0.85.0 --tasks T001,T002

# Preview what would happen
cleo release ship v0.85.0 --bump-version --dry-run

# Ship: bump version, tag, push
cleo release ship v0.85.0 --bump-version --create-tag --push

# List all releases
cleo release list

# Show release details
cleo release show v0.85.0

4.4 Pre-Release Checklist (RLSE-003)

GateCommandRequired
Tests pass./tests/run-all-tests.shMUST
Lint cleanshellcheck scripts/*.sh lib/*.shMUST
Schema validcleo validateMUST
Version bumped./dev/bump-version.sh X.Y.ZMUST
Changelog updatedEdit CHANGELOG.mdMUST
Docs currentReview docs/SHOULD
Install tested./install.shSHOULD

Part 5: Orchestrator Integration

5.1 Orchestrator Role in Lifecycle

The Orchestrator (ct-orchestrator) coordinates the lifecycle by:
  1. Session Management: Starting/resuming sessions scoped to epics
  2. Protocol Selection: Using skill_auto_dispatch() to select protocols
  3. Subagent Spawning: Using skill_prepare_spawn() for token injection
  4. Progress Tracking: Reading MANIFEST.jsonl for subagent outputs
  5. Release Coordination: Triggering release workflow when phase complete

5.2 Orchestrator Lifecycle Commands

# Start lifecycle for new feature
cleo session start --scope epic:T001 --auto-focus --name "Feature-X"

# Spawn subagent with auto-selected protocol
cleo orchestrator spawn T002  # Auto-detects task type → selects protocol

# Check progress
cleo research list --status complete

# Trigger release when ready
cleo release create v0.74.0 --tasks T002,T003
cleo release ship v0.74.0 --bump-version --create-tag --push

# End session
cleo session end --note "Feature complete, released v0.74.0"

5.3 Dispatch Matrix Updates

The dispatch matrix in skills/manifest.json SHOULD be extended for release:
{
  "dispatch_matrix": {
    "by_task_type": {
      "release": "ct-dev-workflow"
    },
    "by_keyword": {
      "release|version|publish|deploy|ship": "ct-dev-workflow"
    }
  }
}

Part 6: RCSD Pipeline Integration

6.1 RCSD-to-Protocol Mapping

RCSD StageProtocolSkillOutput
R: Researchprotocols/research.mdct-research-agent.cleo/rcsd/T###/research/
C: Consensusprotocols/consensus.mdct-validator.cleo/rcsd/T###/consensus/
S: Specificationprotocols/specification.mdct-spec-writer.cleo/rcsd/T###/spec/
D: Decompositionprotocols/decomposition.mdct-epic-architect.cleo/rcsd/T###/tasks/

6.2 Post-RCSD Execution

After RCSD completes (tasks decomposed), execution begins:
RCSD Complete → Implementation → Contribution → Release
      │               │               │            │
      │               │               │            │
      ▼               ▼               ▼            ▼
 Task list      Code + tests     Commits      Tag + push
 in CLEO                         tracked

6.3 Full Workflow Example

# 1. RESEARCH STAGE
cleo add "Research: OAuth patterns" --type epic --phase setup
cleo session start --scope epic:T100 --auto-focus
cleo orchestrator spawn T100  # research protocol

# 2. CONSENSUS STAGE (validate findings)
cleo add "Validate OAuth recommendations" --parent T100
cleo orchestrator spawn T101  # consensus protocol

# 3. SPECIFICATION STAGE
cleo add "Write OAuth Spec" --parent T100
cleo orchestrator spawn T102  # specification protocol

# 4. DECOMPOSITION STAGE
cleo add "Decompose OAuth epic" --parent T100
cleo orchestrator spawn T103  # decomposition protocol
# Creates: T104, T105, T106... (atomic implementation tasks)

# 5. IMPLEMENTATION STAGE
cleo focus set T104
cleo orchestrator spawn T104  # implementation protocol
cleo complete T104

# 6. CONTRIBUTION STAGE (automatic for shared resources)
# contribution protocol auto-triggers when modifying CLAUDE.md, lib/, etc.

# 7. RELEASE STAGE
cleo add "Release v0.75.0 with OAuth" --parent T100 --phase polish
cleo release create v0.75.0 --tasks T104,T105,T106
cleo release ship v0.75.0 --bump-version --create-tag --push
cleo complete T107  # release task

# End session
cleo session end --note "OAuth feature complete, released v0.75.0"

Part 7: Conformance

7.1 Required Protocol Support

A conforming orchestrator MUST:
  1. Support all 7 conditional protocols
  2. Auto-select protocols based on task type/keywords
  3. Inject protocols via skill_prepare_spawn()
  4. Track outputs via MANIFEST.jsonl
  5. Support release workflow integration

7.2 Required Release Support

A conforming release workflow MUST:
  1. Follow RLSE-001 through RLSE-007 requirements
  2. Use cleo release createcleo release ship for automation
  3. Generate Mintlify changelog
  4. Create git tags
  5. Update version consistently across files

Appendix A: Quick Reference

Protocol File Locations

protocols/
├── research.md        # RSCH-001 to RSCH-022
├── consensus.md       # CONS-001 to CONS-022
├── specification.md   # SPEC-001 to SPEC-022
├── decomposition.md   # DCMP-001 to DCMP-022
├── implementation.md  # IMPL-001 to IMPL-022
├── contribution.md    # CONT-001 to CONT-022
└── release.md         # RLSE-001 to RLSE-022

Release Commands & Scripts

# Primary release workflow (use these):
cleo release create <version>      # Register release
cleo release ship <version>        # Full release flow

# Supporting scripts (called internally by cleo release ship):
dev/
├── bump-version.sh                # Version + README only
├── release-version.sh             # DEPRECATED - use cleo release ship
└── validate-version.sh            # Version consistency check

scripts/
└── generate-changelog.sh          # CHANGELOG.md → Mintlify MDX

Shared Protocol References

skills/_shared/
├── task-system-integration.md   # CLEO command tokens
└── subagent-protocol-base.md    # OUT-001 to OUT-004 (base protocol)

Appendix B: Changelog

VersionDateChanges
1.0.02026-01-27Initial specification integrating RCSD + Protocol Stack + Release

End of Specification