[codex] restore ast-first retrieval readiness#26
Closed
TheGreenCedar wants to merge 5 commits into
Closed
Conversation
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
This branch restores the AST-first retrieval path and gives operators a clearer readiness surface for both local navigation and agent packet/search work. The core change is a new readiness model and CLI command that answers whether CodeStory is ready for a specific goal, and when it is not, gives both the minimum next command and the fuller repair command.
It also makes report handoffs explicit, threads readiness through the existing status/error surfaces, and removes Windows-only assumptions from generated commands, scripts, and docs so Linux/macOS users get POSIX examples first while PowerShell remains documented as the Windows path.
What changed
codestory-cli readycommand with--goal local|agentand JSON/Markdown output.index,doctor,codestory://status, stdio recommended next calls, and API error details.minimum_nextandfull_repairso agents do not have to infer whether a local refresh or sidecar rebuild is required.report --profile handoff, plus handoff metadata in report JSON, so generated reports carry freshness/readiness/sidecar caveats instead of looking like timeless source-of-truth artifacts.graph_first_v1sidecar evidence path and updated the e2e stats log with a fresh release run.display.rsand runtime recovery commands escape shell-sensitive single quotes correctly per host.codestory-cliandllama-server, while Windows keeps the.exepath.Why
Before this branch, readiness was implicit and scattered. Operators could see index status, doctor output, sidecar status, and protocol recommendations, but there was no compact contract that said whether the repo was ready for local navigation versus agent packet/search retrieval. That made it too easy to treat a local cache as proof that agent sidecars were ready.
The docs and generated commands also leaned Windows/PowerShell-first. That created friction for Unix users and made WSL validation a real compatibility check rather than a documentation polish item.
This branch makes readiness a first-class runtime concept, keeps report handoffs honest about freshness and sidecar trust, and makes the command surfaces portable across Windows and Unix shells.
User and developer impact
codestory-cli ready --project . --goal local --format markdowngives a direct local-navigation verdict.codestory-cli ready --project . --goal agent --format jsongives machine-readable agent packet/search readiness.codestory-cli report --profile handoffemits report output with handoff metadata and caveats.index,doctor, and stdio status consumers get readiness verdicts without having to duplicate cache/sidecar interpretation.Verification
cargo build --release -p codestory-clicargo test -p codestory-cli --test ready_command --test report_export --test onboarding_contractsnode --test scripts/tests/codestory-agent-ab-analyzer.test.mjscargo test -p codestory-cli command_quoting_single_quotes_shell_sensitive_valuescargo test -p codestory-runtime recovery_commands_quote_shell_sensitive_project_pathswsl -e bash -lc 'cd /mnt/c/Users/alber/source/repos/codestory && cargo --config "build.rustc-wrapper=\"\"" test -p codestory-cli command_quoting_single_quotes_shell_sensitive_values'wsl -e bash -lc 'cd /mnt/c/Users/alber/source/repos/codestory && cargo --config "build.rustc-wrapper=\"\"" test -p codestory-runtime recovery_commands_quote_shell_sensitive_project_paths'$env:CODESTORY_ALLOW_SKIP_REAL_REPO_DRILL_CASES = '1'; cargo test -p codestory-cli --test codestory_repo_e2e_stats -- --ignored --nocaptureproof_tier:full_sidecarcargo fmt --checkgit diff --checkRemaining risk and follow-up
CODESTORY_REAL_REPO_DRILL_CASESwas not set. The stats-only release harness passed withCODESTORY_ALLOW_SKIP_REAL_REPO_DRILL_CASES=1, and the skip is recorded in the stats log.doctor,index, stdio status, and API errors should review the new readiness fields and remediation command fields as an additive contract change.sccache.exerustc wrapper viacargo --config "build.rustc-wrapper=\"\""; that is an environment setup note rather than a repo code change.