G · Tactics library — save/reuse typed tactics#74
Closed
pskeshu wants to merge 7 commits into
Closed
Conversation
…ctics on D's substrate
Add save_tactic/list_tactics/get_tactic/apply_tactic to FileContextStore,
mirroring the plan-template pattern. Templates live at
agent/tactic_library/{id}_{slug}.yaml; apply returns a fresh planned
tactic (new id, state=planned, no live). Fires CONTEXT_UPDATED.
33 TDD tests, all passing.
Three @tool functions (ToolCategory.EXPERIMENT) over FileContextStore's tactic library: save_tactic persists a tactic dict as a reusable template, list_tactics returns a readable id/name/kind summary, apply_tactic instantiates a fresh planned tactic and appends it to the session's Operation Plan (creating a minimal plan if none exists). Store + session resolution mirrors declare_operation_plan. Registered in tools/__init__.py. TDD: 21 tests, all green.
Add read endpoint that returns the saved tactic library from
FileContextStore. Returns {"tactics": []} when the store is absent,
list_tactics() raises, or the library is empty — never a 500.
…terministic name lookup - Add TestScopeRoundTrip: asserts scope survives save→apply, and absent scope stays absent - Preserve rationale as its own key in save_tactic (alongside description); add TestRationalePreservation - Rewrite get_tactic to scan list_tactics() (newest-first) instead of iterdir(); add TestGetTacticDeterministic with name-collision case
Collaborator
Author
|
Superseded by #72 — the temperature + Operations/tactics suite and the new Operate (bottom-cam→SPIM) surface are consolidated onto |
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.
Sub-project G (replaces #67, recovering CI). Save / list / apply reusable typed tactics on D's substrate; apply→Operation Plan. Whole-branch reviewed; ~64 tests; ruff+format clean. Stacked on
feature/operations-tab.