refactor: documentation, bug fixes, test coverage, and GOAP rewrite#1
Open
vantreeseba wants to merge 23 commits into
Open
refactor: documentation, bug fixes, test coverage, and GOAP rewrite#1vantreeseba wants to merge 23 commits into
vantreeseba wants to merge 23 commits into
Conversation
Initializes agent documentation following patterns from sibling libs (dropecho.ds, dropecho.storygen, dropecho.testing). Adds project settings with permission allowlist for common read-only commands. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… nodes Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… Motive what-comment Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s coverage Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…plan tests Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Resolved conflict: keep private _facts field and inline methods, take Float types from worktree branch. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Resolved conflict: kept _currentState.tick() call (now safe after null guard), merged in getCurrentState() accessor added by worktree. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ng cleanup Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nused Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…MTests Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Resolved FSMTests conflict: kept _bb/_st1/_st2/_fsm field names and Type.getClassName-based getName(); removed stale broken tests with undefined TestState1/2 and wrong lambda arity; kept correct new tests. Fixed Plan.get_length to reference _actions not Actions. Deduplicated PlannerTests chained-action test; fixed assertions to use _actions.dequeue() instead of nonexistent index access. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…i-action, PlannerTests edge cases, StateTests Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…, Action.Cost Float Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… Action.Cost Float Resolved conflicts: kept field initializers on Action (worktree removed them), took worktree's iterative isCompleted() and full generatePlan() Graph+Dijkstra rewrite. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AGENTS.md,CLAUDE.md, and.agents/reference docs (overview, architecture, conventions, development, testing, todos) following patterns from sibling libsSucceederNodedouble-return,LeafNodestub implemented,Actionplaceholder docs removed,FSM.toDot()null crash + spurious any-node,FSM.tick()null guard,Plan.lengthproperty wired correctlyBlackboardstoresFloatinstead ofInt;Action.Costchanged toFloat;Plan.isCompleted()made iterative;Plannerfully rewritten to usedropecho.dsGraph+Search.dijkstrafor globally optimal plans (replaces greedy backward-chaining);build.hxmlgets missing-lib dropecho.dsBlackboardTests,TaskBankTests,TaskNodeTests,UtilityTests,FSMTests,PlanTests,PlannerTests,ActionTests,StateTests(new); added edge cases for circular dependencies, globally-cheapest path selection, multi-action plan advancement, null-state guardsGOAP Planner rewrite
The old planner used greedy backward-chaining (cheapest action per precondition independently), which cannot guarantee globally optimal plans and has no cycle detection.
The new planner:
"found_weapon,has_weapon")Graph<String, Action>usingQueue+Setfromdropecho.ds(visited set prevents cycles)Search.dijkstrato find the globally cheapest path to any goal-satisfying stateTest plan
haxelib run dropecho.testing— all targets greenPlannerTests.test_globally_cheapest_plan_chosen_over_greedypasses (key correctness test for new planner)PlannerTests.test_circular_dependencies_do_not_infinite_looppasses (was an infinite loop before)FSMTests.test_tick_before_change_to_state_throwspasses (null guard)BlackboardTests/TaskBankTests/TaskNodeTestsall pass (were empty or missing)🤖 Generated with Claude Code