Rename marketplace and add CLAUDE.md initialization

- Rename marketplace from claude-code-marketplace to severity1-marketplace
- Add auto-generated CLAUDE.md with proper template structure
- Update .gitignore for dirty-files tracking path
This commit is contained in:
severity1
2025-12-13 21:36:31 +13:00
parent b37186c502
commit 6e6c9188ec
3 changed files with 134 additions and 4 deletions

4
.gitignore vendored
View File

@@ -29,5 +29,5 @@ htmlcov/
.DS_Store
Thumbs.db
# Project specific
dirty-files
# Claude Code auto-memory
.claude/auto-memory/dirty-files

130
CLAUDE.md Normal file
View File

@@ -0,0 +1,130 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
<!-- AUTO-MANAGED: project-description -->
## Overview
**claude-code-auto-memory** - A Claude Code plugin that automatically maintains CLAUDE.md files as codebases evolve. Tracks file changes via hooks, spawns agents to update memory, and provides skills for codebase analysis.
Key features:
- Real-time file tracking via PostToolUse hooks
- Stop hook integration to trigger memory updates
- Codebase analyzer skill for initial setup
- Memory processor skill for ongoing updates
<!-- END AUTO-MANAGED -->
<!-- AUTO-MANAGED: build-commands -->
## Build & Development Commands
```bash
# Install dependencies
uv sync
# Run tests
uv run pytest tests/ -v
# Run single test file
uv run pytest tests/test_hooks.py -v
# Lint code
uv run ruff check .
# Format code
uv run ruff format .
# Type check
uv run mypy scripts/
```
<!-- END AUTO-MANAGED -->
<!-- AUTO-MANAGED: architecture -->
## Architecture
```
.claude-plugin/ # Plugin manifest
plugin.json # Plugin metadata and version
agents/
memory-updater.md # Agent that updates CLAUDE.md files
commands/
init.md # /auto-memory:init command
calibrate.md # /auto-memory:calibrate command
status.md # /auto-memory:status command
sync.md # /auto-memory:sync command
hooks/
hooks.json # Hook registration
scripts/
post-tool-use.py # Tracks file edits to dirty-files
stop.py # Triggers memory-updater agent spawn
skills/
codebase-analyzer/ # Initial CLAUDE.md generation
memory-processor/ # Ongoing CLAUDE.md updates
shared/ # Shared references
tests/
test_hooks.py # Hook behavior tests
test_integration.py # Plugin structure tests
test_skills.py # Skill validation tests
```
Data flow:
1. User edits files via Edit/Write tools
2. PostToolUse hook appends paths to `.claude/auto-memory/dirty-files`
3. Stop hook detects dirty files, blocks Claude, requests agent spawn
4. memory-updater agent processes files and updates CLAUDE.md
5. Dirty files cleared after processing
<!-- END AUTO-MANAGED -->
<!-- AUTO-MANAGED: conventions -->
## Code Conventions
- **Python**: 3.9+ with type hints, snake_case naming
- **Imports**: Group stdlib, then third-party, then local
- **Docstrings**: Module-level docstrings explain purpose
- **Hooks**: Zero output for PostToolUse (token cost), JSON output for Stop
- **Skills/Commands**: YAML frontmatter with name/description
- **Line length**: 100 characters (ruff config)
- **Testing**: pytest with descriptive test names (test_verb_condition)
<!-- END AUTO-MANAGED -->
<!-- AUTO-MANAGED: patterns -->
## Detected Patterns
- **Hook Pattern**: Silent tracking (PostToolUse) + blocking decision (Stop)
- **Dirty File Pattern**: Append-only tracking, batch processing at turn end
- **Skill Pattern**: YAML frontmatter + markdown body with algorithm sections
- **Template Pattern**: AUTO-MANAGED markers for updatable sections
- **Config Pattern**: JSON config in `.claude/auto-memory/config.json`
<!-- END AUTO-MANAGED -->
<!-- AUTO-MANAGED: git-insights -->
## Git Insights
Recent design decisions from commit history:
- Template enforcement added to ensure consistent CLAUDE.md structure
- Git commit context enrichment for better change tracking
- Configurable trigger modes (default vs gitmode)
<!-- END AUTO-MANAGED -->
<!-- AUTO-MANAGED: best-practices -->
## Best Practices
From Claude Code documentation:
- Keep CLAUDE.md concise and focused on actionable guidance
- Use AUTO-MANAGED markers for sections that should be auto-updated
- Use MANUAL section for custom notes that persist across updates
- Subtree CLAUDE.md files inherit from root and add module-specific context
<!-- END AUTO-MANAGED -->
<!-- MANUAL -->
## Custom Notes
Add project-specific notes here. This section is never auto-modified.
<!-- END MANUAL -->

View File

@@ -42,8 +42,8 @@ Claude Code edits code -> Plugin tracks changes -> Isolated agent updates memory
### From Marketplace
```bash
claude plugin marketplace add severity1/claude-code-marketplace
claude plugin install auto-memory@claude-code-marketplace
claude plugin marketplace add severity1/severity1-marketplace
claude plugin install auto-memory@severity1-marketplace
```
### Local Development