23 Commits

Author SHA1 Message Date
Jon Chery e8c6c5c917 feat(P05): ship infrastructure — Gitea API client, release notes, npm publishConfig, ciagent projects cmd, --project flag
---ci---
phase: 5
milestone: v1.0
plan: 05
task: SHIP-01-04 MULTI-01 MULTI-02
status: execute
---/ci---
v0.6.5
2026-05-29 18:15:58 +00:00
Jon Chery 4de1f65c10 feat(P04): pipeline stage delegation — EXECUTE=3 agents, TEST=tester, VERIFY=verifier, COMPLETE=doc-writer+ship
---ci---
phase: 4
milestone: v1.0
plan: 04
task: PIPE-01-04
status: execute
---/ci---
2026-05-29 18:13:39 +00:00
Jon Chery 6902c37ced fix(P03): improve planner task descriptions — avoid redundant REQ-ID in task lines
---ci---
phase: 3
milestone: v0.6.0
plan: 03
task: 03-03
status: execute
---/ci---
2026-05-29 18:11:49 +00:00
Jon Chery bbabd2dc0a feat(P03): core agent flesh — VerifierAgent, ResearcherAgent, TesterAgent intrinsic logic v0.6.4 2026-05-29 18:08:38 +00:00
Jon Chery 99df4fe4e2 feat(P02): orchestrator enrichment — GitAgentContext, multi-phase, error recovery, timer cleanup, TEST stage
---ci---
phase: 2
milestone: v0.6
status: execute
decisions:
  - id: D-001
    decision: Pass GitAgentContext to agents instead of bare AgentContext
    rationale: Agents need git-native context (gitContext, gitBranch, ciFiles, milestone) to operate autonomously
    confidence: 0.95
  - id: D-002
    decision: Implement multi-phase iteration with totalPhases derived from ROADMAP.md
    rationale: Milestones can span multiple phases; orchestrator must advance through all of them
    confidence: 0.90
  - id: D-003
    decision: Add executeStageWithRecovery with retry + plan revision + escalation
    rationale: Robust error recovery requires multiple fallback levels before giving up
    confidence: 0.85
  - id: D-004
    decision: Add timer-to-escalation mapping in EscalationProtocol for proper cleanup
    rationale: resolveEscalation must clearTimeout for the corresponding timer to prevent resource leaks
    confidence: 0.90
  - id: D-005
    decision: Add dispose() to EscalationProtocol called in orchestrator finally block
    rationale: Ensures all timers are cleaned up on orchestrator exit regardless of outcome
    confidence: 0.95
  - id: D-006
    decision: Add mechanical TEST stage fallback running npm test via execSync
    rationale: When no backend is available, tests can still be run mechanically
    confidence: 0.85
---/ci---
v0.6.3
2026-05-29 18:05:36 +00:00
Jon Chery 8527df24b3 fix(P01): rename ci-files.test.ts → ciagent-files.test.ts
---ci---
project: ci
phase: 1
milestone: v0.7
status: execute
requirements:
  covered: [RENAME-01, RENAME-02, RENAME-03, RENAME-04, RENAME-05, RENAME-06, RENAME-07, RENAME-08, RENAME-09, RENAME-10, RENAME-11, RENAME-12]
---/ci---

All 12 RENAME requirements covered. 31 test suites, 370 tests passing.
2026-05-29 18:03:31 +00:00
Jon Chery 4a58aa1657 refactor(rebrand): rename & rebrand CI → CIAgent across all source and test files
- Type renames: CIConfig → CIAgentConfig, DEFAULT_CI_CONFIG → DEFAULT_CIAGENT_CONFIG
- Type renames: CiMetadata → CIAgentMetadata, ParsedCiCommit → ParsedCIAgentCommit
- Function renames: initCI → initCIAgent, isCIInitialized → isCIAgentInitialized
- Function renames: extractCiBlock → extractCIAgentBlock, parseCiBlock → parseCIAgentBlock
- Class renames: CiFiles → CIAgentFiles
- Import paths: ci-files.js → ciagent-files.js
- Directory paths: .ci/ → .ciagent/ across all source and test files
- Check names: ".ci directory exists" → ".ciagent directory exists"
- Check names: "CI config valid" → "CIAgent config valid"
- Temp dir names: ci-*-test- → ciagent-*-test-
- CLI examples: "ci init" → "ciagent init"
- Fix deepMerge infinite recursion bug in config.ts
- ---ci---/---/ci--- block markers preserved unchanged
- All 31 test suites, 370 tests passing

