@claudetools/tools 0.7.3 → 0.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5,7 +5,7 @@ export declare const PROJECT_SECTION_END = "<!-- CLAUDETOOLS:PROJECT:END -->";
|
|
|
5
5
|
/**
|
|
6
6
|
* Global CLAUDE.md content - added to ~/.claude/CLAUDE.md
|
|
7
7
|
*/
|
|
8
|
-
export declare const GLOBAL_TEMPLATE = "\n<!-- CLAUDETOOLS:START -->\n# ClaudeTools Memory System\n\nYou have access to a persistent memory system via the `claudetools_memory` MCP server. Use it to remember context across sessions.\n\n## Memory Tools\n\n### Searching Memory\n```\nmemory_search(query: \"authentication patterns\")\n```\nSearch for relevant facts, entities, and past context. Use this when:\n- Starting work on a feature to recall past decisions\n- Looking for patterns or conventions used before\n- Finding related code or architectural context\n\n### Storing Facts\n```\nmemory_store_fact(\n entity1: \"UserService\",\n relationship: \"USES\",\n entity2: \"bcrypt\",\n context: \"Password hashing uses bcrypt with 12 rounds\"\n)\n```\nStore important facts as relationships between entities. Use for:\n- Architectural decisions\n- Code patterns and conventions\n- Dependencies and relationships\n- User preferences learned during conversation\n\n### Context Injection\nContext is automatically injected at the start of each session based on the current project. Check `~/.claudetools/session-context.md` for project-specific context.\n\n## Task Management\n\n### Creating Work Plans with Auto-Dispatch\n```\ntask_plan(\n goal: \"Add user authentication\",\n epic_title: \"User Auth System\",\n tasks: [...]\n)\n```\nBreak down complex work into tracked tasks. **Tasks are automatically set to `ready` status.**\n\nAfter `task_plan` completes, you will receive Task tool invocations to spawn parallel agents.\n**Execute ALL Task tool calls in a SINGLE message** to enable parallel execution.\n\n### Parallel Agent Workflow\n1. User describes work needed\n2. Call `task_plan_draft` to present the plan\n3. User says \"go\" to approve\n4. Call `task_plan` - tasks created in `ready` status\n5. Execute the provided Task tool calls in ONE message\n6. Agents work in parallel, each calling `task_complete` when done\n\n### Manual Task Start (Sequential)\n```\ntask_start(task_id: \"task_xxx\")\n```\nClaim a task before working on it. Use for sequential execution.\n\n### Completing Tasks\n```\ntask_complete(task_id: \"task_xxx\", summary: \"Implemented JWT auth with refresh tokens\")\n```\nMark tasks done with a summary of work completed. **Always call this when a task is finished.**\n\n## Codebase Intelligence\n\n###
|
|
8
|
+
export declare const GLOBAL_TEMPLATE = "\n<!-- CLAUDETOOLS:START -->\n# ClaudeTools Memory System\n\nYou have access to a persistent memory system via the `claudetools_memory` MCP server. Use it to remember context across sessions.\n\n## Memory Tools\n\n### Searching Memory\n```\nmemory_search(query: \"authentication patterns\")\n```\nSearch for relevant facts, entities, and past context. Use this when:\n- Starting work on a feature to recall past decisions\n- Looking for patterns or conventions used before\n- Finding related code or architectural context\n\n### Storing Facts\n```\nmemory_store_fact(\n entity1: \"UserService\",\n relationship: \"USES\",\n entity2: \"bcrypt\",\n context: \"Password hashing uses bcrypt with 12 rounds\"\n)\n```\nStore important facts as relationships between entities. Use for:\n- Architectural decisions\n- Code patterns and conventions\n- Dependencies and relationships\n- User preferences learned during conversation\n\n### Context Injection\nContext is automatically injected at the start of each session based on the current project. Check `~/.claudetools/session-context.md` for project-specific context.\n\n## Task Management\n\n### Creating Work Plans with Auto-Dispatch\n```\ntask_plan(\n goal: \"Add user authentication\",\n epic_title: \"User Auth System\",\n tasks: [...]\n)\n```\nBreak down complex work into tracked tasks. **Tasks are automatically set to `ready` status.**\n\nAfter `task_plan` completes, you will receive Task tool invocations to spawn parallel agents.\n**Execute ALL Task tool calls in a SINGLE message** to enable parallel execution.\n\n### Parallel Agent Workflow\n1. User describes work needed\n2. Call `task_plan_draft` to present the plan\n3. User says \"go\" to approve\n4. Call `task_plan` - tasks created in `ready` status\n5. Execute the provided Task tool calls in ONE message\n6. Agents work in parallel, each calling `task_complete` when done\n\n### Manual Task Start (Sequential)\n```\ntask_start(task_id: \"task_xxx\")\n```\nClaim a task before working on it. Use for sequential execution.\n\n### Completing Tasks\n```\ntask_complete(task_id: \"task_xxx\", summary: \"Implemented JWT auth with refresh tokens\")\n```\nMark tasks done with a summary of work completed. **Always call this when a task is finished.**\n\n## Codebase Intelligence\n\n### Start with codebase_map() - ALWAYS\n```\ncodebase_map() # FIRST TOOL when exploring unfamiliar code\n```\n**When to use:** Starting a new task, exploring unfamiliar code, understanding project structure, finding entry points.\n\nThe map shows:\n- Project structure and key directories\n- Entry points and their exports\n- Framework detection (React, Express, etc.)\n- Key symbols and their locations\n\n**Use codebase_map BEFORE using Grep/Glob** - it gives you the lay of the land so you know where to look.\n\n### Then use targeted tools\n```\ncodebase_find(\"UserService\") # Find specific symbols/files\ncodebase_context(\"src/auth.ts\") # Get file dependencies\nanalyze_impact(\"validateToken\") # See what changing a function affects\n```\n\n## CodeDNA: Generate Code, Save 99% Tokens\n\n**When creating APIs/CRUD operations:** Call `codedna_generate_api` instead of writing code manually.\n\n```\ncodedna_generate_api({\n spec: \"User(email:string:unique, password:string:hashed, age:integer:min(18))\",\n framework: \"express\",\n options: { auth: true, validation: true, tests: true }\n})\n```\n\n**Generates 6 production files** (models, controllers, routes, validators, auth, tests) in ~5 seconds.\n**Saves:** 30,000 tokens \u2192 200 tokens (99% reduction)\n\n## Best Practices\n\n1. **Search before implementing** - Check memory for existing patterns\n2. **Store decisions** - Save architectural choices as facts\n3. **Use task tracking** - Break complex work into tasks\n4. **Use CodeDNA for APIs** - Generate instead of write (99% token savings)\n<!-- CLAUDETOOLS:END -->\n";
|
|
9
9
|
/**
|
|
10
10
|
* Project-level CLAUDE.md content - added to .claude/CLAUDE.md
|
|
11
11
|
*/
|
|
@@ -82,18 +82,26 @@ Mark tasks done with a summary of work completed. **Always call this when a task
|
|
|
82
82
|
|
|
83
83
|
## Codebase Intelligence
|
|
84
84
|
|
|
85
|
-
###
|
|
85
|
+
### Start with codebase_map() - ALWAYS
|
|
86
86
|
\`\`\`
|
|
87
|
-
codebase_map()
|
|
88
|
-
codebase_find("UserService") # Find symbols/files
|
|
89
|
-
codebase_context("src/auth.ts") # Get file dependencies
|
|
87
|
+
codebase_map() # FIRST TOOL when exploring unfamiliar code
|
|
90
88
|
\`\`\`
|
|
89
|
+
**When to use:** Starting a new task, exploring unfamiliar code, understanding project structure, finding entry points.
|
|
90
|
+
|
|
91
|
+
The map shows:
|
|
92
|
+
- Project structure and key directories
|
|
93
|
+
- Entry points and their exports
|
|
94
|
+
- Framework detection (React, Express, etc.)
|
|
95
|
+
- Key symbols and their locations
|
|
91
96
|
|
|
92
|
-
|
|
97
|
+
**Use codebase_map BEFORE using Grep/Glob** - it gives you the lay of the land so you know where to look.
|
|
98
|
+
|
|
99
|
+
### Then use targeted tools
|
|
93
100
|
\`\`\`
|
|
94
|
-
|
|
101
|
+
codebase_find("UserService") # Find specific symbols/files
|
|
102
|
+
codebase_context("src/auth.ts") # Get file dependencies
|
|
103
|
+
analyze_impact("validateToken") # See what changing a function affects
|
|
95
104
|
\`\`\`
|
|
96
|
-
See what would be affected by changing a function.
|
|
97
105
|
|
|
98
106
|
## CodeDNA: Generate Code, Save 99% Tokens
|
|
99
107
|
|
|
@@ -48,6 +48,21 @@ export function buildOrchestratorPrompt(params) {
|
|
|
48
48
|
<!-- Layer 2: Behavioral Guidelines -->
|
|
49
49
|
<behavioral_guidelines>
|
|
50
50
|
<core_behaviors>
|
|
51
|
+
<behavior id="understand_first" priority="CRITICAL">
|
|
52
|
+
BEFORE creating a task plan, understand the codebase:
|
|
53
|
+
|
|
54
|
+
1. Call codebase_map() FIRST
|
|
55
|
+
→ See project structure, entry points, frameworks
|
|
56
|
+
→ Identify which areas of the codebase are relevant
|
|
57
|
+
→ Understand existing patterns before planning changes
|
|
58
|
+
|
|
59
|
+
2. Call memory_search() for past decisions
|
|
60
|
+
→ Check for architectural constraints
|
|
61
|
+
→ Find relevant patterns already established
|
|
62
|
+
|
|
63
|
+
This ensures your plan fits the existing codebase architecture.
|
|
64
|
+
</behavior>
|
|
65
|
+
|
|
51
66
|
<behavior id="delegation_first" priority="CRITICAL">
|
|
52
67
|
NEVER write implementation code in task descriptions or prompts.
|
|
53
68
|
NEVER provide step-by-step implementation guides with code snippets.
|
|
@@ -92,18 +92,24 @@ function buildBehavioralSection(taskId) {
|
|
|
92
92
|
<behavior id="tool_first" priority="MANDATORY">
|
|
93
93
|
BEFORE writing code, use available tools:
|
|
94
94
|
|
|
95
|
-
1.
|
|
95
|
+
1. codebase_map: START HERE - Get project overview
|
|
96
|
+
→ Understand project structure and key entry points
|
|
97
|
+
→ Identify frameworks and patterns in use
|
|
98
|
+
→ Find relevant directories before diving in
|
|
99
|
+
→ Use BEFORE Grep/Glob for unfamiliar code
|
|
100
|
+
|
|
101
|
+
2. memory_search: Check for existing patterns and decisions
|
|
96
102
|
→ "How was authentication implemented?"
|
|
97
103
|
→ "What patterns are used for X?"
|
|
98
104
|
|
|
99
|
-
|
|
105
|
+
3. codebase_find: Find specific symbols/files
|
|
100
106
|
→ Search for existing code to extend/adapt
|
|
101
107
|
|
|
102
|
-
3. docs_get: Retrieve cached documentation
|
|
103
|
-
→ Get up-to-date API references
|
|
104
|
-
|
|
105
108
|
4. codebase_context: Understand file dependencies
|
|
106
109
|
→ See what a file imports/exports
|
|
110
|
+
|
|
111
|
+
5. docs_get: Retrieve cached documentation
|
|
112
|
+
→ Get up-to-date API references
|
|
107
113
|
</behavior>
|
|
108
114
|
|
|
109
115
|
<behavior id="minimal_changes" priority="IMPORTANT">
|