Configures Claude Code hooks and Codex hooks.json/notify. Use when adding PreToolUse guards, Stop hooks, managed hooks, format-on-save, preflight, audits, or worktree/budget hooks.
日本語の概要は準備中です。原文の説明を表示しています。
Applies planning/search theory (A*, CSP, MCTS, PDDL, HTN) to agents. Use when ordering tool calls, enforcing preconditions before side effects, or validating a plan.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Each primitive is expanded in references/primitives-overview.md. Use references/patterns-scenarios-traps.md for scenario recipes and references/formal-theory-map.md when completeness, optimality, or complexity claims matter.
| # | Primitive | Problem It Solves | Failure Mode Addressed | Key Parameters |
|---|---|---|---|---|
| 1 | Problem Formulation | Vague tasks cannot be searched or verified | Agent cannot know what counts as legal progress | State, actions, transition model, goal test, path cost |
| 2 | Uninformed Search | Need complete baseline without domain heuristic | No baseline for completeness, optimality, or frontier explosion | Branching factor b; depth d; frontier policy |
| 3 | Heuristic Search | Large state spaces need directed exploration | State space explodes because exploration is undirected | Heuristic h(n); admissibility; consistency |
| 4 | Local Search | State is large but path is irrelevant | Path-tracking wastes memory when only final configuration matters | Neighborhood; objective; restart/schedule |
| 5 | Constraint Satisfaction | Need assignments satisfying hard constraints | Constraints are mixed into prompts instead of enforced structurally | Variables, domains, constraints, MRV/LCV, arc consistency |
| 6 | Adversarial Search | Opponent actions affect outcomes | Opponent response is ignored or treated as noise | Utility, depth, alpha-beta bounds, rollout policy |
| 7 | Classical Planning | Need valid action sequence from symbolic preconditions/effects | Preconditions and effects are implicit, so invalid plans pass review | STRIPS/PDDL, progression/regression, plan graph |
| 8 | Hierarchical Planning | Tasks decompose into reusable subplans | Repeated task decomposition is ad hoc and inconsistent | Methods, subtasks, ordering constraints |
| 9 | Contingent / Belief-State Planning | Partial observability or nondeterministic actions | Plan assumes full observability or deterministic actions | Belief state, sensing actions, policy vs sequence |
| 10 | Planner-Agent Integration | LLM agent needs explicit plan validity and search boundaries | LLM tool loop lacks plan validation, replanning, or bounded search | Planner tool, state abstraction, verifier, replanning trigger |
Apply this skill when:
Skip or route elsewhere when:
software-search or ai-rag.foundations-decision-theory.foundations-control-theory.foundations-game-theory.foundations-team-theory.ai-agents after this skill defines the planner boundary.| Anti-Pattern | Planning/Search Diagnosis | Fix |
|---|---|---|
| "Ask the LLM to plan" with no state model | No legal-action or goal-test boundary | Define state, action schema, preconditions, effects, and cost (#1, #7) |
| Greedy search used where optimality is promised | Heuristic is not an admissible cost lower bound | Use A* with admissible/consistent heuristic or stop promising optimality (#3) |
| BFS on high branching factor without depth bound | Frontier blowup | Use UCS/A*, iterative deepening, pruning, or abstraction (#2, #3) |
| Constraints buried in prompt prose | Violations are discovered after execution | Model as CSP with propagation and backtracking (#5) |
| Minimax for real-world negotiation | Payoffs and strategies are not a finite game tree | Route incentive/equilibrium design to foundations-game-theory (#6 boundary) |
| PDDL generated but never validated | Planner accepts malformed or semantically wrong domain | Run domain/problem validation and check plan preconditions/effects (#7) |
| Replanning on every token/tool call | Planner-agent boundary is too fine-grained | Replan only on state drift, failed precondition, or new observation (#10) |
| Treating a valid plan as a safe plan | Validity checks preconditions/effects; it does not check whether the goal or path is one that should be executed | Add a separate safety/permission gate over the action set — validity and safety are independent axes (#7, #10) |
| Adding tree search to raise accuracy without a verifier | Search amplifies the scoring signal; an unreliable scorer just finds higher-confidence errors faster | Establish scorer/verifier reliability first, then compare against best-of-N at matched compute, bucketed by difficulty, before adopting tree/beam search (#3, #6) |
| Misuse | Why It Is Wrong | Required Correction |
|---|---|---|
| Calling a prompt outline a plan | It has no executable action model or validity check | Convert to state/action/precondition/effect model |
| Treating local optimum as global optimum | Local search is incomplete without strong assumptions | Use restarts, exact search for small instances, or state the approximation |
| Using A* with an overestimating heuristic while claiming optimality | A* optimality depends on admissibility/consistency | Prove h(n) <= true remaining cost or downgrade claim |
| Modeling soft preferences as hard CSP constraints | Search may become infeasible for avoidable reasons | Separate hard constraints from weighted objectives |
| Using adversarial search for cooperative teams | Cooperative information structure has different primitives | Route to foundations-team-theory |
| Treating partial observability as deterministic planning | Actions may need sensing and contingencies | Use belief-state or contingent planning (#9) |
| Inferring plan safety from planning competence | Measured separately, the two do not track each other: a model can be near-perfect at producing executable plans and still route a large fraction of tasks through dangerous actions | Gate the action set independently of the planner's success metric (#10) |
Before claiming a search guarantee, load the guarantee matrix: finite branching and nonnegative costs alone do not establish UCS/A* completeness in infinite spaces; the standard bound requires step costs bounded below by positive epsilon. A* graph search must reopen improved states with an admissible but inconsistent heuristic, or use consistency when permanently closing nodes. Planner validity requires correct action preconditions/effects. Do not invent benchmark numbers. If a planner or solver is recommended, report assumptions, problem size, and validation cases instead of generic speed claims.
LLM planning benchmark numbers move fast and are rarely comparable across papers: success rate depends on domain, instance size, prompt encoding, number of retries, and whether a verifier was in the loop. Cite the specific setup or state the result qualitatively; do not carry a headline percentage across domains.
Failure: Agent produces plausible steps that violate tool preconditions.
Failure: Recommendations violate compatibility, license, budget, or availability constraints.
foundations-decision-theory when expected value or risk weighting matters.Failure: Agent picks locally good moves and misses opponent responses.
foundations-game-theory.Failure: Task decomposition is repeated manually and varies across runs.
foundations-grounding-communication for handoff repair and common-ground checks.Failure: A planner or agent loop that passed every walkthrough degrades or breaks under real traffic.
Before claiming a guarantee, record a one-row guarantee ledger:
claim | algorithm | model assumptions | runtime limits | verifier | counterexample test.
Completeness or optimality belongs to the modeled problem, not automatically to
the real executor. If preconditions, effects, costs, observability, or resource
limits differ in production, report the result as a validated heuristic plan
rather than inheriting the algorithm's theorem.
failed-precondition and goal-unmet also exit 0); read status or pass --strict.data/sources.jsonfoundations-decision-theory - utility, value of information, regret, and bandits.foundations-control-theory - feedback loops, stability, and MPC.foundations-game-theory - incentives, equilibrium, mechanism design, and strategic actors.foundations-team-theory - cooperative multi-agent allocation with shared payoff.foundations-grounding-communication - handoff repair and common-ground checks for HTN workflow planners.foundations-mathematical-optimization - scheduling, allocation, and CP-SAT for duration/resource/precedence problems without state-dependent preconditions.foundations-formal-methods - LLM-generated formal specifications and sound-tool verification, the same pattern this skill applies to PDDL.When prior decisions or pitfalls are relevant, consult learnings.consolidated.md if present; use learnings.md only for needed history or as the available fallback. Otherwise skip both.
After applying it, if you encountered a pattern worth remembering, a mistake worth preventing, or a domain fact that surprised you, append one dated bullet to learnings.md via agents-skills-feedback-loop/scripts/append_learning.py. Do not modify SKILL.md itself.
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Configures Claude Code hooks and Codex hooks.json/notify. Use when adding PreToolUse guards, Stop hooks, managed hooks, format-on-save, preflight, audits, or worktree/budget hooks.
日本語の概要は準備中です。原文の説明を表示しています。
Configures and hardens Claude Code and Codex MCP servers. Use when connecting databases, APIs, SaaS, building servers, or serving a clearance-filtered knowledge base.
日本語の概要は準備中です。原文の説明を表示しています。
Owns instruction files: AGENTS.md, CLAUDE.md, personal and repo rules. Use when writing, pruning, auditing them, sharing rules across Claude and Codex, or fixing ignored rules.
日本語の概要は準備中です。原文の説明を表示しています。
Creates and audits agent skills: SKILL.md, references, scripts, runtime metadata. Use when writing, validating, or security-reviewing a skill, or fixing truncated skill listings.
日本語の概要は準備中です。原文の説明を表示しています。
Adds per-skill learnings loops for dated patterns, mistakes, and domain facts. Use when wiring skill memory, consolidation, or drift audits.
日本語の概要は準備中です。原文の説明を表示しています。
Chooses subagent, team, workflow, or debate and launches it on Claude Code or Codex. Use when delegating, running agent review boards, or installing shared agents.
日本語の概要は準備中です。原文の説明を表示しています。