Skip to content

AliYmn/claude-structured

Repository files navigation

License: MIT Claude Code Contributions welcome

claude-structured

Give Claude Code persistent memory, autonomous workflows, and self-improving habits.


Quickstart

Option 1: Start a new project

git clone https://github.com/AliYmn/claude-structured.git my-project
cd my-project && claude

Option 2: Add to an existing project Copy the .claude/ and tasks/ directories, along with CLAUDE.md, directly into your existing project's root folder, then run:

/project:setup

Prompt (type in Claude Code chat — not in the terminal): /project:setup

That's it. The setup command scans your project, detects your stack, asks a few questions, and configures everything. No manual editing.

Throughout this README, /project:… lines are slash-command prompts for Claude Code (and compatible tools), not shell commands unless shown inside a bash block above.

Demo


What it solves

What claude-structured solves

Claude Code starts every session with zero memory. You repeat your stack, commands, and conventions every time. Corrections don't stick. Context gets lost between sessions. Code ships without verification.

claude-structured fixes all of this with a layered file system that loads automatically:

How context loads


The workflow

Every task follows the same cycle — plan, build, verify, log:

Autonomous workflow loop

If something fails twice, Claude stops and re-plans instead of pushing through. Subagents handle research in parallel. Everything is logged so the next session picks up where this one left off.


What's in the box

After /project:setup, your project has:

.claude/
├── rules/              # Always-on guardrails (auto-loaded)
│   ├── autonomous-workflow.md
│   ├── code-quality.md
│   ├── testing.md
│   └── security.md
├── commands/           # Slash commands you invoke
│   ├── setup.md        # /project:setup — one-time configuration
│   ├── catchup.md      # /project:catchup — session start briefing
│   ├── add-feature.md  # /project:add-feature — plan → build → verify → log
│   ├── update.md       # /project:update — safe refactoring and modification
│   ├── refactor.md     # /project:refactor — architectural improvements
│   ├── fix-issue.md    # /project:fix-issue — autonomous debugging
│   ├── test.md         # /project:test — dedicated testing workflow
│   ├── audit.md        # /project:audit — security & performance review
│   ├── docs.md         # /project:docs — update documentation
│   ├── review.md       # /project:review — code review
│   └── pre-deploy.md   # /project:pre-deploy — deployment checklist
├── skills/             # Auto-triggered expertise
│   ├── code-review/    # Activates on review requests
│   ├── refactor/       # Activates on refactor requests
│   ├── debug/          # Activates on bug reports
│   └── new-endpoint/   # Activates on endpoint creation
├── agents/             # Isolated subagents
│   ├── researcher.md   # Read-only codebase exploration
│   ├── reviewer.md     # Code review in separate context
│   └── test-writer.md  # Focused test generation
└── settings.json       # Permissions + hooks (format, lint, guards)

tasks/                  # Cross-session memory
├── todo.md             # Current plan
├── changelog.md        # What changed, where, why
└── lessons.md          # Corrections → reusable patterns

docs/                   # Generated by /project:setup
├── architecture.md     # Your project's layer structure
├── api-guide.md        # Your API conventions (if applicable)
└── deployment.md       # Your environments and deploy process

Rules load every session automatically — plan first, verify before done, track everything. See the rules documentation.

Commands are explicit workflows you invoke. /project:add-feature enforces the full plan-build-verify-log cycle. See the commands documentation.

Skills activate when Claude recognizes a matching task — refactoring triggers test-first incremental changes, bugs trigger root-cause analysis. See the skills documentation.

Agents are opt-in subagents (@researcher, @reviewer, etc.) for specialized tasks without cluttering the main context. The /project:setup command will ask if you want to use them and delete them if you'd prefer a leaner workspace. See the agents documentation.

Hooks guarantee deterministic actions — formatter runs after every edit, linter catches issues immediately, lock files are protected. See the hooks documentation.

Tasks persist across sessions — any agent runs /project:catchup and instantly knows what was done, what's pending, and what mistakes to avoid.


Daily usage

Prompts (Claude Code chat):

# Start of session — catch up on what happened
/project:catchup

# Build something — plans before coding, tests before shipping
/project:add-feature Add user authentication with sessions

# Modify something — safely refactor or update with regression checks
/project:update Refactor the sidebar navigation to use the new component

# Deep refactoring — architecture improvements
/project:refactor Extract the data access layer into a separate module

# Fix a bug — locates, diagnoses, fixes, tests, logs
/project:fix-issue Login returns 500 when email has special characters

# Dedicated testing
/project:test Write unit tests for the authentication service

# Documentation updates
/project:docs Update the API guide to include the new user endpoints

# Codebase audit
/project:audit Review the frontend components for accessibility issues

# Review before merge
/project:review

# Before deploy
/project:pre-deploy production

Multi-tool support

The template includes configuration for multiple AI coding tools:

Tool Files Config by
Claude Code .claude/, CLAUDE.md /project:setup
Cursor .cursor/rules/ /project:setup
Windsurf .windsurf/rules/ /project:setup
Codex / Zed AGENTS.md /project:setup

All tool configs are updated together by /project:setup. The tasks/ system works with every tool — it's just markdown files.


Principles

  1. Less is more. Every line costs tokens. Only document what Claude gets wrong.
  2. Linters over rules. Hooks guarantee formatting. Rules handle judgment calls.
  3. Detect, don't configure. /project:setup reads your project — you don't fill forms.
  4. Grow organically. Start with setup. Add rules when Claude makes mistakes.
  5. Verify, don't trust. Tests > assumptions. Always.

Resources

Official and third-party references on project context files, Claude Code workflows, and related practices:

Anthropic

Third-party guides


Contributing

See CONTRIBUTING.md for a complete guide on how to add new commands, agents, rules, skills, and hooks — with templates and examples for each.

Quick version: Fork → Branch → Change → Test in a real project → PR.

License

MIT

About

An opinionated project template for Claude Code — persistent context, autonomous workflows, self-improving agents.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors