Skill: ivangdavila/agentic-coding (version 1.0.0)

--- name: Agentic Coding slug: agentic-coding version: 1.0.0 homepage: https://clawic.com/skills/agentic-coding description: Ship production code with AI agents through acceptance contracts, micro diffs, red green loops, and deterministic handoff checkpoints. changelog: Initial release with PACT protocol, contract templates, and handoff-first delivery workflow. metadata: {"clawdbot":{"emoji":"AI","requires":{"bins":["git"]},"os":["linux","darwin","win32"]}} --- ## Setup If `~/agentic-coding/` does not exist or is empty, read `setup.md`, ask a concise kickoff question, and keep any persistence explicitly opt-in. ## Positioning This skill is intentionally different from `agentic-engineering` and `vibe-coding`: - `agentic-engineering` focuses on multi-agent operating patterns and team throughput. - `vibe-coding` focuses on prompt-led exploration and fast idea shipping. - `agentic-coding` focuses on contract-first implementation, proof of fix, and reviewer-ready handoff. ## When to Use User needs merge-ready code from an AI agent with explicit quality gates. Use for production features, risky refactors, bug fixes with reproducible failures, and Xcode-centered work such as Swift feature delivery, iOS/macOS regressions, and release-branch hotfixes. ## Architecture Memory lives in `~/agentic-coding/`. See `memory-template.md` for setup. ```text ~/agentic-coding/ |- memory.md # Persistent preferences and operating mode |- contracts.md # Accepted task contracts and non-goals |- evidence.md # Test evidence and verification snapshots `- handoffs.md # Delivery notes and rollback hints ``` ## Quick Reference Load these files on demand to keep context focused and execution fast. | Topic | File | |-------|------| | Setup process | `setup.md` | | Memory template | `memory-template.md` | | PACT loop | `protocol.md` | | Contract prompts | `prompt-contracts.md` | | Merge handoff checklist | `handoff.md` | ## Core Rules ### 1. Lock a Contract Before Writing Code Start every task with a compact contract: - Objective: exact outcome in one sentence - Acceptance: checks that prove success - Non-goals: what must stay untouched - Constraints: stack, style, limits, deadlines No contract, no code. ### 2. Run the PACT Loop Use the same execution loop every time: 1. **P**roblem framing: restate objective and assumptions 2. **A**cceptance design: define checks before edits 3. **C**hange set: produce the smallest useful diff 4. **T**race and test: show evidence and residual risk This skill is execution discipline, not brainstorming. For Xcode workflows, tie acceptance to a concrete target, simulator/device, and test command before editing. ### 3. Keep Diffs Surgical One user objective maps to one focused change set: - Prefer file-local edits over broad rewrites - Separate behavior change from style cleanup - Avoid hidden side effects outside declared scope If scope grows, split into a second contract. ### 4. Prove Failure Then Prove Fix For bugs and regressions: - Capture the failing condition first (test, log, or reproduction) - Apply minimal fix - Re-run the same check to prove resolution Never claim fixed without before and after evidence. ### 5. Deliver Handoff-Grade Output End each cycle with a delivery packet: - What changed and why - Files touched and blast radius - Validation run and results - Known risks and rollback path If handoff is unclear, the task is not finished. ### 6. Escalate With a Structured Fallback When blocked after two failed attempts: - Stop editing - State what was tried - Propose two grounded alternatives - Request a decision with tradeoffs Do not keep guessing in loops. ## Common Traps - Starting implementation without acceptance checks -> endless iteration and unclear done state. - Asking the agent for full rewrites -> noisy diffs and avoidable regressions. - Mixing feature work with architecture overhaul -> weak reviewability and hard rollback. - Reporting success without reproducible evidence -> false confidence in production. - Treating AI output as final draft -> quality debt moved to code review. ## Security & Privacy **Data that leaves your machine:** - None from this skill itself **Data that stays local:** - Contracts, evidence notes, and handoff summaries in `~/agentic-coding/` **This skill does NOT:** - Trigger undeclared network requests - Access files outside its own memory path - Write to global or platform memory stores - Auto-approve risky code without explicit evidence ## Scope This skill ONLY: - Improves execution quality of AI-assisted coding - Enforces contract driven implementation and verification - Produces clear handoff packets for reviewers This skill NEVER: - Replaces security review for high risk domains - Encourages blind trust in generated code - Overrides project specific contribution rules ## Related Skills Install with `clawhub install <slug>` if user confirms: - `agentic-engineering` - Multi-agent collaboration and operating patterns. - `coding` - General coding support across stacks and tasks. - `code` - Broad code authoring and editing assistance. - `copilot` - Companion style IDE assistance patterns. - `delegate` - Structured task delegation to autonomous agents. ## Feedback - If useful: `clawhub star agentic-coding` - Stay updated: `clawhub sync`

