feat(ci): v0.9.0 — Distribution & Expansion milestone complete
---ci---
project: ci
phase: 6
milestone: v0.9
status: complete
artifacts:
tags: [v0.9.0]
decisions:
- id: D-047
decision: v0.9 theme = Distribution & Expansion
rationale: npm publish + OpenAI/Anthropic backends + agent flesh + parallel execution
confidence: 0.92
- id: D-049
decision: Feature milestone — patch tags v0.8.1-v0.8.6 then v0.9.0
rationale: OpenAI backend, agent flesh, npm publish all feat
confidence: 0.95
- id: D-059
decision: Rename OllamaBaseBackend to LLMBaseBackend + thin OllamaBaseBackend subclass
rationale: 15 of 17 methods backend-agnostic
confidence: 0.92
- id: D-060
decision: OpenAI/Anthropic backends use native fetch() not SDK packages
rationale: No dependency bloat; fetch native in Node 18+
confidence: 0.85
- id: D-066
decision: Concurrency limiter internal (no p-limit dependency)
rationale: 15 lines; avoids dependency for trivial feature
confidence: 0.90
- id: D-067
decision: Promise.allSettled for review agents at orchestrator lines 373-400
rationale: Current sequential loop replaced with parallel execution
confidence: 0.88
requirements:
covered: [PUBLISH-01, PUBLISH-02, PUBLISH-03, PUBLISH-04, OPENAI-01, OPENAI-02, OPENAI-03, OPENAI-04, OPENAI-05, FLESH-01, FLESH-02, FLESH-03, FLESH-04, FLESH-05, ANTHROPIC-01, ANTHROPIC-02, FLESH-06, FLESH-07, NPM-01, NPM-02, PARALLEL-01, PARALLEL-02, PARALLEL-03, INTEG-01, INTEG-02, INTEG-03, INTEG-04, INTEG-05]
---/ci---
6 phases, 28 tasks, 4077 net lines added, 57 test suites, 527 tests, zero stub agents
This commit is contained in:
@@ -19,9 +19,11 @@ src/
|
||||
backends/ # Intelligence backend layer
|
||||
types.ts # IntelligenceBackend, BackendRequest, BackendResult, BackendConfigSection
|
||||
tool-registry.ts # CIAgent-owned tool implementations (readFile, writeFile, editFile, runBash, glob, grep)
|
||||
ollama-base.ts # Abstract base for Ollama backends (shared tool loop, prompt construction)
|
||||
llm-base.ts # Abstract base for LLM backends (shared tool loop, prompt construction)
|
||||
ollama-local.ts # OllamaLocalBackend (localhost:11434)
|
||||
ollama-cloud.ts # OllamaCloudBackend (remote endpoint, auth, rate limiting)
|
||||
openai.ts # OpenAIBackend (OpenAI API, gpt-4o)
|
||||
anthropic.ts # AnthropicBackend (Anthropic API, Claude)
|
||||
opencode.ts # OpencodeBackend (shells out to opencode --non-interactive)
|
||||
index.ts # Backend registry + auto-detection
|
||||
cli/ # Commander.js CLI (commands.ts, index.ts)
|
||||
@@ -53,7 +55,7 @@ src/
|
||||
security.ts # Layer 3: regex-based threat pattern scanning (no STRIDE analysis yet)
|
||||
quality.ts # Layer 4: regex-based code quality checks (no multi-persona review yet)
|
||||
index.ts # Public API exports
|
||||
version.ts # VERSION = "0.7.0"
|
||||
version.ts # VERSION = "0.9.0"
|
||||
templates/ # Template files (config.json, DECISIONS.md, specification.md)
|
||||
```
|
||||
|
||||
@@ -94,7 +96,8 @@ IntelligenceBackend (unified interface)
|
||||
├── LLMBackend (CIAgent runs tool loop, provides tools, constructs prompts)
|
||||
│ ├── OllamaLocalBackend (localhost:11434, no auth)
|
||||
│ ├── OllamaCloudBackend (remote endpoint, API key, rate limits)
|
||||
│ └── (future: OpenAI, Anthropic, Gemini, etc.)
|
||||
│ ├── OpenAIBackend (OpenAI API, gpt-4o, API key auth)
|
||||
│ └── AnthropicBackend (Anthropic API, Claude, API key auth)
|
||||
└── AgentBackend (agent runs own tool loop, CIAgent sends request)
|
||||
├── OpencodeBackend (opencode --non-interactive)
|
||||
└── (future: Codex, Claude Code, Hermes, etc.)
|
||||
@@ -102,8 +105,8 @@ IntelligenceBackend (unified interface)
|
||||
|
||||
- **LLM backends**: CIAgent constructs system prompts from persona.md + workflow.md, defines tool schemas, runs the tool-call loop via `ToolRegistry`, and parses structured JSON output
|
||||
- **Agent backends**: CIAgent serializes `BackendRequest`, invokes the agent, and parses JSON `BackendResult` from stdout
|
||||
- **Auto-detection** (provider: "auto"): tries opencode → ollama-local → ollama-cloud → fails with instructions
|
||||
- **Per-command override**: `ciagent run --backend ollama-local` forces a specific backend
|
||||
- **Auto-detection** (provider: "auto"): tries opencode → openai → ollama-local → ollama-cloud → anthropic → fails with instructions
|
||||
- **Per-command override**: `ciagent run --backend ollama-local` forces a specific backend (options: opencode, openai, anthropic, ollama-local, ollama-cloud)
|
||||
- **Config**: `backend` section in `.ciagent/config.json` with provider, fallback, agent_backends, llm_backends
|
||||
|
||||
## Agent Modification Rules (from PRD)
|
||||
@@ -131,7 +134,7 @@ IntelligenceBackend (unified interface)
|
||||
- Test framework: Jest with ts-jest
|
||||
- Test file pattern: `**/*.test.ts` in `src/`
|
||||
- Run: `npm run test`
|
||||
- 44 test suites, 454 tests covering types, core, git-native, verification, agent, backends, and utility modules
|
||||
- 57 test suites, 527 tests covering types, core, git-native, verification, agent, backends, and utility modules
|
||||
- Tests use temp directories (os.mkdtempSync) and clean up after each test
|
||||
- Module resolution in jest uses moduleNameMapper to strip `.js` extensions
|
||||
|
||||
@@ -191,16 +194,19 @@ IntelligenceBackend (unified interface)
|
||||
|
||||
## Current State
|
||||
|
||||
- **v0.7.0**: Backends module (OllamaLocal, OllamaCloud, Opencode), learnship references removed, verification layers migrated from .planning/ to .ciagent/
|
||||
- **v0.9.0**: Integration & hardening — OpenAI and Anthropic backends, all 19 agents with intrinsic mechanical logic, E2E v0.9 integration tests, parallel agent execution
|
||||
- **v0.8.0**: 11 newly-fleshed agents with mechanical methods, OpenAI/Anthropic config types, Gitea CI workflows
|
||||
- **New backends (v0.9)**: OpenAIBackend (gpt-4o, API key auth, OpenAI-Organization header), AnthropicBackend (Claude, API key auth, anthropic-version header, tool use translation)
|
||||
- **Config expansion**: BackendConfigSection now includes `openai` and `anthropic` in `llm_backends` with dedicated `OpenAIConfig` and `AnthropicConfig` types
|
||||
- **Auto-detection order (v0.9)**: opencode → openai → ollama-local → ollama-cloud → anthropic
|
||||
- **All agents mechanical**: Every non-orchestrator agent (18/19) produces meaningful output without a backend — no "requires intelligence backend" stub errors
|
||||
- **Integration tests**: E2E v0.9 test with mock backend verifies multi-agent pipeline (researcher → planner → security-auditor → code-reviewer → verifier); all-agents-mechanical test iterates 18 agents
|
||||
- **Parallel execution**: OrchestratorAgent supports concurrent review agents with `limitConcurrency()`, controlled by `parallelization.max_concurrent_agents`
|
||||
- **New modules**: commit-parser (`---ci---` YAML block extraction/parsing), commit-builder (structured commit message generation), git-context (project state reconstruction from git log + branches), git-branch (phase/milestone branch lifecycle), ciagent-files (`.ciagent/` long-lived reference file management)
|
||||
- **Commit schema**: Every CIAgent-generated commit contains a `---ci---` YAML block with phase, milestone, status, decisions, escalations, requirements, lessons, and compound metadata
|
||||
- **Branch strategy**: `phase/NN-slug` and `milestone/vX.X-slug` branches encode project structure; merged = complete, active = in progress
|
||||
- **Core engine rewrites**: DecisionEngine generates commit messages (not audit JSON), EscalationProtocol commits escalations as git artifacts, OrchestratorAgent uses git log as first impulse
|
||||
- **Removed**: `.ciagent/audit/` directory (audit trail is git log), `.planning/` directory (dynamic state derived from git history)
|
||||
- **`.ciagent/` contents**: `config.json`, `PROJECT.md`, `ARCHITECTURE.md`, `ROADMAP.md`, `REQUIREMENTS.md` — long-lived reference docs updated with discipline
|
||||
- **Reconstruction test**: An agent with only commit message access can reconstruct project state (phase, decisions, requirements coverage, lessons, escalations)
|
||||
- **Verification layers**: All 4 layers implemented — structural, behavioral, security, quality
|
||||
- **Verification layers**: All 4 layers implemented — structural, behavioral (test execution), security (STRIDE + CWE), quality (3-persona review)
|
||||
- **CLI**: All 11 commands wired up (`init`, `run`, `quick`, `debug`, `verify`, `review`, `status`, `audit`, `clarify`, `rollback`, `ship`)
|
||||
- **Agent implementations**: Persona loaders that delegate to active backend. Fail honestly when no backend is available (no more fake success).
|
||||
- **Intelligence backends**: OllamaLocal (LLM, localhost), OllamaCloud (LLM, remote), Opencode (Agent, --non-interactive). Auto-detection: opencode → ollama-local → ollama-cloud.
|
||||
- **Tests**: 44 test suites, 454 tests covering types, config, decision-engine, escalation, clarify, commit-parser, commit-builder, git-context, git-branch, ciagent-files, all 4 verification layers, file utils, backends, tool-registry, agents (security-auditor, doc-writer, debugger, challenger, code-reviewer), zod validation, e2e
|
||||
- **Intelligence backends**: 5 options — OpenAI (LLM), Anthropic (LLM), OllamaLocal (LLM, localhost), OllamaCloud (LLM, remote), Opencode (Agent, --non-interactive). Auto-detection: opencode → openai → ollama-local → ollama-cloud → anthropic.
|
||||
- **Tests**: 57 test suites, 527 tests covering types, config, decision-engine, escalation, clarify, commit-parser, commit-builder, git-context, git-branch, ciagent-files, all 4 verification layers, file utils, backends (ollama, openai, anthropic, opencode, tool-registry), agents (all 18 non-orchestrator), zod validation, e2e, parallel execution
|
||||
Reference in New Issue
Block a user