Consume the $project_root/.ai_workflow/plan.md file produced by the validate-logs skill and fix each open issue in the codebase. After every fix is applied and verified, insert the resolved items into the project roadmap. Use this skill when asked to apply, resolve, or close the issues listed in plan.md, or immediately after running validate-logs.
This skill is the second half of the log-validation pipeline:
validate-logs → $project_root/.ai_workflow/plan.md → fix-log-issues
It reads $project_root/.ai_workflow/plan.md, works through every issue with status
open in dependency order, applies the minimal fix required, verifies the
fix, updates the issue status in plan.md, and finally records all resolved
items in the project roadmap (docs/ROADMAP.md).
$project_root/.ai_workflow/plan.md must exist and contain at least one issue with
**Status:** open.validate-logs first if plan.md is absent or empty.The file is written by validate-logs. Each issue block looks like:
### RI-NNN — <short title>
- **ID:** RI-NNN
- **Source step:** step_<id>
- **Type:** <issue type>
- **Priority:** <Medium | Low>
- **Path:** <file or directory path>
- **Description:** <problem description>
- **Fix:** <action to take>
- **Status:** open
Only issues with **Status:** open are processed. Issues with status
done, skipped, or in-progress are left untouched.
Each Type value maps to a concrete fix strategy:
undocumented-directoryThe directory at Path is not referenced in any documentation file.
Fix procedure:
README.md inside the same parent directory, or docs/ARCHITECTURE.md).cd "$project_root" && npm run lint:md to confirm no markdown violations were introduced.markdown-lintOne or more markdownlint rules are violated in the file at Path.
Fix procedure:
cd "$project_root" && npm run lint:md:fix to apply auto-fixable corrections.cd "$project_root" && npm run lint:md to identify any remaining violations.Description field.cd "$project_root" && npm run lint:md and confirm zero violations for the affected
file(s).dependency-warningnpm install --dry-run or npm audit produced a warning for a dependency.
Fix procedure:
cd "$project_root" && npm audit --audit-level=moderate to reproduce the warning.cd "$project_root" && npm audit fix (non-breaking
only — do not use --force).cd "$project_root" && npm ci && npm run build && npm test to confirm nothing regressed.package.json (or open a
GitHub issue) and mark the plan item as skipped with a reason.typescript-issuetsc --noEmit reported a type error or warning.
Fix procedure:
cd "$project_root" && npx tsc --noEmit to reproduce.Path to resolve the type error using the minimum
change that preserves existing behaviour.cd "$project_root" && npx tsc --noEmit and confirm zero new errors.cd "$project_root" && npm test to confirm no test regressions.architecture-mismatchThe directory tree diverges from the description in docs/ARCHITECTURE.md.
Fix procedure:
docs/ARCHITECTURE.md.cd "$project_root" && npm run lint:md after editing any documentation.missing-test-coverageA module or exported function has no corresponding test.
Fix procedure:
Path.test/ following the
existing test structure (e.g., test/core/, test/utils/).cd "$project_root" && npm run test:coverage and confirm the new code is covered.docs-outdatedA documentation file references a file, export, or behaviour that no longer exists in the codebase.
Fix procedure:
Path.Description.cd "$project_root" && npm run lint:md to confirm no violations were introduced.For each open issue in plan.md (in the order they appear):
Set status to in-progress — update **Status:** open →
**Status:** in-progress in plan.md.
Apply the fix — follow the procedure for the issue's Type (see
Fix catalogue above). Use the Fix field from
plan.md as the authoritative description of what to do.
Verify the fix — run the verification command(s) listed in the fix procedure. Confirm the issue no longer reproduces.
Mark as done — update **Status:** in-progress →
**Status:** done in plan.md.
If the fix cannot be applied (dependency with no upstream patch, requires breaking change, etc.):
skipped.**Skip reason:** <explanation> immediately after the Status line.Commit after every individual fix so that each change is atomic and