remediate-failures

$npx mdskill add Fr-e-d/GAAI-framework/remediate-failures

Correct failures and rule violations from QA review until all gates pass.

  • Fixes acceptance criteria gaps and rule violations detected during QA review.
  • Depends on QA report, story artefacts, plans, and rules files.
  • Maps each failure to criteria or rules, then applies minimal corrective changes.
  • Outputs updated code, remediation notes, and re-validation inputs for QA.

SKILL.md

.github/skills/remediate-failuresView on GitHub ↗
---
name: remediate-failures
description: Correct failures, rule violations, and acceptance criteria gaps detected during QA review. Activate when qa-review returns FAIL. Fixes without redefining scope — loops until all quality gates pass.
license: ELv2
compatibility: Works with any filesystem-based AI coding agent
metadata:
  author: gaai-framework
  version: "1.0"
  category: delivery
  track: delivery
  id: SKILL-REMEDIATE-FAILURES-001
  updated_at: 2026-01-27
  status: stable
inputs:
  - qa_report  (failing)
  - contexts/artefacts/stories/**
  - contexts/artefacts/plans/**
  - contexts/rules/**
  - memory_context_bundle  (optional)
outputs:
  - updated_code_changes
  - remediation_notes
  - updated_qa_inputs  (for re-validation)
---

# Remediate Failures

## Purpose / When to Activate

Activate when:
- QA review returns FAIL
- Acceptance criteria are unmet
- Rules are violated
- Regressions are detected
- Implementation deviates from governed artefacts

---

## Process

1. Identify all failures precisely from the QA report
2. Map each failure to: acceptance criteria / rule violated / implementation section
3. Determine minimal corrective changes
4. Apply fixes without expanding scope
5. Re-validate against Story criteria and rules
6. Prepare updated inputs for QA re-run

**Loop: Detect → Correct → Re-validate → repeat until PASS.**

**Convergence / Escalation:** If re-validation does not pass after 3 attempts, or if a fix requires changing acceptance criteria or product intent, STOP. Mark the story as `failed` and escalate to Discovery with a remediation report listing: what was attempted, what failed, and why convergence was not possible.

---

## Remediation Principles

- Fix the cause, not the symptom
- Minimal change preferred
- Never broaden scope
- Never reinterpret requirements
- Respect architecture constraints
- Preserve maintainability

---

## Output

- Corrected implementation
- Remediation notes:
  - What failed
  - What was fixed
  - Why it now passes
- Updated inputs for QA re-validation

---

## Quality Checks

- All acceptance criteria satisfied
- No rule violations remain
- QA review will pass
- Scope unchanged
- Code remains clean

---

## Non-Goals

This skill must NOT:
- Add new features
- Reinterpret product intent
- Weaken rules
- Bypass quality gates
- Silently ignore failures

**If a fix requires changing product intent or scope: STOP. Escalate back to Discovery. Remediation is correction — not redesign.**

More from Fr-e-d/GAAI-framework

SkillDescription
abort-safe-handlerOrchestrator-level Stage 4 entry gate for /gaai:bootstrap. Presents a pre-loop "Skip Q&A entirely" option, delegates to qa-loop-ui when the user proceeds, and returns a unified abort_safe_result with telemetry on every path. Guarantees no partial state on skip or abort.
ambiguity-detectorTakes surface scan results, optional LLM synthesis open-question entries, and optional tree-sitter AST signals to score project ambiguities (1-10). Outputs structured ambiguity_feed for smart-question-generator. Pure heuristic — no LLM calls. Designed for Stage 3.5 of the /gaai:bootstrap pipeline (between LLM synthesis and Q&A).
approach-evaluationResearch industry standards and best practices, identify viable approaches for a given technical or architectural problem, and produce a structured factual comparison against project-specific constraints. Reports options — does not decide.
architecture-extractConvert raw project structure into clear architectural understanding — module boundaries, data flows, service relationships, and architectural patterns. Activate after codebase-scan during Bootstrap.
bootstrap-llm-synthesisConstruct the LLM synthesis prompt from project surface scan + optional tree-sitter context + optional Q&A answers. Call the LLM. Parse and validate the response into 6-8 structured memory entries with clarity tags and source traceability. Used as Stage 3 of the /gaai:bootstrap pipeline.
bootstrap-memory-ingest-cloudWrite structured memory entries to the Cloud workspace via gaai_memory.store MCP tool with source='bootstrap'. Loops over entries from bootstrap-llm-synthesis, calls the tool per entry, collects success/fail counts. Used as Stage 5 of the /gaai:bootstrap pipeline (Cloud path only).
browser-journey-testValidate user stories by simulating real user journeys in a live browser against deployed application. Activate after implementation to verify actual user experience against acceptance criteria, not just code logic.
build-agents-indexScan all agent and sub-agent definition files in .gaai/core/agents/, extract YAML frontmatter, merge with specialists.registry.yaml, and generate a derived agents-index.yaml at .gaai/core/agents/agents-index.yaml. Activate after adding, modifying, or removing any agent, sub-agent, or specialist entry.
build-skills-indexScan SKILL.md files in .gaai/core/skills/ and .gaai/project/skills/, extract YAML frontmatter, and regenerate separate skills indices for each layer. Core index ships with the OSS framework; project index is project-specific.
ci-watch-and-fixWatch GitHub Actions CI after PR creation, detect failures, extract logs, apply minimal fixes, and re-push — keeping the delivery session alive until CI resolves or escalating after 3 cycles. Activate immediately after gh pr create and before marking the story done.