Framework for agents to understand implicit user intent, think before acting, and consider action impact. Uses STAR framework (Stop-Think-Analyze-Respond) to prevent literal execution that doesn't match context. Use when agent receives ambiguous requests, abstract commands like "fix", "improve", "delete all", or actions with potential wide-scope impact. Trigger on code modification requests without explicit scope constraints.
Install
npx skillscat add rfxlamia/claude-skillkit/framework-initiative Install via the SkillsCat registry.
Agent Initiative Framework
Overview
Agent Initiative helps AI agents avoid literal interpretation trap - executing commands literally without understanding context and impact. This framework uses STAR (Stop-Think-Analyze-Respond) to ensure agents think before acting.
Metaphor: When a user asks to "turn the world into paper because trees are gone," a good agent doesn't turn EVERYTHING into paper - but chooses what's appropriate (trash, inanimate objects) and protects living beings.
When to Use
Trigger conditions:
- User requests code changes without specifying explicit scope
- Request involves abstract words ("fix", "improve", "change all")
- Action potentially affects many files/components
- No explicit constraints from user
Don't use when:
- User gives very specific instructions with clear scope
- Task is read-only (analysis, explanation)
- User explicitly asks to "execute immediately without analysis"
Documentation vs Code Reality
Important Principle: Documentation is a REFERENCE, not an OBLIGATION. Existing code is the primary source of truth.
Documentation Can Be Misleading
In the AI era, documentation is often:
- Deprecated - not updated even though code has changed
- Auto-generated - created by tools without business context
- Template - copy-pasted from other projects
- Outdated - old versions that are no longer relevant
Trust Hierarchy
âââââââââââââââââââââââââââââââââââââââââââ
â SOURCE OF TRUTH HIERARCHY â
âââââââââââââââââââââââââââââââââââââââââââ¤
â 1. Currently running code â Most â
â (runtime behavior, actual logic) â
â â
â 2. Passing test suite â
â (behavioral contracts) â
â â
â 3. Git history & commit messages â
â (intent and historical context) â
â â
â 4. Code comments (if specific) â
â (explanations of WHY, not WHAT) â
â â
â 5. External documentation â Least â
â (README, wiki, API docs) trusted â
âââââââââââââââââââââââââââââââââââââââââââExecution Principles
Don't blindly trust documentation. Verify with:
- Read actual code - What does this function actually do?
- Trace execution path - How does data flow?
- Check test cases - What behavior is expected?
- Cross-reference - Do docs match implementation?
Documentation Red Flags
| Warning Sign | Action |
|---|---|
| "According to documentation X but code doesn't work" | Prioritize code, documentation may be outdated |
| "Documentation says A but test expects B" | Tests are contracts, documentation can be wrong |
| "README says this feature exists but can't find it" | Check git history, may have been deleted |
| "API docs don't match actual response" | Trust actual response, docs may not be updated |
Scenario Example
User: "Add feature X according to this API documentation"
â Wrong: Follow API documentation without verification â code error because endpoint has changed
â Correct:
- Read documentation as INITIAL reference
- Check actual API calls in codebase
- Verify endpoint, payload, response structure
- Execute based on REALITY, not documentation
STAR Framework
S - Stop (Pause Before Action)
Before execution, pause and identify:
âââââââââââââââââââââââââââââââââââââââââââ
â STOP CHECKPOINT â
âââââââââââââââââââââââââââââââââââââââââââ¤
â 1. What did the user SAY? â
â 2. What does the user MEAN? â
â 3. Is there a gap between the two? â
âââââââââââââââââââââââââââââââââââââââââââRed flags that trigger STOP:
- "Fix this bug" (which bug? what's the scope?)
- "Update all X to Y" (all = literally all?)
- "Make it better" (criteria for "better"?)
T - Think (Identify Implicit Intent)
Translate literal request into actual intent:
| User Says | Might Actually Mean |
|---|---|
| "Fix this function" | Fix function + update callers + update tests |
| "Delete unused code" | Delete unused BUT preserve if might be needed |
| "Rename X to Y everywhere" | Rename in code, but maybe not in API/DB |
| "Make it faster" | Optimize hot paths, not micro-optimizations |
Questions to ask yourself:
- What is the business/technical context of this request?
- What would the user be DISAPPOINTED by if I do it?
- What does the user ASSUME I know but didn't say?
A - Analyze (Map Impact & Dependencies)
Before action, scan for dependencies:
# For code changes:
1. Grep/Glob for usages of target
2. Identify callers and dependencies
3. Check test coverage
4. Identify API contracts that might be affectedImpact Zones:
ââââââââââââââââ
â Direct Zone â <- Direct target (file/function)
ââââââââââââââââ¤
âââââ⤠Caller Zone â <- Who calls this?
â ââââââââââââââââ¤
â â Contract Zoneâ <- API, interface, types
â ââââââââââââââââ¤
âââââ⤠Test Zone â <- Tests that need updating
ââââââââââââââââFor each zone, ask:
- Does change in Direct Zone affect other zones?
- Are there breaking changes?
- Are there silent failures that might occur?
R - Respond (Execute with Awareness)
Execute with graduated approach:
- Propose First: Explain plan before execution
- Scope Confirmation: Confirm scope if ambiguous
- Safe Order: Execute from low-risk to high-risk
- Verify After: Check results match intent
âââââââââââââââââââââââââââââââââââââââââââ
â RESPONSE PATTERN â
âââââââââââââââââââââââââââââââââââââââââââ¤
â "I will [action] on [scope]. â
â This will affect [impact]. â
â I will NOT touch [exclude]. â
â Confirm before proceeding?" â
âââââââââââââââââââââââââââââââââââââââââââQuick Reference
Intent Severity Levels
| Level | Signal | Action |
|---|---|---|
| Low | Specific, single-file, no deps | Direct execution |
| Medium | Multi-file, has callers | STAR light (T+A) |
| High | Abstract request, wide scope | Full STAR |
Pre-Action Checklist
â¡ Do I understand INTENT, not just WORDS?
â¡ Have I scanned dependencies?
â¡ Is there anything that might BREAK silently?
â¡ Have I confirmed ambiguous scope?
â¡ Can I ROLLBACK if wrong?Common Pitfalls
| Pitfall | Example | Prevention |
|---|---|---|
| Literal execution | "Delete X" â delete all X including important ones | Check importance before delete |
| Scope creep | Fix bug A â refactor B, C, D | Stick to original scope |
| Assumption blindness | Assume user wants X approach | Ask if ambiguous |
| Silent breakage | Change function â caller breaks | Scan callers first |
| Documentation trap | "Documentation says X" â follow without verification | Trust code reality, docs are just reference |
Resources
references/
star-framework.md- Detailed STAR implementationimpact-analysis.md- Dependency analysis techniquesintent-patterns.md- Common implicit intent patternsexamples.md- Real-world examples
Core Principles:
- Better to ask and confirm than to assume and break.
- Code reality > Documentation theory. Documentation is reference, code is truth.