Commit Graph

608 Commits

Author SHA1 Message Date
Trevin Chow 96dbd99e30 fix(review): keep P0/P1 findings when a Stage 5b validator infra-fails
PR #881 feedback: Stage 5b dropped a finding as "validator failed" on any
validator infrastructure failure (timeout / dispatch error / malformed JSON).
For P0/P1 that silently removes the highest-severity issues from the
report/actionable JSON on a transient failure — the opposite of safe, and now
that the validation pass always runs (default + mode:agent) it's reachable.

Now: P2/P3 still drop on infra failure (conservative bias); P0/P1 are kept and
their validation marked degraded (reported in Coverage). A genuine
validated:false rejection still drops at any severity.

bun test: contract 29/0; full suite at the 47 pre-existing failures, zero new.
2026-06-02 20:05:48 -07:00
Trevin Chow 89cff2103f fix(review): resolve PR #881 Codex feedback on the apply / agent-mode contract
Address 7 P2 review threads, several of them fallout from this branch's
apply-model changes:

- mode:agent is now described as report-only (skips Stage 5c apply), not
  "serialization only" — a runner could otherwise apply during mode:agent and
  the caller would re-apply the same findings.
- Deprecated mode:autofix removed from the conflict-stop list so it no longer
  contradicts the deprecated-mode "ignore and proceed" path.
- Agent-mode output: the markdown Actionable Findings summary is default-mode
  only; mode:agent carries actionable findings solely in the JSON field and
  emits nothing after the object.
- Agent-mode JSON: require one raw (unfenced) JSON object so naive JSON.parse
  callers don't choke on a leading code fence.
- pr-remote scope: resolve a real PR_BASE_REF (fetch baseRefName + rev-parse)
  and pass it to reviewers/validators so the data-migration persona's
  git diff <base> -- db/schema.rb schema-drift check works on remote PRs.
- ce-optimize: inline a local mechanical-apply bar instead of referencing
  ce-work's review-findings-followup.md (skills must be self-contained).
- lfg review-followup: make the post-fix push upstream-aware so a fresh branch
  with no upstream doesn't break the autonomous pipeline.

Contract test updated for the report-only reframe. bun test: contract 29/0;
full suite at the 47 pre-existing failures, zero new.
2026-06-02 19:53:16 -07:00
Trevin Chow f435b994aa fix(review): commit safe fixes on a clean tree; gate the push, not the commit
Refine the interactive apply model after design review. The permanence gate is
the push, not the commit: a local commit is private and reversible, and leaving
applied fixes uncommitted on a clean tree just creates a chore plus a window
where the user's next edits entangle with them.

- Stage 5c: when the working tree was clean before the review, commit the
  applied fixes as one isolated `fix(review):` commit; on a dirty tree apply but
  leave them for the user's commit (the fixes can't be isolated from WIP).
  Never push, open PRs, or file tickets.
- Operating principle, After Review, the Applied report step, the output
  template, the skill doc, and the plan all updated to commit-on-clean /
  never-push (was "never commits or pushes").
- Contract tests updated to the new contract.

bun test: contract 29/0; full suite at the 47 pre-existing failures, zero new.
2026-06-02 19:21:50 -07:00
Trevin Chow 818112e2d3 fix(review): concrete named test for terse Issue-cell discipline
The latest dogfood run kept the terse-cell + detail-line format (good) but
still packed full sentences into several P2 Issue cells. Replace the vague
"terse" guidance with a checkable bar: one short clause (~12 words or fewer,
no second sentence, no because/so/which explanation); the moment a cell wants
a comma-plus-clause or a reason, move the depth to the keyed detail line.
Applied in the SKILL.md Stage 6 skeleton + Findings step and the output
template; contract test asserts the named test is present.
2026-06-02 18:45:02 -07:00
Trevin Chow 4af3754a5d fix(review): terse-cell + keyed detail-line findings format with render-time template load
Dogfood run showed the findings format still escaping to field-blocks for
detail-heavy P1s (while P2/P3 stayed tables) and a duplicate finding number on
a multi-file applied fix. Make the canonical output skeleton accommodate detail
so the format stops fighting the content:

- Findings: terse Issue cell (the scannable index) + a keyed detail line
  (`- **#N** — ...`) under each severity table for findings that need depth
  (usually P0/P1). One shape for every severity.
- review-output-template.md is the canonical copy-this skeleton; Stage 6 now
  instructs loading and mirroring it at render time (not just "see the
  template"), with the inline stub as the always-loaded fallback.
- Format gate now catches the real failure (inconsistent treatment across
  severities) and explicitly does not flag the keyed detail line.
- Applied section: a multi-file fix is one row with one # (no duplicate
  numbers); green-but-unverifiable edits flagged inline in the Fix cell.
