htn-planner
Skill1 starsChanged 30 days agoMITView on GitHub
Decompose software objectives into deterministic Hierarchical Task Networks (HTN) with methods, subtasks, and precondition guards. Use when planning a compound coding task, breaking a feature into ordered subtasks, choosing between a vertical event slice and a de-risking spike, or persisting task state to plans/tasks.json or libSQL.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- kunwl123456/zeroclaw-skills-collectiontheir own version, first seen Feb 19, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- kunwl123456/zeroclaw-skills-collection★ 27same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- codacy-analysis-cliSkill
- codacy-cloud-cliSkill
- codacy-code-reviewSkill
- configure-codacy-cloudSkill
- configure-codacySkill
- crates-io-name-checkSkill
- event-modelerSkill
- fail-closed-proxySkill
- harnessSkill
- issue-to-prSkill
- move-only-decompositionSkill
- nested-build-isolationSkill
- npm-github-publishSkill
- pr-triageSkill
- setup-coverageSkill
- skill-creatorSkill
- skill-distillerSkill
- spike-runnerSkill
- tokio-performanceSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 42
Check method preconditions before selecting a method.
- Very specific: line 45
When decomposition is justified and applied, persist current method state and subtask index into plans/tasks.json or libSQL.
- Distinctive: line 46
Never advance subtask pointer until the corresponding sensor passes with exit code 0.
- Very specific: line 47
When a decomposed subtask carries high uncertainty, delegate to .agents/skills/spike-runner before advancing.
- Very specific: line 49
Do not decompose a task that lacks a specified domain requirement — the precondition of Vertical Event Slice is unmet.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
HTN Planner Skill
Purpose
Decompose incoming software objectives into deterministic Hierarchical Task Networks (HTN) using methods, subtasks, and precondition guards.
Method Catalog
Method: Vertical Event Slice
- Preconditions: Domain requirement specified, target entities known.
- Subtasks:
define-event-schema: Write Command, Event, and State types.write-acceptance-test: Create Red ATDD test fixtures.implement-slice: Write domain logic and event handler.verify-sensors: Runcargo check,cargo test, andcargo clippy.distill-learning: Record heuristics in libSQL.
Method: Spike & Resolve
- Preconditions: High API uncertainty, third-party crate ambiguity, or performance unknown.
- Subtasks:
create-spike: Generate isolated test scratchpad intests/spikes/.execute-spike: Run computational verification against minimal prototype.record-findings: Store outcome in.do-harness/agent_state.db.clean-spike: Remove ephemeral files.transition-to-slice: InvokeVertical Event Slicemethod.
Execution Rules
- Before repository-dependent decomposition or persisting a plan, run the harness freshness step (
bash .agents/skills/harness/scripts/latest-main.sh [--read-only]). Read-only planning observes remote state via--read-onlywithout writing Git, DB, or working-tree state, and reports advertised SHA and local HEAD separately. Cleanmaincan fast-forward only; dirty/diverged/in-progress branches are never reset, auto-stashed, or automatically rebased. Fetch or network failure blocks claims of freshness; do not substitute stale source as latest. - Check method preconditions before selecting a method; if they are unmet, pick the matching alternative or defer.
- Scope the method to the work: apply HTN decomposition only to genuinely multi-step or dependent requests. Trivial or isolated changes (a typo, a rename, a one-file fix) take the ordinary scoped route without plan artifacts.
- Completing a slice does not compel a skill update: review the outcome for reusable learning, and distill only when a repeated or consequential failure supplies distilled evidence (see
.agents/skills/skill-distiller). - When decomposition is justified and applied, persist current method state and subtask index into
plans/tasks.jsonor libSQL. - Never advance subtask pointer until the corresponding sensor passes with exit code 0.
- When a decomposed subtask carries high uncertainty, delegate to
.agents/skills/spike-runnerbefore advancing.
Gotchas
- Do not decompose a task that lacks a specified domain requirement — the precondition of
Vertical Event Sliceis unmet. - A spike decision is made at planning time, not discovered mid-implementation.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

