| name | pddl-applicable-actions |
| description | Must be used whenever the user asks which actions are applicable, available, legal, or possible in a PDDL state — regardless of how small or "obvious" the problem looks. Triggers: "what actions can I take", "applicable actions", "available actions", "legal moves", "what can be done next", "possible actions from this state", "enumerate actions", given a domain + problem + optional partial plan. Do not attempt to enumerate applicable actions by reading PDDL manually: human-style enumeration consistently miscounts, hallucinates inapplicable actions, and confuses similarly-named action variants (e.g. push-to-goal vs push-to-nongoal). The bundled script is the only authoritative source — invoke it on every such request.
|
PDDL Applicable Actions Skill
Given a domain, problem, and optional partial plan, enumerate every fully
grounded action whose preconditions are satisfied in the current state.
Step 1: Read the Domain and Problem
Read the domain and problem files to understand:
- All action schemas and their parameters, preconditions, and effects
- All typed objects declared in the problem
- The initial state (set of ground atoms)
If anything is unclear, consult references/pddl_syntax.md.
Step 2: Run the Script
Run the applicable actions script. It validates the partial plan (if any),
simulates the resulting state, and enumerates all applicable grounded actions:
uv run python scripts/applicable_actions.py domain.pddl problem.pddl [plan.txt]
- If
plan.txt is omitted, the current state is the initial state.
- If the partial plan contains an invalid action (unknown or inapplicable),
the script prints an error to stderr and exits with code 1. Report the error
to the user and stop.
- If valid (or no plan provided), the script prints one applicable grounded
action per line, sorted lexicographically.
Step 3: Present Results
Present the script output to the user, one action per line:
(action-name arg1 arg2)
If no actions are applicable, say so explicitly.
References
- PDDL syntax:
references/pddl_syntax.md
- Common failure modes:
references/debugging_guide.md