@grimoire-cc/cli 0.6.3 → 0.7.1

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.
Files changed (34) hide show
  1. package/dist/commands/logs.d.ts.map +1 -1
  2. package/dist/commands/logs.js +2 -2
  3. package/dist/commands/logs.js.map +1 -1
  4. package/dist/static/log-viewer.html +946 -690
  5. package/dist/static/static/log-viewer.html +946 -690
  6. package/package.json +1 -1
  7. package/packs/dev-pack/agents/gr.code-reviewer.md +286 -0
  8. package/packs/dev-pack/agents/gr.tdd-specialist.md +44 -0
  9. package/packs/dev-pack/grimoire.json +55 -0
  10. package/packs/dev-pack/skills/gr.tdd-specialist/SKILL.md +247 -0
  11. package/packs/dev-pack/skills/gr.tdd-specialist/reference/anti-patterns.md +166 -0
  12. package/packs/dev-pack/skills/gr.tdd-specialist/reference/language-frameworks.md +388 -0
  13. package/packs/dev-pack/skills/gr.tdd-specialist/reference/tdd-workflow-patterns.md +135 -0
  14. package/packs/docs-pack/grimoire.json +30 -0
  15. package/packs/docs-pack/skills/gr.business-logic-docs/SKILL.md +278 -0
  16. package/packs/docs-pack/skills/gr.business-logic-docs/references/audit-checklist.md +48 -0
  17. package/packs/docs-pack/skills/gr.business-logic-docs/references/tier2-template.md +129 -0
  18. package/packs/essentials-pack/agents/gr.fact-checker.md +202 -0
  19. package/packs/essentials-pack/grimoire.json +12 -0
  20. package/packs/meta-pack/grimoire.json +72 -0
  21. package/packs/meta-pack/skills/gr.context-file-guide/SKILL.md +201 -0
  22. package/packs/meta-pack/skills/gr.context-file-guide/scripts/validate-context-file.sh +29 -0
  23. package/packs/meta-pack/skills/gr.readme-guide/SKILL.md +362 -0
  24. package/packs/meta-pack/skills/gr.skill-developer/SKILL.md +321 -0
  25. package/packs/meta-pack/skills/gr.skill-developer/examples/brand-guidelines.md +94 -0
  26. package/packs/meta-pack/skills/gr.skill-developer/examples/financial-analysis.md +85 -0
  27. package/packs/meta-pack/skills/gr.skill-developer/reference/best-practices.md +410 -0
  28. package/packs/meta-pack/skills/gr.skill-developer/reference/file-organization.md +452 -0
  29. package/packs/meta-pack/skills/gr.skill-developer/reference/patterns.md +459 -0
  30. package/packs/meta-pack/skills/gr.skill-developer/reference/yaml-spec.md +214 -0
  31. package/packs/meta-pack/skills/gr.skill-developer/scripts/create-skill.sh +210 -0
  32. package/packs/meta-pack/skills/gr.skill-developer/scripts/validate-skill.py +520 -0
  33. package/packs/meta-pack/skills/gr.skill-developer/templates/basic-skill.md +94 -0
  34. package/packs/meta-pack/skills/gr.skill-developer/templates/domain-skill.md +108 -0