---ci---
phase: 1
milestone: v0.5
plan: 07
task: 07-01-01
status: execute
---/ci---
v0.6.2
2026-05-29 18:01:13 +00:00
Jon Chery e31afe3b59 docs(rebrand): rename & rebrand CI → CIAgent across all documentation, templates, and scripts
- README.md: title, project name, CLI commands, .ci/ → .ciagent/, ci-files → ciagent-files, CI Modification → CIAgent Modification
- AGENTS.md: title, project name, architecture tree, agent count (18→19), test count (25→31 suites, 218→370 tests), version (0.4.0→0.6.0), ci-files → ciagent-files, CIConfig → CIAgentConfig, CiMetadata → CIAgentMetadata, .ci/ → .ciagent/
- templates/DECISIONS.md: .ci/audit/ → .ciagent/audit/, ci audit → ciagent audit
- scripts/postinstall.js: CI postinstall → CIAgent postinstall
- scripts/install.sh: CI → CIAgent, ci-init → ciagent-init, INSTALL COMPLETE banner
- opencode/ci/workflows/*.md (11 files): .ci/ → .ciagent/, CI → CIAgent project name, ci-command → ciagent-command usage lines
- opencode/ci/references/*.md (5 files): .ci/ → .ciagent/, CI → CIAgent project name, ci-files → ciagent-files references
- opencode/ci/contexts/*.md (3 files): .ci/ → .ciagent/, CI → CIAgent project name
- opencode/agents/ci-*.md (18 files): .ci/ → .ciagent/, CI → CIAgent project name
- opencode/command/ci-*.md (11 files): CI → CIAgent project name

Preserved: ---ci---/---/ci--- markers, opencode/ci/ dir paths, ci-*.md filenames, ci listProjects()/ci setActiveProject() API names, repo URLs

---ci---
phase: 1
milestone: v0.6
plan: 01-01
task: 01-01-01
status: execute
---/ci---
v0.6.1
2026-05-29 17:58:48 +00:00
Jon Chery ab6af144b7 feat(P06): 3-tier versioning, branch hierarchy enforcement, ARCHITECTURE-PLAN synthesis
---ci---
phase: 6
milestone: v0.5
status: complete
decisions:
  - id: D-006
    decision: Research as intermediate work product
    rationale: Conclusions update .ci/ files; full research doc intentionally not preserved
    confidence: 0.90
  - id: D-007
    decision: Branch hierarchy enforcement: main > milestone > phase
    rationale: Prevents out-of-order merges and semantically wrong tags
    confidence: 0.92
  - id: D-008
    decision: 3-tier versioning: NFR/feature/schema-breaking
    rationale: Patch per phase (NFR/feature) or minor per phase (schema-breaking); milestone gets minor (feature) or major (schema-breaking)
    confidence: 0.95
requirements:
  covered: [VER-06, BRANCH-01, BRANCH-02, ARCH-01]
---/ci---

- Synthesize ARCHITECTURE-PLAN.md into .ci/ci/ARCHITECTURE.md (expanded 51→230 lines)
- Add D-006/D-007/D-008 to .ci/ci/PROJECT.md key decisions table
- Delete ARCHITECTURE-PLAN.md after synthesis
- Rewrite ship.md with 3-tier versioning model + branch hierarchy merge flows
- Rewrite branch-strategy.md with 3-tier versioning + branch hierarchy + version validation
- Add MilestoneType to config types
- Replace isNfrMilestone() with getMilestoneType() returning nfr|feature|schema-breaking
- Add validateMergeOrder(), mergeMilestoneBranch(), computeMilestoneTag() to GitBranch
- Add computeShipVersion(), validateVersionOrder(), resolveMergeTarget() to ship command
- Remove hardcoded v0.5. from error-recovery rollback
- Create .githooks/pre-push for semver ordering + branch hierarchy validation
- Add 15 new tests (370 total, all passing)
v0.5.6 v0.6.0
2026-05-29 17:18:10 +00:00
Jon Chery 3d069319b5 feat(P05): implement parseRequirementsMd and parseArchitectureMd — real content parsing
---ci---
project: ci
phase: 5
milestone: v0.5
status: complete
decisions:
  - id: D-030
    decision: Phase 5 Parser Completeness complete
    rationale: All PARSE requirements covered; 31 suites, 355 tests
    confidence: 0.95
    alternatives: []
requirements:
  covered: [PARSE-01, PARSE-02]
---/ci---
v0.5.0 v0.5.5
2026-05-29 16:47:17 +00:00
Jon Chery b33431c1a6 feat(P04): verification intelligence — git-native coverage, npm audit, TS compilation
---ci---
project: ci
phase: 4
milestone: v0.5
status: complete
decisions:
  - id: D-028
    decision: Phase 4 Verification Intelligence complete
    rationale: All INTEL requirements covered; 31 suites, 355 tests
    confidence: 0.95
    alternatives: []
requirements:
  covered: [INTEL-01, INTEL-02, INTEL-03]
---/ci---
v0.5.4
2026-05-29 16:46:17 +00:00
Jon Chery 5753e2dc96 fix(P03): honest execution — real rollback, honest orchestrator, git-native verification
---ci---
project: ci
phase: 3
milestone: v0.5
status: complete
decisions:
  - id: D-026
    decision: Phase 3 Honest Execution complete
    rationale: All HONEST requirements covered; no more fake success returns
    confidence: 0.95
    alternatives: []
requirements:
  covered: [HONEST-01, HONEST-02, HONEST-03]
---/ci---
v0.5.3
2026-05-29 16:44:46 +00:00
Jon Chery 815c928a43 test(P02): backend test coverage — 4 new suites, 353 tests passing
---ci---
project: ci
phase: 2
milestone: v0.5
status: complete
decisions:
  - id: D-024
    decision: Phase 2 Backend Test Coverage complete
    rationale: All TEST requirements covered; 31 suites, 353 tests passing
    confidence: 0.95
    alternatives: []
requirements:
  covered: [TEST-01, TEST-02, TEST-03, TEST-04]
---/ci---
v0.5.2
2026-05-29 16:42:09 +00:00
Jon Chery a82926a22e fix(P01): quick wins — remove dead refs, unused imports, fix postinstall, version bump
---ci---
project: ci
phase: 1
milestone: v0.5
status: complete
decisions:
  - id: D-020
    decision: Phase 1 Quick Wins complete
    rationale: All 5 FIX requirements (FIX-01 through FIX-05) verified and passing
    confidence: 0.95
    alternatives: []
requirements:
  covered: [FIX-01, FIX-02, FIX-03, FIX-04, FIX-05]
---/ci---

Phase 1 (Quick Wins) summary:
- A1/FIX-01: Marked .planning/ refs as (legacy)/(removed) in docs
- A2/FIX-02: Removed unused execSync import from ollama-base.ts
- A3/FIX-03: Replaced postinstall with explicit install-opencode, removed scripts/ from files
- A4/FIX-04: Verified opencode.json is clean (no learnship entry)
- A5/FIX-05: Version bump to 0.5.0
v0.5.1
2026-05-29 16:39:26 +00:00
CI fb3f1df13e release(v0.4.0): purge learnship, migrate .planning→.ci, fix backends, add test coverage
- Remove all learnship references: Decision.learnship_equivalent field,
  agent persona prompts, opencode.json permissions, test fixtures
- Migrate verification layers from .planning/ to .ci/: structural
  checks .ci/ dir + ROADMAP.md, behavioral checks ROADMAP.md
- Fix ollama-local: remove sync require+curl blocking, use async
  fetchAvailableModels() in callModel
- Fix opencode.json: use __OPENCODE_DIR__ template tokens, remove
  legacy learnship permission entries
- Remove duplicate install script from package.json (keep postinstall)
- Fix quality any-regex false positives (target type annotations only)
- Add backends test coverage: backends.test.ts, tool-registry.test.ts
- Version bump 0.3.0 → 0.4.0
- Artifacts module: rename .planning→.ci internal paths
- Remove dead TODO_PATTERN/FIXME_PATTERN constants

---ci---
phase: 3
milestone: v0.4
status: complete
requirements:
  covered: [REQ-09, REQ-10, REQ-11, REQ-13, REQ-14, REQ-17]
  partial: []
decisions:
  - id: D-001
    decision: purge all learnship references from codebase
    rationale: project is CI-only, learnship is no longer a dependency
    confidence: 0.99
    category: scope
    alternatives: [keep for historical reference]
  - id: D-002
    decision: migrate verification from .planning/ to .ci/ paths
    rationale: .planning/ is removed schema, all current state lives in .ci/
    confidence: 0.95
    category: architecture
    alternatives: [keep dual-path support]
  - id: D-003
    decision: use __OPENCODE_DIR__ template tokens in opencode.json
    rationale: hardcoded ~ paths fail in containers and non-standard homes
    confidence: 0.90
    category: implementation_approach
    alternatives: [keep tilde expansion]
---/ci---
v0.4.0
2026-05-29 16:18:30 +00:00
CI 7a20784c87 fix: remove hardcoded /home/jchery paths, use __OPENCODE_DIR__ template token resolved at install time
Command markdown files now use __OPENCODE_DIR__ placeholder instead of
hardcoded user path. Both postinstall.js and install.sh perform template
replacement when copying files to ~/.config/opencode/, making CI portable
across any user/machine/container.
2026-05-29 16:08:46 +00:00
CI 940b85bfae feat(backends): multi-backend intelligence layer — LLM + Agent backends, persona-loading agents, honest CLI commands
Add IntelligenceBackend abstraction with two categories:
- LLMBackend (OllamaLocal, OllamaCloud): CI runs tool loop, provides tools, constructs prompts
- AgentBackend (Opencode): agent runs own tool loop, CI serializes request

Refactor all 18 agents from hardcoded stubs to persona loaders that delegate
to the active backend or fail honestly when no backend is available.

Refactor OrchestratorAgent.executeStage() from monolithic switch to agent
delegation via STAGE_AGENT_MAP for intelligent stages (research, plan, execute,
verify), with mechanical stages (specify, clarify, complete) staying inline.

Wire CLI commands with --backend flag and auto-detection (opencode →
ollama-local → ollama-cloud). Harden rollback/ship with real git operations.
No command returns fake success.
2026-05-29 15:58:34 +00:00
CI ddf04792c7 feat(P03): multi-project support, NFR milestone versioning, phase context reset, install scripts (v0.3.0) v0.3.0 2026-05-29 15:13:45 +00:00
CI e4bb3a9970 fix(P02): mandatory releases for every phase and milestone — correct versioning
---ci---
phase: 2
milestone: v0.2
status: execute
decisions:
  - id: D-016
    decision: Every ship creates a release — phases get patch, milestones get minor/major
    rationale: Releases are not optional. Every phase must be tagged and released. Milestone completion also gets a release. Major for schema changes, Minor for milestones, Patch for phases.
    confidence: 0.99
    alternatives: [optional releases, phase-only releases]
---/ci---

- ship.md: rewritten with mandatory release flow and versioning table (Major/Minor/Patch)
- run.md: COMPLETE stage now includes tag + release as mandatory steps
- branch-strategy.md: added Versioning and Releases section with merge→tag→release examples
2026-05-29 13:35:51 +00:00
grimacing 2f738c33b7 feat(P02): opencode integration layer (#2)
18 CI agents, 11 workflows, 11 commands, 5 references, 3 contexts. Zero learnship dependencies.
2026-05-29 13:27:29 +00:00
CI eedcdd4282 docs: rewrite README for v0.2.0 git-native architecture
---ci---
phase: 1
milestone: v0.2.0
status: complete
---/ci---

- Replace npm install with from-source instructions (package not published yet)
- Add git-native architecture section with commit schema, branch strategy, reconstruction test
- Add .ci/ file table explaining what lives where
- Fix <repo-url> placeholder with actual Gitea URL
- Add Current Limitations section (agent stubs, no npm publish, partial verif layers)
- Update Differences from Learnship table for git-native era
- Update Decision Engine section: audit trail is now git log
- Update Agents table with orchestrator git-first modification
2026-05-29 13:10:27 +00:00
grimacing 6e637e4af0 v0.2.0: Git-native architecture (#1) v0.2.0 2026-05-29 12:59:45 +00:00
CI 9cf5c000d9 feat: implement CI (Continuous Intelligence) autonomous engineering harness
Implements the full PRD for CI - a fully autonomous AI-driven software
engineering harness derived from Learnship's architecture.

Core components:
- CI Orchestrator agent with autonomous pipeline (SPECIFY → CLARIFY →
  RESEARCH → PLAN → EXECUTE → VERIFY → COMPLETE)
- Decision Engine with confidence thresholds (high/medium/low)
- Clarify Phase with question budget and default acceptance
- Escalation Protocol with timeout auto-proceed
- Audit Trail system (.ci/audit/) for post-hoc review
- Error Recovery with retry, plan revision, and rollback

18 agents (all Learnship agents + Orchestrator):
- Autonomous behavioral modifications per PRD §7.1
- Agent registry with factory pattern

11 CLI commands:
- ci init, ci run, ci quick, ci debug, ci verify
- ci review, ci status, ci audit, ci clarify
- ci rollback, ci ship

4-layer verification system:
- Structural, Behavioral, Security, Code Quality

3 autonomy levels: full, supervised, guided
Compatible with Learnship artifact schemas (.planning/)
2026-05-28 23:24:42 +00:00