src/autoskillit/skills_extended/rectify/SKILL.md
Deep investigation of test gaps and architectural weaknesses following an investigation, then devise a plan for architectural immunity rather than direct fixes. Use when user says "rectify", "rectify this", or wants to address root architectural causes after an investigation.
npx skillsauth add talont-org/autoskillit rectifyInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Based on your investigation report, use subagents to investigate further how our tests missed this and if there are any other similar or related bugs. Walk over the codebase carefully.
Then devise a plan to resolve these issues. No bandaids, fallbacks, or other approaches that just fix the direct exact issue.
The approach should make it so the architecture, structure and/or pattern is innately immune to the issue in the first place and/or results in the issue being easily and instantly surfaced as an error caught by testing.
Explore the architecture of the systems involved very carefully and map the components they connect to with subagents.
Find what the architectural solution would be instead of just applying a direct fix to the immediate issue. The solution should solve more than just the issue at hand.
Do not change any code.
/autoskillit:investigate skill)NEVER:
{{AUTOSKILLIT_TEMP}}/rectify/ directoryrun_in_background: true is prohibited)ALWAYS:
model: "sonnet" when spawning all subagents via the Task tool{{AUTOSKILLIT_TEMP}}/rectify/ directory (relative to the current working directory){{AUTOSKILLIT_TEMP}}/rectify/...) but
the token must use the absolute path (prepend the full CWD):
plan_path = /absolute/cwd/{{AUTOSKILLIT_TEMP}}/rectify/{filename}.md
plan_parts = /absolute/cwd/{{AUTOSKILLIT_TEMP}}/rectify/{filename}.md
This token is MANDATORY — the pipeline cannot capture the output without it.Locate the most recent investigation report in {{AUTOSKILLIT_TEMP}}/investigate/ or from conversation context. Extract:
Path-existence guard: Before issuing a Read call on a path that is not guaranteed to
exist (e.g., plan file arguments, {{AUTOSKILLIT_TEMP}}/investigate/ reports, external file references), use
Glob or ls to confirm the path exists first. This prevents ENOENT errors that cascade into
sibling parallel-call cancellations.
Launch parallel subagents to investigate (some of the listed aspects may require multiple subagents):
Test Gap Analysis
Similar/Related Bugs
Architectural Mapping
Pattern Analysis
Design an approach that provides immunity rather than a fix:
Test-Driven Approach: The plan must lead with tests. Before any implementation step, define a test that reproduces the issue or captures the gap. Each subsequent implementation step should make that test pass. This applies to the initial fix and to any broader architectural changes—write the failing test first, then the code that makes it green.
After finalizing the plan, determine which architecture lens best illustrates the proposed changes, then create a mermaid diagram.
4a. Select the lens based on what the plan primarily affects:
| If the plan primarily involves... | Use Lens | |-----------------------------------|----------| | Adding/modifying containers, services, or integrations | C4 Container | | Changing workflow logic, state machines, or decision flow | Process Flow | | Altering data storage, transformations, or information flow | Data Lineage | | Restructuring modules, changing dependencies, or layering | Module Dependency | | Adding/modifying parallel execution or thread handling | Concurrency | | Changing error handling, retry logic, or recovery paths | Error/Resilience | | Modifying repository patterns or data access | Repository Access | | Changing CLI commands, config, or monitoring | Operational | | Adding/modifying validation, trust boundaries, or isolation | Security | | Changing build tools, test framework, or quality gates | Development | | Affecting multiple user journeys or cross-component flows | Scenarios | | Modifying state contracts, field lifecycles, or resume logic | State Lifecycle | | Changing deployment topology or infrastructure | Deployment |
4b. Write your lens selection rationale to a file using the Write tool:
{{AUTOSKILLIT_TEMP}}/rectify/arch_lens_selection_{YYYY-MM-DD_HHMMSS}.md4c. MANDATORY: LOAD the appropriate arch-lens skill using the Skill tool:
| Lens | Skill to LOAD |
|------|---------------|
| C4 Container | /autoskillit:arch-lens-c4-container |
| Process Flow | /autoskillit:arch-lens-process-flow |
| Data Lineage | /autoskillit:arch-lens-data-lineage |
| Module Dependency | /autoskillit:arch-lens-module-dependency |
| Concurrency | /autoskillit:arch-lens-concurrency |
| Error/Resilience | /autoskillit:arch-lens-error-resilience |
| Repository Access | /autoskillit:arch-lens-repository-access |
| Operational | /autoskillit:arch-lens-operational |
| Security | /autoskillit:arch-lens-security |
| Development | /autoskillit:arch-lens-development |
| Scenarios | /autoskillit:arch-lens-scenarios |
| State Lifecycle | /autoskillit:arch-lens-state-lifecycle |
| Deployment | /autoskillit:arch-lens-deployment |
If the Skill tool cannot be used (disable-model-invocation) or refuses this invocation, omit the diagram and proceed without the architectural diagram.
4d. Create the diagram following the loaded skill's instructions:
newComponent class for new elements)● prefix for modified existing components★ prefix for new componentsInclude the diagram in the plan document under a "## Proposed Architecture" section.
Before writing the final plan, verify:
/autoskillit:arch-lens-* skill using the Skill tool/autoskillit:mermaid skill for stylingIf the plan exceeds 500 lines, split it into multiple files (_part_a, _part_b, etc.). Each part must be a self-contained, independently implementable plan executed sequentially. Split by functional scope (e.g., Part A = "fix core bug + tests", Part B = "add guards + enforcement"), NOT by document structure. Each file must have its own failing tests, implementation steps, and verification.
Multi-part plan rules:
— PART A ONLY (or B, C, etc.).> **PART {X} ONLY. Do not implement any other part. Other parts are separate tasks requiring explicit authorization.**Save the plan to: {{AUTOSKILLIT_TEMP}}/rectify/rectify_{topic}_{YYYY-MM-DD_HHMMSS}.md (relative to the current working directory)
Structured output: After saving the file(s), emit the following lines so pipeline orchestrators can capture both fields:
For a single-part plan:
IMPORTANT: Emit the structured output tokens as literal plain text with no markdown formatting on the token names. Do not wrap token names in
**bold**,*italic*, or any other markdown. The adjudicator performs a regex match on the exact token name — decorators cause match failure.
plan_path = {absolute_path}
plan_parts = {absolute_path}
For a multi-part plan (list all part paths in alphabetical order):
plan_path = {path_to_part_a}
plan_parts = {path_to_part_a}
{path_to_part_b}
{path_to_part_c}
Plan structure:
# Rectify: {Topic}
**Date:** {YYYY-MM-DD}
**Investigation Reference:** {link to or name of the investigation report}
## Summary
{Brief overview of the architectural weakness and proposed immunity}
## How Tests Missed This
{Analysis of the test gap - what assumptions were wrong}
## Related Issues Found
{Other instances of the same or similar weakness in the codebase}
## Architectural Analysis
{Map of affected components and their connections}
## Proposed Architecture
{Mermaid diagram showing the proposed changes using the selected lens}
**Lens Used:** {lens name} - {why this lens was chosen}
## Immunity Plan
### Step 1: Failing Tests
{Tests that reproduce the issue and capture the gap — these must be written first}
### Step 2: Implementation
{The architectural solution that makes this class of bug impossible or instantly caught, structured so each change makes a failing test pass}
## Verification
{How to verify the architectural changes provide the intended immunity}
development
Generate YAML recipes for .autoskillit/recipes/. Use when user says "make script skill", "generate script", "script a workflow", "write a script", "create a script", "new recipe", "write a pipeline", or when loaded by other skills for script formatting.
data-ai
Create Uncertainty Representation visualization planning spec showing error bar definitions, distribution-aware alternatives, and multi-seed variance protocols. Statistical lens answering "How is uncertainty honestly represented?"
data-ai
Create Temporal Dynamics visualization planning spec showing axis scaling (linear vs log), smoothing disclosure, epoch/step alignment, run aggregation (mean + variance bands), early-stopping markers, and wall-clock vs step-count x-axis. Temporal lens answering "Are training dynamics shown clearly and honestly?"
data-ai
Create Narrative Story Arc visualization planning spec showing visual consistency across the report (same color = same model everywhere), logical figure progression, redundant figure detection, and narrative dependency between figures. Narrative lens answering "Do the figures tell a coherent story across the report?"