writing-skills
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
forage-solutionsAI solution exploration using ant colony optimization — deploying scout hypotheses, reinforcing promising approaches, detecting diminishing returns, and knowing when to abandon a strategy. Use when facing a problem with multiple plausible approaches and no clear winner, when the first approach is not working but alternatives are unclear, when debugging with…
Independent GitHub snapshot · Automated classification · Original documentation governs
Explore solution space via ant colony opt — deploy indep hypotheses as scouts, reinforce promising via evidence, detect diminishing returns, know when abandon strategy + explore elsewhere.
build-coherence when space must be explored before decisionBefore deploying, characterize shape.
Solution Distribution Types:
┌────────────────────┬──────────────────────────────────────────────────┐
│ Type │ Characteristics and Strategy │
├────────────────────┼──────────────────────────────────────────────────┤
│ Concentrated │ One correct answer exists (bug fix, syntax │
│ (one right fix) │ error). Deploy many scouts quickly to locate │
│ │ it. Exploit immediately when found │
├────────────────────┼──────────────────────────────────────────────────┤
│ Distributed │ Multiple valid approaches (architecture choice, │
│ (many valid paths) │ implementation strategy). Scouts assess quality │
│ │ of each. Use `build-coherence` to choose │
├────────────────────┼──────────────────────────────────────────────────┤
│ Ephemeral │ Solutions depend on timing or sequence (race │
│ (time-sensitive) │ conditions, order-dependent bugs). Fast scouting │
│ │ with immediate exploitation. Cannot revisit │
├────────────────────┼──────────────────────────────────────────────────┤
│ Nested │ Solving the surface problem reveals a deeper one │
│ (layers of cause) │ (config issue masking an architecture problem). │
│ │ Scout at each layer before committing to depth │
└────────────────────┴──────────────────────────────────────────────────┘
Classify. Distribution type → how many scouts + how fast switch exploration → exploitation.
→ Clear characterization informs scouting. Feels accurate not forced.
If err: completely unknown → itself = classification. Treat as potentially distributed + deploy broad scouts. First round reveals character.
Gen indep hypotheses as scouts. Each probes diff direction.
Scout Deployment Template:
┌───────┬──────────────────────┬──────────────────────┬──────────┐
│ Scout │ Hypothesis │ Test (one action) │ Promise │
├───────┼──────────────────────┼──────────────────────┼──────────┤
│ 1 │ │ │ High/Med/│
│ 2 │ │ │ Low │
│ 3 │ │ │ │
│ 4 │ │ │ │
│ 5 │ │ │ │
└───────┴──────────────────────┴──────────────────────┴──────────┘
Key: scouts assess not exploit. Quick signal each, not deep investigation first promising.
→ 3-5 indep hypotheses + cheap tests. None deeply explored yet — breadth-first pass.
If err: <3 hypotheses → (a) very constrained (concentrated — good, scout aggressive) or (b) understanding too shallow (read more context). Hypotheses not indep (variations same) → too narrow, force ≥1 contradicting others.
After scout results, reinforce promising, let weak decay.
Trail Reinforcement Decision:
┌───────────────────────────┬──────────────────────────────────────┐
│ Scout Result │ Action │
├───────────────────────────┼──────────────────────────────────────┤
│ Strong supporting evidence│ REINFORCE — deepen investigation │
│ Weak supporting evidence │ HOLD — one more cheap test before │
│ │ committing │
│ No evidence │ DECAY — deprioritize, scout elsewhere│
│ Contradicting evidence │ INHIBIT — mark as dead end │
│ Ambiguous result │ REFINE — hypothesis was too vague, │
│ │ sharpen and re-scout │
└───────────────────────────┴──────────────────────────────────────┘
→ Clear prioritization on evidence not preference. Strongest gets most but ≥1 alt alive.
If err: all empty → hypotheses wrong, not approach. Reframe: "What assumptions could be wrong?" Gen new from diff angle. All strong → distributed (multiple valid) → build-coherence for selection.
Monitor yield. Info per effort drops below avg across all → switch.
Marginal Value Assessment:
┌────────────────────────┬──────────────────────────────────────────┐
│ Signal │ Action │
├────────────────────────┼──────────────────────────────────────────┤
│ New information per │ CONTINUE — this trail is productive │
│ action is high │ │
├────────────────────────┼──────────────────────────────────────────┤
│ New information per │ PREPARE TO SWITCH — squeeze remaining │
│ action is declining │ value, begin scouting alternatives │
├────────────────────────┼──────────────────────────────────────────┤
│ Last 2-3 actions │ SWITCH — the trail is depleted. The cost │
│ yielded nothing new │ of staying exceeds the cost of switching │
├────────────────────────┼──────────────────────────────────────────┤
│ Information contradicts│ SWITCH IMMEDIATELY — not just depleted │
│ earlier findings │ but misleading. Cut losses │
└────────────────────────┴──────────────────────────────────────────┘
Important: factor switching cost. Moving to new hypothesis = loading new context = cost. Don't switch marginal gains → only when clearly depleted.
→ Deliberate continue or switch on yield assessment, not habit/frustration. Switches evidence-based not impulse.
If err: switching too frequent (oscillation) → switching cost undervalued. Commit to current N more actions before reassess. Never switching (stuck despite declining) → hard cap: after N unproductive, switch regardless sunk cost.
Based on results → select next phase.
build-coherence to select→ Strategic decision next phase follows logically from results. Feels like conclusion not guess.
If err: no strategy feels right → foraging revealed genuine uncertainty, valid outcome. Communicate to user: "Explored N, found X. Most promising Y because Z. Pursue or additional context?"
forage-resources — multi-agent foraging model this adapts to single-agentbuild-coherence — foraging reveals multiple valid needing evalcoordinate-reasoning — manages info flow between scout hypotheses + exploitationawareness — monitors premature convergence + tunnel vision during foraging