chore: Archive add-cli-lesson change
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
# Change: Update Memory Lesson with Latest Documentation
|
||||
|
||||
## Why
|
||||
|
||||
The current memory lesson (`blog-posts/02-memory.md`) is based on older Claude Code documentation. The official documentation at `https://code.claude.com/docs/en/memory` includes several new features and updates that the lesson doesn't cover, making it incomplete for readers who want to learn about Claude Code's full memory capabilities.
|
||||
|
||||
## What Changes
|
||||
|
||||
### New Features to Add
|
||||
- **Project Rules** (`.claude/rules/*.md`) - Modular, topic-specific markdown files for organizing instructions
|
||||
- **Path-Specific Rules** - YAML frontmatter with `paths:` to scope rules to specific file patterns
|
||||
- **Glob Pattern Support** - Examples of glob patterns for path-specific rules
|
||||
- **Project Local Memory** (`CLAUDE.local.md`) - Personal project preferences that are auto-gitignored
|
||||
- **Symlink Support** - Sharing rules across projects using symbolic links
|
||||
|
||||
### Updates to Existing Content
|
||||
- **Memory Hierarchy Table** - Update to include Project Rules and Project Local as additional memory types
|
||||
- **Enterprise Policy Windows Path** - Correct to `C:\Program Files\ClaudeCode\CLAUDE.md` (currently shows `C:\ProgramData\ClaudeCode\CLAUDE.md`)
|
||||
- **Memory Lookup Algorithm** - Add detailed explanation of recursive upward search behavior
|
||||
- **Best Practices Section** - Add guidelines for `.claude/rules/` organization
|
||||
|
||||
### Structure Improvements
|
||||
- Add new section: "Modular Rules with `.claude/rules/`"
|
||||
- Add new section: "Path-Specific Rules"
|
||||
- Update directory structure example to show `.claude/rules/` organization
|
||||
- Improve organization of content to match official documentation structure
|
||||
|
||||
## Impact
|
||||
|
||||
- **Affected files**: `blog-posts/02-memory.md`
|
||||
- **User benefit**: Readers will learn about complete memory capabilities including modular rules and path-specific scoping
|
||||
- **No breaking changes**: All existing content remains valid; this adds new sections and updates outdated information
|
||||
@@ -0,0 +1,69 @@
|
||||
## MODIFIED Requirements
|
||||
|
||||
### Requirement: Memory Hierarchy Documentation
|
||||
The memory lesson SHALL document the complete 5-level memory hierarchy including Enterprise Policy, Project Memory, Project Rules, User Memory, and Project Local memory types.
|
||||
|
||||
#### Scenario: Complete hierarchy explanation
|
||||
- **WHEN** a reader views the memory hierarchy section
|
||||
- **THEN** they SHALL see all 5 memory levels with their locations, scopes, and sharing capabilities
|
||||
|
||||
#### Scenario: Enterprise Policy Windows path
|
||||
- **WHEN** a reader views the Enterprise Policy location for Windows
|
||||
- **THEN** the path SHALL be `C:\Program Files\ClaudeCode\CLAUDE.md`
|
||||
|
||||
#### Scenario: Memory type comparison table
|
||||
- **WHEN** a reader views the memory type comparison table
|
||||
- **THEN** it SHALL include Project Rules (`.claude/rules/*.md`) and Project Local (`CLAUDE.local.md`) as distinct types
|
||||
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Modular Rules Documentation
|
||||
The memory lesson SHALL document the `.claude/rules/` directory for organizing instructions into topic-specific markdown files.
|
||||
|
||||
#### Scenario: Rules directory structure
|
||||
- **WHEN** a reader views the modular rules section
|
||||
- **THEN** they SHALL see an example directory structure showing `.claude/rules/` with subdirectories
|
||||
|
||||
#### Scenario: Benefits explanation
|
||||
- **WHEN** a reader views the modular rules section
|
||||
- **THEN** they SHALL understand the benefits of topic-specific rule files for organization
|
||||
|
||||
### Requirement: Path-Specific Rules Documentation
|
||||
The memory lesson SHALL document how to use YAML frontmatter with `paths:` directive to scope rules to specific file patterns.
|
||||
|
||||
#### Scenario: YAML frontmatter example
|
||||
- **WHEN** a reader views the path-specific rules section
|
||||
- **THEN** they SHALL see an example of YAML frontmatter with `paths:` directive
|
||||
|
||||
#### Scenario: Glob pattern table
|
||||
- **WHEN** a reader views the path-specific rules section
|
||||
- **THEN** they SHALL see a table of glob pattern examples with explanations
|
||||
|
||||
### Requirement: Project Local Memory Documentation
|
||||
The memory lesson SHALL document `CLAUDE.local.md` files for personal project preferences that are auto-gitignored.
|
||||
|
||||
#### Scenario: Local memory explanation
|
||||
- **WHEN** a reader views the project local memory section
|
||||
- **THEN** they SHALL understand that `CLAUDE.local.md` is for personal preferences on shared projects
|
||||
|
||||
#### Scenario: Auto-gitignore behavior
|
||||
- **WHEN** a reader views the project local memory section
|
||||
- **THEN** they SHALL understand that these files are automatically excluded from git
|
||||
|
||||
### Requirement: Symlink Support Documentation
|
||||
The memory lesson SHALL document how to share rules across projects using symbolic links.
|
||||
|
||||
#### Scenario: Symlink examples
|
||||
- **WHEN** a reader views the symlink support section
|
||||
- **THEN** they SHALL see bash examples for creating symlinks to shared rule files and directories
|
||||
|
||||
### Requirement: Memory Lookup Algorithm Documentation
|
||||
The memory lesson SHALL document how Claude Code discovers and loads memory files recursively.
|
||||
|
||||
#### Scenario: Recursive search explanation
|
||||
- **WHEN** a reader views the memory lookup section
|
||||
- **THEN** they SHALL understand the recursive upward search from current directory to root
|
||||
|
||||
#### Scenario: Subtree discovery
|
||||
- **WHEN** a reader views the memory lookup section
|
||||
- **THEN** they SHALL understand that subtree files are discovered when those files are accessed
|
||||
@@ -0,0 +1,46 @@
|
||||
## 1. Update Memory Hierarchy Section
|
||||
- [x] 1.1 Update the memory hierarchy table to include 5 levels (Enterprise, Project, Project Rules, User, Project Local)
|
||||
- [x] 1.2 Update the mermaid diagram to show the complete hierarchy
|
||||
- [x] 1.3 Fix Windows Enterprise Policy path from `C:\ProgramData\ClaudeCode\CLAUDE.md` to `C:\Program Files\ClaudeCode\CLAUDE.md`
|
||||
- [x] 1.4 Add explanation of precedence and loading order
|
||||
|
||||
## 2. Add Modular Rules Section
|
||||
- [x] 2.1 Create new section "Modular Rules with `.claude/rules/`"
|
||||
- [x] 2.2 Add directory structure example showing `.claude/rules/` organization
|
||||
- [x] 2.3 Explain benefits of topic-specific rule files
|
||||
- [x] 2.4 Add examples of modular rule filenames (code-style.md, testing.md, security.md)
|
||||
|
||||
## 3. Add Path-Specific Rules Section
|
||||
- [x] 3.1 Create new section "Path-Specific Rules with Glob Patterns"
|
||||
- [x] 3.2 Explain YAML frontmatter with `paths:` directive
|
||||
- [x] 3.3 Add table of glob pattern examples (`**/*.ts`, `src/**/*`, etc.)
|
||||
- [x] 3.4 Include practical example of path-scoped API rules
|
||||
|
||||
## 4. Add Project Local Memory Section
|
||||
- [x] 4.1 Add explanation of `CLAUDE.local.md` file
|
||||
- [x] 4.2 Explain auto-gitignore behavior
|
||||
- [x] 4.3 Add use case examples (personal preferences on shared projects)
|
||||
|
||||
## 5. Add Symlink Support Section
|
||||
- [x] 5.1 Add section on sharing rules across projects using symlinks
|
||||
- [x] 5.2 Include bash examples for creating symlinks to shared rules
|
||||
|
||||
## 6. Update Memory Lookup Algorithm
|
||||
- [x] 6.1 Add detailed explanation of recursive upward search
|
||||
- [x] 6.2 Explain subtree discovery behavior
|
||||
- [x] 6.3 Add example of which files are loaded from different directories
|
||||
|
||||
## 7. Update Best Practices
|
||||
- [x] 7.1 Add best practices for `.claude/rules/` organization
|
||||
- [x] 7.2 Add guidelines for using path-specific rules sparingly
|
||||
- [x] 7.3 Add tips for symlink-based rule sharing
|
||||
|
||||
## 8. Update Directory Structure Example
|
||||
- [x] 8.1 Update the directory structure to show `.claude/rules/` hierarchy
|
||||
- [x] 8.2 Include subdirectory examples (frontend/, backend/)
|
||||
|
||||
## 9. Review and Polish
|
||||
- [x] 9.1 Ensure all mermaid diagrams are updated
|
||||
- [x] 9.2 Review table formatting consistency
|
||||
- [x] 9.3 Update "Official Documentation" links if needed
|
||||
- [x] 9.4 Verify all code examples are accurate
|
||||
Reference in New Issue
Block a user