-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Pragmatic context management with plan keys and helper scripts #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
brian-lai
wants to merge
15
commits into
main
Choose a base branch
from
para/CONTEXT-001-smart-context-loading
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…nd multi-repo support
… injection, token budgeting, and multi-repo support
…ripts BREAKING CHANGE: Major plan revision mid-execution Original approach: - Document 'smart detection' and 'auto-injection' features - Build MCP tools for automatic context management - 1,132-line CLAUDE.md with speculative features Revised approach: - Build simple, testable bash scripts - Work with Claude Code's existing capabilities - Help users manage relevant files pragmatically Why the pivot: - Claude Code can't 'inject' files into Claude's context from outside - Documentation became too long with unimplemented features - Need deterministic, testable tools that work today New implementation: - 4 bash scripts in context/servers/ - Simplified documentation (~800-900 line target for CLAUDE.md) - Focus on practical, immediate value 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Removed 156 lines of speculative content: - Smart Context Loading (132 lines) → replaced with Helper Scripts (28 lines) - MCP & Token Efficiency (12 lines) - Example MCP Workflow (19 lines) - Session Hygiene (8 lines) - Summary Checklist (9 lines) Results: - Before: 1,132 lines - After: 976 lines - Savings: 156 lines (13.8% reduction) Replaced with practical, buildable content: - Simple helper scripts documentation - Clear usage examples - Multi-repo support explanation - No speculative plugin features 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…an key Implements first helper script: - Parses context/context.md JSON - Extracts active_context[plan-key].files[] - Outputs each file path Features: - Validates plan key exists - Shows available keys on error - Requires jq for JSON parsing - Proper error handling and usage messages Tested with CONTEXT-001 - works correctly! 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements second helper script: - Uses para-list-files.sh to get file list - Checks if each file exists - Reports ✅ found / ❌ missing status - Shows summary with counts - Exit code 1 if any files missing Output example: ✅ file1.ts ❌ file2.ts (missing) Summary: Found: 1 file(s) Missing: 1 file(s) Note: Currently shows repo-prefixed paths as missing (expected). The para-resolve-paths.sh script will handle path resolution. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- para-resolve-paths.sh: Resolves repo-name/path format to absolute paths - Scans current dir, subdirs, and parent's subdirs for git repos - Compatible with bash 3.2 (macOS default) - Multi-repo support with helpful debug output - para-generate-prompt.sh: Generates prompts for Claude to load files - Uses para-resolve-paths.sh to get absolute paths - Outputs copy-pasteable prompt for Claude Code - Simple workflow for loading context in new sessions Both scripts are executable and include proper error handling.
commands/focus.md: - Complete rewrite from speculative auto-injection to practical workflow - Documents helper scripts (para-list-files, para-validate, para-resolve, para-generate) - Removes 252 lines of non-existent features - Adds 263 lines of actionable guidance - Shows multi-repo support and troubleshooting resources/CLAUDE.md: - Removed 156 lines of speculative MCP content - Added 28-line Helper Scripts section with clear examples - Rewrote Quickstart section with real working examples - Shows plan keys, context structure, and script usage - Focuses on what works today, not future aspirations Both files now document the actual helper scripts we built, not speculative features.
examples/example-workflow.md: - Changed plan command to include plan key: /plan AUTH-001 add-jwt-authentication - Added Step 3b showing helper script usage for loading context - Updated all file paths to reflect plan key naming convention - Removed speculative MCP tool references - Shows realistic workflow with para-generate-prompt.sh README.md: - Updated Quick Start example to show plan key parameter - Changed "MCP tool wrappers" to "Helper scripts for context management" - Updated Token Efficiency section to reflect actual helper scripts - Examples now show DARK-001 plan key format Both files demonstrate the actual working system with plan keys and helper scripts.
Updated context.md to reflect completion of all 17 tasks: - Phase 1: Foundation (3 tasks complete) - Phase 2: Build Helper Scripts (6 tasks complete) - Phase 3: Simplify Documentation (4 tasks complete) - Phase 4: Integration & Testing (4 tasks complete) Deliverables: - 4 working helper scripts (all tested, executable, bash 3.2 compatible) - Documentation cleanup (removed 156 lines of speculation) - Updated examples and quickstart - Full multi-repo support Ready for PR and review.
Comprehensive summary documenting: - The successful pivot from speculation to pragmatic tools - All 4 helper scripts created and tested - Documentation cleanup (removed 156 lines of speculation) - Multi-repo support implementation - Testing results and validation - Key learnings and follow-up tasks Ready for PR creation and review. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Successfully pivoted from speculative "smart context loading" documentation to building practical, testable bash scripts for context management. This PR delivers a complete helper script suite that enables multi-repo work and plan key-based context loading.
Key Achievement: Mid-execution pivot - recognized we were documenting features that don't exist, and redirected to building tools that work today.
Changes
🛠️ Helper Scripts Created (4 new scripts)
All scripts are executable, bash 3.2 compatible, and support multi-repo work:
repo-name/pathformat to absolute paths📚 Documentation Updates
resources/CLAUDE.md
commands/focus.md
examples/example-workflow.md
README.md
Technical Details
Multi-Repo Support
Scripts automatically find git repositories by scanning:
.gitfoldersExample:
{ "active_context": { "AUTH-001": { "repos": ["api-gateway", "user-service"], "files": [ "api-gateway/src/middleware/auth.ts", "user-service/src/models/user.ts" ] } } }Plan Key System
Supports multiple concurrent work streams:
Usage Example
Testing
All scripts tested and validated:
Commits
Previous commits:
Metrics
What Users Get
Review Notes
Related
🤖 Generated with Claude Code