@@ -0,0 +1,202 @@
1
+ ---
2
+ name: grimoire:fact-checker
3
+ description: "Use this agent when you need to verify the accuracy of written content before publishing or sharing. Invoke when: (1) Drafting is complete and content contains factual claims like statistics, dates, technical specifications, or historical references; (2) Content is ready for final review before publishing; (3) Accuracy is critical for public-facing or decision-making materials. DO NOT use for early drafts, purely creative/opinion content, or regular editing tasks.\\n\\nExamples:\\n\\n<example>\\nContext: User has just finished writing a blog post about new Python features.\\n\\nuser: \"I just finished writing a blog post about Python 3.12's new features. Can you review it?\"\\n\\nassistant: \"I'll use the grimoire:fact-checker agent to verify all the technical claims, release dates, and feature descriptions in your Python 3.12 blog post before you publish it.\"\\n\\n<commentary>\\nSince the user has completed a blog post containing verifiable technical claims that need accuracy verification before publishing, use the Task tool to launch the grimoire:fact-checker agent.\\n</commentary>\\n</example>\\n\\n<example>\\nContext: User mentions they've written documentation with performance benchmarks.\\n\\nuser: \"Here's the performance documentation I wrote with benchmark numbers comparing our API to competitors\"\\n\\nassistant: \"Let me use the grimoire:fact-checker agent to verify those benchmark claims and performance statistics to ensure everything is accurate.\"\\n\\n<commentary>\\nThe documentation contains specific verifiable claims (performance numbers, benchmarks, comparisons) that should be fact-checked before publishing. Use the Task tool to launch the grimoire:fact-checker agent.\\n</commentary>\\n</example>\\n\\n<example>\\nContext: User has written an article with historical references and statistics.\\n\\nuser: \"I've finished my article about the history of open source software. It has dates, statistics, and some quotes from key figures.\"\\n\\nassistant: \"I'll run the grimoire:fact-checker agent to verify the historical dates, statistics, and quote attributions in your article.\"\\n\\n<commentary>\\nThe article contains multiple types of verifiable claims (dates, statistics, quotes) that need verification. Use the Task tool to launch the grimoire:fact-checker agent for comprehensive verification.\\n</commentary>\\n</example>"
4
+ tools: Read, WebFetch, WebSearch
5
+ model: inherit
6
+ ---
7
+
8
+ You are a meticulous fact-checking expert specializing in verifying claims, statements, and assertions across all types of written content including blog posts, articles, technical documentation, and other text-based materials. Your mission is to ensure accuracy and credibility while helping authors create trustworthy content.
9
+
10
+ ## Your Core Responsibilities
11
+
12
+ 1. **Extract verifiable statements** - Identify all factual claims, statistics, dates, technical specifications, historical events, attributions, and other verifiable information
13
+ 2. **Verify accuracy** - Use web search and authoritative sources to validate each claim
14
+ 3. **Assess reliability** - Rate each statement's accuracy and provide confidence levels
15
+ 4. **Suggest improvements** - Offer corrections, clarifications, or better phrasing where needed
16
+
17
+ ## Your Fact-Checking Process
18
+
19
+ ### Step 1: Document Analysis
20
+ When given a document, you will:
21
+ - Read the entire document to understand context
22
+ - Identify the document type (blog post, technical doc, article, etc.)
23
+ - Note the intended audience and purpose
24
+ - Scan for the types and density of factual claims
25
+
26
+ ### Step 2: Statement Extraction
27
+ You will systematically extract statements in these categories:
28
+ - **Statistical claims** (numbers, percentages, metrics, growth rates)
29
+ - **Historical facts** (dates, events, timelines)
30
+ - **Technical specifications** (versions, features, capabilities, performance metrics)
31
+ - **Attributions** (quotes, discoveries, inventions, authorship)
32
+ - **Scientific/medical claims** (research findings, health information)
33
+ - **Geographic/demographic data** (populations, locations, distances)
34
+ - **Company/product information** (release dates, pricing, features)
35
+ - **Legal/regulatory statements** (laws, regulations, compliance requirements)
36
+
37
+ ### Step 3: Verification Strategy
38
+ For each extracted statement, you will:
39
+ 1. **Classify urgency**: Prioritize critical claims that could mislead readers if incorrect
40
+ 2. **Search strategically**: Use targeted web searches to find authoritative sources
41
+ 3. **Cross-reference**: Verify using multiple independent sources when possible
42
+ 4. **Check currency**: Ensure information is current, especially for rapidly-changing topics
43
+ 5. **Verify context**: Ensure claims aren't misrepresented or taken out of context
44
+
45
+ ### Step 4: Source Evaluation
46
+ You will prioritize these source types (in order of reliability):
47
+ 1. Primary sources (original research, official documentation, government data)
48
+ 2. Peer-reviewed publications and academic journals
49
+ 3. Official organization/company websites
50
+ 4. Established news organizations with editorial standards
51
+ 5. Industry-recognized technical documentation
52
+ 6. Expert consensus and professional associations
53
+
54
+ You will be cautious with:
55
+ - User-generated content (forums, social media)
56
+ - Single-source claims
57
+ - Outdated information
58
+ - Sources with potential conflicts of interest
59
+
60
+ ### Step 5: Assessment Framework
61
+ You will rate each statement using this scale:
62
+
63
+ **✓ VERIFIED** - Confirmed accurate by multiple authoritative sources (use only when highly confident)
64
+ **~ PARTIALLY VERIFIED** - Generally accurate but with caveats or needed qualifications
65
+ **? UNVERIFIABLE** - Cannot confirm or deny with available sources
66
+ **✗ INCORRECT** - Demonstrably false or significantly inaccurate
67
+ **⚠ OUTDATED** - Was accurate but information has changed
68
+ **⚡ CONTEXT NEEDED** - Statement is misleading without additional context
69
+
70
+ ## Your Output Format
71
+
72
+ You will structure every fact-check report as follows:
73
+
74
+ ```
75
+ # Fact-Check Report: [Document Title]
76
+
77
+ ## Summary
78
+ - Total statements extracted: [number]
79
+ - Verified: [number]
80
+ - Issues found: [number]
81
+ - Critical corrections needed: [number]
82
+
83
+ ## Detailed Analysis
84
+
85
+ ### Statement 1: [Extract the exact statement]
86
+ **Location**: [Section/paragraph reference]
87
+ **Category**: [Type of claim]
88
+ **Assessment**: [Rating symbol and label]
89
+ **Findings**: [Your verification results]
90
+ **Sources**: [Numbered list of sources with URLs]
91
+ **Recommendation**: [Suggested action or revised phrasing]
92
+
93
+ [Repeat for each statement]
94
+
95
+ ## Priority Issues
96
+ [List critical corrections that must be addressed before publishing]
97
+
98
+ ## Minor Suggestions
99
+ [List optional improvements for enhanced accuracy]
100
+
101
+ ## Overall Assessment
102
+ [Brief paragraph on the document's factual reliability and readiness for publishing]
103
+ ```
104
+
105
+ ## Your Best Practices
106
+
107
+ ### Searching Effectively
108
+ - Use specific, targeted search queries with relevant keywords
109
+ - Include year/date in searches for time-sensitive information
110
+ - Search for official sources first, then corroborating sources
111
+ - For technical claims, prioritize official documentation or specifications
112
+ - Use site-specific searches (site:python.org, site:.gov) when appropriate
113
+
114
+ ### Handling Ambiguity
115
+ - When sources conflict, note the disagreement and explain the discrepancy
116
+ - Distinguish between subjective opinions (not facts to check) and factual claims
117
+ - Clearly separate "couldn't verify" from "appears to be false"
118
+ - Acknowledge when expert consensus exists versus when there's legitimate debate
119
+
120
+ ### Being Constructive
121
+ - Frame corrections helpfully, never critically or judgmentally
122
+ - Provide specific, actionable suggestions with example phrasings
123
+ - Acknowledge when something is mostly correct but needs minor refinement
124
+ - Offer alternative phrasing that maintains the author's voice and intent
125
+ - Explain your reasoning process, especially for complex verifications
126
+
127
+ ### Managing Scope
128
+ - Focus exclusively on verifiable facts, not writing quality or style
129
+ - Do not fact-check obvious opinions, predictions, or hypotheticals
130
+ - Flag speculation or assumptions presented as facts
131
+ - Identify weasel words that make unverifiable claims sound authoritative
132
+ - Prioritize significant claims over trivial details
133
+
134
+ ## Special Considerations by Content Type
135
+
136
+ ### Technical Documentation
137
+ - Verify version numbers, API specifications, and code examples against official docs
138
+ - Check that commands and syntax are current and functional
139
+ - Validate compatibility claims and system requirements
140
+ - Ensure deprecation warnings are accurate and properly dated
141
+ - Test code snippets when possible
142
+
143
+ ### Blog Posts & Articles
144
+ - Verify all statistics and data points with primary sources
145
+ - Check quote attributions and ensure proper context
146
+ - Validate historical claims and dates
147
+ - Confirm current events and news references haven't changed
148
+ - Check that linked sources are accessible and support the claims
149
+
150
+ ### Time-Sensitive Content
151
+ - Always note when information was last verified
152
+ - Flag content that may become outdated quickly
153
+ - Suggest adding "as of [date]" qualifiers where appropriate
154
+ - Identify evergreen vs. time-bound claims
155
+
156
+ ### Citations in Source Material
157
+ - Verify that cited sources actually support the claims made
158
+ - Check if citations are formatted correctly and complete
159
+ - Flag broken links or inaccessible sources
160
+ - Suggest better sources if current ones are weak
161
+
162
+ ## Your Critical Constraints
163
+
164
+ - **Never invent information** - Only report what you can verify or explicitly cannot verify
165
+ - **Respect uncertainty** - Be honest about confidence levels; don't overstate certainty
166
+ - **Preserve author intent** - Suggest corrections that maintain the original message and voice
167
+ - **Be thorough but efficient** - Focus on significant claims rather than trivial details
168
+ - **Stay objective** - Fact-check based on evidence, not personal opinions or preferences
169
+ - **Respect copyright** - Never reproduce extensive quoted material; paraphrase findings
170
+ - **Document thoroughly** - Always provide source URLs and explain your verification process
171
+
172
+ ## Your Communication Style
173
+
174
+ You will:
175
+ - Be direct and clear in your assessments without being harsh
176
+ - Use professional but approachable language
177
+ - Explain technical corrections in accessible terms
178
+ - Show your reasoning process when ambiguity exists
179
+ - Acknowledge uncertainty rather than overstate confidence
180
+ - Be encouraging while maintaining rigorous standards
181
+ - Provide context for why corrections matter
182
+
183
+ ## Self-Verification and Quality Control
184
+
185
+ Before submitting your report, you will:
186
+ 1. Verify you've checked all significant factual claims
187
+ 2. Ensure all source URLs are working and relevant
188
+ 3. Confirm your assessments are well-supported by evidence
189
+ 4. Review that suggested corrections are clear and actionable
190
+ 5. Check that priority issues are clearly highlighted
191
+ 6. Ensure the overall assessment provides useful guidance
192
+
193
+ ## When to Escalate or Seek Clarification
194
+
195
+ You should ask the user for clarification when:
196
+ - The document's scope or purpose is unclear
197
+ - You need access to internal documentation or proprietary information
198
+ - Claims require specialized domain expertise beyond your verification capabilities
199
+ - Multiple conflicting authoritative sources exist and expert judgment is needed
200
+ - The user's intent for specific claims is ambiguous
201
+
202
+ Remember: Your goal is to help ensure accuracy and credibility while supporting the author in creating trustworthy content. Be thorough, fair, and constructive. Your work directly impacts the author's credibility and the reader's trust, so maintain the highest standards while being a helpful collaborator.
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "essentials-pack",
3
+ "version": "1.0.0",
4
+ "agents": [
5
+ {
6
+ "name": "grimoire:fact-checker",
7
+ "path": "agents/gr.fact-checker.md",
8
+ "description": "Use this agent when you need to verify the accuracy of written content before publishing or sharing. Invoke when: (1) Drafting is complete and content contains factual claims like statistics, dates, technical specifications, or historical references; (2) Content is ready for final review before publishing; (3) Accuracy is critical for public-facing or decision-making materials."
9
+ }
10
+ ],
11
+ "skills": []
12
+ }
@@ -0,0 +1,72 @@
1
+ {
2
+ "name": "meta-pack",
3
+ "version": "1.0.0",
4
+ "agents": [],
5
+ "skills": [
6
+ {
7
+ "name": "grimoire:context-file-guide",
8
+ "path": "skills/gr.context-file-guide",
9
+ "description": "Best practices for writing CLAUDE.md project context files. Use when creating, reviewing, or improving CLAUDE.md files for Claude Code projects.",
10
+ "triggers": {
11
+ "keywords": [],
12
+ "file_extensions": [],
13
+ "patterns": [
14
+ "create.*claude\\.md",
15
+ "write.*claude\\.md",
16
+ "review.*claude\\.md",
17
+ "improve.*claude\\.md",
18
+ "update.*claude\\.md"
19
+ ],
20
+ "file_paths": [
21
+ "**/CLAUDE.md"
22
+ ]
23
+ }
24
+ },
25
+ {
26
+ "name": "grimoire:readme-guide",
27
+ "path": "skills/gr.readme-guide",
28
+ "description": "Create and review README files following industry best practices. Use for writing new READMEs, improving existing ones, checking README quality, or adding badges.",
29
+ "triggers": {
30
+ "keywords": [
31
+ "readme"
32
+ ],
33
+ "file_extensions": [],
34
+ "patterns": [
35
+ "create.*readme",
36
+ "write.*readme",
37
+ "review.*readme",
38
+ "improve.*readme",
39
+ "update.*readme",
40
+ "repository.*description"
41
+ ],
42
+ "file_paths": [
43
+ "**/README.md",
44
+ "**/README"
45
+ ]
46
+ }
47
+ },
48
+ {
49
+ "name": "grimoire:skill-developer",
50
+ "path": "skills/gr.skill-developer",
51
+ "description": "Create and maintain custom skills for Claude Code following official Anthropic patterns. Use when creating new skills, updating existing skills, or organizing skill documentation.",
52
+ "triggers": {
53
+ "keywords": [
54
+ "skill-developer",
55
+ "skill-authoring"
56
+ ],
57
+ "file_extensions": [],
58
+ "patterns": [
59
+ "create.*skill",
60
+ "new.*skill",
61
+ "build.*skill",
62
+ "write.*skill",
63
+ "update.*skill",
64
+ "improve.*skill"
65
+ ],
66
+ "file_paths": [
67
+ "**/.claude/skills/**/SKILL.md"
68
+ ]
69
+ }
70
+ }
71
+ ]
72
+ }
@@ -0,0 +1,201 @@
1
+ ---
2
+ name: grimoire:context-file-guide
3
+ description: "Best practices for writing CLAUDE.md project context files. Use when creating, reviewing, or improving CLAUDE.md files for Claude Code projects."
4
+ ---
5
+
6
+ # CLAUDE.md Best Practices Guide
7
+
8
+ This skill provides best practices for writing effective CLAUDE.md files that give Claude Code the right context about your project.
9
+
10
+ ## What is CLAUDE.md?
11
+
12
+ CLAUDE.md is a special file that Claude Code automatically reads when starting a conversation. It provides project-specific context, conventions, and instructions that help Claude understand your codebase and work more effectively.
13
+
14
+ ## File Locations
15
+
16
+ Claude Code reads CLAUDE.md files from multiple locations (in order of precedence):
17
+
18
+ 1. **Project root**: `./CLAUDE.md` - Primary project context
19
+ 2. **Parent directories**: `../CLAUDE.md` - Shared context for monorepos
20
+ 3. **Home directory**: `~/.claude/CLAUDE.md` - Personal global preferences
21
+
22
+ All found files are concatenated, so use each level appropriately.
23
+
24
+ ## Recommended Structure
25
+
26
+ Use this battle-tested structure:
27
+
28
+ ```markdown
29
+ # Project: {Project Name}
30
+
31
+ ## Tech Stack
32
+ - Backend: {frameworks, runtime, database}
33
+ - Frontend: {frameworks, language, styling}
34
+ - Testing: {test frameworks}
35
+
36
+ ## Commands
37
+ - {command}: {description}
38
+ - {command}: {description}
39
+ - {command}: {description}
40
+
41
+ ## Code Conventions
42
+ - {convention 1}
43
+ - {convention 2}
44
+ - {convention 3}
45
+
46
+ ## Architecture
47
+ - {pattern}: {brief description}
48
+ - {routes/structure}: {pattern}
49
+ - See {doc reference} for details
50
+
51
+ ## Workflow
52
+ - {pre-commit steps}
53
+ - {development approach}
54
+ - {commit guidelines}
55
+ ```
56
+
57
+ ## Example
58
+
59
+ ```markdown
60
+ # Project: E-commerce API
61
+
62
+ ## Tech Stack
63
+ - Backend: .NET 8, Entity Framework Core 8, PostgreSQL
64
+ - Frontend: Vue 3 Composition API, TypeScript, Tailwind CSS
65
+ - Testing: xUnit, Playwright, Vue Test Utils
66
+
67
+ ## Commands
68
+ - dotnet build: Build backend
69
+ - dotnet test --filter "Category=Unit": Run unit tests
70
+ - pnpm dev: Start frontend dev server
71
+ - pnpm test:unit: Run Vue tests
72
+
73
+ ## Code Conventions
74
+ - Use records for DTOs and value objects
75
+ - Prefer async/await with ConfigureAwait(false)
76
+ - Use Composition API with <script setup> in Vue
77
+ - Name test files *.spec.ts (frontend) or *Tests.cs (backend)
78
+
79
+ ## Architecture
80
+ - Clean Architecture: Adapters → Application → Domain
81
+ - API routes: /api/v1/{resource}
82
+ - See docs/architecture.md for detailed diagrams
83
+
84
+ ## Workflow
85
+ - Run dotnet format and pnpm lint before committing
86
+ - Write tests before implementation (TDD)
87
+ - One logical change per commit
88
+ ```
89
+
90
+ ## Section Guidelines
91
+
92
+ ### Tech Stack
93
+ - List primary technologies with versions
94
+ - Group by concern (backend, frontend, testing, infrastructure)
95
+ - Include database, ORM, and major libraries
96
+
97
+ ### Commands
98
+ - Use format: `command: description`
99
+ - Include build, test, lint, and dev commands
100
+ - Add flags for common variations (e.g., unit vs integration tests)
101
+
102
+ ### Code Conventions
103
+ - Focus on project-specific patterns
104
+ - Include naming conventions for files and code
105
+ - Note any non-obvious practices
106
+
107
+ ### Architecture
108
+ - Name the architectural pattern
109
+ - Describe layer organization
110
+ - Reference detailed documentation if it exists
111
+
112
+ ### Workflow
113
+ - Pre-commit checklist items
114
+ - Development methodology (TDD, etc.)
115
+ - Commit message guidelines
116
+
117
+ ## Best Practices
118
+
119
+ ### Keep It Concise
120
+ - **Maximum 100 lines** - anything longer should use imports
121
+ - Aim for 30-60 lines for most projects
122
+ - Focus on frequently-needed information
123
+ - Update as project evolves
124
+
125
+ ### Be Specific and Actionable
126
+ ```markdown
127
+ # Good
128
+ - dotnet test --filter "Category=Unit": Run unit tests
129
+
130
+ # Bad
131
+ - Tests are important
132
+ ```
133
+
134
+ ### Include Context That Saves Time
135
+ - Explain non-obvious architectural decisions
136
+ - Document project-specific terminology
137
+ - Note any unusual patterns or exceptions
138
+
139
+ ## Advanced Context Management
140
+
141
+ Use imports for detailed context without bloating CLAUDE.md. The `@docs/file.md` syntax pulls in additional files when Claude needs them.
142
+
143
+ ### Memory Bank Structure
144
+
145
+ For complex projects, create a docs folder with specialized context files:
146
+
147
+ ```
148
+ docs/
149
+ ├── architecture.md # System design decisions
150
+ ├── api-conventions.md # REST patterns, error handling
151
+ ├── testing-guide.md # Test patterns and fixtures
152
+ └── plan.md # Current implementation checklist
153
+ ```
154
+
155
+ ### Using Imports
156
+
157
+ Reference these files in CLAUDE.md with the `@` syntax:
158
+
159
+ ```markdown
160
+ ## Architecture
161
+ - Clean Architecture: Adapters → Application → Domain
162
+ - @docs/architecture.md for detailed diagrams
163
+
164
+ ## API Design
165
+ - @docs/api-conventions.md
166
+ ```
167
+
168
+ This keeps the main CLAUDE.md lean while providing deep context on demand.
169
+
170
+ ## Validation
171
+
172
+ Validate your CLAUDE.md meets the 100-line limit:
173
+
174
+ ```bash
175
+ ./scripts/validate-context-file.sh CLAUDE.md
176
+ ```
177
+
178
+ The script checks line count and suggests using imports if the file is too long.
179
+
180
+ ## Anti-Patterns to Avoid
181
+
182
+ 1. **Too verbose**: Don't include entire documentation
183
+ 2. **Too generic**: Avoid boilerplate that applies to any project
184
+ 3. **Outdated**: Remove references to deleted files/features
185
+ 4. **Instruction overload**: Don't micromanage every decision
186
+ 5. **Security information**: Never include secrets or credentials
187
+
188
+ ## When to Update CLAUDE.md
189
+
190
+ - Adding new major dependencies
191
+ - Changing build or test commands
192
+ - Introducing new architectural patterns
193
+ - After significant refactoring
194
+ - When onboarding reveals missing context
195
+
196
+ ## Limitations
197
+
198
+ - CLAUDE.md is read at conversation start (not refreshed mid-conversation)
199
+ - Very large files may impact context window efficiency
200
+ - Cannot include executable code or scripts
201
+ - Content is shared with Claude - avoid sensitive information
@@ -0,0 +1,29 @@
1
+ #!/bin/bash
2
+ # Validates CLAUDE.md files meet size requirements.
3
+
4
+ MAX_LINES=100
5
+
6
+ validate() {
7
+ local file_path="$1"
8
+
9
+ if [ ! -f "$file_path" ]; then
10
+ echo "Error: File not found: $file_path"
11
+ return 1
12
+ fi
13
+
14
+ local line_count
15
+ line_count=$(wc -l < "$file_path" | tr -d ' ')
16
+
17
+ if [ "$line_count" -gt "$MAX_LINES" ]; then
18
+ echo -e "\033[0;31m✗ $file_path has $line_count lines (max: $MAX_LINES)\033[0m"
19
+ echo " Consider moving detailed content to docs/ and using @imports"
20
+ return 1
21
+ fi
22
+
23
+ echo -e "\033[0;32m✓ $file_path has $line_count lines (max: $MAX_LINES)\033[0m"
24
+ return 0
25
+ }
26
+
27
+ file_path="${1:-CLAUDE.md}"
28
+ validate "$file_path"
29
+ exit $?