agentleFS
alchemiststudiosDOTaialchemiststudiosDOTai/harness-engineering/skills/qa-from-execute/SKILL.md

qa-from-execute

Skill104 starsChanged 8 months agoMITView on GitHub

Perform quality assurance on code changes after the research-phase -> plan-phase -> execute-phase workflow. STRICTLY QA only—no coding, no fixes, no source-code changes. Focus on changed areas only, emphasizing control/data flow correctness.

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 7 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    This skill is STRICTLY for QA evaluation: Do not write code, do not fix issues, and do not perform the Execute phase.

    line 29
  2. Distinctive:

    Use this skill when:

    line 33
  3. Very specific:

    If a path is provided: Read from memory-bank/execute/<path>

    line 45
  4. Very specific:

    If a topic is provided: Find the latest matching file in memory-bank/execute/

    line 46
  5. Distinctive:

    Focus analysis ONLY on these changed areas: Do not review unchanged code.

    line 63
  6. Very specific:

    Run: pytest -q or equivalent

    line 164
  7. Distinctive:

    Verify request/response DTOs match spec

    line 176
  8. Distinctive:

    Check for breaking field/enum changes

    line 177
  9. Distinctive:

    Run static analysis tools (read-only, report results):

    line 181
  10. Distinctive:

    If additional analysis is needed:

    line 304
  11. Very specific:

    After writing the QA report to memory-bank/qa/, hand off to the user for disposition.

    line 318

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

QA From Execute

Evaluate code changes for correctness, risks, and quality. This skill performs read-only analysis of implemented work, producing a QA report without modifying code.

CRITICAL BOUNDARIES

ActivityStatus
QA Analysis✅ This skill
Code Changes❌ NO — Read only
Bug Fixes❌ NO — Report only
Execute❌ NO — Analysis only

This skill is STRICTLY for QA evaluation. Do not write code, do not fix issues, and do not perform the Execute phase. Analyze, evaluate, and report.

When to Use

Use this skill when:

  • The Execute phase is complete
  • Code has been written and needs quality evaluation
  • The task is to assess correctness of changes, not modify them
  • Pre-merge or post-implementation review is needed

Workflow

Step 1: Load Execute Context

Locate and read the execution log:

  • If a path is provided: Read from memory-bank/execute/<path>
  • If a topic is provided: Find the latest matching file in memory-bank/execute/

Extract:

  • Which files were modified
  • Which functions/endpoints were added or changed
  • What the acceptance criteria were
  • Any issues encountered during the Execute phase

Step 2: Identify Changed Areas

From the execution log, build a list of:

  • Files modified: Paths to all changed files
  • Functions changed: Public functions that were added or modified
  • Interfaces changed: API endpoints, CLI commands, public methods
  • State changes: Database schema, configuration, shared resources

Focus analysis ONLY on these changed areas. Do not review unchanged code.

Step 3: Apply QA Checklist Per Changed Area

For each changed file/function/endpoint, evaluate:

3.1 Inputs & Preconditions

CheckQuestion
ValidationAre all inputs validated before use?
Type safetyAre type assumptions explicit and checked?
Null/emptyAre null, undefined, and empty cases handled?
BoundariesAre min/max values, sizes, and limits enforced?

3.2 Control Flow

CheckQuestion
Branch coverageAre all branches reachable? Any dead code?
Fall-throughAre switch/case fall-throughs intentional?
Early returnsAre guard clauses used appropriately?
Loop terminationDo all loops have guaranteed termination?

3.3 Data Flow

CheckQuestion
InvariantsAre invariants preserved through transformations?
Mutation scopeIs mutation limited to appropriate scope?
Shared stateIs shared state access properly synchronized?
AliasingAre aliasing risks (multiple refs to same data) handled?

3.4 State & Transactions

CheckQuestion
IdempotencyIs the operation safe to retry?
AtomicityAre multi-step operations atomic?
RollbackIs there a path to undo partial changes?
ConcurrencyAre race conditions handled?

3.5 Error Handling

CheckQuestion
SpecificityAre exceptions specific (not broad catches)?
Retry logicIs transient failure handled with backoff?
Dead letterAre unprocessable items routed to DLQ/log?
Error contextDo errors include sufficient debugging info?

3.6 Contracts

CheckQuestion
Pre-conditionsAre pre-conditions documented and enforced?
Post-conditionsAre post-conditions guaranteed on success?
Schema driftDo request/response schemas match implementation?
VersioningAre breaking changes properly versioned?

3.7 Time & Locale

CheckQuestion
TimezonesAre datetime operations timezone-aware?
Monotonic timeIs elapsed time measured with monotonic clocks?
DSTAre daylight saving time transitions handled?
Format stabilityAre date/time formats consistent and unambiguous?

3.8 Resource Hygiene

CheckQuestion
File lifecycleAre files opened/closed properly (with statements)?
Connection poolingAre connections returned to pools?
TimeoutsDo all blocking operations have timeouts?
CancellationIs cancellation propagated through async chains?

3.9 Edge Cases

