@compilr-dev/sdk 0.1.11 → 0.1.12

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.
package/dist/index.d.ts CHANGED
@@ -45,7 +45,7 @@ export { type ModelTier, type TierInfo, type ProviderModelMap, MODEL_TIERS, TIER
45
45
  export { assembleTools, deduplicateTools } from './tools.js';
46
46
  export { MetaToolsRegistry, createMetaTools, META_TOOLS_SYSTEM_PROMPT_PREFIX, } from './meta-tools/index.js';
47
47
  export type { MetaToolStats, MetaTools } from './meta-tools/index.js';
48
- export { SystemPromptBuilder, buildSystemPrompt, detectGitRepository, getModuleStats, ALL_MODULES, IDENTITY_MODULE, STYLE_MODULE, TASK_EXECUTION_MODULE, TODO_MANAGEMENT_MODULE, TOOL_USAGE_DIRECT_MODULE, TOOL_USAGE_META_MODULE, DELEGATION_MODULE, GIT_SAFETY_MODULE, SUGGEST_MODULE, IMPORTANT_RULES_MODULE, ENVIRONMENT_MODULE, shouldIncludeModule, getEstimatedTokensForConditions, getTotalEstimatedTokens, } from './system-prompt/index.js';
48
+ export { SystemPromptBuilder, buildSystemPrompt, detectGitRepository, getModuleStats, ALL_MODULES, IDENTITY_MODULE, STYLE_MODULE, TASK_EXECUTION_MODULE, TODO_MANAGEMENT_MODULE, TOOL_USAGE_DIRECT_MODULE, TOOL_USAGE_HINTS_MODULE, TOOL_USAGE_META_MODULE, DELEGATION_MODULE, GIT_SAFETY_MODULE, SUGGEST_MODULE, IMPORTANT_RULES_MODULE, ENVIRONMENT_MODULE, shouldIncludeModule, getEstimatedTokensForConditions, getTotalEstimatedTokens, } from './system-prompt/index.js';
49
49
  export type { SystemPromptContext, BuildResult, SystemPromptModule, ModuleConditions, } from './system-prompt/index.js';
50
50
  export type { ProjectType, ProjectStatus, RepoPattern, WorkflowMode, LifecycleState, WorkItemType, WorkItemStatus, WorkItemPriority, GuidedStep, DocumentType, PlanStatus, Project, WorkItem, ProjectDocument, Plan, PlanSummary, PlanWithWorkItem, HistoryEntry, CreateProjectInput, UpdateProjectInput, ProjectListOptions, CreateWorkItemInput, UpdateWorkItemInput, QueryWorkItemsInput, CreateDocumentInput, UpdateDocumentInput, CreatePlanInput, UpdatePlanInput, ListPlansOptions, WorkItemQueryResult, ProjectListResult, BulkCreateItem, IProjectRepository, IWorkItemRepository, IDocumentRepository, IPlanRepository, IAnchorService, IArtifactService, IEpisodeService, AnchorData, ArtifactType, ArtifactData, ArtifactSummaryData, WorkEpisode, ProjectWorkSummary, PlatformContext, PlatformToolsConfig, PlatformHooks, StepCriteria, } from './platform/index.js';
51
51
  export { createPlatformTools, createProjectTools, createWorkItemTools, createDocumentTools, createPlanTools, createBacklogTools, createAnchorTools, createArtifactTools, createEpisodeTools, } from './platform/index.js';
package/dist/index.js CHANGED
@@ -71,7 +71,7 @@ export {
71
71
  // Builder
72
72
  SystemPromptBuilder, buildSystemPrompt, detectGitRepository, getModuleStats,
73
73
  // Module constants
74
- ALL_MODULES, IDENTITY_MODULE, STYLE_MODULE, TASK_EXECUTION_MODULE, TODO_MANAGEMENT_MODULE, TOOL_USAGE_DIRECT_MODULE, TOOL_USAGE_META_MODULE, DELEGATION_MODULE, GIT_SAFETY_MODULE, SUGGEST_MODULE, IMPORTANT_RULES_MODULE, ENVIRONMENT_MODULE,
74
+ ALL_MODULES, IDENTITY_MODULE, STYLE_MODULE, TASK_EXECUTION_MODULE, TODO_MANAGEMENT_MODULE, TOOL_USAGE_DIRECT_MODULE, TOOL_USAGE_HINTS_MODULE, TOOL_USAGE_META_MODULE, DELEGATION_MODULE, GIT_SAFETY_MODULE, SUGGEST_MODULE, IMPORTANT_RULES_MODULE, ENVIRONMENT_MODULE,
75
75
  // Module utilities
76
76
  shouldIncludeModule, getEstimatedTokensForConditions, getTotalEstimatedTokens, } from './system-prompt/index.js';
77
77
  // =============================================================================
@@ -19,7 +19,7 @@ export type WorkItemType = 'feature' | 'bug' | 'tech-debt' | 'chore';
19
19
  export type WorkItemStatus = 'backlog' | 'in_progress' | 'completed' | 'skipped';
20
20
  export type WorkItemPriority = 'critical' | 'high' | 'medium' | 'low';
21
21
  export type GuidedStep = 'plan' | 'implement' | 'test' | 'commit' | 'review';
22
- export type DocumentType = 'prd' | 'architecture' | 'design' | 'notes' | 'plan';
22
+ export type DocumentType = 'prd' | 'architecture' | 'design' | 'notes' | 'plan' | 'app-model';
23
23
  export type PlanStatus = 'draft' | 'approved' | 'in_progress' | 'completed' | 'abandoned';
24
24
  export interface Project {
25
25
  id: number;
@@ -31,4 +31,4 @@
31
31
  * ```
32
32
  */
33
33
  export { SystemPromptBuilder, buildSystemPrompt, detectGitRepository, getModuleStats, type SystemPromptContext, type BuildResult, } from './builder.js';
34
- export { ALL_MODULES, IDENTITY_MODULE, STYLE_MODULE, TASK_EXECUTION_MODULE, TODO_MANAGEMENT_MODULE, TOOL_USAGE_DIRECT_MODULE, TOOL_USAGE_META_MODULE, DELEGATION_MODULE, GIT_SAFETY_MODULE, SUGGEST_MODULE, IMPORTANT_RULES_MODULE, ENVIRONMENT_MODULE, shouldIncludeModule, getEstimatedTokensForConditions, getTotalEstimatedTokens, type SystemPromptModule, type ModuleConditions, } from './modules.js';
34
+ export { ALL_MODULES, IDENTITY_MODULE, STYLE_MODULE, TASK_EXECUTION_MODULE, TODO_MANAGEMENT_MODULE, TOOL_USAGE_DIRECT_MODULE, TOOL_USAGE_HINTS_MODULE, TOOL_USAGE_META_MODULE, DELEGATION_MODULE, GIT_SAFETY_MODULE, SUGGEST_MODULE, IMPORTANT_RULES_MODULE, ENVIRONMENT_MODULE, shouldIncludeModule, getEstimatedTokensForConditions, getTotalEstimatedTokens, type SystemPromptModule, type ModuleConditions, } from './modules.js';
@@ -31,4 +31,4 @@
31
31
  * ```
32
32
  */
33
33
  export { SystemPromptBuilder, buildSystemPrompt, detectGitRepository, getModuleStats, } from './builder.js';
34
- export { ALL_MODULES, IDENTITY_MODULE, STYLE_MODULE, TASK_EXECUTION_MODULE, TODO_MANAGEMENT_MODULE, TOOL_USAGE_DIRECT_MODULE, TOOL_USAGE_META_MODULE, DELEGATION_MODULE, GIT_SAFETY_MODULE, SUGGEST_MODULE, IMPORTANT_RULES_MODULE, ENVIRONMENT_MODULE, shouldIncludeModule, getEstimatedTokensForConditions, getTotalEstimatedTokens, } from './modules.js';
34
+ export { ALL_MODULES, IDENTITY_MODULE, STYLE_MODULE, TASK_EXECUTION_MODULE, TODO_MANAGEMENT_MODULE, TOOL_USAGE_DIRECT_MODULE, TOOL_USAGE_HINTS_MODULE, TOOL_USAGE_META_MODULE, DELEGATION_MODULE, GIT_SAFETY_MODULE, SUGGEST_MODULE, IMPORTANT_RULES_MODULE, ENVIRONMENT_MODULE, shouldIncludeModule, getEstimatedTokensForConditions, getTotalEstimatedTokens, } from './modules.js';
@@ -62,6 +62,13 @@ export declare const TODO_MANAGEMENT_MODULE: SystemPromptModule;
62
62
  * Lists tools that are always available
63
63
  */
64
64
  export declare const TOOL_USAGE_DIRECT_MODULE: SystemPromptModule;
65
+ /**
66
+ * Tool usage hints module - always included
67
+ * Behavioral guidance removed from tool descriptions (Phase 1a optimization).
68
+ * These hints are load-bearing: bash background workflow, todo/backlog
69
+ * disambiguation, file pagination, edit matching, suggest quality.
70
+ */
71
+ export declare const TOOL_USAGE_HINTS_MODULE: SystemPromptModule;
65
72
  /**
66
73
  * Tool usage module (meta-tools) - only if enableMetaTools=true
67
74
  * Explains how to use specialized tools via meta-tools
@@ -143,6 +143,24 @@ IMPORTANT: Tool names are lowercase with underscores.
143
143
  - **User interaction**: ask_user, ask_user_simple
144
144
  - **Sub-agents**: task (types: explore, code-review, plan, debug, test-runner, refactor, security-audit, general)`,
145
145
  };
146
+ /**
147
+ * Tool usage hints module - always included
148
+ * Behavioral guidance removed from tool descriptions (Phase 1a optimization).
149
+ * These hints are load-bearing: bash background workflow, todo/backlog
150
+ * disambiguation, file pagination, edit matching, suggest quality.
151
+ */
152
+ export const TOOL_USAGE_HINTS_MODULE = {
153
+ id: 'tool-usage-hints',
154
+ name: 'Tool Usage Hints',
155
+ estimatedTokens: 120,
156
+ content: `## Tool Usage Hints
157
+
158
+ - **bash background:** For long-running commands (builds, servers, watchers), set \`run_in_background: true\` and poll with \`bash_output\`. Never wait indefinitely.
159
+ - **todo vs backlog:** \`todo_write\` is for ephemeral session tasks (lost on exit). For persistent project backlog, use \`workitem_*\` tools.
160
+ - **Large files:** When reading files >500 lines, use \`maxLines\`/\`startLine\` to paginate. Avoid loading entire large files into context.
161
+ - **edit matching:** \`edit\` uses exact string matching. Provide enough surrounding context to make the match unique. If the match fails, read the file first to get the exact text.
162
+ - **suggest quality:** Suggestions should be specific and actionable (e.g., "run npm test" not "continue working").`,
163
+ };
146
164
  /**
147
165
  * Tool usage module (meta-tools) - only if enableMetaTools=true
148
166
  * Explains how to use specialized tools via meta-tools
@@ -294,6 +312,7 @@ export const ALL_MODULES = [
294
312
  TASK_EXECUTION_MODULE,
295
313
  TODO_MANAGEMENT_MODULE,
296
314
  TOOL_USAGE_DIRECT_MODULE,
315
+ TOOL_USAGE_HINTS_MODULE,
297
316
  TOOL_USAGE_META_MODULE, // Conditional: enableMetaTools
298
317
  DELEGATION_MODULE,
299
318
  GIT_SAFETY_MODULE, // Conditional: hasGit
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compilr-dev/sdk",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "description": "Universal agent runtime for building AI-powered applications",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",