home / skills / sounder25 / google-antigravity-skills-library / 07_deterministic_planner

07_deterministic_planner skill

/07_deterministic_planner

This skill enforces a deterministic planning phase by generating and validating PLAN.json with objectives, steps, verification, and rollback guidance.

npx playbooks add skill sounder25/google-antigravity-skills-library --skill 07_deterministic_planner

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
1.5 KB
---
name: Deterministic Planner
description: Enforces a structural planning phase before execution. Generates and validates PLAN.json to ensure every task has a clear objective, steps, verification method, and rollback strategy.
version: 1.0.0
author: Antigravity Skills Library
created: 2026-01-16
leverage_score: 5/5
---

# SKILL-007: Deterministic Planner

## Overview

Complex tasks fail when agents improvise. This skill enforces a "Measure Twice, Cut Once" discipline by requiring a valid `PLAN.json` artifact before significant changes are made.

## Trigger Phrases

- `create plan <objective>`
- `start task <name>`
- `initialize mission`

## Inputs

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `--objective` | string | Yes | - | High-level goal (e.g., "Refactor gas logic") |
| `--output` | string | No | `PLAN.json` | Output file path |

## Outputs

1. `PLAN.json` with the following rigid schema:
    - `objective`: String
    - `steps`: Array of Objects `{ step: int, description: string, verification: string }`
    - `rollback_strategy`: String
    - `risks`: Array of strings

## Preconditions

None.

## Safety Checks

- Validates that `rollback_strategy` is not empty/null.
- Validates that every step has a `verification` criteria.

## Implementation

See `init_plan.ps1`.

## Integration

```powershell
.\skills\07_deterministic_planner\init_plan.ps1 -Objective "Migrate Database Schema"
# Returns valid JSON structure to fill
```

Overview

This skill enforces a structural planning phase before any execution by generating and validating a PLAN.json artifact. It ensures every task has a clear objective, ordered steps, verification criteria, and a rollback strategy before changes are made. The result is predictable, auditable operations that reduce improvisation and mitigate risk.

How this skill works

The skill runs an initialization routine that produces a rigid PLAN.json schema and prompts the agent or operator to fill in objective, steps, verification methods, risks, and rollback strategy. It validates that each step includes a verification clause and that rollback_strategy is present and non-empty. Only a validated PLAN.json is allowed to unlock subsequent execution stages.

When to use it

  • Before any multi-step automation that changes systems or data
  • When refactoring code or migrating database schemas
  • For deployments, configuration changes, and infrastructure updates
  • When multiple actors or agents will execute coordinated tasks
  • When auditability and rollback guarantees are required

Best practices

  • Write concise objectives that describe the desired outcome, not the method
  • Define verifiable acceptance criteria for every step (tests, checks, logs)
  • Keep rollback strategies explicit and actionable, with exact commands or procedures
  • Enumerate risks realistically and include mitigation actions
  • Use the validated PLAN.json as the single source of truth for execution and postmortem

Example use cases

  • Refactor a gas-calculation module: plan steps, tests to run, and rollback commit hash
  • Migrate database schema: define pre-checks, migration steps, verification queries, and fallback plan
  • Automated deployment: outline build, deploy, smoke tests, and rollback procedures
  • Agent handoff: provide a deterministic sequence with verification so multiple agents can operate safely

FAQ

What does the PLAN.json schema require?

It requires objective (string), steps (array of objects with step, description, verification), rollback_strategy (non-empty string), and risks (array of strings).

Will execution proceed without a valid PLAN.json?

No. The skill blocks execution until PLAN.json passes validation checks for verification fields and rollback_strategy presence.