iiRecord
Agentic AI Atlas · GAP-PROMPT-009: Tool Preference and Usage Rules
page:docs-harness-features-backlog-gaps-prompt-engineering-gap-prompt-009a5c.ai
II.
Page JSON

page:docs-harness-features-backlog-gaps-prompt-engineering-gap-prompt-009

Structured · live

GAP-PROMPT-009: Tool Preference and Usage Rules json

Inspect the normalized record payload exactly as the atlas UI reads it.

File · wiki/docs/harness-features-backlog/gaps/prompt-engineering/gap-prompt-009.mdCluster · wiki
Record JSON
{
  "id": "page:docs-harness-features-backlog-gaps-prompt-engineering-gap-prompt-009",
  "_kind": "Page",
  "_file": "wiki/docs/harness-features-backlog/gaps/prompt-engineering/gap-prompt-009.md",
  "_cluster": "wiki",
  "attributes": {
    "nodeKind": "Page",
    "sourcePath": "docs/harness-features-backlog/gaps/prompt-engineering/GAP-PROMPT-009.md",
    "sourceKind": "repo-docs",
    "title": "GAP-PROMPT-009: Tool Preference and Usage Rules",
    "displayName": "GAP-PROMPT-009: Tool Preference and Usage Rules",
    "slug": "docs/harness-features-backlog/gaps/prompt-engineering/gap-prompt-009",
    "articlePath": "wiki/docs/harness-features-backlog/gaps/prompt-engineering/GAP-PROMPT-009.md",
    "article": "\n# GAP-PROMPT-009: Tool Preference and Usage Rules\n\n| Field | Value |\n|-------|-------|\n| Category | prompt-engineering |\n| Priority | High |\n| Effort | S |\n| Status | Missing |\n\n## Description\nInclude tool preference and usage rules in task prompts when delegating to harnesses with agentic tool access. Prevents common mistakes like using Bash for file operations when dedicated tools exist, blind file overwrites without reading first, and inefficient tool usage patterns.\n\n## Current State\nCC's system prompt includes explicit tool preference rules (\"Use Read instead of cat\", \"Use Edit instead of sed\", \"Use Grep instead of grep\"). The agentic tools module (`packages/sdk/src/harness/agenticTools.ts`) defines tools for Pi sessions but does not include meta-instructions about tool selection. When Pi sessions use agentic tools, the agent lacks guidance on when to prefer which tool.\n\n## Target State\nA `toolPreferences` prompt section injected when tasks involve agentic tool access. Includes: dedicated tool preference over Bash, read-before-edit enforcement, efficient search patterns (Grep over bash grep). Adapts rules based on which tools are available in the target harness. Configurable per harness adapter.\n\n## Dependencies\n- [GAP-PROMPT-001](../prompt-engineering/GAP-PROMPT-001.md) -- strata model for section placement\n- [GAP-PROMPT-002](../prompt-engineering/GAP-PROMPT-002.md) -- capability projection to know which tools are available\n\n## Key Files\n| Component | Path |\n|-----------|------|\n| Prompts module | `packages/sdk/src/prompts/` |\n| Agentic tools | `packages/sdk/src/harness/agenticTools.ts` |\n| CC prompt phrasing analysis | [`11-prompt-phrasing-analysis.md`](../../11-prompt-phrasing-analysis.md) -- Section 3 (Tool Preference Rules) and Section 7 (Tool Descriptions) have exact phrasing |\n\n## Recommendation\nPhase 2 implementation. Small effort -- extract tool preference rules from CC phrasing analysis, inject into agentic tools system prompt preamble.\n",
    "documents": []
  },
  "outgoingEdges": [],
  "incomingEdges": [
    {
      "from": "page:docs-harness-features-backlog",
      "to": "page:docs-harness-features-backlog-gaps-prompt-engineering-gap-prompt-009",
      "kind": "contains_page"
    }
  ]
}