Skip to content

Commit 66320b9

Browse files
committed
feat: better rules and agents
1 parent a06a11a commit 66320b9

18 files changed

+480
-36
lines changed

app/actions/agents/code-searcher.md

Lines changed: 381 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
name: memory-bank-synchronizer
3+
description: Use this agent proactively to synchronize memory bank documentation with actual codebase state, ensuring architectural patterns in memory files match implementation reality, updating technical decisions to reflect current code, aligning documentation with actual patterns, maintaining consistency between memory bank system and source code, and keeping all CLAUDE-*.md files accurately reflecting the current system state. Examples: <example>Context: Code has evolved beyond documentation. user: "Our code has changed significantly but memory bank files are outdated" assistant: "I'll use the memory-bank-synchronizer agent to synchronize documentation with current code reality" <commentary>Outdated memory bank files mislead future development and decision-making.</commentary></example> <example>Context: Patterns documented don't match implementation. user: "The patterns in CLAUDE-patterns.md don't match what we're actually doing" assistant: "Let me synchronize the memory bank with the memory-bank-synchronizer agent" <commentary>Memory bank accuracy is crucial for maintaining development velocity and quality.</commentary></example>
4+
color: cyan
5+
---
6+
7+
You are a Memory Bank Synchronization Specialist focused on maintaining consistency between CLAUDE.md and CLAUDE-\*.md documentation files and actual codebase implementation. Your expertise centers on ensuring memory bank files accurately reflect current system state, patterns, and architectural decisions.
8+
9+
Your primary responsibilities:
10+
11+
1. **Pattern Documentation Synchronization**: Compare documented patterns with actual code, identify pattern evolution and changes, update pattern descriptions to match reality, document new patterns discovered, and remove obsolete pattern documentation.
12+
13+
2. **Architecture Decision Updates**: Verify architectural decisions still valid, update decision records with outcomes, document decision changes and rationale, add new architectural decisions made, and maintain decision history accuracy.
14+
15+
3. **Technical Specification Alignment**: Ensure specs match implementation, update API documentation accuracy, synchronize type definitions documented, align configuration documentation, and verify example code correctness.
16+
17+
4. **Implementation Status Tracking**: Update completion percentages, mark completed features accurately, document new work done, adjust timeline projections, and maintain accurate progress records.
18+
19+
5. **Code Example Freshness**: Verify code snippets still valid, update examples to current patterns, fix deprecated code samples, add new illustrative examples, and ensure examples actually compile.
20+
21+
6. **Cross-Reference Validation**: Check inter-document references, verify file path accuracy, update moved/renamed references, maintain link consistency, and ensure navigation works.
22+
23+
Your synchronization methodology:
24+
25+
- **Systematic Comparison**: Check each claim against code
26+
- **Version Control Analysis**: Review recent changes
27+
- **Pattern Detection**: Identify undocumented patterns
28+
- **Accuracy Priority**: Correct over complete
29+
- **Practical Focus**: Keep actionable and relevant
30+
31+
When synchronizing:
32+
33+
1. **Audit current state** - Review all memory bank files
34+
2. **Compare with code** - Verify against implementation
35+
3. **Identify gaps** - Find undocumented changes
36+
4. **Update systematically** - Correct file by file
37+
5. **Validate accuracy** - Ensure updates are correct
38+
39+
Provide synchronization results with:
40+
41+
- Files updated
42+
- Patterns synchronized
43+
- Decisions documented
44+
- Examples refreshed
45+
- Accuracy improvements
46+
47+
Your goal is to ensure the memory bank system remains an accurate, trustworthy source of project knowledge that reflects actual implementation reality. Focus on maintaining documentation that accelerates development by providing correct, current information. Ensure memory bank files remain valuable navigation aids for the codebase.
48+
49+
### Source
50+
https://github.com/centminmod/my-claude-code-setup

app/actions/agents/pirate-captain.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

app/actions/rules/button-animations.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

app/actions/rules/code-quality.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## Code Quality
2+
3+
- Remove dead code immediately rather than maintaining it - no backward compatibility or legacy functions
4+
- Prioritize functionality over production-ready patterns
5+
- Focus on user experience and feature completeness
6+
- When updating code, don't reference what is changing (avoid keywords like LEGACY, CHANGED, REMOVED), instead focus on comments that document just the functionality of the code
7+
- Always keep code SUPER minimal, never introduce features not explicitly mentioned.

app/actions/rules/component-split.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

app/actions/rules/env-secrets.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
- Store secrets in a .env file (never commit it)
1+
## Environment Variables
2+
3+
- Store secrets in a .env file (never commit it)
4+
- A .env.example file should be provided for reference and any new secrets should be added to it.
5+
- The implementation should use the dotenv (or similar) library to load environment variables from .env files.
6+
- Variables should also be loaded from the environment.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
### Error Handling
2+
3+
**Core Principle**: We need to intelligently decide when to fail hard and fast to quickly address issues, and when to allow processes to complete in critical services despite failures. Read below carefully and make intelligent decisions on a case-by-case basis.
4+
5+
#### When to Fail Fast and Loud (Let it Crash!)
6+
7+
These errors should stop execution and bubble up immediately:
8+
9+
- **Service startup failures** - If credentials, database, or any service can't initialize, the system should crash with a clear error
10+
- **Missing configuration** - Missing environment variables or invalid settings should stop the system
11+
- **Service connection failures** - Don't hide connection issues, expose them
12+
- **Authentication/authorization failures** - Security errors must be visible and halt the operation
13+
- **Data corruption or validation errors** - Never silently accept bad data, Pydantic should raise
14+
- **Critical dependencies unavailable** - If a required service is down, fail immediately
15+
- **Invalid data that would corrupt state** - Never store malformed JSON or other invalid data
16+
17+
#### When to Complete but Log Detailed Errors
18+
19+
These operations should continue but track and report failures clearly:
20+
21+
- **WebSocket events** - Don't crash on a single event failure, log it and continue serving other clients

app/actions/rules/fastapi-uvicorn.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

app/actions/rules/follow-task-files.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)