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---
This commit is contained in:
Jon Chery
2026-05-29 18:01:13 +00:00
parent e31afe3b59
commit 4a58aa1657
51 changed files with 505 additions and 465 deletions
+10 -10
View File
@@ -1,7 +1,7 @@
import { execSync } from "node:child_process";
import {
ParsedCiCommit,
CiMetadata,
ParsedCIAgentCommit,
CIAgentMetadata,
CommitDecision,
} from "../types/commit-meta.js";
import { parseCommitMessage } from "./commit-parser.js";
@@ -16,7 +16,7 @@ export interface ProjectState {
phasesCompleted: number[];
phaseBranches: BranchInfo[];
milestoneBranches: string[];
lastCommit: ParsedCiCommit | null;
lastCommit: ParsedCIAgentCommit | null;
}
export interface BranchInfo {
@@ -69,13 +69,13 @@ export class GitContext {
return this.git("rev-parse --abbrev-ref HEAD");
}
getRecentCommits(count: number = 20): ParsedCiCommit[] {
getRecentCommits(count: number = 20): ParsedCIAgentCommit[] {
const format = "%H%x00%s%x00%B%x01";
const raw = this.git(`log --max-count=${count} --format="${format}"`);
if (!raw) return [];
const commits: ParsedCiCommit[] = [];
const commits: ParsedCIAgentCommit[] = [];
const entries = raw.split("\x01").filter(Boolean);
for (const entry of entries) {
@@ -93,7 +93,7 @@ export class GitContext {
return commits;
}
getLatestCiCommit(): ParsedCiCommit | null {
getLatestCiCommit(): ParsedCIAgentCommit | null {
const commits = this.getRecentCommits(1);
return commits.length > 0 ? commits[0] : null;
}
@@ -207,7 +207,7 @@ export class GitContext {
return decisions;
}
getDecisionsFromCommits(commits: ParsedCiCommit[], phase?: number): CommitDecision[] {
getDecisionsFromCommits(commits: ParsedCIAgentCommit[], phase?: number): CommitDecision[] {
const decisions: CommitDecision[] = [];
for (const commit of commits) {
if (commit.ci?.decisions) {
@@ -300,20 +300,20 @@ export class GitContext {
};
}
getCommitsForPhase(phase: number): ParsedCiCommit[] {
getCommitsForPhase(phase: number): ParsedCIAgentCommit[] {
const commits = this.getRecentCommits(200);
return commits.filter(
(c) => c.scope === `P${String(phase).padStart(2, "0")}` || c.ci?.phase === phase
);
}
getCommitsForBranch(branch: string): ParsedCiCommit[] {
getCommitsForBranch(branch: string): ParsedCIAgentCommit[] {
const format = "%H%x00%s%x00%B%x01";
const raw = this.git(`log ${branch} --max-count=100 --format="${format}"`);
if (!raw) return [];
const commits: ParsedCiCommit[] = [];
const commits: ParsedCIAgentCommit[] = [];
const entries = raw.split("\x01").filter(Boolean);
for (const entry of entries) {