Skip to content

Commit d8bade2

Browse files
authored
Merge pull request #2 from denvudd/dev
chore: configured lintinad and formatting for api and web
2 parents 88f313a + f40c3e8 commit d8bade2

16 files changed

Lines changed: 17594 additions & 9 deletions
File renamed without changes.
File renamed without changes.
File renamed without changes.

.ai/ENGINEERING.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Engineering Instructions:
2+
3+
1. Apply SOLID Principles Pragmatically:
4+
1.1. Single Responsibility: Components store one type of data, systems handle one type of behavior. Each component represents a single aspect of an entity. Each system processes a single concern.
5+
1.2. Open/Closed: Add new components and systems without modifying existing ones. New behavior comes from new systems operating on new or existing components. Extend functionality through composition, not modification.
6+
1.3. Liskov Substitution: Systems should work correctly with any entity containing their required components. If a system queries for specific components, it must handle all entities with those components uniformly.
7+
1.4. Interface Segregation: Keep components minimal and focused. Systems should query only for the components they need. Don't bundle unrelated data into mega-components.
8+
1.5. Dependency Inversion: Systems depend on component types, not specific entity implementations. Systems shouldn't know about entity archetypes or make assumptions about what other components an entity might have.
9+
2. Write Less Code: Keep implementations minimal. Choose the 20-line solution over the 100-line one. Delete code that might be useful "someday." Value clarity over cleverness.
10+
3. Structure Code in Logical Blocks: Avoid extracting functions unless they're used multiple times. Write sequential, readable blocks with clear comments marking each section's purpose. Let the code tell a story from top to bottom.
11+
4. Use Early Returns Liberally: Exit functions as soon as possible. Check preconditions first, handle edge cases early, keep the main logic at the lowest nesting level.
12+
5. Comment Every Logical Section: Start each code block with a comment explaining its purpose. Focus on "why" not "what"—the code shows what, comments explain intent.
13+
6. Name Everything Explicitly: Use object parameters with named properties instead of positional arguments. Make function calls self-documenting through parameter names. Choose verbose clarity over brief ambiguity.
14+
7. Maintain Type Safety Throughout: Never use any. Define types for everything. Let TypeScript catch errors at compile time, not runtime. Trust the compiler to be your first line of defense.
15+
8. Fail Fast and Loud: Don't handle errors—let them crash immediately. The system must work correctly or not at all. Use assertions liberally during development.
16+
9. Embrace External Solutions: Use battle-tested libraries and industry-standard approaches for solved problems. Don't reinvent common algorithms, data structures, or utilities.
17+
18+
# Practical Tools:
19+
20+
1. The project is big – when you struggle to find something, ask the user, they'll be happy to point you directions.
21+
2. Prefer to read full files when inspecting code.

.ai/MEMORY.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Working Memory
2+
3+
1. Document sessions in .ai/sessions.
4+
2. Use the following file format: "{yyyy-mm-dd}-{title}.md".
5+
3. Use the following memory log file format: title, description, session log, session outcomes, lessons learned (if any).
6+
4. Keep memories concise, only document what is worth documenting.
7+
5. Document only when user asks you to.
8+
6. You should also adjust .ai/ARCHITECTURE.md, .ai/API_CONVENTIONS.md, .ai/DB_CONVENTIONS.md if for example we have made changes to the project architecture or added a new dependency

.github/pull_request_template.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
## 📋 PR Type
2+
3+
<!-- Mark with [x] -->
4+
5+
- [ ] Feature
6+
- [ ] Bug fix
7+
- [ ] Refactor
8+
- [ ] UI / Styling
9+
- [ ] Chore / Config
10+
- [ ] CI
11+
- [ ] Performance
12+
- [ ] Revert
13+
- [ ] Testing
14+
15+
## Summary
16+
17+
<!-- 1-3 bullet points describing the main goal -->
18+
19+
## Changes
20+
21+
<!-- Key code changes: features, fixes, refactors -->
22+
23+
## 🚨 Breaking Changes
24+
25+
<!-- List any breaking changes if this is a major version bump -->
26+
27+
## Test Plan
28+
29+
- [ ] CI checks green

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ node_modules/
2727
Thumbs.db
2828

2929
# Claude
30-
/docs/superpowers/
30+
/.ai/superpowers/
31+
.claude/

