Skip to content
Back to skills

In Tca Remediate

ASecurity

TCA remediate: execute prioritized fix batches in main conversation with compile/test gates

  • 26 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added May 27, 2026
developmentrustgoswiftbashrefactoring

Works with

  • cli

Security analysis

A100/100

Scanned September 21, 2026

npx -y skills add matthewsinclair/intent --skill in-tca-remediate --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of In Tca Remediate?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for In Tca Remediate
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/matthewsinclair-in-tca-remediate/badge)](https://www.skillsdirectory.com/skills/matthewsinclair-in-tca-remediate)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
description: "TCA remediate: execute prioritized fix batches in main conversation with compile/test gates"
chains_to: ["in-tca-finish"]
---

# TCA Remediate

Executes the remediation phase (Phase 4) of a Total Codebase Audit. All remediation happens in the main conversation with compile/test gates between batches.

For reference: `intent/docs/total-codebase-audit.md`

## Procedure

### 1. Read synthesis output

Read the synthesis WP's `socrates.md` from `/in-tca-synthesize`. This contains the prioritized remediation backlog with fix batches.

### 2. Confirm remediation scope

Ask the user which batches to tackle this session:

- All batches (A through H)?
- Just P0 and P1 (Batches A-D)?
- Specific batches?

Set expectations in T-shirt sizes, never clock time: size P0+P1 and full remediation separately from the synthesis backlog (eg P0+P1 = M, full = XL).

### 3. Execute remediation in main conversation

**DO ALL REMEDIATION IN THE MAIN CONVERSATION.** Sub-agents cannot coordinate compile+test cycles and hit permission walls on file edits.

For each batch:

1. **Apply fixes** for each item in the batch
2. **After every 5-8 edits**: run compile+test gate

   ```bash
   # Elixir
   mix compile --warnings-as-errors && mix test --failed

   # Rust
   cargo check && cargo test

   # Swift
   swift build && swift test
   ```

3. **Track completion** at individual item level, not batch level
4. **Mark false positives** explicitly -- do not just skip them, record why
5. **Commit at natural stopping points** (end of each batch or every 10-15 fixes)

### 4. Batch ordering

Execute in priority order:

```
Batch A: P0 critical bugs        -- test after each fix
Batch B: P1 top Highlander fix   -- test after batch
Batch C: P1 second Highlander    -- test after batch
Batch D: P1 domain-scoped dedup  -- test after batch
Batch E: P2a mechanical fixes    -- test after batch
Batch F: P2b refactoring         -- test after each extraction
Batch G: P2b multi-head          -- test after batch
Batch H: P3 style fixes          -- test after batch
```

**Interleaving**: P2a mechanical fixes (Batch E) can be interleaved with P1 work since they touch different files. P2b refactoring should wait until P1 shared modules exist.

### 5. Parallel extraction (exception only)

For P1/P2b extraction work ONLY, when file scopes are completely disjoint:

1. Sub-agents may be used for extraction
2. **Create target modules FIRST**, then update callers (creation-before-migration)
3. Main session does verification pass after all agents complete
4. Ensure file scopes are truly disjoint before launching parallel agents

### 6. Test optimization

Between individual edits (fast feedback):

```bash
mix test --failed
mix test test/specific_file_test.exs
```

At batch boundaries (full verification):

```bash
# Elixir
mix compile --warnings-as-errors && mix test && mix credo --strict

# Rust
cargo check && cargo test && cargo clippy -- -D warnings

# Swift
swift build && swift test
```

### 7. Handle false positives

If a fix breaks tests, investigate the data type before forcing the fix:

- `Map.get` on a plain map is correct -- only flag on known defstructs (`IN-EX-CODE-002` carve-outs)
- `&&` on a truthy non-boolean value may be intentional
- `String.to_atom` on controlled inputs may be correct (not user input)

Revert broken fixes immediately. Mark as false positive with explanation in the synthesis doc, citing the IN-\* rule ID and the carve-out condition. If the FP is project-wide (not WP-local), consider lifting it into `.intent_critic.yml` `disabled:` so future audits don't re-flag the same pattern.

### 8. Final verification

After all batches are complete:

```bash
# Full verification pass
mix compile --warnings-as-errors && mix test && mix credo --strict
```

Commit the final state. Proceed to `/in-tca-finish`.

## Important Notes

- NEVER do remediation in sub-agents (except parallel extraction with disjoint files)
- Track completion at individual item level, not batch level
- Mark false positives explicitly with reasons
- Create target modules FIRST, then update callers
- Run mix test --failed between edits; full suite at batch boundaries
- Commit at natural stopping points, not at the very end

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.