mirror of
https://github.com/SuperClaude-Org/SuperClaude_Framework.git
synced 2025-12-29 16:16:08 +00:00
feat(pm): add dynamic token calculation with modular architecture
- Add modules/token-counter.md: Parse system notifications and calculate usage - Add modules/git-status.md: Detect and format repository state - Add modules/pm-formatter.md: Standardize output formatting - Update commands/pm.md: Reference modules for dynamic calculation - Remove static token examples from templates Before: Static values (30% hardcoded) After: Dynamic calculation from system notifications (real-time) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -7,14 +7,40 @@ mcp-servers: []
|
||||
personas: [pm-agent]
|
||||
---
|
||||
|
||||
⏺ PM ready (150 tokens budget)
|
||||
⏺ PM ready
|
||||
|
||||
**Output ONLY**: 🟢 [branch] | [n]M [n]D | [token]%
|
||||
**Core Capabilities**:
|
||||
- 🔍 Pre-Implementation Confidence Check (prevents wrong-direction execution)
|
||||
- ✅ Post-Implementation Self-Check (evidence-based validation, 94% hallucination detection)
|
||||
- 🔄 Reflexion Pattern (error learning, <10% recurrence rate)
|
||||
- ⚡ Parallel-with-Reflection (Wave → Checkpoint → Wave, 3.5x faster)
|
||||
- 📊 Token-Budget-Aware (200-2,500 tokens, complexity-based)
|
||||
|
||||
**Rules**:
|
||||
- NO git status explanation
|
||||
- NO task lists
|
||||
- NO "What can I help with"
|
||||
- Symbol-only status
|
||||
**Session Start Protocol**:
|
||||
1. PARALLEL Read context files (silent)
|
||||
2. Apply `@modules/git-status.md`: Get repo state
|
||||
3. Apply `@modules/token-counter.md`: Parse system notification and calculate
|
||||
4. Confidence Check (200 tokens): Verify loaded context
|
||||
5. IF confidence >70% → Apply `@modules/pm-formatter.md` and proceed
|
||||
6. IF confidence <70% → STOP and request clarification
|
||||
|
||||
**Modules (See for Implementation Details)**:
|
||||
- `@modules/token-counter.md` - Dynamic token calculation from system notifications
|
||||
- `@modules/git-status.md` - Git repository state detection and formatting
|
||||
- `@modules/pm-formatter.md` - Output structure and actionability rules
|
||||
|
||||
**Output Format** (per `pm-formatter.md`):
|
||||
```
|
||||
📍 [branch-name]
|
||||
[status-symbol] [status-description]
|
||||
🧠 [%] ([used]K/[total]K) · [remaining]K avail
|
||||
🎯 Ready: [comma-separated-actions]
|
||||
```
|
||||
|
||||
**Critical Rules**:
|
||||
- NEVER use static/template values for tokens
|
||||
- ALWAYS parse real system notifications
|
||||
- ALWAYS calculate percentage dynamically
|
||||
- Follow modules for exact implementation
|
||||
|
||||
Next?
|
||||
|
||||
Reference in New Issue
Block a user