# Ag Construir Validado

> Spawna builder (ag-implementar-codigo) + validator (ag-revisar-codigo) em paralelo. Builder implementa, validator verifica em tempo real. Pattern de Boris Cherny.

- **Type:** Skill
- **Install:** `agentstack add skill-andregusman-raiz-a-gusman-claude-ag-construir-validado`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [andregusman-raiz](https://agentstack.voostack.com/s/andregusman-raiz)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [andregusman-raiz](https://github.com/andregusman-raiz)
- **Source:** https://github.com/andregusman-raiz/a-gusman-claude/tree/main/skills/ag-construir-validado

## Install

```sh
agentstack add skill-andregusman-raiz-a-gusman-claude-ag-construir-validado
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# ag-construir-validado — Builder/Validator Pattern

Implements the builder/validator pattern where implementation and review
happen concurrently instead of sequentially.

## Invocation

Use the **Agent tool** with:
- `subagent_type`: `general-purpose`
- `mode`: `auto`
- `prompt`: Compose from template below

## Prompt Template

```
Projeto: [CWD]
Scope: [from arguments]

## Pattern: Builder + Validator Concurrent

1. Read task_plan.md to understand what needs to be built
2. Spawn TWO agents in parallel:

   **Builder (ag-implementar-codigo)**:
   - Agent tool with subagent_type: ag-implementar-codigo
   - isolation: worktree
   - Implements all items from task_plan.md
   - Commits incrementally every 5 actions

   **Validator (ag-revisar-codigo)**:
   - Agent tool with subagent_type: ag-revisar-codigo
   - run_in_background: true
   - Reviews code as it's committed
   - Reports issues found

3. During build: Builder uses LSP tool (hover/documentSymbol) for instant type validation on modified files — avoids spawning tsc during iterative work

4. After both complete:
   - Read validator output
   - If issues found: fix them
   - Run quality gates: tsc full (`bun run typecheck`) + lint + test (only here, not during build)
   - Report final status
```

## Inter-Agent Communication
- Builder uses **SendMessage** to notify coordinator at key milestones:
  - Module complete, blocker found, self-check result
- Validator uses **SendMessage** to report issues found during review
- Coordinator reads messages and decides: continue, fix, or escalate

## Important
- Builder and validator run CONCURRENTLY — this is the key innovation
- Validator reviews code as it appears, not after all code is written
- This reduces cycle time vs sequential build→review
- allowed-tools for coordinator MUST include SendMessage

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [andregusman-raiz](https://github.com/andregusman-raiz)
- **Source:** [andregusman-raiz/a-gusman-claude](https://github.com/andregusman-raiz/a-gusman-claude)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-andregusman-raiz-a-gusman-claude-ag-construir-validado
- Seller: https://agentstack.voostack.com/s/andregusman-raiz
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
