Back to docs

KitTools (1.6.4)

A documentation framework for AI-assisted development. Structured docs, session management, and automation hooks.

View Release Notes

What is KitTools?

KitTools is a Claude Code plugin that provides:

  • Structured documentation templates — Consistent docs across projects
  • Session management — Track work across context refreshes
  • Automation hooks — Auto-timestamps, scratchpad reminders
  • Feature planning — Create PRDs and plan features with guided workflows

Think of it as a “documentation kit” for your projects, with AI-aware features built in. Instead of spending tokens explaining your project in chat, maintain living documentation that gives AI immediate understanding.


Installation

# 1. Add the WashingBearLabs marketplace
/plugin marketplace add WashingBearLabs/WashingBearLabsMarketplace

# 2. Install the plugin
/plugin install kit-tools@washingbearlabs

From Local Clone

git clone https://github.com/WashingBearLabs/KitTools.git
/plugin install ./KitTools

Quick Start

  1. Initialize — Set up kit_tools in your project:

    /kit-tools:init-project
    

    Select your project type (API, Web App, CLI, etc.) and templates will be tailored accordingly.

  2. Seed — Populate templates with project-specific content:

    /kit-tools:seed-project
    

    Claude explores your codebase and fills in the documentation.

  3. Work — Start a development session:

    /kit-tools:start-session
    

    Claude orients itself using your docs and creates a scratchpad for notes.

  4. Close — End your session cleanly:

    /kit-tools:close-session
    

    Notes are processed into permanent documentation.


Skills Reference

SkillDescription
/kit-tools:init-projectInitialize kit_tools with project-type presets
/kit-tools:seed-projectPopulate templates from codebase exploration
/kit-tools:seed-templateSeed a single template with project-specific content
/kit-tools:validate-seedingValidate seeded templates for unfilled placeholders
/kit-tools:migrateMigrate existing docs to kit_tools structure
/kit-tools:start-sessionOrient and create scratchpad for a work session
/kit-tools:close-sessionProcess notes and update docs at session end
/kit-tools:checkpointMid-session checkpoint without closing
/kit-tools:plan-featureCreate a Product Requirements Document (PRD) for a new feature
/kit-tools:complete-featureMark a PRD as completed and archive it
/kit-tools:sync-projectFull sync between code and docs (--quick for audit)
/kit-tools:validate-featureValidate a feature branch against its PRD (quality, security, compliance)
/kit-tools:update-kit-toolsUpdate project components from latest plugin versions
/kit-tools:execute-featureExecute PRD stories autonomously, supervised, or guarded
/kit-tools:execution-statusCheck progress and status of autonomous execution
/kit-tools:sync-symlinksForce-refresh skill symlinks after a plugin update

Hooks Reference

KitTools includes automation hooks that run automatically:

HookTriggerWhat it does
create_scratchpadSessionStartCreates SESSION_SCRATCH.md if kit_tools exists
sync_skill_symlinksSessionStartSyncs skill symlinks for the plugin
update_doc_timestampsPostToolUse (Edit/Write)Updates “Last Updated” in kit_tools docs
detect_phase_completionPostToolUse (Edit/Write)Notes PRD criteria and TODO task completions; suggests validate-feature when all PRD criteria are done
validate_seeded_templatePostToolUse (Edit/Write)Validates seeded templates for unfilled placeholders
remind_scratchpad_before_compactPreCompactReminds to capture notes, adds compaction marker
check_execution_notificationsUserPromptSubmitSurfaces execution notifications (completions, failures, crashes, pauses) on next user message
remind_close_sessionStopReminds to run close-session if scratchpad has notes

Note: Setup validation is built into /kit-tools:init-project as a final step.


Project Structure

After initialization, your project will have:

your-project/
├── kit_tools/
│   ├── AGENT_README.md      # AI navigation guide
│   ├── SYNOPSIS.md          # Project overview
│   ├── SESSION_LOG.md       # Session history
│   ├── AUDIT_FINDINGS.md    # Code quality findings
│   │
│   ├── arch/                # Architecture docs
│   │   ├── CODE_ARCH.md     # Code structure, patterns
│   │   ├── SERVICE_MAP.md   # Dependencies, integrations
│   │   ├── INFRA_ARCH.md    # Cloud resources, networking
│   │   ├── DATA_MODEL.md    # Database schema
│   │   ├── SECURITY.md      # Auth, secrets, permissions
│   │   ├── DECISIONS.md     # Architectural decision records
│   │   └── patterns/        # Detailed pattern docs
│   │
│   ├── docs/                # Operational docs
│   │   ├── LOCAL_DEV.md     # Local development setup
│   │   ├── CONVENTIONS.md   # Code conventions
│   │   ├── TROUBLESHOOTING.md
│   │   ├── MONITORING.md
│   │   ├── CI_CD.md
│   │   ├── DEPLOYMENT.md
│   │   ├── API_GUIDE.md
│   │   ├── ENV_REFERENCE.md
│   │   ├── UI_STYLE_GUIDE.md
│   │   ├── GOTCHAS.md       # Known issues
│   │   └── feature_guides/
│   │
│   ├── testing/             # Test documentation
│   │   └── TESTING_GUIDE.md
│   │
│   ├── prd/                 # Product Requirements Documents
│   │   └── archive/         # Completed PRDs
│   │
│   └── roadmap/             # Milestone tracking
│       ├── MVP_TODO.md
│       └── BACKLOG.md