CheckQuestion
Empty inputsIs empty/null input handled gracefully?
Max sizesAre large inputs bounded (pagination, limits)?
Partial failureIs partial failure detectable and recoverable?
Resource exhaustionAre OOM, disk full, quota exceeded handled?

3.10 Public Surface

CheckQuestion
Backward compatAre breaking changes intentional and documented?
OpenAPI alignmentDo implementations match OpenAPI/JSON schemas?
Type exportsAre public types exported and documented?
DeprecationAre deprecated items marked and alternatives provided?

Step 4: Test & Contracts Analysis

For each changed public function/endpoint:

  1. Map to test coverage
    • Run: pytest -q or equivalent
    • Run: coverage run -m pytest && coverage report --format=markdown
    • Identify which changed functions have tests
  2. Identify missing test cases
    • Error branches: Are failure paths tested?
    • Boundary conditions: Are min/max values tested?
    • Property invariants: Are data guarantees verified?
    • Mutation tests: Would incorrect code fail tests?
  3. Contract/API verification
    • Compare OpenAPI/JSON schema to implementation
    • Verify request/response DTOs match spec
    • Check for breaking field/enum changes

Step 5: Secondary Scans (Optional)

Run static analysis tools (read-only, report results):

# Type checking
mypy . --ignore-missing-imports 2>/dev/null || echo "mypy not available"

# Security scan
bandit -r . -q 2>/dev/null || echo "bandit not available"

# Dependency audit
pip-audit 2>/dev/null || npm audit --json 2>/dev/null | jq '.metadata' || echo "audit not available"

Note findings without attempting fixes.

Step 6: Write QA Report

Create memory-bank/qa/YYYY-MM-DD_HH-MM-SS_<topic>_qa.md:

---
title: "<topic> – QA Report"
phase: QA
date: "YYYY-MM-DD HH:MM:SS"
owner: "<agent_or_user>"
parent_execute: "memory-bank/execute/<file>.md"
git_commit_at_qa: "<sha>"
tags: [qa, <topic>]
---

## Summary

| Metric | Count |
|--------|-------|
| Files reviewed | N |
| Functions reviewed | N |
| CRITICAL findings | N |
| WARNING findings | N |
| INFO findings | N |
| PASS (no issues) | N |

## Changed Areas Reviewed

### File: `path/to/file.py`

| Function/Class | Lines | Status |
|----------------|-------|--------|
| `function_name()` | L45-89 | ⚠️ WARNING |
| `ClassName` | L120-200 | ✅ PASS |

#### Findings for `function_name()`

| Severity | Category | Finding | Recommendation |
|----------|----------|---------|----------------|
| WARNING | Error Handling | Broad `except Exception` catch | Catch specific exceptions |
| INFO | Data Flow | Mutation of input parameter | Document or avoid |

### File: `path/to/another.js`

...

## Test Coverage Analysis

| Function | Has Tests | Coverage % | Missing Cases |
|----------|-----------|------------|---------------|
| `function_name()` | ✅ | 85% | Error branch, empty input |
| `another_function()` | ❌ | 0% | All cases |

## Contract/API Verification

| Endpoint | Schema Match | Breaking Changes |
|----------|--------------|------------------|
| `POST /api/items` | ✅ | None |
| `GET /api/items/:id` | ⚠️ | New required field |

## Static Analysis Summary

| Tool | Result |
|------|--------|
| mypy | N errors, M warnings |
| bandit | N low, M medium issues |
| pip-audit | N vulnerabilities |

## Risk Assessment

| Risk | Likelihood | Impact | Mitigation Status |
|------|------------|--------|-------------------|
| Race condition in shared state | Medium | High | Not mitigated |
| Missing error branch coverage | High | Medium | Not tested |

## Recommendations Summary

### Must Fix (CRITICAL)
1. [Description of critical issue]

### Should Fix (WARNING)
1. [Description of warning]

### Observations (INFO)
1. [Description of observation]

Finding Severity Levels

LevelDefinitionAction Required
CRITICALSecurity risk, data loss, or system instabilityMust fix before merge
WARNINGPotential bugs, maintainability issues, missing coverageShould fix, can defer
INFOStyle observations, suggestions, notesOptional
PASSNo issues foundNone

Constraints

ConstraintRule
NO CODE CHANGESNever write, modify, or delete code
NO FIXESReport issues, do not implement solutions
FOCUS ON CHANGESOnly review files listed in the execution log
READ-ONLY TOOLSUse tools that don't modify state
DOCUMENT FINDINGSEvery issue must be in the QA report

Subagent Usage

If additional analysis is needed:

With subagents available: Deploy maximum 3:

SubagentWhen to Deploy
antipattern-snifferReview changed code for anti-patterns and code smells
codebase-analyzerDeep analysis of specific function implementations
context-synthesisIdentify hidden dependencies affected by changes

Without subagents: Perform manual analysis following the checklist.

Handoff

After writing the QA report to memory-bank/qa/, hand off to the user for disposition.

Suggested next action:

Review memory-bank/qa/<file>.md and decide whether to accept the work or create follow-up planning.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.