Skip to content

yaodongC/coding-with-files

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coding with Files

Work like a professional developer — Use persistent markdown files for implementation planning, progress tracking, and build verification.

A Claude Code plugin that implements the Plan-Code-Build-Test SDLC loop with file-based working memory. Inspired by the planning-with-files skill and adapted for coding workflows, especially ROS/catkin projects.

Quick Install

/plugin marketplace add yaodongC/coding-with-files
/plugin install coding-with-files@coding-with-files

Why This Skill?

Claude Code (and most AI agents) suffer from:

  • Open-loop coding — Making changes without verifying they compile
  • Forgotten goals — After 50+ tool calls, original requirements get lost
  • Repeated mistakes — Build errors not tracked, same fixes attempted multiple times
  • Context stuffing — Everything crammed into context instead of stored

The Solution: 4-File Pattern + Build Verification

For every coding task, create FOUR files:

implementation_plan.md   → Goals, file changes, decisions
coding_progress.md       → Task checklist, current phase
build_log.md             → Build attempts, errors, fixes
implementation_audit.md  → Independent audit vs plan/progress/build

The Core Principle

Context Window = RAM (volatile, limited)
Filesystem = Disk (persistent, unlimited)

→ All plans, progress, and build results get written to disk.
→ Code is NOT done until build passes.

The Agentic SDLC Loop

Plan → Code → Build → Test → (loop until done)
Phase Action Verification
Requirements Read plan and user request Do I understand what to build?
Design Update implementation_plan.md Have I listed every file change?
Implementation Edit files atomically Am I breaking existing logic?
Build Run catkin build Did it compile?
Verify Run tests, dry run Does it work?
Audit Run auditor subagent Does implementation match plan and evidence?

Usage

Once installed, Claude will automatically:

  1. Create implementation_plan.md before starting coding tasks
  2. Re-read plan before editing files (via PreToolUse hook)
  3. Remind you to update progress after file writes (via PostToolUse hook)
  4. Verify build before stopping (via Stop hook)
  5. Verify audit before stopping (via Stop hook)
  6. Log all errors for future reference

Or invoke manually with /coding-with-files.

Key Rules

  1. Create Plan First — Never start coding without implementation_plan.md
  2. Atomic Changes — Edit ONE file, build, verify, then next file
  3. Read Before Edit — Always read a file before modifying it
  4. Build After Every Change — Code isn't done until it compiles
  5. Self-Correct — Fix your own compile errors, don't ask the user
  6. Run Auditor — Produce implementation_audit.md before completion

File Structure

coding-with-files/
├── .claude-plugin/
│   └── plugin.json          # Plugin manifest
├── skills/
│   └── coding-with-files/
│       ├── SKILL.md         # Main skill definition
│       ├── templates/       # File templates
│       │   ├── implementation_plan.md
│       │   ├── coding_progress.md
│       │   ├── build_log.md
│       │   └── implementation_audit.md
│       └── scripts/         # Helper scripts
│           ├── init-session.sh
│           ├── verify-build.sh
│           └── verify-audit.sh
└── README.md

Templates

Copy these templates to your project directory to start:

  • implementation_plan.md — Goals, file changes, decisions
  • coding_progress.md — Task checklist with phases
  • build_log.md — Build output and error tracking
  • implementation_audit.md — Independent audit output

The 3-Strike Error Protocol

ATTEMPT 1: Diagnose & Fix
  → Read error carefully
  → Identify root cause
  → Apply targeted fix

ATTEMPT 2: Alternative Approach
  → Same error? Try different method
  → NEVER repeat exact same failing action

ATTEMPT 3: Broader Rethink
  → Question assumptions
  → Search for solutions

AFTER 3 FAILURES: Escalate to User

When to Use

Use for:

  • Feature implementation (3+ file changes)
  • Bug fixes requiring investigation
  • Refactoring tasks
  • ROS node development
  • Any coding requiring build verification

Skip for:

  • Single-line fixes
  • Quick config changes
  • Non-code tasks (research, docs only)

Credits

  • Inspired by planning-with-files by OthmanAdi
  • Based on the Manus AI context engineering pattern
  • Adapted for ROS/catkin development workflows

License

MIT License — feel free to use, modify, and distribute.

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages