GigiKit Guides

Creating Implementation Plans

Every non-trivial task in GigiKit begins with a plan. Plans live in ./plans, are created by the planner agent, and provide the single source of truth that all subsequent agents β€” implementers, testers, reviewers β€” follow.

Plan Directory Naming

Plan directories follow a timestamp-plus-slug format injected by the subagent-start hook:

plans/YYMMDD-HHMM-descriptive-slug/

# Examples
plans/260305-1034-stripe-webhook-integration/
plans/260305-1505-user-authentication-and-profile/
plans/260306-0900-database-migration-v2/

The timestamp is always the date and time the planning session began. The slug is kebab-case and describes the feature or task β€” long slugs are fine.

Directory Structure

plans/
└── 260305-1034-stripe-webhook-integration/
    β”œβ”€β”€ plan.md                              # Overview β€” entry point
    β”œβ”€β”€ phase-01-setup-dependencies.md       # Install and configure SDKs
    β”œβ”€β”€ phase-02-implement-webhook-handler.md
    β”œβ”€β”€ phase-03-implement-event-processors.md
    β”œβ”€β”€ phase-04-write-tests.md
    β”œβ”€β”€ research/
    β”‚   β”œβ”€β”€ researcher-stripe-api-report.md
    β”‚   └── researcher-security-report.md
    └── reports/
        β”œβ”€β”€ implementer-report.md
        β”œβ”€β”€ tester-report.md
        └── reviewer-report.md

The research/ subdirectory holds researcher agent outputs. The reports/ subdirectory accumulates agent completion reports throughout the implementation.

The plan.md Overview File

plan.md is the entry point for the entire plan. Keep it under 80 lines β€” it is a navigation document, not a specification.

# Plan: Stripe Webhook Integration

## Status
- Phase 01: Complete
- Phase 02: In Progress
- Phase 03: Not Started
- Phase 04: Not Started

## Phases
- [Phase 01 β€” Setup Dependencies](./phase-01-setup-dependencies.md)
- [Phase 02 β€” Webhook Handler](./phase-02-implement-webhook-handler.md)
- [Phase 03 β€” Event Processors](./phase-03-implement-event-processors.md)
- [Phase 04 β€” Tests](./phase-04-write-tests.md)

## Key Dependencies
- Phase 02 requires Phase 01 complete (SDK installed)
- Phase 03 requires Phase 02 complete (handler interface defined)
- Phase 04 requires Phase 02 and 03 complete

## Research
- [Stripe API Report](./research/researcher-stripe-api-report.md)
- [Security Report](./research/researcher-security-report.md)

Phase Files

Each phase file is a complete, self-contained specification for one slice of work. An agent assigned to a phase should be able to execute it without reading any other phase file.

Required sections in every phase file:

SectionPurpose
Context LinksLinks to research reports, related docs, architecture docs
OverviewPriority, current status, brief description
Key InsightsCritical findings from research phase
RequirementsFunctional and non-functional requirements
ArchitectureSystem design, component interactions, data flow
File OwnershipExact glob patterns this phase owns
Implementation StepsNumbered, specific instructions
Todo ListCheckbox list for tracking progress
Success CriteriaDefinition of done and validation method
Risk AssessmentPotential issues and mitigations
Security ConsiderationsAuth, data protection, input validation
Next StepsDependencies this phase unlocks

Updating Plan Status

As phases complete, the planner or lead updates plan.md to reflect current status. Agents must not update plan.md themselves β€” they report completion via TaskUpdate and a message to the lead, who updates the overview.

Research Before Planning

For unfamiliar domains, spawn researcher agents in parallel before creating the plan:

# Researcher 1
"Research Stripe webhook security best practices.
 Report to: /plans/reports/researcher-stripe-security-report.md"

# Researcher 2 (simultaneous)
"Research idempotency patterns for payment webhook handlers.
 Report to: /plans/reports/researcher-idempotency-report.md"

The planner reads both reports before writing phase files, ensuring implementation steps reflect real-world constraints.