chore: Add Claude Fix some bugs.
Some checks failed
Build BAB Application Deployment Artifact / build (push) Failing after 2m40s

This commit is contained in:
2026-03-14 22:50:00 -04:00
parent a11b2a0568
commit e1259688a4
19 changed files with 659 additions and 22 deletions

View File

@@ -0,0 +1,16 @@
# Archive Rules
## Raw File Archival
After creating a Source Document Summary for any raw file:
1. Move the raw file to `docs/archive/`
2. Record the move in the source summary's header: `Archived From: [original path]`
3. Do not read from `docs/archive/` unless the user explicitly says "go back to the original [filename]"
## Summary Lifecycle Rules
1. **Session handoffs expire**: After a new handoff is written, the previous handoff moves to `docs/archive/handoffs/`. Only the latest handoff stays in `docs/summaries/`.
2. **Decision records persist**: Decision records (DR-*) stay in `docs/summaries/` permanently — they are institutional memory.
3. **Source summaries persist**: Source document summaries stay until the project ends — they replace raw documents.
4. **Analysis summaries**: Keep only the latest version. If re-run, the new one replaces the old (archive the old one).
5. **Maximum active summaries**: If `docs/summaries/` exceeds 15 files, consolidate older source summaries into a single `project-digest.md` and archive the originals.

View File

@@ -0,0 +1,23 @@
# Document Processing Protocol
Use this whenever you need to process multiple documents or large files.
## For 1-3 Short Documents (< 2K words each)
Read sequentially. After each document, write a Source Document Summary (Template 1 from `templates/claude-templates.md`) to disk. Then proceed with work using summaries only.
## For 4+ Documents OR Any Document > 2K Words
**Step 1:** List all documents with file sizes. Present to user for prioritization.
**Step 2:** Process each document individually:
- Read one document
- Extract into Source Document Summary format
- Write to `./docs/summaries/source-[filename].md`
- Release the document from active consideration before reading the next
**Step 3:** After all documents are processed, read only the summaries to form your working context.
**Step 4:** Cross-reference summaries for contradictions or dependencies. Note these explicitly.
**Step 5:** Proceed with the actual task using summaries as your reference.

View File

@@ -0,0 +1,18 @@
# Subagent Deployment Rules
## When to Use Subagent vs. Main Agent
| Situation | Approach | Why |
|-----------|----------|-----|
| Reading/analyzing documents | Subagent | Keeps source content out of main context |
| Research and competitive analysis | Subagent | Heavy reading, return summary only |
| Writing deliverables | Main agent | Needs full decision-making context |
| Schema/architecture design | Main agent | Needs holistic project understanding |
| Code generation | Subagent | Isolated implementation, return result |
| Review and QA | Subagent | Fresh perspective, no bias from writing |
## Output Requirements
Subagent output must conform to the Output Contracts in `templates/claude-templates.md`. No free-form prose returns.
Optimal subagent return size: 1,000-2,000 tokens of structured summary. Longer returns consume main agent context without proportional benefit.