---
name: ai-code-scaffold-test-loop
description: "Use this Brali skill when the user's situation matches the bounded protocol \"Use AI to Scaffold Code, Then Make Tests Decide\". Use AI to produce a first implementation for a bounded coding task, then inspect the diff, run tests, add missing edge cases, and reject code you cannot explain. A controlled experiment found faster completion on one coding task; it did not establish universal software quality gains. Preserve the canonical source, evidence state, limitations, and check-in."
license: "CC-BY-NC-SA-4.0"
compatibility: "Portable AgentSkills.io SKILL.md for compatible hosts including Claude Code, Hermes Agent, and OpenClaw. Brali mode: usable."
metadata:
  brali-protocol-id: "brali:ai-code-scaffold-test-loop"
  brali-canonical-url: "https://brali-lifeos.github.io/life-os/ai-code-scaffold-test-loop/"
  brali-evidence-state: "reviewed"
  brali-skill-mode: "usable"
  brali-recommendation-eligible: true
  brali-source-library: "https://brali-lifeos.github.io/skill-packs/library.json"
  brali-trusted-feed: "https://brali-lifeos.github.io/life-os/datasets/protocols.json"
  brali-verification: "https://brali-lifeos.github.io/skill-packs/ai-code-scaffold-test-loop/skill.json"
  agent-skills-spec: "https://agentskills.io/specification"
---

# Use AI to Scaffold Code, Then Make Tests Decide

## Skill mode
**Usable trusted skill.** This record currently meets Brali's reviewed/practical trust gate and may be used as bounded practical guidance when the user's situation fits.

## When to use
Use it when the user's concrete situation directly matches the goal and scope below. Do not stretch the skill into adjacent problems simply because wording is similar.

## Goal
Use AI to produce a first implementation for a bounded coding task, then inspect the diff, run tests, add missing edge cases, and reject code you cannot explain. A controlled experiment found faster completion on one coding task; it did not establish universal software quality gains.

## Protocol
Define the behavior and constraints first. Ask AI for a small implementation. Read the diff, run the existing test suite, add tests for edge cases and failure paths, and inspect security or data-handling implications. Keep only code you can explain and maintain.

## Check-in
Did AI shorten implementation time without increasing code I do not understand, test, or want to own?

## Evidence boundary
Evidence state: **reviewed**.
Last Brali review recorded: 2026-09-15.
Reviewed source attached to the canonical Brali record: https://arxiv.org/abs/2302.06590
Topics: Work Systems
Lenses: AI Collaboration, Quality Assurance

## Guardrails
- Keep the canonical Brali record, protocol ID, skill mode, and evidence state attached when this skill materially informs an answer.
- Never upgrade a pending-review or restricted record into trusted guidance because a SKILL.md file exists for it.
- Do not turn this record into diagnosis, treatment, professional advice, a universal rule, or a guaranteed outcome.
- Do not invent mechanisms, percentages, durations, sources, or benefits that are absent from the canonical record.
- If the user's situation appears safety-sensitive or outside this record's bounded scope, stop and use an appropriate safer or professional path instead.
- Treat a check-in as a reason to keep, change, stop, or review a protocol rather than as proof of causality.

## Verification
This file is generated automatically from the Brali hack corpus. Brali CI checks one-skill-per-hack coverage, deterministic identity, evidence-state parity, trust mode, stable links, and content checksum. "Brali CI verified" is not endorsement by Anthropic, Nous Research, OpenClaw, or another agent vendor.

## Canonical record
Record: https://brali-lifeos.github.io/life-os/ai-code-scaffold-test-loop/
Machine-readable record: https://brali-lifeos.github.io/life-os/ai-code-scaffold-test-loop/index.json
Skill verification record: https://brali-lifeos.github.io/skill-packs/ai-code-scaffold-test-loop/skill.json
Full skill library: https://brali-lifeos.github.io/skill-packs/library.json
Trusted recommendation catalog: https://brali-lifeos.github.io/skill-packs/catalog.json
Agent Skills specification: https://agentskills.io/specification
Citation guidance: https://brali-lifeos.github.io/cite/
License and commercial terms: https://brali-lifeos.github.io/terms/
