Skip to content

Care loopd - #4

Open
Jacobjeevan wants to merge 27 commits into
mainfrom
care-loop
Open

Care loopd#4
Jacobjeevan wants to merge 27 commits into
mainfrom
care-loop

Conversation

@Jacobjeevan

Copy link
Copy Markdown
Contributor
  • Added care loop and loop doctor skills

@Jacobjeevan Jacobjeevan changed the title Care loop Care loopd Jul 21, 2026
Jacobjeevan and others added 12 commits July 21, 2026 14:57
Optional pre-Step-1 enrichment (TicketFetcher port) that folds a Jira ticket's
description — ADF flattened, with inline [image: NAME] markers keeping each image
welded to the paragraph it illustrates — plus its image attachments into the
planner input. Attachments ride both planner phases as opencode file parts
(the image->model transport probed on Copilot). Cached under runDir + resume-safe;
degrades to the raw kickoff task when unconfigured or on fetch failure, so the
default deployment (no JIRA_* env) is unchanged.

Live-verified end to end against CARE-298: classic Basic auth, issue fetch, ADF
flatten with document-ordered attachments, authenticated image download, and the
image reaching the model. smoke:jira / probe:image cover the live paths.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ndness, specs-owed)

Fixes proposed by the end-of-run doctor across ~6 runs, collated in
care-loop-doctor/proposals/000-COLLATION-2026-07-28.md, plus the doctor
--report mode that produced them:

- [§A] triager: skip already-resolved threads entirely — emit no verdict at
  all (not even decline), so a round stops burning spawns re-litigating threads
  closed rounds ago. Only genuinely-new content on a re-opened thread earns a
  fresh verdict.
- [§E.1] defaultDiffOf: include untracked new files (synthesized add-diff), since
  `git add -A` only runs at step 5 — a brand-new *.spec.ts was invisible to the
  reviewer/test-grader meant to grade it.
- [§E.2] test-grader: raise a `specs_owed` advisory (listing the unasserted
  criteria) when the plan declared a Test-surface contract but zero specs were
  delivered, instead of a silent no_specs pass. Advisory only — never hard-gates.
- doctor: `--report` mode writes one proposal doc per run instead of opening a PR.
care-diff-review Step 2 is now the `care-intent` skill, so it can run as a
standalone maker-tier role (the salvage reconstruction spawn) and be graded by
care-evals. care-diff-review keeps the same prompt: its `default` methodology
region splits into `agreement` + `findings`, and `reviewerMethodology` composes
agreement → care-intent → findings in file order. Byte-identity of the 4a
reviewer prompt is pinned by two golden fixtures (tsx / no-tsx), plus guards
that the answer-key rule stays out and the Reference block stays in.

care-evals: `care-intent` grades on the care-review path (recall/FP), with its
own prompt builder and a first task (it-01-age-short-misread).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… open PR

Salvaging an old PR is not a new flow, it is the existing loop entered late:
Steps 1-5 already happened and their outputs sit on the PR, so what remains is
6a/6b/7, which runCiRounds already drives.

- adopt.ts: reconstruct the PR's intent BLIND (the description is never fed to
  the model), confirm at one human gate with a description-vs-diff divergence
  check, bootstrap the run dir + a synthetic journal that projects to mode "ci".
  Adopt backdates a synthetic push so round 1's poll baseline counts the PR's
  existing reviews as arrived, instead of waiting forever on an unchanged head.
- salvage-gate-terminal.ts: the single human gate for the above.
- reviewers.ts + feedback.ts: opt-in digest extensions — review summary bodies,
  unanchored path:line findings, reviewer attribution via
  pull_request_review_id, per-source trim budgets so trusted reviewers' fix
  suggestions survive trimming. Every option defaults off, so the loop's digest
  stays byte-identical (pinned by a snapshot test) and makes no extra API call.
- github.ts: carry PR body/baseRef and review id/body.
- cli.ts: `--pr <n>` wiring, worktree checkout, then hand off to cmdResume.
- skills-opencode.ts: opencodeIntentReconstructor (care-intent, maker tier).

266 tests green; tsc clean. Live dogfood on a real PR still pending.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ion settings

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant