Repository navigation
fix(init): write language-appropriate agent instructions (#13596) - #13685
Conversation
`ripr init --agents` now detects Python and TypeScript/JavaScript roots and writes pytest/unittest or jest/vitest verify commands and exact-assert advice, without cargo or a promise of guided `ripr repair` (Rust only). The Cursor rule globs and description follow the detected languages. Rust roots keep the Rust text byte for byte; mixed roots keep it and add a short preview note. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLTBWXG3mQZ3zTPeoKz
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 17 minutes. View limit details
|
Step 5 now reuses the json-compact rule (findings == exposed, complete outcome kind, analysis_complete) and the Rust STOP list, so no_static_path, reachable_unrevealed, *_unknown and empty-scope runs no longer read as done. Reword the Rust-only repair note, add the advisory/findings==exposed note to the mixed block, and pin all of it in tests. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLTBWXG3mQZ3zTPeoKz
…e changelog issue-first (#13596) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLTBWXG3mQZ3zTPeoKz
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_READY
Scope: the complete diff against main at c67d0f7.
- Detection reuses
config::language_detection::detect_languages. A Rust-only or undetected root writesAGENT_BLOCKbyte for byte, so the parity test withdocs/AGENT_QUICKSTART.mdholds. - The Python and TS/JS preview blocks fixed the earlier fail-open DONE rule. Step 5 now matches the Rust json-compact rule: exit 0, a complete outcome kind,
analysis_complete: true,summary.findings=summary.exposed, and STOP on missing fields ordocument_complete: false. The block says explicitly thatgaps=0alone is not enough. The full STOP list is restored, and unit tests pin every DONE and STOP needle in both the Python and TS blocks, plus the absence of the old weak rule. - Repair guidance is accurate for preview languages.
ripr repairand--seam-idare Rust only, and a--gap-idstart runs only whenripr checkprints it. This matches the binary behaviour observed in the scratch repos (exit 3 / exit 2 with "Rust only"). - Mixed roots get the Rust block plus a note that the preview results are advisory and step 5 needs findings = exposed. I reworded the note so "advisory" attaches to the Python/TS results, not to
ripr repair. - The Cursor globs and description follow the detected languages. The quickstart documents root plus immediate-children detection. The changelog fragment is named issue-first.
Evidence: 17 local init_agents unit tests passed on this source, cli_smoke init_agents passed 2, init_agents_block_smoke passed 2, and rustfmt --check was clean. Hosted CI runs precommit, goldens and check-user-text.
Generated by Claude Code
ripr static exposure checkCommit Took 123s. |
…s Cursor front matter (#13596) - Only detected AND enabled ([languages].enabled of the config init writes or keeps; unreadable config enables none) preview languages get a loop; a detected but not enabled language is named as not analyzed. - --force refreshes Cursor front matter only when it exactly matches a shape ripr generated; user front matter and notes are kept. - Preview DONE/VERIFY: put the new test in the analyzed source (commit it or --worktree on FIND and VERIFY) and STOP on unanalyzed_working_tree. - RIPR-SPEC-0009 requirement, acceptance example and traceability mapping. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLTBWXG3mQZ3zTPeoKz
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_READY
Scope: the complete diff against main at 2e3e3b4, including the c67d0f7 review and the four Devin findings.
- Enabled-language gating:
init_planreads the enabled set from the config being written (targets[0]is always the config target) or from the keptripr.toml. An unreadable config enables nothing. Preview loops appear only for languages that are both detected and enabled, and a disabled language gets an explicit "NOT analyzed" note pointing toripr doctor. The cli_smoke TypeScript case now usestsconfig.json, the marker that actually turns TS analysis on. - Cursor front matter: refreshed on
--forceonly when it exactly matches a ripr-generated shape. User front matter and other agents' files are untouched, and the refresh is idempotent. The regression test covers all of this. - Dirty tree: the preview VERIFY step says to commit the test or use
--worktreeconsistently, and DONE STOPs onunanalyzed_working_tree: true, matching the Rust block. - Spec: RIPR-SPEC-0009 has the behavior bullet, an acceptance example and mappings, and
.ripr/traceability.d/init-agents-language.tomlmaps the tests and code.
Evidence (worker, this head's source): init_agents lib 19 passed, cli_smoke init_agents 2 passed, init_agents_block_smoke 2 passed, cargo fmt --check clean. check-traceability and check-spec-format passed with the existing xtask binary (xtask is unchanged on this branch). Hosted CI runs the rest.
Generated by Claude Code
…S analyzers (#13596) The Rust-only feature lane correctly reports Python files as not analyzed, so the preview-loop expectations only hold when both analyzers are built. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLTBWXG3mQZ3zTPeoKz
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_READY
Scope: the complete diff against main at b9d98ba. The only change since 2e3e3b4 gates init_agents_writes_language_appropriate_instructions on all(feature = "lang-python", feature = "lang-typescript"). The Rust-only feature lane failed it with pyproject.toml: missing "pytest -k". That was correct product behavior: a build without the Python analyzer reports Python files as not analyzed instead of promising the preview loop. The source and oracle review from 2e3e3b4 carries forward.
Generated by Claude Code
Picks up the regenerated docs/CLI_REFERENCE.md (#13604) that the cli_reference_doc test needs after #13685/#13731. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UNUoLUGWB1o9vpixujro7H
Requested by Steven Zimmerman, via Claude.
Governing issue or accepted claim: #13596
Acceptance delta (one sentence):
ripr init --agentswrites pytest/unittest or jest/vitest verify and assertion advice (no cargo, no guidedripr repairpromise) and matching Cursor globs for Python and TypeScript/JavaScript roots, while Rust roots keep the Rust text unchanged.Summary
detect_languagesmarkers (Cargo.toml, pyproject/setup.py/pytest.ini, package.json/tsconfig).docs/AGENT_QUICKSTART.md).pytest -k/unittest,npx jest -t/npx vitest run -t, exact-value assertion advice, and a note thatripr repair/ripr agent stub/--seam-idare Rust only. The route isripr check --format agent, then a hand-written test;ripr agent repair --gap-idonly if check prints it. I checked this by running the binary in scratch Python and TypeScript repos:ripr repair <probe>andripr agent repair --seam-id <probe>refuse (exit 3 / 2, "covers Rust files only"),check --format agent/explainwork, and a strengthened test moves the finding toexposed.globsanddescriptionfollow the detected languages.docs/AGENT_QUICKSTART.md; changelog fragment.Verification
Ran locally (final head, except where noted):
cargo fmt --checkcargo test -p ripr --lib init_agents(17 passed, includes the quickstart parity test and new variant tests)cargo test -p ripr --test cli_smoke init_agents(newinit_agents_writes_language_appropriate_instructionsand the existing init-agents test pass) and--test init_agents_block_smokecargo test -p ripr --test cli_smokerun on the prior commit state: 710 passed, 19 failed; the failures are root-discovery / legend / git-boundary tests that fail in this sandboxed worktree (e.g. "a changed file is absent from the working tree"), none touch init.cargo test -p xtask: 5196 passed, 3 failed, allreports::dx_scoreboard(clone/checkout), unrelated.Not run locally:
cargo xtask precommit, goldens andcheck-user-text(shared cargo lock contention); full precommit/xtask/goldens proof is left to hosted CI.Generated by Claude Code