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---
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# AGENTS.md — CI Project Guidelines
|
||||
# AGENTS.md — CIAgent Project Guidelines
|
||||
|
||||
## Build & Run Commands
|
||||
|
||||
@@ -9,16 +9,16 @@
|
||||
|
||||
## Project Overview
|
||||
|
||||
CI (Continuous Intelligence) is a fully autonomous AI-driven software engineering harness. It receives a specification, resolves ambiguities through a single Clarify phase, then executes the full pipeline (research → plan → execute → verify) autonomously, escalating only when it cannot safely proceed alone.
|
||||
CIAgent (Continuous Intelligence) is a fully autonomous AI-driven software engineering harness. It receives a specification, resolves ambiguities through a single Clarify phase, then executes the full pipeline (research → plan → execute → verify) autonomously, escalating only when it cannot safely proceed alone.
|
||||
|
||||
## Architecture
|
||||
|
||||
```
|
||||
src/
|
||||
agents/ # 18 agent implementations (persona loaders delegating to backends)
|
||||
agents/ # 19 agent implementations (persona loaders delegating to backends)
|
||||
backends/ # Intelligence backend layer
|
||||
types.ts # IntelligenceBackend, BackendRequest, BackendResult, BackendConfigSection
|
||||
tool-registry.ts # CI-owned tool implementations (readFile, writeFile, editFile, runBash, glob, grep)
|
||||
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)
|
||||
ollama-local.ts # OllamaLocalBackend (localhost:11434)
|
||||
ollama-cloud.ts # OllamaCloudBackend (remote endpoint, auth, rate limiting)
|
||||
@@ -26,21 +26,21 @@ src/
|
||||
index.ts # Backend registry + auto-detection
|
||||
cli/ # Commander.js CLI (commands.ts, index.ts)
|
||||
core/ # Core engine components
|
||||
artifacts.ts # Legacy .ci/ artifact management (retained for backward compat)
|
||||
audit.ts # Legacy audit trail in .ci/audit/ (retained for backward compat)
|
||||
ci-files.ts # .ci/ long-lived reference file management (PROJECT.md, ROADMAP.md, etc.)
|
||||
artifacts.ts # Legacy .ciagent/ artifact management (retained for backward compat)
|
||||
audit.ts # Legacy audit trail in .ciagent/audit/ (retained for backward compat)
|
||||
ciagent-files.ts # .ciagent/ long-lived reference file management (PROJECT.md, ROADMAP.md, etc.)
|
||||
clarify.ts # Clarify phase: question generation, default acceptance
|
||||
commit-builder.ts # Structured commit message generation (---ci--- YAML blocks)
|
||||
commit-parser.ts # ---ci--- YAML block extraction and parsing
|
||||
config.ts # .ci/config.json load/save/init
|
||||
config.ts # .ciagent/config.json load/save/init
|
||||
decision-engine.ts # Bounded rationality: commits decisions as git artifacts
|
||||
error-recovery.ts # Retry, plan revision, rollback logic
|
||||
escalation.ts # Escalation protocol: commits escalations as git artifacts
|
||||
git-branch.ts # Branch lifecycle: phase/NN-slug, milestone/vX.X-slug
|
||||
git-context.ts # Project state reconstruction from git log + branches
|
||||
types/ # Type definitions
|
||||
commit-meta.ts # CiMetadata, CommitDecision, CommitEscalation, ParsedCiCommit
|
||||
config.ts # CIConfig, AutonomyLevel, ModelProfile, DEFAULT_CI_CONFIG (includes backend)
|
||||
commit-meta.ts # CIAgentMetadata, CommitDecision, CommitEscalation, ParsedCIAgentCommit
|
||||
config.ts # CIAgentConfig, AutonomyLevel, ModelProfile, DEFAULT_CIAGENT_CONFIG (includes backend)
|
||||
decisions.ts # Decision, ConfidenceLevel, DecisionCategory
|
||||
escalation.ts # Escalation, EscalationType, EscalationResolution
|
||||
clarify.ts # ClarifyQuestion, ClarifyResult
|
||||
@@ -53,7 +53,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.4.0"
|
||||
version.ts # VERSION = "0.6.0"
|
||||
templates/ # Template files (config.json, DECISIONS.md, specification.md)
|
||||
```
|
||||
|
||||
@@ -62,9 +62,9 @@ templates/ # Template files (config.json, DECISIONS.md, specification.md
|
||||
- **Autonomy levels**: `full` (no HITL after clarify), `supervised` (escalate on gates + verification failures), `guided` (escalate on every decision gate)
|
||||
- **Decision confidence thresholds**: High (>0.85) auto-decide and log; Medium (0.60–0.85) auto-decide with assumption logging; Low (<0.60) escalate to human
|
||||
- **Escalation timeout**: Default 5 minutes, then auto-proceeds with recommended option. Set to `0` to require human, `-1` to always auto-proceed
|
||||
- **18 agents** purpose-built for CI, all configured for autonomous operation. OrchestratorAgent is CI-specific
|
||||
- **Git-native context**: The git log IS the project memory. Agent's first impulse to gather context is `git log` + `git branch`, not file reads. Dynamic state (decisions, escalations, lessons, compounding) lives in `---ci---` YAML blocks in commit messages. `.ci/` holds only long-lived reference docs (PROJECT.md, ARCHITECTURE.md, ROADMAP.md, REQUIREMENTS.md, config.json).
|
||||
- **Artifact compatibility**: CI no longer writes `.planning/` schema. Dynamic state is derived from git history. `.ci/` files follow a CI-native schema.
|
||||
- **19 agents** purpose-built for CIAgent, all configured for autonomous operation. OrchestratorAgent is CIAgent-specific
|
||||
- **Git-native context**: The git log IS the project memory. Agent's first impulse to gather context is `git log` + `git branch`, not file reads. Dynamic state (decisions, escalations, lessons, compounding) lives in `---ci---` YAML blocks in commit messages. `.ciagent/` holds only long-lived reference docs (PROJECT.md, ARCHITECTURE.md, ROADMAP.md, REQUIREMENTS.md, config.json).
|
||||
- **Artifact compatibility**: CIAgent no longer writes `.planning/` schema. `.ciagent/` files follow a CIAgent-native schema.
|
||||
|
||||
## Code Conventions
|
||||
|
||||
@@ -73,7 +73,7 @@ templates/ # Template files (config.json, DECISIONS.md, specification.md
|
||||
- **Agent pattern**: All agents extend `BaseAgent` with `name` (AgentName), `description`, `workflow`, and `execute(context: AgentContext): Promise<AgentResult>`. Agents delegate to `context.backend` when available, fail honestly when not.
|
||||
- **No runtime validation library**: Uses plain TypeScript types, not Zod schemas (Zod is a dependency but types are hand-defined)
|
||||
- **File I/O**: Use `src/utils/file.ts` helpers (`writeFile`, `readFile`, `ensureDir`, `readJSON`, `writeJSON`) instead of raw `fs` calls in agent/business logic
|
||||
- **Config**: `CIConfig` type and `DEFAULT_CI_CONFIG` in `src/types/config.ts` — always merge partial configs with defaults
|
||||
- **Config**: `CIAgentConfig` type and `DEFAULT_CIAGENT_CONFIG` in `src/types/config.ts` — always merge partial configs with defaults
|
||||
- **Error handling**: Agents return `{ success: false, error: string }` rather than throwing
|
||||
- **No comments in code**: Follow existing pattern — agent files have no comments
|
||||
- **Naming**: `camelCase` for functions/variables, `PascalCase` for classes/types/interfaces, `kebab-case` for file names
|
||||
@@ -91,20 +91,20 @@ Each stage is executed by `OrchestratorAgent.executeStage()`. The orchestrator d
|
||||
|
||||
```
|
||||
IntelligenceBackend (unified interface)
|
||||
├── LLMBackend (CI runs tool loop, provides tools, constructs prompts)
|
||||
├── 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.)
|
||||
└── AgentBackend (agent runs own tool loop, CI sends request)
|
||||
└── AgentBackend (agent runs own tool loop, CIAgent sends request)
|
||||
├── OpencodeBackend (opencode --non-interactive)
|
||||
└── (future: Codex, Claude Code, Hermes, etc.)
|
||||
```
|
||||
|
||||
- **LLM backends**: CI 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**: CI serializes `BackendRequest`, invokes the agent, and parses JSON `BackendResult` from stdout
|
||||
- **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**: `ci run --backend ollama-local` forces a specific backend
|
||||
- **Config**: `backend` section in `.ci/config.json` with provider, fallback, agent_backends, llm_backends
|
||||
- **Per-command override**: `ciagent run --backend ollama-local` forces a specific backend
|
||||
- **Config**: `backend` section in `.ciagent/config.json` with provider, fallback, agent_backends, llm_backends
|
||||
|
||||
## Agent Modification Rules (from PRD)
|
||||
|
||||
@@ -131,17 +131,17 @@ IntelligenceBackend (unified interface)
|
||||
- Test framework: Jest with ts-jest
|
||||
- Test file pattern: `**/*.test.ts` in `src/`
|
||||
- Run: `npm run test`
|
||||
- 25 test suites, 218 tests covering types, core, git-native, verification, and utility modules
|
||||
- 31 test suites, 370 tests covering types, core, git-native, verification, 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
|
||||
|
||||
## Important Files
|
||||
|
||||
- `.ci/config.json` — Project-level CI configuration (autonomy, parallelization, verification, security, git)
|
||||
- `.ci/PROJECT.md` — Vision, core value, requirements, constraints, key decisions table
|
||||
- `.ci/ARCHITECTURE.md` — System architecture, component boundaries, data flow
|
||||
- `.ci/ROADMAP.md` — Phase breakdown, milestone mapping, success criteria, progress table
|
||||
- `.ci/REQUIREMENTS.md` — v1/v2 requirements with REQ-IDs and traceability matrix
|
||||
- `.ciagent/config.json` — Project-level CIAgent configuration (autonomy, parallelization, verification, security, git)
|
||||
- `.ciagent/PROJECT.md` — Vision, core value, requirements, constraints, key decisions table
|
||||
- `.ciagent/ARCHITECTURE.md` — System architecture, component boundaries, data flow
|
||||
- `.ciagent/ROADMAP.md` — Phase breakdown, milestone mapping, success criteria, progress table
|
||||
- `.ciagent/REQUIREMENTS.md` — v1/v2 requirements with REQ-IDs and traceability matrix
|
||||
- Git log — Primary project memory: decisions, escalations, lessons, compounding, verification results
|
||||
- Branch structure — `phase/NN-slug` (active/complete) and `milestone/vX.X-slug` branches
|
||||
|
||||
@@ -191,16 +191,16 @@ IntelligenceBackend (unified interface)
|
||||
|
||||
## Current State
|
||||
|
||||
- **v0.4.0**: Backends module (OllamaLocal, OllamaCloud, Opencode), learnship references removed, verification layers migrated from .planning/ to .ci/
|
||||
- **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), ci-files (`.ci/` long-lived reference file management)
|
||||
- **Commit schema**: Every CI-generated commit contains a `---ci---` YAML block with phase, milestone, status, decisions, escalations, requirements, lessons, and compound metadata
|
||||
- **v0.6.0**: Backends module (OllamaLocal, OllamaCloud, Opencode), learnship references removed, verification layers migrated from .planning/ to .ciagent/
|
||||
- **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**: `.ci/audit/` directory (audit trail is git log), `.planning/` directory (dynamic state derived from git history)
|
||||
- **`.ci/` contents**: `config.json`, `PROJECT.md`, `ARCHITECTURE.md`, `ROADMAP.md`, `REQUIREMENTS.md` — long-lived reference docs updated with discipline
|
||||
- **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 (STRIDE), quality
|
||||
- **Verification layers**: All 4 layers implemented — structural, behavioral, security, quality
|
||||
- **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**: 27 test suites covering types, config, decision-engine, escalation, clarify, commit-parser, commit-builder, git-context, git-branch, ci-files, all 4 verification layers, file utils, backends, tool-registry
|
||||
- **Tests**: 31 test suites, 370 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
|
||||
Reference in New Issue
Block a user