└── CLAUDE.md                # Claude Code instructions

Templates Reference

KitTools provides 29 documentation templates organized by category:

Core (Always included)

TemplatePurpose
AGENT_README.mdAI navigation guide — read order, patterns, off-limits areas
SYNOPSIS.mdProject overview — what is this, current state, how to run
SESSION_LOG.mdSession history
AUDIT_FINDINGS.mdCode quality findings log
CODE_ARCH.mdCode architecture — structure, patterns, key abstractions
DECISIONS.mdArchitecture decision records
LOCAL_DEV.mdLocal development setup
GOTCHAS.mdKnown issues and landmines
CONVENTIONS.mdCode conventions and standards
TROUBLESHOOTING.mdCommon issues and solutions
TESTING_GUIDE.mdTesting strategy and patterns
prd/*Product Requirements Documents
roadmap/*Milestone tracking and backlog

API (For backend services)

TemplatePurpose
API_GUIDE.mdAPI documentation
DATA_MODEL.mdDatabase schema
ENV_REFERENCE.mdEnvironment variables
SERVICE_MAP.mdDependencies and integrations

Ops (For deployed services)

TemplatePurpose
DEPLOYMENT.mdDeploy procedures
CI_CD.mdPipeline documentation
MONITORING.mdLogs, metrics, alerts
INFRA_ARCH.mdCloud resources, networking
SECURITY.mdSecurity documentation

UI (For frontend applications)

TemplatePurpose
UI_STYLE_GUIDE.mdUI patterns and component guidelines
feature_guides/FEATURE_TEMPLATE.mdFeature-specific documentation template

Patterns (Optional deep-dives)

TemplatePurpose
AUTH.mdAuthentication patterns
ERROR_HANDLING.mdError handling patterns
LOGGING.mdLogging patterns

Project Types

When initializing, select your project type for tailored templates:

TypeDescriptionTemplates Included
API/BackendREST, GraphQL, microservicesCore + API + Data + Ops
Web AppReact, Vue, Next.jsCore + Deployment + CI + UI
Full StackFrontend + BackendEverything
CLI ToolCommand-line appsCore (minimal)
Librarynpm, PyPI packagesCore + API docs
MobileiOS/Android appsCore + Services
CustomPick templates manuallyYour choice

Session Workflow

KitTools encourages a session-based workflow:

┌─────────────────┐
│  start-session  │  ← Orient, check for orphaned notes
└────────┬────────┘


┌─────────────────┐
│     Work...     │  ← Scratchpad captures notes automatically
│                 │  ← Hooks update timestamps, remind on compact
└────────┬────────┘

    ┌────┴────┐
    │         │
    ▼         ▼
┌────────┐ ┌─────────────┐
│checkpoint│ │close-session│
└────────┘ └─────────────┘
    │              │
    │              ▼
    │         Notes → permanent docs
    │         Scratchpad deleted

  Continue
  working...

SESSION_SCRATCH.md

When a session starts, a scratchpad is created:

# SESSION_SCRATCH.md

> Auto-generated. Append notes as you work. Processed on session close.

## Active Feature

**Working on:** [Feature name or "General"]
**PRD:** [e.g., `prd-auth.md` or N/A]

---

## Notes

[Notes captured during the session]

On close-session, these notes are processed into permanent documentation and the scratchpad is deleted.


Feature Validation

Use /kit-tools:validate-feature to validate an entire feature branch against its PRD:

  1. Captures the full branch diff (git diff main...HEAD) — all changes across the feature
  2. Runs three independent review passes:
    • Code Quality — naming, patterns, code smells, error handling (dedicated agent)
    • Security — injection, auth gaps, secrets, input validation (dedicated agent)
    • PRD Compliance — acceptance criteria coverage, requirement fulfillment, scope creep
  3. Runs the project’s test suite — auto-detects the test command (package.json, pyproject.toml, pytest.ini, Makefile, or TESTING_GUIDE.md). Failed tests are logged as critical findings.
  4. Fixes critical findings automatically (autonomous mode) or inline (supervised mode)
  5. Writes remaining findings to kit_tools/AUDIT_FINDINGS.md with unique IDs and severity levels
  6. Critical findings pause autonomous execution — a .pause_execution file is created referencing the findings. Warning and info findings do not pause. In supervised mode, findings are reported without pausing.

Validation runs automatically after autonomous execution completes, and can be invoked manually at any time. Open findings are reviewed at /kit-tools:start-session.


Feature Planning with PRDs

Use /kit-tools:plan-feature to create Product Requirements Documents (PRDs):

  1. Interactive questions refine scope and requirements
  2. Epic detection — Large features are automatically decomposed into multiple PRDs
  3. Generates prd-[name].md with:
    • Overview and goals
    • User stories with acceptance criteria (US-XXX format)
    • Implementation hints per story (key files, patterns, gotchas)
    • Functional requirements (FR-X format)
    • Non-goals and scope boundaries
    • Technical considerations
  4. Story refinement — Each story is reviewed for session-fit before finalizing
    • Implementation hints are generated during refinement to reduce agent exploration time
    • Test criteria auto-injected — Code stories automatically get “Tests written/updated” and “Full test suite passes” criteria (doc/config-only stories are exempt)
  5. Links to backlog and milestone tracking
  6. Captures implementation notes and refinement notes as you work

Story Refinement

After generating the PRD, each story is reviewed against these heuristics:

CheckQuestionRed Flag
Single ResponsibilityIs this story doing multiple things?“and”, “also”, multiple verbs
Session FitCan this complete in one context window?Touches >3 files, crosses subsystems
Research NeedsAre there unknowns that would eat context?Vague tech, unexplored patterns
Scope ClarityAre criteria specific and verifiable?“works correctly”, “handles properly”

For each story with issues, the refinement process:

  • Multi-concern stories → Split into separate stories
  • Over-scoped stories → Narrow or split
  • Research needs → Conduct research, document findings
  • Vague criteria → Propose specific, verifiable criteria

Refinement findings are captured in the PRD’s “Refinement Notes” section.

Session-Fit Guidelines

PRDs focus on session-fit per story rather than story counts:

GuidelineTarget
Single responsibilityOne concern per story
Session fitCompletable in one context window
Acceptance criteria3-5 per story, clear and verifiable

Story count is not a target — a PRD with 15 well-refined stories is fine. What matters is that each story passes refinement checks.

PRDs are marked session_ready: true if all stories pass refinement; session_ready: false if refinement was skipped or stories have unresolved issues.

Epic Decomposition & Chaining

Large features (“epics”) are automatically split into focused PRDs with chaining fields:

"OAuth Authentication" (epic)
         ↓ decomposed into:
├── prd-oauth-schema.md    (epic_seq: 1, no dependencies)
├── prd-oauth-provider.md  (epic_seq: 2, depends_on: [oauth-schema])
├── prd-oauth-api.md       (epic_seq: 3, depends_on: [oauth-provider])
└── prd-oauth-ui.md        (epic_seq: 4, epic_final: true, depends_on: [oauth-api])

When you run /kit-tools:execute-feature on any PRD in an epic, the orchestrator detects the epic and offers to execute all remaining PRDs in sequence on a shared epic/[name] branch. Each PRD is validated, tagged, and archived before the next one starts. Dependencies are enforced as hard gates — a PRD won’t execute until its depends_on PRDs are archived.

PRD Lifecycle

/plan-feature → prd-auth.md (status: active, session_ready: true)

/execute-feature → implement stories on feature/auth branch

/validate-feature → quality, security, and PRD compliance review

/complete-feature → archive PRD, clean up artifacts, handle branch

PRD Structure

---
feature: auth
status: active
session_ready: true   # true if all stories pass refinement
depends_on: []
epic:                 # epic name (empty for standalone PRDs)
epic_seq:             # execution order within epic (1-based)
epic_final:           # true only on last PRD in epic
created: 2025-01-15
updated: 2025-01-20
---

# PRD: User Authentication

## Overview
Brief description of the feature and the problem it solves.

## Goals
- Specific, measurable objective 1
- Specific, measurable objective 2

## User Stories

### US-001: User Login Form

**Description:** As a user, I want to see a login form so that I can enter my credentials.

**Implementation Hints:**
- Reuse existing Form component at `src/components/Form.tsx`
- Follow validation patterns in `src/utils/validators.ts`

**Acceptance Criteria:**
- [ ] Login page shows email and password fields
- [ ] Submit button is disabled until both fields have content
- [ ] Tests written/updated for new functionality
- [ ] Full test suite passes
- [ ] Typecheck/lint passes

### US-002: Login Authentication

**Description:** As a user, I want my credentials validated so that I can access my account.

**Implementation Hints:**
- AuthService at `src/services/auth.ts` handles credential validation
- Dashboard route at `/dashboard` — redirect on success

**Acceptance Criteria:**
- [ ] Valid credentials redirect to dashboard
- [ ] Invalid credentials show error message
- [ ] Tests written/updated for new functionality
- [ ] Full test suite passes
- [ ] Typecheck/lint passes

## Non-Goals
- What this feature will NOT include

## Implementation Notes
<!-- Populated during implementation -->

## Refinement Notes

### Research Conducted
- Existing auth uses AuthService at src/services/auth.ts
- Dashboard route at /dashboard

### Scope Adjustments
- Original US-001 split into US-001 (form) and US-002 (auth)

### Decisions Made
- Reuse existing AuthService for credential validation

Autonomous Execution

Use /kit-tools:execute-feature to execute PRD stories:

/kit-tools:execute-feature    # Select PRD, choose execution mode, run

Three execution modes:

  • Supervised — Review each story in-session before continuing
  • Autonomous — Spawn separate Claude sessions per story, run until complete
  • Guarded — Autonomous with human oversight on failures

Key features of autonomous execution:

  • Branch-per-attempt — Each implementation attempt runs on a temporary branch (feature-story-attempt-N). Successful attempts merge; failed attempts are deleted cleanly (no destructive git reset).
  • File-based agent results — Agents write structured JSON result files instead of stdout parsing, eliminating false failures from LLM output formatting.
  • Reference-based context — Agent prompts pass file paths instead of inlining full file contents, reducing prompt size ~80% for large projects.
  • Implementation hints — Per-story hints from planning flow reduce exploration time.
  • Independent verification — A separate verifier agent receives git-sourced file lists (not implementer claims) for honest assessment.
  • Patch-based retry — Failed attempt diffs are included in retry prompts so the agent takes a different approach.
  • Pause on critical findings — After validation, critical findings create a .pause_execution file. The pipeline resumes when the file is removed after review.

Progress is tracked in kit_tools/EXECUTION_LOG.md and PRD checkboxes.

For epics, the orchestrator chains PRDs automatically — executing all stories in one PRD, validating, tagging a checkpoint, archiving, then moving to the next. You can choose to pause between PRDs for review or run non-stop.


Key Files Explained

AGENT_README.md

The entry point for AI assistants. Contains:

  • Read order — Which docs to read and in what order
  • Session checklists — Start and end checklists
  • Patterns to follow — Code organization, naming conventions, security patterns
  • Off-limits areas — Things requiring human review

SYNOPSIS.md

Quick project overview answering:

  • What is this project?
  • What state is it in?
  • What’s the tech stack?
  • How do I run it locally?
  • What works? What’s broken?

GOTCHAS.md

Known issues, quirks, and landmines:

### [Title]

**Location:** `path/to/file`
**Severity:** 🔴 High / 🟡 Medium / 🟢 Low

**What happens:** [Description]
**Why it exists:** [Reason]
**Workaround:** [How to avoid]

AUDIT_FINDINGS.md

Code quality findings from validation:

## Active Findings

### [AUD-001] Finding Title
- **Severity:** critical / warning / info
- **File:** path/to/file.ts:42
- **Description:** What was found
- **Recommendation:** How to fix it

Template Versioning

All templates include version comments:

<!-- Template Version: 1.2.0 -->

Use /kit-tools:update-kit-tools to see if your project components are behind the plugin versions and selectively update.

Template vs Instance

A key design principle:

  • Plugin templates = Canonical versions, updated with the plugin
  • Project kit_tools/ = Your project’s documentation, can diverge and customize

This means:

  • Plugin updates don’t overwrite your customized docs
  • You can selectively pull in template improvements
  • Each project’s documentation is independent

Philosophy

This framework is built around a key insight: AI assistants are most effective when they have structured, comprehensive context about a codebase.

Instead of repeatedly explaining your project in chat, maintain living documentation that:

  • Gives AI immediate understanding of architecture and patterns
  • Prevents AI from making decisions that violate existing conventions
  • Enables effective troubleshooting with log locations and debug procedures
  • Reduces errors by documenting gotchas and known issues

The documentation also benefits human developers, but it’s optimized for AI consumption.

Core Principles

  1. AI-first documentation — Written for AI consumption, useful for humans too
  2. Living docs — Update as you go, not as an afterthought
  3. Minimal viable docs — Only document what’s useful, delete what isn’t
  4. Session logging — Track what was done for continuity across sessions


License

GPL-3.0 License