path: handoff.md
content: # Merge Handoff Checklist

Use this checklist before claiming completion.

## Required Sections

1. Change Summary
- One paragraph describing the user-visible outcome

2. File Impact
- Exact file list
- Why each file changed
- Blast radius statement

3. Validation Evidence
- Commands run
- Key outputs summarized
- Before and after proof for bug fixes

4. Risk and Rollback
- Remaining risks by severity
- Rollback steps that can be executed quickly

5. Follow-ups
- Deferred cleanup or hardening tasks
- Suggested sequencing for next contracts

## Quality Bar

A handoff is complete only when a reviewer can answer:
- What was requested?
- What changed?
- Why should I trust this change?
- How do I revert safely?


path: memory-template.md
content: # Memory Template - Agentic Coding

Create `~/agentic-coding/memory.md` with this structure:

```markdown
# Agentic Coding Memory

## Status
status: ongoing
version: 1.0.0
last: YYYY-MM-DD
integration: pending

## Working Context
<!-- Active repositories and stacks -->
<!-- Typical task types and risk profile -->

## Contract Preferences
<!-- How this user defines objective, constraints, and non-goals -->
<!-- Preferred acceptance style: tests, logs, screenshots, benchmarks -->

## Validation Patterns
<!-- Commands and checks that are trusted in this workspace -->
<!-- What counts as enough evidence before handoff -->

## Repeated Traps
<!-- Recurring failure modes worth preventing early -->

## Notes
<!-- Stable operational observations only -->

---
*Updated: YYYY-MM-DD*
```

## contracts.md Template

Create `~/agentic-coding/contracts.md`:

```markdown
# Active Contracts

## YYYY-MM-DD - [Task Name]
Objective: ...
Acceptance: ...
Non-goals: ...
Constraints: ...
Status: drafted | active | verified | blocked
```

## evidence.md Template

Create `~/agentic-coding/evidence.md`:

```markdown
# Validation Evidence

## YYYY-MM-DD - [Task Name]
Before: [failing test/log/reproduction]
After: [passing test/log/reproduction]
Residual risk: [low/medium/high + why]
```

## handoffs.md Template

Create `~/agentic-coding/handoffs.md`:

```markdown
# Handoffs

## YYYY-MM-DD - [Task Name]
Changes: ...
Files touched: ...
Validation run: ...
Rollback: ...
Next action: ...
```

## Status Values

| Value | Meaning | Behavior |
|-------|---------|----------|
| `ongoing` | Default | Keep collecting patterns |
| `complete` | Context is stable | Use memory mostly for refresh |
| `paused` | User wants minimal process | Keep only essential checks |
| `never_ask` | User rejected integration prompts | Stop prompting and stay silent |


path: prompt-contracts.md
content: # Contract Prompt Templates

Use these prompts to start high quality agentic coding cycles.

## Feature Contract Prompt

```text
You are implementing one scoped feature.
Objective: [one sentence]
Acceptance checks:
1) [new behavior test]
2) [baseline must stay green]
Non-goals: [what must not change]
Constraints: [stack, style, performance, deadline]
Output:
- Plan in 3-6 bullets
- Files to modify
- Minimal diff strategy
- Validation commands
Wait for approval before coding.
```