- Tests + fixture cover the detail line, the multi-file one-row applied fix,
  and the consistency/load contract.

Behavior preserved: contract tests 29/0; full suite at the 47 pre-existing
failures, zero new.
2026-06-02 17:47:06 -07:00
Trevin Chow cbc343925e fix(review): scrub leftover review-only contradictions from the autofix change
Simplification pass over ee7891ed found stale/contradictory prose the feature
commit missed:

- SKILL.md "After Review": dropped the "Review-only handoff / do not edit
  project files" framing that contradicts Stage 5c default-mode apply; scoped
  apply vs report-only by mode.
- ce-work / ce-work-beta followup: scoped the "review-only / does not mutate"
  claim to the mode:agent invocation (true for the caller path) rather than
  asserting it of the skill as a whole.
- docs/skills + output template: removed the stale safe_auto promotion bullet
  and the deprecated report-only Mode-line value.
- contract test: de-duplicated the mutate-contract assertions across two tests
  (each invariant asserted once in its relevant test) and fixed a misleading
  comment.

Behavior preserved: contract tests 28/0; full suite at the 47 pre-existing
failures, zero new.
2026-06-02 16:46:46 -07:00
Trevin Chow ee7891edd3 feat(review): apply safe verified fixes in interactive ce-code-review
Re-introduce auto-fixing into ce-code-review as a lightweight, judgment-based
act policy (not the removed mode:autofix machinery). In default (interactive)
mode the review now applies the safe, verified fixes it is confident in and
reports them in an Applied section; in mode:agent it stays report-only and the
caller applies. It never commits or pushes — the human/caller owns permanence.

- Stage 5c "Act on findings (default mode only)": bias-to-act policy (apply
  clear reversible improvements; push back if the reviewer is wrong; defer what
  needs a decision), scope invariant (local-aligned/standalone only),
  verify-then-keep (revert on red), no auto-commit, and prominent surfacing of
  green-but-unverifiable edits (auth/contract/concurrency). No deny-list: a
  code-review fix is a reversible edit, so downside is controlled after the fact
  (revert + visible diff + commit checkpoint).
- Stage 6 + output template: Applied section (# | File | Fix | Reviewer +
  validation line); applied findings keep their stable # and stay out of the
  severity tables.
- Operating principles / Action Routing / autofix deprecation reframed:
  autofix_class is signal, never an apply gate; mode:agent never mutates.
- ce-work and ce-work-beta apply step reframed from a conservative
  "when unsure, skip" eligibility filter to the same bias-to-act policy.
- Contract test + numbering fixture cover the new behavior; skill doc updated
  (also corrected pre-existing drift: removed safe_auto and four-modes framing).

