Option 1: Start a new project
git clone https://github.com/AliYmn/claude-structured.git my-project
cd my-project && claudeOption 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:setupPrompt (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.
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:
Every task follows the same cycle — plan, build, verify, log:
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.
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.
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
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.
- Less is more. Every line costs tokens. Only document what Claude gets wrong.
- Linters over rules. Hooks guarantee formatting. Rules handle judgment calls.
- Detect, don't configure.
/project:setupreads your project — you don't fill forms. - Grow organically. Start with setup. Add rules when Claude makes mistakes.
- Verify, don't trust. Tests > assumptions. Always.
Official and third-party references on project context files, Claude Code workflows, and related practices:
Anthropic
- Using CLAUDE.md files — Blog article on project context files.
- Claude Code: Best practices — Official documentation.
- Claude Code: Subagents — Official documentation.
Third-party guides
- CLAUDE.md guide (Builder.io).
- Writing a good CLAUDE.md (HumanLayer).
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.
MIT