## Bug Fix Contract Prompt

```text
You are fixing one reproducible bug.
Bug signal: [error/log/behavior]
Reproduction steps: [ordered steps]
Acceptance checks:
1) Reproduction fails before fix
2) Reproduction passes after fix
3) Related area remains stable
Non-goals: [explicit exclusions]
Output:
- Suspected root cause
- Minimal fix path
- Verification plan
Do not implement until the plan is approved.
```

## Refactor Contract Prompt

```text
You are refactoring without changing behavior.
Objective: [maintain behavior, improve structure in specific area]
Behavior lock: [tests or traces proving parity]
Constraints:
- No API signature changes
- No schema changes
- No new dependencies
Output:
- Refactor boundaries
- Risk points
- Rollback strategy
- Validation plan
Proceed only within listed boundaries.
```

## Final Handoff Prompt

```text
Prepare a reviewer handoff with:
1) What changed and why
2) Files touched
3) Validation evidence (before and after)
4) Residual risk
5) Rollback instructions
Keep it concise and auditable.
```


path: protocol.md
content: # PACT Loop - Agentic Coding Protocol

PACT keeps AI coding predictable under time pressure.

## P: Problem Framing

Write a compact brief before editing:
- Target behavior
- Current gap
- Scope boundary
- Definition of done

Output format:

```text
Objective:
Gap:
Scope:
Done when:
```

## A: Acceptance Design

Define checks before touching code.

Minimum acceptance set:
- One check that fails before changes
- One check that must pass after changes
- One guardrail that must remain unaffected

Examples:
- Bug fix: failing reproduction, then passing reproduction
- Feature: new test plus unchanged baseline tests
- Refactor: behavior parity checks plus static quality gate

## C: Change Set

Implement only what the contract requires.

Rules:
- Keep file count as low as possible
- Avoid broad renames during behavioral changes
- Split optional cleanup into follow-up contracts

## T: Trace and Test

Produce concrete evidence and decision support.

Report:
- Commands executed
- Pass or fail outcomes
- Residual risk with explicit rationale
- Recommended next action

## Stop Conditions

Stop and escalate when:
- Two implementation attempts fail
- Acceptance cannot be measured with available tooling
- The requested scope conflicts with project constraints

Escalation packet:
- What was attempted
- What blocked progress
- Two alternative paths with tradeoffs


path: setup.md
content: # Setup - Agentic Coding

Read this when `~/agentic-coding/` is missing or empty. Keep startup concise and transparent.

## Your Attitude

Act like an execution partner focused on shipping reliable changes, not a hype assistant. Be direct, specific, and evidence-first.

## Priority Order

### 1. First: Integration

Within the first exchanges, clarify when this skill should activate in future sessions:
- When the user asks for code changes with quality gates
- Only on request, or proactively when risk is high
- Situations where this method should never activate

If the user approves, save activation preferences in `~/agentic-coding/memory.md` only.
Do not write to global memory stores or external configuration files.

### 2. Then: Understand Delivery Context

Capture only what affects execution quality:
- Repository and stack
- Current objective and deadline pressure
- Existing test harness and validation constraints
- Risk tolerance for scope and refactor depth

Keep questions minimal and immediately useful.

### 3. Finally: Calibrate Operating Mode

Adapt to the user style:
- Fast mode: tighter loops, shorter handoffs
- Audit mode: explicit evidence and risk reporting
- Teaching mode: explain tradeoffs and alternatives

Infer preference from behavior before asking directly.

## What You Save Internally

Save durable patterns, not chat noise:
- Preferred contract shape and acceptance granularity
- Usual validation commands and confidence thresholds
- Repeated failure modes and reliable recovery tactics
- Handoff format the user approves fastest

All persisted context stays under `~/agentic-coding/`.

## Golden Rule

Answer the coding problem first. Use setup context to improve execution, never to delay execution.


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)