worclaude 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +278 -0
- package/package.json +62 -0
- package/src/commands/backup.js +55 -0
- package/src/commands/diff.js +76 -0
- package/src/commands/init.js +628 -0
- package/src/commands/restore.js +95 -0
- package/src/commands/status.js +141 -0
- package/src/commands/upgrade.js +208 -0
- package/src/core/backup.js +94 -0
- package/src/core/config.js +54 -0
- package/src/core/detector.js +43 -0
- package/src/core/file-categorizer.js +177 -0
- package/src/core/merger.js +413 -0
- package/src/core/scaffolder.js +60 -0
- package/src/data/agents.js +164 -0
- package/src/index.js +51 -0
- package/src/prompts/agent-selection.js +99 -0
- package/src/prompts/claude-md-merge.js +153 -0
- package/src/prompts/conflict-resolution.js +24 -0
- package/src/prompts/project-type.js +75 -0
- package/src/prompts/tech-stack.js +35 -0
- package/src/utils/display.js +41 -0
- package/src/utils/file.js +70 -0
- package/src/utils/hash.js +13 -0
- package/src/utils/time.js +22 -0
- package/templates/agents/optional/backend/api-designer.md +61 -0
- package/templates/agents/optional/backend/auth-auditor.md +63 -0
- package/templates/agents/optional/backend/database-analyst.md +61 -0
- package/templates/agents/optional/data/data-pipeline-reviewer.md +68 -0
- package/templates/agents/optional/data/ml-experiment-tracker.md +67 -0
- package/templates/agents/optional/data/prompt-engineer.md +75 -0
- package/templates/agents/optional/devops/ci-fixer.md +64 -0
- package/templates/agents/optional/devops/dependency-manager.md +55 -0
- package/templates/agents/optional/devops/deploy-validator.md +68 -0
- package/templates/agents/optional/devops/docker-helper.md +63 -0
- package/templates/agents/optional/docs/changelog-generator.md +69 -0
- package/templates/agents/optional/docs/doc-writer.md +60 -0
- package/templates/agents/optional/frontend/style-enforcer.md +47 -0
- package/templates/agents/optional/frontend/ui-reviewer.md +51 -0
- package/templates/agents/optional/quality/bug-fixer.md +54 -0
- package/templates/agents/optional/quality/performance-auditor.md +65 -0
- package/templates/agents/optional/quality/refactorer.md +61 -0
- package/templates/agents/optional/quality/security-reviewer.md +74 -0
- package/templates/agents/universal/build-validator.md +15 -0
- package/templates/agents/universal/code-simplifier.md +17 -0
- package/templates/agents/universal/plan-reviewer.md +20 -0
- package/templates/agents/universal/test-writer.md +17 -0
- package/templates/agents/universal/verify-app.md +16 -0
- package/templates/claude-md.md +40 -0
- package/templates/commands/commit-push-pr.md +9 -0
- package/templates/commands/compact-safe.md +8 -0
- package/templates/commands/end.md +9 -0
- package/templates/commands/review-plan.md +10 -0
- package/templates/commands/setup.md +112 -0
- package/templates/commands/start.md +3 -0
- package/templates/commands/status.md +6 -0
- package/templates/commands/techdebt.md +9 -0
- package/templates/commands/update-claude-md.md +9 -0
- package/templates/commands/verify.md +8 -0
- package/templates/mcp-json.json +3 -0
- package/templates/progress-md.md +21 -0
- package/templates/settings/base.json +64 -0
- package/templates/settings/docker.json +9 -0
- package/templates/settings/go.json +10 -0
- package/templates/settings/node.json +17 -0
- package/templates/settings/python.json +16 -0
- package/templates/settings/rust.json +11 -0
- package/templates/skills/templates/backend-conventions.md +57 -0
- package/templates/skills/templates/frontend-design-system.md +48 -0
- package/templates/skills/templates/project-patterns.md +48 -0
- package/templates/skills/universal/claude-md-maintenance.md +110 -0
- package/templates/skills/universal/context-management.md +71 -0
- package/templates/skills/universal/git-conventions.md +95 -0
- package/templates/skills/universal/planning-with-files.md +114 -0
- package/templates/skills/universal/prompt-engineering.md +97 -0
- package/templates/skills/universal/review-and-handoff.md +106 -0
- package/templates/skills/universal/subagent-usage.md +108 -0
- package/templates/skills/universal/testing.md +116 -0
- package/templates/skills/universal/verification.md +120 -0
- package/templates/spec-md-backend.md +85 -0
- package/templates/spec-md-cli.md +79 -0
- package/templates/spec-md-data.md +74 -0
- package/templates/spec-md-devops.md +87 -0
- package/templates/spec-md-frontend.md +81 -0
- package/templates/spec-md-fullstack.md +81 -0
- package/templates/spec-md-library.md +87 -0
- package/templates/spec-md.md +22 -0
- package/templates/workflow-meta.json +10 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: test-writer
|
|
3
|
+
model: sonnet
|
|
4
|
+
isolation: worktree
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are a test specialist. Write comprehensive tests for the
|
|
8
|
+
recently changed code:
|
|
9
|
+
|
|
10
|
+
- Unit tests for individual functions and methods
|
|
11
|
+
- Integration tests for component interactions
|
|
12
|
+
- Edge case coverage (null, empty, boundary values)
|
|
13
|
+
- Error path testing
|
|
14
|
+
|
|
15
|
+
Follow the project's testing patterns from .claude/skills/testing.md.
|
|
16
|
+
Run all tests to verify they pass. Aim for meaningful coverage,
|
|
17
|
+
not 100% line coverage.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: verify-app
|
|
3
|
+
model: sonnet
|
|
4
|
+
isolation: worktree
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are a verification specialist. Test the actual running
|
|
8
|
+
application behavior, not just unit tests:
|
|
9
|
+
|
|
10
|
+
- Start the application
|
|
11
|
+
- Test the changed functionality end-to-end
|
|
12
|
+
- Verify the behavior matches the specification
|
|
13
|
+
- Check for regressions in related features
|
|
14
|
+
- Test error handling and edge cases in the running app
|
|
15
|
+
|
|
16
|
+
Report results with specific pass/fail for each verification step.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
{project_name} — {description}
|
|
4
|
+
|
|
5
|
+
## Key Files
|
|
6
|
+
- `docs/spec/PROGRESS.md` — Read first every session
|
|
7
|
+
- `docs/spec/SPEC.md` — Source of truth
|
|
8
|
+
|
|
9
|
+
## Tech Stack
|
|
10
|
+
{tech_stack_filled_during_init}
|
|
11
|
+
|
|
12
|
+
## Commands
|
|
13
|
+
{commands_filled_during_init}
|
|
14
|
+
|
|
15
|
+
## Skills (read on demand, not upfront)
|
|
16
|
+
See `.claude/skills/` — load only what's relevant:
|
|
17
|
+
- context-management.md — Session lifecycle
|
|
18
|
+
- git-conventions.md — Commits and branches
|
|
19
|
+
- planning-with-files.md — Implementation planning
|
|
20
|
+
- review-and-handoff.md — Session endings
|
|
21
|
+
- verification.md — How to verify work
|
|
22
|
+
- testing.md — Test philosophy and patterns
|
|
23
|
+
{project_specific_skills}
|
|
24
|
+
|
|
25
|
+
## Session Protocol
|
|
26
|
+
**Start:** Read PROGRESS.md. Read active implementation prompt if any.
|
|
27
|
+
**During:** One task at a time. Commit after each. Use subagents for side work.
|
|
28
|
+
**End:** Update PROGRESS.md. Write handoff if ending mid-task.
|
|
29
|
+
|
|
30
|
+
## Critical Rules
|
|
31
|
+
1. SPEC.md is source of truth. Do not invent features.
|
|
32
|
+
2. Test before moving on.
|
|
33
|
+
3. Ask if ambiguous. Do not guess.
|
|
34
|
+
4. Read source files before writing. Never assume.
|
|
35
|
+
5. Self-healing: same mistake twice → update CLAUDE.md.
|
|
36
|
+
6. Use subagents to keep main context clean.
|
|
37
|
+
7. Mediocre fix → scrap it, implement elegantly.
|
|
38
|
+
|
|
39
|
+
## Gotchas
|
|
40
|
+
[Grows during development]
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Update docs/spec/PROGRESS.md with:
|
|
2
|
+
- What was completed this session
|
|
3
|
+
- What's in progress
|
|
4
|
+
- Any blockers or decisions needed
|
|
5
|
+
- Next steps
|
|
6
|
+
|
|
7
|
+
If ending mid-task, write a handoff document at
|
|
8
|
+
docs/handoffs/HANDOFF_{date}.md with enough context
|
|
9
|
+
for a fresh session to continue seamlessly.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Send the current implementation plan to the plan-reviewer agent.
|
|
2
|
+
The plan-reviewer will act as a staff engineer and critically
|
|
3
|
+
review the plan for:
|
|
4
|
+
- Ambiguity
|
|
5
|
+
- Missing verification steps
|
|
6
|
+
- Unrealistic scope
|
|
7
|
+
- Edge cases
|
|
8
|
+
- SPEC.md alignment
|
|
9
|
+
|
|
10
|
+
Wait for the review and address all feedback before proceeding.
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
You are conducting a project setup interview. Your goal is to gather
|
|
2
|
+
enough information to fill in all project-specific files with real,
|
|
3
|
+
useful content.
|
|
4
|
+
|
|
5
|
+
IMPORTANT RULES:
|
|
6
|
+
- Before EVERY question, remind the user: "You can type 'skip' to
|
|
7
|
+
skip this section or 'back' to return to the previous one."
|
|
8
|
+
- Show a persistent section indicator: "Section X of 7: [Name]"
|
|
9
|
+
- If the user seems uncertain, reassure them: "No pressure — you
|
|
10
|
+
can always update these files later. Skip anything you're not
|
|
11
|
+
sure about."
|
|
12
|
+
- After each section, briefly summarize what you learned before
|
|
13
|
+
moving on.
|
|
14
|
+
- Be conversational, not robotic. Adapt follow-up questions based
|
|
15
|
+
on answers.
|
|
16
|
+
- Do NOT use information from previous conversations, memory, or
|
|
17
|
+
other projects. This setup is for THIS project only. Only use
|
|
18
|
+
information the user provides during this interview. Ask every
|
|
19
|
+
question fresh — do not pre-fill answers from memory.
|
|
20
|
+
|
|
21
|
+
## Interview Flow
|
|
22
|
+
|
|
23
|
+
### Section 1 of 7: Project Story
|
|
24
|
+
Ask: "Do you have an existing project description, PRD, requirements
|
|
25
|
+
document, or any file that describes your project? If so, share the
|
|
26
|
+
file path and I'll read it first."
|
|
27
|
+
|
|
28
|
+
If yes: Read the file. Extract purpose, features, users, constraints.
|
|
29
|
+
Use this context for all subsequent questions — skip questions already
|
|
30
|
+
answered by the document.
|
|
31
|
+
|
|
32
|
+
If no, ask:
|
|
33
|
+
- What does this project do in one paragraph?
|
|
34
|
+
- Who is it for? (end users, developers, internal team, etc.)
|
|
35
|
+
- What problem does it solve?
|
|
36
|
+
- Is there a similar product you're modeling this after?
|
|
37
|
+
|
|
38
|
+
### Section 2 of 7: Architecture & Structure
|
|
39
|
+
- What's the overall architecture? (monolith, microservices, monorepo, serverless)
|
|
40
|
+
- What are the main directories or modules and their purposes?
|
|
41
|
+
- What database(s) do you use? What are the main entities/tables?
|
|
42
|
+
- Does it integrate with any external services or APIs?
|
|
43
|
+
- How is it deployed? (Vercel, Railway, AWS, Docker, etc.)
|
|
44
|
+
|
|
45
|
+
### Section 3 of 7: Tech Stack Details
|
|
46
|
+
- Specific frameworks and versions? (e.g., FastAPI 0.100+, Next.js 14)
|
|
47
|
+
- Package manager? (npm, yarn, pnpm, bun, pip, poetry)
|
|
48
|
+
- ORM or database client? (Prisma, SQLAlchemy, Drizzle, etc.)
|
|
49
|
+
- Testing framework? (pytest, vitest, jest, etc.)
|
|
50
|
+
- Linting/formatting tools already configured?
|
|
51
|
+
|
|
52
|
+
### Section 4 of 7: Core Features
|
|
53
|
+
- What are the main features or modules?
|
|
54
|
+
- Which are already built vs planned?
|
|
55
|
+
- What's the priority order?
|
|
56
|
+
- Any complex business logic Claude should understand?
|
|
57
|
+
- Any tricky edge cases or gotchas you've discovered?
|
|
58
|
+
|
|
59
|
+
### Section 5 of 7: Development Workflow
|
|
60
|
+
- How do you start the project locally? (exact commands)
|
|
61
|
+
- How do you run tests? (exact commands)
|
|
62
|
+
- How do you build for production?
|
|
63
|
+
- Any environment variables needed? (names only, not values)
|
|
64
|
+
- CI/CD pipeline? (GitHub Actions, GitLab CI, etc.)
|
|
65
|
+
- Any setup steps for new developers?
|
|
66
|
+
|
|
67
|
+
### Section 6 of 7: Coding Conventions
|
|
68
|
+
- Any specific patterns? (repository pattern, service layer, clean architecture, etc.)
|
|
69
|
+
- Error handling approach?
|
|
70
|
+
- Logging approach?
|
|
71
|
+
- API response format conventions?
|
|
72
|
+
- Naming conventions for files, functions, variables?
|
|
73
|
+
- Any "never do this" rules specific to this project?
|
|
74
|
+
- Any "always do this" rules?
|
|
75
|
+
|
|
76
|
+
### Section 7 of 7: Verification Strategy
|
|
77
|
+
- How should Claude verify its changes work?
|
|
78
|
+
- Are there specific test commands beyond the standard ones?
|
|
79
|
+
- Can Claude run the app and test it manually? How?
|
|
80
|
+
- Any browser testing needed? How to set up?
|
|
81
|
+
- Is there a staging or preview environment?
|
|
82
|
+
- Any CI checks that must pass before merging?
|
|
83
|
+
|
|
84
|
+
## After Interview
|
|
85
|
+
|
|
86
|
+
Summarize everything learned in a brief overview. Then write/update
|
|
87
|
+
these files with real, project-specific content:
|
|
88
|
+
|
|
89
|
+
1. **CLAUDE.md** — Update Tech Stack section with exact tools and
|
|
90
|
+
versions. Update Commands section with real project commands.
|
|
91
|
+
Add any project-specific critical rules or gotchas.
|
|
92
|
+
|
|
93
|
+
2. **docs/spec/SPEC.md** — Write a comprehensive specification
|
|
94
|
+
from the interview answers. Include all features, data models,
|
|
95
|
+
architecture decisions, and implementation phases.
|
|
96
|
+
|
|
97
|
+
3. **.claude/skills/backend-conventions.md** — Fill with real
|
|
98
|
+
backend patterns, framework-specific conventions, database
|
|
99
|
+
patterns specific to this project.
|
|
100
|
+
|
|
101
|
+
4. **.claude/skills/frontend-design-system.md** — Fill with real
|
|
102
|
+
design system, component patterns, styling approach if
|
|
103
|
+
applicable.
|
|
104
|
+
|
|
105
|
+
5. **.claude/skills/project-patterns.md** — Fill with real
|
|
106
|
+
architectural patterns, directory structure explanation,
|
|
107
|
+
module interaction patterns.
|
|
108
|
+
|
|
109
|
+
6. **docs/spec/PROGRESS.md** — Update with actual phases and
|
|
110
|
+
features from the interview, marking completed items.
|
|
111
|
+
|
|
112
|
+
Show the user what files were updated and offer to review each one.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Scan the codebase for technical debt:
|
|
2
|
+
- Duplicated code
|
|
3
|
+
- Dead code (unused functions, imports, variables)
|
|
4
|
+
- TODO/FIXME/HACK comments
|
|
5
|
+
- Overly complex functions
|
|
6
|
+
- Missing tests for critical paths
|
|
7
|
+
- Inconsistent patterns
|
|
8
|
+
|
|
9
|
+
Report findings organized by severity. Fix quick wins directly.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Based on this session's work, propose updates to CLAUDE.md:
|
|
2
|
+
|
|
3
|
+
Review what happened:
|
|
4
|
+
- Any mistakes that should become rules
|
|
5
|
+
- Any patterns discovered that should be documented
|
|
6
|
+
- Any gotchas encountered
|
|
7
|
+
|
|
8
|
+
Write the proposed additions to the Gotchas section or
|
|
9
|
+
Critical Rules section. Show the diff before applying.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# PROGRESS.md
|
|
2
|
+
|
|
3
|
+
## Current Status
|
|
4
|
+
**Phase:** Not started
|
|
5
|
+
**Last Updated:** {timestamp}
|
|
6
|
+
|
|
7
|
+
## Completed
|
|
8
|
+
- [x] Project setup with Worclaude
|
|
9
|
+
|
|
10
|
+
## In Progress
|
|
11
|
+
- [ ] Define project spec in SPEC.md
|
|
12
|
+
|
|
13
|
+
## Next Steps
|
|
14
|
+
1. Write your SPEC.md with project requirements
|
|
15
|
+
2. Fill in CLAUDE.md with project-specific details
|
|
16
|
+
3. Start your first Claude Code session
|
|
17
|
+
|
|
18
|
+
## Blockers
|
|
19
|
+
None
|
|
20
|
+
|
|
21
|
+
## Notes
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"// -- Read-only / Exploration --",
|
|
5
|
+
"Bash(find:*)", "Bash(grep:*)", "Bash(cat:*)", "Bash(ls:*)",
|
|
6
|
+
"Bash(head:*)", "Bash(tail:*)", "Bash(wc:*)", "Bash(which:*)",
|
|
7
|
+
"Bash(tree:*)", "Bash(diff:*)", "Bash(sort:*)", "Bash(uniq:*)",
|
|
8
|
+
"Bash(awk:*)", "Bash(sed:*)", "Bash(cut:*)", "Bash(jq:*)",
|
|
9
|
+
"Bash(xargs:*)",
|
|
10
|
+
"Bash(ps:*)", "Bash(du:*)", "Bash(df:*)",
|
|
11
|
+
"Bash(env:*)", "Bash(printenv:*)",
|
|
12
|
+
|
|
13
|
+
"// -- Git --",
|
|
14
|
+
"Bash(git status:*)", "Bash(git log:*)", "Bash(git diff:*)",
|
|
15
|
+
"Bash(git branch:*)", "Bash(git checkout:*)",
|
|
16
|
+
"Bash(git add:*)", "Bash(git commit:*)", "Bash(git push:*)",
|
|
17
|
+
"Bash(git pull:*)", "Bash(git fetch:*)", "Bash(git merge:*)",
|
|
18
|
+
"Bash(git stash:*)", "Bash(git worktree:*)",
|
|
19
|
+
"Bash(git rebase:*)", "Bash(git cherry-pick:*)", "Bash(git tag:*)",
|
|
20
|
+
"Bash(gh:*)",
|
|
21
|
+
|
|
22
|
+
"// -- Common Dev Tools --",
|
|
23
|
+
"Bash(echo:*)", "Bash(mkdir:*)", "Bash(touch:*)",
|
|
24
|
+
"Bash(cp:*)", "Bash(mv:*)",
|
|
25
|
+
"Bash(curl:*)", "Bash(wget:*)",
|
|
26
|
+
"Bash(tar:*)", "Bash(zip:*)", "Bash(unzip:*)",
|
|
27
|
+
"Bash(make:*)",
|
|
28
|
+
|
|
29
|
+
"// -- Edit Permissions --",
|
|
30
|
+
"Edit(.claude/**)", "Edit(docs/**)",
|
|
31
|
+
"Edit(src/**)", "Edit(tests/**)", "Edit(test/**)",
|
|
32
|
+
"Edit(README*)", "Edit(*.md)",
|
|
33
|
+
"Edit(package.json)", "Edit(pyproject.toml)",
|
|
34
|
+
"Edit(.github/**)"
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
"hooks": {
|
|
38
|
+
"PostToolUse": [
|
|
39
|
+
{
|
|
40
|
+
"matcher": "Write|Edit",
|
|
41
|
+
"hooks": [{
|
|
42
|
+
"type": "command",
|
|
43
|
+
"command": "{formatter_command}"
|
|
44
|
+
}]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"matcher": "Stop",
|
|
48
|
+
"hooks": [{
|
|
49
|
+
"type": "command",
|
|
50
|
+
"command": "{notification_command}"
|
|
51
|
+
}]
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"PostCompact": [
|
|
55
|
+
{
|
|
56
|
+
"matcher": "",
|
|
57
|
+
"hooks": [{
|
|
58
|
+
"type": "command",
|
|
59
|
+
"command": "cat CLAUDE.md && cat docs/spec/PROGRESS.md 2>/dev/null || true"
|
|
60
|
+
}]
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"// -- Node.js / TypeScript --",
|
|
5
|
+
"Bash(npm:*)", "Bash(npx:*)", "Bash(node:*)",
|
|
6
|
+
"Bash(tsc:*)", "Bash(tsx:*)",
|
|
7
|
+
"Bash(jest:*)", "Bash(vitest:*)",
|
|
8
|
+
"Bash(eslint:*)", "Bash(prettier:*)",
|
|
9
|
+
"Bash(pnpm:*)", "Bash(yarn:*)", "Bash(bun:*)",
|
|
10
|
+
"Edit(*.ts)", "Edit(*.tsx)", "Edit(*.js)", "Edit(*.jsx)",
|
|
11
|
+
"Edit(*.json)", "Edit(*.css)", "Edit(*.scss)",
|
|
12
|
+
"Edit(tsconfig*.json)", "Edit(.eslintrc*)",
|
|
13
|
+
"Edit(vite.config.*)", "Edit(next.config.*)", "Edit(webpack.config.*)"
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
"formatter": "npx prettier --write . || true"
|
|
17
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"// -- Python --",
|
|
5
|
+
"Bash(python:*)", "Bash(python3:*)",
|
|
6
|
+
"Bash(pip:*)", "Bash(pip3:*)",
|
|
7
|
+
"Bash(uv:*)", "Bash(uvx:*)",
|
|
8
|
+
"Bash(pytest:*)", "Bash(ruff:*)", "Bash(mypy:*)",
|
|
9
|
+
"Bash(black:*)", "Bash(isort:*)", "Bash(flake8:*)",
|
|
10
|
+
"Bash(poetry:*)", "Bash(pdm:*)",
|
|
11
|
+
"Edit(*.py)", "Edit(pyproject.toml)",
|
|
12
|
+
"Edit(requirements*.txt)", "Edit(setup.py)", "Edit(setup.cfg)"
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"formatter": "ruff format . || true"
|
|
16
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Stack-specific backend patterns, API design, database access, error handling conventions"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Backend Conventions
|
|
6
|
+
|
|
7
|
+
> Fill in each section with your project's specific patterns. Delete sections that
|
|
8
|
+
> don't apply. Add sections for patterns unique to your stack.
|
|
9
|
+
|
|
10
|
+
## API Patterns
|
|
11
|
+
|
|
12
|
+
<!-- How are endpoints structured? REST, GraphQL, RPC?
|
|
13
|
+
What's the URL naming convention?
|
|
14
|
+
How are request/response bodies structured?
|
|
15
|
+
What authentication is required per endpoint?
|
|
16
|
+
How is pagination handled?
|
|
17
|
+
How are API versions managed? -->
|
|
18
|
+
|
|
19
|
+
## Database Access
|
|
20
|
+
|
|
21
|
+
<!-- Which ORM/query builder/driver is used?
|
|
22
|
+
Where do migrations live? How are they run?
|
|
23
|
+
What's the naming convention for tables and columns?
|
|
24
|
+
How are transactions handled?
|
|
25
|
+
Are there read replicas or connection pooling concerns?
|
|
26
|
+
What's the seeding strategy for development? -->
|
|
27
|
+
|
|
28
|
+
## Error Handling
|
|
29
|
+
|
|
30
|
+
<!-- What error types/classes exist?
|
|
31
|
+
How are errors propagated to the API response?
|
|
32
|
+
What HTTP status codes map to which error types?
|
|
33
|
+
How are errors logged?
|
|
34
|
+
What information is safe to expose to clients vs internal-only? -->
|
|
35
|
+
|
|
36
|
+
## Authentication
|
|
37
|
+
|
|
38
|
+
<!-- What auth mechanism is used (JWT, sessions, API keys)?
|
|
39
|
+
Where is auth middleware applied?
|
|
40
|
+
How are roles/permissions structured?
|
|
41
|
+
How are tokens refreshed?
|
|
42
|
+
What's the password hashing strategy? -->
|
|
43
|
+
|
|
44
|
+
## Logging
|
|
45
|
+
|
|
46
|
+
<!-- What logging library is used?
|
|
47
|
+
What log levels mean what?
|
|
48
|
+
What structured fields are required on every log entry?
|
|
49
|
+
Where do logs go (stdout, file, service)?
|
|
50
|
+
What should NEVER be logged (PII, secrets)? -->
|
|
51
|
+
|
|
52
|
+
## Configuration Management
|
|
53
|
+
|
|
54
|
+
<!-- How is config loaded (env vars, config files, secrets manager)?
|
|
55
|
+
What's the hierarchy (defaults < config file < env vars)?
|
|
56
|
+
How are secrets managed in dev vs production?
|
|
57
|
+
What validation runs on config at startup? -->
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Design system, component library, styling approach, accessibility and responsive design standards"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Frontend Design System
|
|
6
|
+
|
|
7
|
+
> Fill in each section with your project's specific patterns. Delete sections that
|
|
8
|
+
> don't apply. Add sections for patterns unique to your stack.
|
|
9
|
+
|
|
10
|
+
## Component Library
|
|
11
|
+
|
|
12
|
+
<!-- What component library is used (custom, Material UI, Shadcn, etc.)?
|
|
13
|
+
Where do shared components live?
|
|
14
|
+
What's the naming convention for components?
|
|
15
|
+
How are component variants handled (props, composition)?
|
|
16
|
+
What's the component documentation strategy (Storybook, etc.)? -->
|
|
17
|
+
|
|
18
|
+
## Styling Approach
|
|
19
|
+
|
|
20
|
+
<!-- CSS-in-JS, CSS modules, Tailwind, plain CSS?
|
|
21
|
+
What's the naming convention (BEM, utility-first)?
|
|
22
|
+
Where do design tokens live (colors, spacing, typography)?
|
|
23
|
+
How are themes handled (dark mode, brand variants)?
|
|
24
|
+
What's the z-index strategy? -->
|
|
25
|
+
|
|
26
|
+
## State Management
|
|
27
|
+
|
|
28
|
+
<!-- What state management solution is used?
|
|
29
|
+
What goes in global state vs local state?
|
|
30
|
+
How is server state cached and synchronized?
|
|
31
|
+
What's the data fetching pattern (React Query, SWR, etc.)?
|
|
32
|
+
How are loading and error states handled consistently? -->
|
|
33
|
+
|
|
34
|
+
## Accessibility Standards
|
|
35
|
+
|
|
36
|
+
<!-- What WCAG level is targeted (A, AA, AAA)?
|
|
37
|
+
How is keyboard navigation handled?
|
|
38
|
+
What ARIA patterns are used for common widgets?
|
|
39
|
+
How are focus management and screen reader support tested?
|
|
40
|
+
What color contrast requirements apply? -->
|
|
41
|
+
|
|
42
|
+
## Responsive Design
|
|
43
|
+
|
|
44
|
+
<!-- What breakpoints are used?
|
|
45
|
+
Mobile-first or desktop-first approach?
|
|
46
|
+
How are images handled at different sizes?
|
|
47
|
+
What layouts change at which breakpoints?
|
|
48
|
+
How is touch vs mouse interaction handled? -->
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Architectural patterns, naming conventions, file organization, and error handling philosophy for this project"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Project Patterns
|
|
6
|
+
|
|
7
|
+
> Fill in each section with your project's specific patterns. Delete sections that
|
|
8
|
+
> don't apply. Add sections for patterns unique to your architecture.
|
|
9
|
+
|
|
10
|
+
## Architecture Overview
|
|
11
|
+
|
|
12
|
+
<!-- What's the high-level architecture (monolith, microservices, serverless)?
|
|
13
|
+
What are the major components and how do they communicate?
|
|
14
|
+
Where does the domain logic live vs infrastructure?
|
|
15
|
+
What external services does this project depend on?
|
|
16
|
+
Is there a diagram or reference document? -->
|
|
17
|
+
|
|
18
|
+
## Naming Conventions
|
|
19
|
+
|
|
20
|
+
<!-- How are files named (camelCase, kebab-case, PascalCase)?
|
|
21
|
+
How are functions/methods named?
|
|
22
|
+
How are constants named?
|
|
23
|
+
How are database tables/columns named?
|
|
24
|
+
Are there domain-specific naming rules? -->
|
|
25
|
+
|
|
26
|
+
## File Organization
|
|
27
|
+
|
|
28
|
+
<!-- What's the directory structure philosophy (feature-based, layer-based)?
|
|
29
|
+
Where do new features go?
|
|
30
|
+
Where do shared utilities live?
|
|
31
|
+
Where do types/interfaces live?
|
|
32
|
+
How are test files organized relative to source files? -->
|
|
33
|
+
|
|
34
|
+
## Common Patterns
|
|
35
|
+
|
|
36
|
+
<!-- What design patterns are used consistently (repository, factory, observer)?
|
|
37
|
+
How is dependency injection handled?
|
|
38
|
+
What's the pattern for adding a new feature end-to-end?
|
|
39
|
+
What's the pattern for adding a new API endpoint?
|
|
40
|
+
Are there code generation tools or templates for common tasks? -->
|
|
41
|
+
|
|
42
|
+
## Error Handling Philosophy
|
|
43
|
+
|
|
44
|
+
<!-- How are errors classified (operational vs programmer)?
|
|
45
|
+
How do errors propagate through layers?
|
|
46
|
+
What's the retry strategy for transient failures?
|
|
47
|
+
How are errors reported to monitoring/alerting?
|
|
48
|
+
What's the circuit breaker strategy for external dependencies? -->
|