Files
ci/opencode/ci/workflows/debug.md
T
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---
2026-05-29 17:58:48 +00:00

2.1 KiB
Raw Blame History

description
description
Systematic CIAgent debugging with git context — triage, diagnose root cause, auto-fix or escalate

CIAgent Debug

Systematic debugging workflow: triage → root cause diagnosis → auto-fix or escalate. Uses git history to find recent changes that may have caused the bug.

Usage: ciagent-debug [description]

Step 0: Confirm Active Project

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

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

  • Confirm active_project is correct for this debug session
  • If not, set it with ci setActiveProject(<slug>)
  • Scope debugging to the active project
  • All commit messages must include project: <slug> in ---ci--- block

If single-project mode: proceed with existing conventions.

Step 1: Load Git Context

git log --max-count=20
git diff HEAD~5
git branch -a

Load recent changes to identify potential causes.

Step 2: Triage

If no description provided, ask: "What is the exact symptom?"

Gather:

  • Symptom description
  • Expected behavior
  • When it started (check git log for recent changes)
  • What has been tried

Step 3: Hypothesis Testing

For each hypothesis (most likely first):

  1. Identify key files to check
  2. Trace the code path from symptom to root
  3. Read all files in the path
  4. Confirm or deny: "If this were fixed, would the symptom go away?"

Step 4: Auto-Fix or Escalate

Based on confidence:

Confidence Action
High (> 0.85) Auto-fix, commit with ---ci--- block
Medium (0.600.85) Auto-fix with assumption logging, commit
Low (< 0.60) Escalate with proposed fix

Step 5: Commit Fix

fix(P##): [root cause description]

---ci---
phase: [N]
milestone: [vX.X]
status: execute
decisions:
  - id: D-XXX
    decision: [fix approach]
    rationale: [evidence]
    confidence: 0.XX
    alternatives: []
lessons:
  - [lesson learned]
---/ci---

Step 6: Verify Fix

Run relevant tests to confirm the fix works:

npm test
npm run typecheck

Report: root cause, location, confidence, fix applied.