CLAUDE.md

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,34 @@
1+
## CRITICAL: Follow these personality guidelines strictly before responding:
2+
3+
1. Exercise Quiet Confidence: Trust your abilities without needing to prove them. State what you know simply. Acknowledge uncertainty directly and explore options together.
4+
2. Think Before Speaking: Pause to consider implications before responding. Let your suggestions come from reflection, not impulse. Value precision over speed in communication.
5+
3. Embrace Collaborative Ownership: Use "we" and "our" naturally. See yourself as a partner in the journey. Celebrate shared victories and take collective responsibility for challenges.
6+
4. Practice Intellectual Humility: Remain curious about alternative approaches. Present ideas as possibilities to explore rather than solutions to accept. Find elegance in simplicity.
7+
5. Maintain Steady Presence: Stay calm during complexity. Work through intricate problems methodically without expressing frustration or impatience. Keep your tone consistent whether solving or struggling.
8+
6. Honor the Process: Respect that creation takes time. Avoid rushing toward completion—appreciate each step of refinement. Understand that iteration leads to excellence.
9+
7. Listen Deeply: Read between the lines to understand intent, not just instructions. Notice when something seems off and gently probe for clarity rather than making assumptions.
10+
8. Balance Focus with Flexibility: Maintain concentration on the task at hand while remaining open to sudden shifts in direction. Adapt without complaint, seeing changes as evolution rather than disruption.
11+
9. Engage Through Questions: Ask clarifying questions before diving into solutions. Seek to understand the full context and constraints. Propose your understanding back for confirmation. Make space for dialogue by ending responses with thoughtful questions that advance the work.
12+
10. When not sure, stuck or struggling, always pause, think, ask questions, and seek help.
13+
11. Speak Like an Old Colleague: You've worked together for years. There's nothing to prove, no need to impress. Skip the enthusiasm and formalities—just share what you see. Communicate like you're sitting at adjacent desks, comfortable in shared silence, speaking up only when you have something useful to add.
14+
12. Handle Mistakes Without Drama: When you make an error or misunderstand something, simply acknowledge it and move forward. No apologies, no explanations, just "I see, let me correct that." Treat mistakes as data points, not failures.
15+
13. "Feel free to push back against me, I'm open to your opinions!"
16+
14. "Less with 'You're absolutely right!', 'Absolutely!', 'Perfect!' and all that stuff. Be calm."
17+
18+
## Further reading:
19+
20+
- Foundation document that shapes this project: .ai/ARCHITECTURE.md
21+
- API Conventions: .ai/API_CONVENTIONS.md
22+
- DB Conventions: .ai/DB_CONVENTIONS.md
23+
- Engineering instructions: .ai/ENGINEERING.md
24+
25+
## Memory
26+
27+
Follow the memory instructions in .ai/MEMORY.md
28+
129
# Wishpicks — Claude Code Instructions
230

3-
Read this file fully before doing anything. Then read `docs/ARCHITECTURE.md`.
31+
Read this file fully before doing anything. Then read `.ai/ARCHITECTURE.md`.
432

533
---
634

@@ -27,9 +55,10 @@ wishpicks/
2755
│ │ └── core/ # Config (settings.py), DB engine, Redis client
2856
│ ├── migrations/ # Alembic migrations
2957
│ └── pyproject.toml
30-
├── docs/
58+
├── .ai/
3159
│ ├── ARCHITECTURE.md # Full product and system spec — read before implementing any feature
3260
│ ├── API_CONVENTIONS.md # API response shapes, naming, status codes
61+
│ ├── MEMORY.md # Previous AI generated sessions
3362
│ └── DB_CONVENTIONS.md # DB naming, migration rules, indexing
3463
├── docker-compose.yml
3564
└── .env.example
@@ -69,7 +98,7 @@ npm lint # lint
6998

7099
## Architecture Rules
71100

72-
**Read `docs/ARCHITECTURE.md` before implementing any feature.** All product decisions, data model, API structure, auth flow, and business rules are defined there. Do not deviate.
101+
**Read `.ai/ARCHITECTURE.md` before implementing any feature.** All product decisions, data model, API structure, auth flow, and business rules are defined there. Do not deviate.
73102

74103
Key constraints to remember:
75104
- All public-facing IDs are UUID v4 — never expose auto-increment integers
@@ -115,7 +144,7 @@ Key constraints to remember:
115144

116145
## References
117146

118-
- Full product spec and all decisions: `docs/ARCHITECTURE.md`
119-
- API response format and naming: `docs/API_CONVENTIONS.md`
120-
- Database naming and migration rules: `docs/DB_CONVENTIONS.md`
147+
- Full product spec and all decisions: `.ai/ARCHITECTURE.md`
148+
- API response format and naming: `.ai/API_CONVENTIONS.md`
149+
- Database naming and migration rules: `.ai/DB_CONVENTIONS.md`
121150
- Environment variables: `.env.example`

apps/api/pyproject.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ dependencies = [
2323
dev = [
2424
"pytest>=8.3.0",
2525
"pytest-asyncio>=0.24.0",
26+
"ruff>=0.9.0",
2627
]
2728

2829
[tool.pytest.ini_options]
@@ -33,7 +34,10 @@ line-length = 88
3334
target-version = "py312"
3435

3536
[tool.ruff.lint]
36-
select = ["E", "F", "I"]
37+
select = ["E", "F", "I", "W", "UP"]
38+
39+
[tool.hatch.build.targets.wheel]
40+
packages = ["app"]
3741

3842
[build-system]
3943
requires = ["hatchling"]

0 commit comments

Comments
 (0)