Files
ci/opencode/ci/workflows/ship.md
T
CI cf5e7695fd feat(P03): multi-project support, NFR milestone versioning, phase context reset, install scripts
---ci---
phase: 3
milestone: v0.3.0
status: complete
decisions:
  - id: D-006
    decision: Multi-project via .ci/<slug>/ subdirectories and config.json registry
    rationale: Backward compatible migration from flat files; slug-based namespacing for branches and commits
    confidence: 0.92
    alternatives: [Git worktrees, Separate repos with subtrees]
  - id: D-007
    decision: NFR milestones use progressive patch versioning (no minor tag)
    rationale: NFR phases (fix/chore/docs/perf/refactor/test) don't represent feature delivery; patch increments reflect incremental improvement only
    confidence: 0.90
    alternatives: [Treat all milestones uniformly, Skip versioning for NFR]
  - id: D-008
    decision: Phase context reset via git checkpoint + fresh agent spawn
    rationale: Git-native architecture makes full state serialization safe; fresh context prevents accumulated conversation drift
    confidence: 0.88
    alternatives: [Context compaction, Sliding window summarization]
  - id: D-009
    decision: Install via both npm postinstall and standalone bash script
    rationale: Postinstall only fires on npm install -g; standalone script covers manual/cloned installs
    confidence: 0.95
    alternatives: [Postinstall only, Makefile target]
---/ci---

Source code:
- Added ProjectEntry, projects[], active_project to CIConfig
- Added project?: string to CiMetadata, CommitScope, all commit input types
- CiFiles: multi-project support (projectSlug, listProjects, addProject, migrateFlatToProject, isNfrMilestone)
- GitContext: projectSlug support, detectProjectFromCommit(), isNfrMilestone()
- GitBranch: project-prefixed branch naming via prefix()
- commit-builder/parser: project field in ---ci--- blocks
- config.ts: initCI() accepts projectSlug/projectName
- Implemented parseRoadmapMd phase parsing
- 284 tests passing (66 new tests)

Install scripts:
- scripts/install.sh: Standalone bash installer
- scripts/postinstall.js: npm postinstall (global installs only)

OpenCode integration:
- All 18 agents updated with multi-project project_context
- All 11 workflows updated with Step 0: Confirm Active Project
- All 5 references updated (branch-strategy, ci-files-discipline, commit-schema, decision-engine, git-context-loading)
- All 3 contexts updated (dev, research, review)
- VERSION bumped to 0.3.0

Package:
- Added files field, postinstall script, install script alias
- Version bumped to 0.3.0
2026-05-29 14:11:49 +00:00

4.8 KiB

description
description
Ship CI phase or milestone — test, tag, release. Every phase gets a patch release. Every milestone gets a minor (or major) release. Full autopilot.

CI Ship

Ship a CI phase or milestone. Every ship creates a release — no exceptions.

Versioning rule:

  • Major (X.0.0): Project-level refactor or schema changes
  • Minor (0.X.0): Feature milestone completion only
  • Patch (0.0.X): Every phase completion

NFR versioning:

  • NFR milestones (all phases are fix/chore/docs/perf/refactor/test): progressive patch versions only (v0.1.1, v0.1.2, v0.1.3). No minor milestone tag.
  • Feature milestones (any feat phase): progressive patch versions per phase + minor milestone tag on completion (e.g., v0.2.0).

Usage: ci-ship [phase_number|milestone]

Step 0: Confirm Active Project

Check ci listProjects() or read .ci/config.json to determine if multi-project mode is active.

If .ci/config.json has projects[] with length > 0:

  • Confirm active_project is correct for this ship
  • If not, set it with ci setActiveProject(<slug>)
  • All commit messages must include project: <slug> in ---ci--- block
  • Branch names are prefixed with <slug>/ in multi-project mode

If single-project mode: proceed with existing conventions.

Step 1: Pre-Flight

git log --max-count=10
git branch -a

Determine what is being shipped: a single phase (patch release) or an entire milestone (minor/major release).

Read .ci/ROADMAP.md to determine:

  • Current milestone version (e.g., v0.2)
  • Phase number within the milestone
  • Whether this is the last phase in the milestone

Read .ci/config.json for autonomy level.

Step 2: Run Tests

npm test
npm run typecheck
npm run build

If any fail: iterate autonomously until tests pass. Do NOT ask the user for guidance — debug and fix.

Step 3: Compute Version

Determine the release version from what is being shipped. Check isNfrMilestone() for versioning behavior:

What's shipping Milestone Type Version bump Tag format Example
Single phase NFR Patch vX.Y.Z v0.1.3 (3rd NFR phase in milestone v0.1)
Single phase Feature Patch vX.Y.Z v0.2.3 (3rd phase in feature milestone v0.2)
Milestone completion NFR Patch (last phase) vX.Y.Z v0.1.3 (no minor tag)
Milestone completion Feature Minor vX.Y.0 v0.3.0 (feature milestone v0.3 complete)
Project refactor/schema change Any Major vX.0.0 v1.0.0 (breaking schema)

Count completed phases in the current milestone to determine the patch number.

Step 4: Merge Branch

Phase ship (patch release)

git checkout main
git merge --squash phase/NN-slug
git commit -m "docs(P##): complete [phase-name] phase

---ci---
phase: [N]
milestone: [vX.Y]
status: complete
requirements:
  covered: [REQ-01, REQ-02]
  partial: []
---/ci---"

Milestone ship (minor/major release)

git checkout main
git merge --squash milestone/vX.Y-slug
git commit -m "docs(milestone): complete [milestone-name]

---ci---
phase: 0
milestone: [vX.Y]
status: complete
---/ci---"

Step 5: Tag and Push

git tag -a vX.Y.Z -m "vX.Y.Z: [phase-name or milestone-name]"
git push origin main --tags

Step 6: Create Release

Every ship creates a Gitea release. No exceptions.

Generate release notes from git log:

git log v[previous_tag]..vX.Y.Z --oneline

Create the release via Gitea API:

curl -X POST "https://git.cloudinit.dev/api/v1/repos/continuous-intelligence/ci/releases" \
  -H "Authorization: token $GITEA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"tag_name":"vX.Y.Z","name":"vX.Y.Z","body":"[release notes from git log]"}'

For milestone releases, include a summary of all phases completed and requirements covered.

Step 7: Update .ci/ Files

  • Update .ci/REQUIREMENTS.md — mark shipped requirements as complete
  • Update .ci/ROADMAP.md — mark shipped phase as complete

Commit the file updates.

Step 8: Report

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 CI ► SHIPPED
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Phase [N]: [name]
Milestone: [vX.Y]
Version: vX.Y.Z
Release: https://git.cloudinit.dev/continuous-intelligence/ci/releases/tag/vX.Y.Z
Status: complete

Tests: PASS
Typecheck: PASS
Build: PASS

Requirements covered: [N]
Commits: [N]

[If milestone complete:]
All phases in milestone v0.2 complete. Milestone released.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━