Fix CI Issues Command
Briefly tell the user you are using the fci skill before starting work,
so they know which workflow is running.
PRIMARY OBJECTIVE
Fix all CI pipeline failures blocking the PR merge while maintaining code quality and test integrity.
Resolve the task with ../setup/references/task-context.md before inspecting or changing code. Reuse
the linked task or create the minimum record in the configured task root. Record the failing run,
actual commands/cwds selected from repo or CI configuration, fixes, observed validation, current
state, and next action there. Do not create a separate CI ledger.
SCOPE
- Supports the project CI pipeline as configured in the repository
- If
$ARGUMENTS specifies a workflow outside the project scope, inform the user and suggest manual investigation
CONTEXT & CONSTRAINTS
- CI pipeline failed during merge attempt to main branch
- Must resolve all failures without compromising code quality
- Preserve existing test coverage and validation logic
- CI includes the lint, type, test, build, and project-specific checks declared by the selected
workflow; resolve their actual commands and working directories before running them.
- Do not silence CI with
any, @ts-ignore, // eslint-disable, or
architectural shortcuts — the goal is a real fix, not a green checkmark.
If a suppression is genuinely correct (e.g. a .d.ts shim), flag it
explicitly so the reviewer can confirm.
- Follow project architecture rules (see coding-conventions skill)
RELATED SKILLS
/dbg - Runtime bugs requiring instrumentation and evidence gathering
/sr - Post-fix code review before re-attempting merge
/prc - Addressing reviewer comments on the PR
ANALYSIS REQUIREMENTS
Identify CI Failures:
- Run
gh workflow list if you are unsure of the workflow name.
- Run
gh run list --limit=3 to check recent CI status.
- Pick the most recent failing run and review its logs with
gh run view <run-id> --log. Don't fetch logs for older runs unless
the recent-run failures are ambiguous.
- Categorize failures by type (linting, tests, types, build, other).
Execute Diagnostic Checks (run in parallel):
- These commands are independent — batch them in one turn as parallel
Bash tool calls, do not chain sequentially.
- Ensure dependencies are installed first (sequential prerequisite).
- Resolve the selected workflow's actual scripts and working directory before running checks.
Then in parallel: the resolved lint, typecheck, test, and build commands.
Do not run unresolved placeholders or assume every command belongs to the repository root.
- Collect all failure logs before choosing where to start fixing —
don't stop at the first red check.
RESOLUTION PROCESS
Scope discipline: fix only what the failing CI checks require. Do not
refactor nearby code, rename symbols for consistency, tighten unrelated
types, or add defensive error handling that wasn't failing. If you spot
adjacent problems, note them in the handoff summary — don't fix them in
this PR.
Formatting (only if lint reported style violations):
- Skip this step entirely if formatting is clean.
- Otherwise run the formatter declared by the selected workflow, then re-run lint to confirm the
formatter didn't introduce new issues.
Address Type Errors:
- Resolve typing errors surfaced by lint/test/typecheck output
- Add precise typings rather than suppressing warnings
Resolve Test Failures:
- Fix failing tests by correcting the implementation bug the test is
catching — the test is a spec, so weakening assertions to turn the
check green hides the real defect.
- Maintain or improve test coverage against the repository or CI-configured baseline. If a test is
genuinely wrong (e.g. asserts outdated behavior), update it and
explicitly flag the change in the handoff summary.
Fix Linting Issues:
- Address linter violations
- Update tests/fixtures when necessary rather than suppressing rules
Security Issues:
- Address any dependency vulnerability findings that surface during investigation
Build Issues:
- Ensure build succeeds
- Fix any import or runtime errors
VERIFICATION REQUIREMENTS
Before completion, run the full CI-equivalent validation suite locally and confirm every resolved
command exits zero. Run each package command from its declared working directory:
# Run the resolved CI-equivalent validation commands from their declared working directories.
# The command names must be read from repo/CI configuration before execution.
Optional additional checks (if relevant jobs are failing): run the repository's configured coverage
command only when it is relevant to the failing job; record the resolved command and result in the
task record. Never execute an unresolved placeholder.
TROUBLESHOOTING
gh auth failure: Run gh auth status; prompt user to run gh auth login if needed
- Docker not running: Run
docker info; inform user to start Docker Desktop
- DB connection refused: Verify test database is running; check port conflicts
- Language version mismatch: Check version files (
.nvmrc, .tool-versions, etc.) and use appropriate version manager
DEFINITION OF DONE
1---2name: fci-23description: Fix CI pipeline failures blocking PR merge. Use when CI checks fail, 'pipeline broken', 'build failing', 'fix CI', or 'checks not passing'. NOT for debugging runtime bugs (use /dbg), NOT for code review (use /sr).4---56# Fix CI Issues Command78Briefly tell the user you are using the fci skill before starting work,9so they know which workflow is running.1011## PRIMARY OBJECTIVE12Fix all CI pipeline failures blocking the PR merge while maintaining code quality and test integrity.1314Resolve the task with `../setup/references/task-context.md` before inspecting or changing code. Reuse15the linked task or create the minimum record in the configured task root. Record the failing run,16actual commands/cwds selected from repo or CI configuration, fixes, observed validation, current17state, and next action there. Do not create a separate CI ledger.1819## SCOPE20- Supports the project CI pipeline as configured in the repository21- If `$ARGUMENTS` specifies a workflow outside the project scope, inform the user and suggest manual investigation2223## CONTEXT & CONSTRAINTS24- CI pipeline failed during merge attempt to main branch25- Must resolve all failures without compromising code quality26- Preserve existing test coverage and validation logic27- CI includes the lint, type, test, build, and project-specific checks declared by the selected28 workflow; resolve their actual commands and working directories before running them.29- Do not silence CI with `any`, `@ts-ignore`, `// eslint-disable`, or30 architectural shortcuts — the goal is a real fix, not a green checkmark.31 If a suppression is genuinely correct (e.g. a `.d.ts` shim), flag it32 explicitly so the reviewer can confirm.33- Follow project architecture rules (see coding-conventions skill)3435## RELATED SKILLS36- `/dbg` - Runtime bugs requiring instrumentation and evidence gathering37- `/sr` - Post-fix code review before re-attempting merge38- `/prc` - Addressing reviewer comments on the PR3940## ANALYSIS REQUIREMENTS411. **Identify CI Failures:**42 - Run `gh workflow list` if you are unsure of the workflow name.43 - Run `gh run list --limit=3` to check recent CI status.44 - Pick the most recent failing run and review its logs with45 `gh run view <run-id> --log`. Don't fetch logs for older runs unless46 the recent-run failures are ambiguous.47 - Categorize failures by type (linting, tests, types, build, other).48492. **Execute Diagnostic Checks (run in parallel):**50 - These commands are independent — batch them in one turn as parallel51 Bash tool calls, do not chain sequentially.52 - Ensure dependencies are installed first (sequential prerequisite).53 - Resolve the selected workflow's actual scripts and working directory before running checks.54 Then in parallel: the resolved lint, typecheck, test, and build commands.55 Do not run unresolved placeholders or assume every command belongs to the repository root.56 - Collect all failure logs before choosing where to start fixing —57 don't stop at the first red check.5859## RESOLUTION PROCESS6061Scope discipline: fix only what the failing CI checks require. Do not62refactor nearby code, rename symbols for consistency, tighten unrelated63types, or add defensive error handling that wasn't failing. If you spot64adjacent problems, note them in the handoff summary — don't fix them in65this PR.66671. **Formatting (only if lint reported style violations):**68 - Skip this step entirely if formatting is clean.69 - Otherwise run the formatter declared by the selected workflow, then re-run lint to confirm the70 formatter didn't introduce new issues.71722. **Address Type Errors:**73 - Resolve typing errors surfaced by lint/test/typecheck output74 - Add precise typings rather than suppressing warnings75763. **Resolve Test Failures:**77 - Fix failing tests by correcting the implementation bug the test is78 catching — the test is a spec, so weakening assertions to turn the79 check green hides the real defect.80 - Maintain or improve test coverage against the repository or CI-configured baseline. If a test is81 genuinely wrong (e.g. asserts outdated behavior), update it and82 explicitly flag the change in the handoff summary.83844. **Fix Linting Issues:**85 - Address linter violations86 - Update tests/fixtures when necessary rather than suppressing rules87885. **Security Issues:**89 - Address any dependency vulnerability findings that surface during investigation90916. **Build Issues:**92 - Ensure build succeeds93 - Fix any import or runtime errors9495## VERIFICATION REQUIREMENTS96Before completion, run the full CI-equivalent validation suite locally and confirm every resolved97command exits zero. Run each package command from its declared working directory:98```bash99# Run the resolved CI-equivalent validation commands from their declared working directories.100# The command names must be read from repo/CI configuration before execution.101```102103Optional additional checks (if relevant jobs are failing): run the repository's configured coverage104command only when it is relevant to the failing job; record the resolved command and result in the105task record. Never execute an unresolved placeholder.106107## TROUBLESHOOTING108- `gh` auth failure: Run `gh auth status`; prompt user to run `gh auth login` if needed109- Docker not running: Run `docker info`; inform user to start Docker Desktop110- DB connection refused: Verify test database is running; check port conflicts111- Language version mismatch: Check version files (`.nvmrc`, `.tool-versions`, etc.) and use appropriate version manager112113## DEFINITION OF DONE114- [ ] All CI checks pass (lint, typing, format, tests, build)115- [ ] Test coverage did not drop below the repository or CI-configured baseline (use the configured116 floor; do not invent a new percentage target).117- [ ] No test logic simplified or removed118- [ ] Security vulnerabilities resolved (if applicable)119- [ ] Build succeeds120- [ ] GitHub CI status shows green checkmark121- [ ] Ready for clean merge to main branch