Plan: docs/plans/2026-06-02-001-feat-ce-code-review-safe-autofix-plan.md
2026-06-02 16:42:53 -07:00
Trevin Chow 729b7fef99 refactor(review): drop Route from per-severity findings tables
The human-facing per-severity tables are now 5 columns
(# | File | Issue | Reviewer | Confidence). The synthesized route
(autofix_class -> owner) moves to the Actionable Findings table and the
mode:agent JSON, where it is actionable — keeping the scannable severity
tables narrow enough to render across terminals and non-Claude harnesses.

The finding set, routing, confidence gating, and JSON contract are
unchanged; this is presentation only. Updates the Stage 6 inline skeleton
and column description, the output-template examples and formatting rules,
the numbering fixture, and the primary-findings regex in the contract test.
2026-06-02 14:01:53 -07:00
Trevin Chow 0b4baf792c fix(review): guarantee critical-finding validation and enforce findings-table output
ce-code-review hardening prompted by a dogfood run that shipped findings in
the output template's own documented anti-pattern format and skipped
validation on the P1 findings:

- Stage 5b: resolve the "skip when >15 survivors" vs "validate top-15"
  contradiction. The stage no longer skips while any finding survives, and
  P0/P1 findings are always validated (raise the cap rather than drop a
  critical); only the P2/P3 tail is dropped when over budget.
- Stage 5b: sanction orchestrator direct verification of load-bearing facts
  (a pinned dependency's source, repo wiring) as a complement to the validator
  wave, using single-purpose native tools instead of chained shell.
- Stage 6: inline a literal findings-table skeleton in the always-loaded
  SKILL.md plus a concrete negative-signature tripwire (no Field: blocks, no
  box-drawing/middot separators, no lists) so the output contract survives a
  long session even when the template reference was not reloaded.
- Output format: state that mode:agent JSON is the deterministic cross-harness
  machine contract and default markdown is the human view; keep markdown
  ASCII-safe so it degrades gracefully across terminals and harnesses.
- Lock the P0/P1-always-validated invariant into the Stage 5b contract test.
2026-06-02 13:44:08 -07:00
Trevin Chow 633576a3f9 fix(review): use resolved branch ref for intent log; stop double review in apply followup
Address PR review feedback (#881):

- ce-code-review: Stage 2 branch-mode intent discovery now runs
  `git log ${BASE}..<branch-ref>` using the resolved ref instead of the raw
  `<branch>` argument, so remote-only branch reviews read the right commit
  intent instead of failing or reading a stale same-named local branch.
- ce-work / ce-work-beta apply followup: consume the review already produced
  by Tier 2 step 2a instead of re-invoking ce-code-review; re-invocation is
  now a documented cold-caller fallback. Avoids a second full review per
  Tier 2 run. Updated the ce-work SKILL.md section anchor and the contract
  test to lock in the corrected (no-double-review) behavior.

Note: pre-existing failures in CLI install/cleanup/target-detection tests
(47, unrelated to these skill-content changes) not addressed by this PR.
2026-06-02 01:09:34 -07:00
Trevin Chow bc9d30260a fix(review): verify PR head identity and thread scope into validators (#881)
Two remaining gaps in the review-scope model surfaced by Codex review of
3f22822d, both causing findings to be validated against the wrong tree:

- PR scope classification trusted the branch name alone, so a fork PR (or
  a stale local branch) sharing a name with the PR head was treated as
  local-aligned and diffed/inspected against the local checkout. Now
  local-aligned also requires the PR to be same-repo (isCrossRepository
  false) and the PR head commit to be an ancestor of local HEAD; metadata
  fetch gains headRefOid + isCrossRepository.
- Stage 5b validators never received the scope mode or remote head ref, so
  in pr-remote/branch-remote they fell back to Read/Grep on the stale
  workspace. Now the scope mode and <pr-head-ref>/<branch-head-ref> are
  injected into validator prompts (mirroring Stage 4), with inspection
  access scoped by mode. The validator template already consumed these.

Note: pre-existing CLI install test failures (tests/cli.test.ts) are
unrelated to this change and present on HEAD before it.
2026-06-01 17:30:07 -07:00
Trevin Chow 3f22822d9b fix(review): branch-remote scope and local-aligned PR diffs
Add branch-remote inspection rules for no-checkout branch reviews, use local tree diffs instead of appending gh pr diff when aligned on the PR branch, and sync ce-work-beta residual gate sentinels with ce-work.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-30 15:57:50 -07:00
Trevin Chow a2ec295fb5 fix(review): JSON skip responses and pr-remote file inspection (#881)
Return status skipped in mode:agent when PR pre-checks bail out.
In pr-remote scope, fetch PR head ref and forbid workspace Read/Grep
for changed files; validators use git show or diff hunks only.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-30 15:04:12 -07:00
Trevin Chow 9bee6ec5cc fix(review): self-contain followup refs and align agent output template (#881)
- Duplicate review-findings-followup into ce-work-beta for isolated installs
- Inline LFG apply bar in lfg/references/review-followup.md
- Replace stale headless text envelope with JSON contract in review-output-template

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-30 14:52:31 -07:00
Trevin Chow 5391c57851 merge: integrate origin/main into review-only refactor branch
Resolve ce-code-review Stage 6 conflict by keeping review-only output
(no Applied Fixes section, JSON schema for mode:agent).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-30 01:55:00 -07:00
Trevin Chow 0346beae3b refactor(review): make ce-code-review review-only and split apply to callers
Orchestrated workflows now invoke review for findings and own fix application separately, so ce-work and lfg can batch fixes without the review skill mutating the checkout.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-30 01:17:56 -07:00
github-actions[bot] 85987d496f chore: release main (#874)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-28 12:23:52 -07:00
Trevin Chow b3e396d0bf fix(ce-plan): honor explicit external-research requests and route them by intent (#875) 2026-05-28 12:22:49 -07:00
Trevin Chow 253dba80dd fix(ce-sessions): emit repo root path instead of basename subshell (#873) 2026-05-27 15:21:06 -07:00
github-actions[bot] 2bab351c81 chore: release main (#872)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-27 11:17:53 -07:00
Trevin Chow e5e3fc3630 fix(ce-brainstorm,ce-plan): add conceptual-diagram affordance to brainstorm docs (#871) 2026-05-27 11:12:39 -07:00
github-actions[bot] 48cd9140b2 chore: release main (#869)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-27 09:54:04 -07:00
Trevin Chow 1051132d04 fix(html-rendering): constrain measure and surface execution notes (#870) 2026-05-27 09:52:22 -07:00
Trevin Chow 5c88212c1f fix(ce-brainstorm,ce-plan): restore default-on requirements grouping (#868) 2026-05-27 09:47:08 -07:00
github-actions[bot] e2c9cd2352 chore: release main (#852)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-26 10:02:33 -07:00
Trevin Chow 11e12e5739 feat(ce-plan,ce-brainstorm): contract-driven sections + optional HTML output (#826) 2026-05-26 09:53:14 -07:00
Trevin Chow 673dcfacb8 fix(simplify-code): guard against over-simplification and behavior drift (#859) 2026-05-24 22:03:03 -07:00
Trevin Chow 26a802551e fix(commit): auto-create feature branch on default branch (#856) 2026-05-22 21:53:59 -07:00
Trevin Chow 5297a9440f refactor(review): consolidate migration personas and trim stack reviewers (#854)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-21 22:37:42 -07:00
Trevin Chow 0b6b5c51ef fix(review): restore P3 output and legacy cleanup for removed personas
Re-enable P3 findings in reports and synthesis after the persona refactor
temporarily suppressed them. Register removed migration and stack reviewers
in LEGACY_ONLY_AGENT_DESCRIPTIONS and EXTRA_LEGACY ce-* agent paths so
upgrades sweep stale flat installs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-21 19:59:57 -07:00
Trevin Chow 4df7533832 fix(review): address Codex feedback on structure.sql and plan deepening
Extend data-migration Step 0 to diff db/structure.sql when present, and route plan deepening migration risks to ce-data-integrity-guardian instead of the PR-review persona.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-21 19:25:37 -07:00
Trevin Chow 67d273622e fix(ce-commit-push-pr): require user-visible bug summaries (#853) 2026-05-21 18:42:02 -07:00
Trevin Chow 556c978684 refactor(review): consolidate migration personas and trim stack reviewers
Remove DHH/Kieran stack reviewers, fold structural checks into maintainability, suppress P3 findings in synthesis, and merge migration/schema-drift agents into a single conditional data-migration reviewer.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-21 18:26:11 -07:00
Kieran Klaassen 0aa6b55a80 feat(ce-dogfood-beta): add diff-scoped browser QA dogfood skill (#848)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 12:14:02 -05:00
github-actions[bot] 08bb589903 chore: release main (#850)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-21 00:21:38 -07:00
Trevin Chow ac1c6d9a99 fix(ce-compound): drop date suffix from generated doc filenames (#849) 2026-05-21 00:20:43 -07:00
Brian Paden 796bea75b7 fix(agents): rename .agent.md to .md for VS Code Copilot tool access (#846)
Co-authored-by: Trevin Chow <trevin@trevinchow.com>
2026-05-21 00:18:17 -07:00
Trevin Chow 2a46670958 fix(ce-proof): update HITL flow for Proof v2 (#847) 2026-05-21 00:16:52 -07:00
github-actions[bot] f61d1b33ea chore: release main (#834)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-18 09:34:16 -07:00
Trevin Chow fd88fd8fd7 fix(ce-commit-push-pr): rewrite pr-description around a core principle (#841) 2026-05-17 13:30:00 -07:00
Trevin Chow 82b8af415d fix(ce-coherence-reviewer): remove Bash from tool allowlist (#837) 2026-05-16 01:45:10 -07:00
Trevin Chow 6fa1277e57 fix(ce-web-researcher): use any web tool, not just Claude built-ins (#836) 2026-05-16 00:30:10 -07:00
Trevin Chow 39cb9da3a1 fix(ce-plan): inline synthesis gate output into SKILL.md (#822) 2026-05-14 20:42:40 -07:00
github-actions[bot] 705f28a7a9 chore: release main (#831)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-14 10:54:13 -07:00
Trevin Chow 6df3f96580 fix(ce-brainstorm): scoping synthesis and Q&A interaction cleanup (#829) 2026-05-13 22:29:40 -07:00
github-actions[bot] b07aac55b5 chore: release main (#817)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-11 16:45:52 -07:00
Trevin Chow 60c1c938d5 fix(ce-plan): compress synthesis confirmation to prose + call-outs (#819) 2026-05-11 12:09:52 -07:00
Trevin Chow d090bde0ff fix(ce-code-review): replace resolve-base.sh with prose-driven base detection (#815) 2026-05-10 16:23:19 -07:00
github-actions[bot] 85548a5cff chore: release main (#814)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-10 12:53:45 -07:00
Trevin Chow 9b45a83d7e feat(ce-compound): add mode:headless for non-interactive use (#813) 2026-05-10 12:50:12 -07:00