Skip to content

fix: harden context-driven baseline adoption - #36

Merged
marcioaltoe merged 6 commits into
mainfrom
ma/doctor-skill-readiness
Jul 26, 2026
Merged

fix: harden context-driven baseline adoption#36
marcioaltoe merged 6 commits into
mainfrom
ma/doctor-skill-readiness

Conversation

@marcioaltoe

@marcioaltoe marcioaltoe commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • harden semantic Baseline analysis and profile capability evidence
  • make Preservation converge after repository-rule redistribution
  • align the Roundfix repository with the generated agent-guidance layout and Exa skill

Implementation notes

  • removes duplicate content-addressed AGENTS backup files after the successful Baseline adoption
  • consolidates triage and skill governance into their semantic agent guides

Verification

  • rtk make verify passed before the final backup-only cleanup
  • rtk go run -buildvcs=false ./cmd/roundfix skills check passed on the current head
  • full make verify intentionally not rerun after deleting only the duplicate AGENTS backup files, per maintainer direction

Risk and rollback

  • affects Baseline classification, Preservation planning, generated guidance, and repository skill setup
  • revert the squash commit to restore the previous behavior and guidance layout

Summary by CodeRabbit

  • New Features

    • Improved baseline analysis with clearer semantic text and boundary information.
    • Added visible warnings when automated analysis proposals are unavailable or discarded.
    • Added the recommended Exa web-search skill to supported setup profiles.
  • Bug Fixes

    • Improved preservation and migration of repository guidance, reducing duplicate rules and repeated changes.
    • Increased reliability for longer-running analysis and large streamed outputs.
  • Documentation

    • Reorganized repository guidance into a clearer instruction hierarchy.

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d06f66a5-2f4e-4c78-b53d-72dc05e22646

📥 Commits

Reviewing files that changed from the base of the PR and between f98a12f and 4b1f436.

⛔ Files ignored due to path filters (43)
  • .agents/skills/exa-web-search/SKILL.md is excluded by !.agents/**
  • .agents/skills/exa-web-search/references/extraction.md is excluded by !.agents/**
  • .agents/skills/exa-web-search/references/filtering.md is excluded by !.agents/**
  • .agents/skills/exa-web-search/references/patterns-code.md is excluded by !.agents/**
  • .agents/skills/exa-web-search/references/patterns-companies.md is excluded by !.agents/**
  • .agents/skills/exa-web-search/references/patterns-news.md is excluded by !.agents/**
  • .agents/skills/exa-web-search/references/patterns-papers.md is excluded by !.agents/**
  • .agents/skills/exa-web-search/references/patterns-people.md is excluded by !.agents/**
  • .agents/skills/exa-web-search/references/patterns-relationships.md is excluded by !.agents/**
  • .agents/skills/exa-web-search/references/searching.md is excluded by !.agents/**
  • .agents/skills/exa-web-search/references/source-quality.md is excluded by !.agents/**
  • .agents/skills/exa-web-search/references/synthesis.md is excluded by !.agents/**
  • docs/_inbox/2026-07-24-analise.md is excluded by !docs/**
  • docs/_inbox/samples/AGENTS.go-cli.md is excluded by !docs/**
  • docs/_inbox/samples/AGENTS.rust-cli.md is excluded by !docs/**
  • docs/_inbox/samples/AGENTS.typescript-bun.md is excluded by !docs/**
  • docs/adr/0078-confirmed-root-rules-move-to-semantic-owners.md is excluded by !docs/**
  • docs/agents/agent-instructions.md is excluded by !docs/**
  • docs/agents/autonomous-work.md is excluded by !docs/**
  • docs/agents/cli.md is excluded by !docs/**
  • docs/agents/docs-layout.md is excluded by !docs/**
  • docs/agents/domain.md is excluded by !docs/**
  • docs/agents/external-triage.md is excluded by !docs/**
  • docs/agents/go.md is excluded by !docs/**
  • docs/agents/issue-tracker.md is excluded by !docs/**
  • docs/agents/secondbrain.md is excluded by !docs/**
  • docs/agents/setup-context.json is excluded by !docs/**
  • docs/agents/skill-dispatch.md is excluded by !docs/**
  • docs/agents/skill-governance.md is excluded by !docs/**
  • docs/agents/spec-routing.md is excluded by !docs/**
  • docs/agents/specific-repository.md is excluded by !docs/**
  • docs/agents/tui.md is excluded by !docs/**
  • docs/findings/2026-07-25-npm-trusted-publishing-and-release-preflight.md is excluded by !docs/**
  • docs/findings/2026-07-25-spec-owned-reference-lifecycle.md is excluded by !docs/**
  • docs/specs/0036-doctor-skill-readiness/_prd.md is excluded by !docs/**
  • docs/specs/0036-doctor-skill-readiness/_techspec.md is excluded by !docs/**
  • docs/specs/0036-doctor-skill-readiness/task_01.md is excluded by !docs/**
  • docs/specs/0036-doctor-skill-readiness/task_02.md is excluded by !docs/**
  • docs/specs/0042-verification-capacity-and-daemon-task-settlement/task_07.md is excluded by !docs/**
  • docs/specs/0049-baseline-preservation-idempotency/_prd.md is excluded by !docs/**
  • docs/specs/0049-baseline-preservation-idempotency/_tasks.md is excluded by !docs/**
  • docs/specs/0049-baseline-preservation-idempotency/_techspec.md is excluded by !docs/**
  • docs/specs/0049-baseline-preservation-idempotency/task_01.md is excluded by !docs/**
📒 Files selected for processing (27)
  • AGENTS.md
  • internal/agent/acpx_runner_test.go
  • internal/agent/sealed.go
  • internal/agent/sealed_test.go
  • internal/baseline/assets/setups/go-cli.json
  • internal/baseline/assets/setups/rust-cli.json
  • internal/baseline/assets/setups/typescript-bun.json
  • internal/baseline/classification.go
  • internal/baseline/classification_test.go
  • internal/baseline/plan.go
  • internal/baseline/plan_test.go
  • internal/baseline/preservation.go
  • internal/baseline/preservation_test.go
  • internal/baseline/segmentation.go
  • internal/baseline/segmentation_test.go
  • internal/baseline/testdata/catalog.digest
  • internal/baseline/testdata/catalog.normalized.json
  • internal/baseline/testdata/parity-corpus/v1/fixtures/asset-sync.json
  • internal/baseline/testdata/parity-corpus/v1/manifest.json
  • internal/baselineacp/analyzer.go
  • internal/baselineacp/analyzer_test.go
  • internal/cli/baseline_human.go
  • internal/cli/baseline_human_test.go
  • internal/cli/releaseplan_documentation_contract_test.go
  • skills-lock.json
  • skills/baseline_skill_contract_test.go
  • skills/recommended.txt

Walkthrough

This change adds semantic text and boundary evidence to baseline analysis, derives proposal evidence locally, improves root-guidance preservation convergence, streams sealed ACPX output incrementally, surfaces analyzer discard findings, rewrites repository instructions, and refreshes skill snapshots and parity metadata.

Changes

Semantic baseline pipeline

Layer / File(s) Summary
Semantic snapshot and proposal contracts
internal/baseline/classification.go, internal/baseline/segmentation.go, internal/baseline/*_test.go
Snapshots expose semantic text and byte boundaries; proposal normalization derives omitted evidence and validates advertised ranges.
Root guidance preservation and deduplication
internal/baseline/preservation.go, internal/baseline/preservation_test.go
Preservation planning filters unmarked guidance, excludes verified backup payloads, tracks consumed paths, and computes contributing source entries.
Repository rule redistribution and convergence
internal/baseline/plan.go, internal/baseline/plan_test.go
Planning merges repository rules, handles consumed paths, and tests redistribution, repair, later additions, and backup stability.
Analyzer findings in the human workflow
internal/baselineacp/*, internal/cli/baseline_human*
Semantic analysis records sanitized discard findings, which the human workflow renders after segmentation and classification.

Streamed sealed ACPX prompts

Layer / File(s) Summary
Incremental sealed output parsing
internal/agent/sealed.go
Sealed prompt stdout is parsed incrementally with bounded buffering, terminal-result handling, tool tracking, and output limits.
Streaming parser harness coverage
internal/agent/acpx_runner_test.go, internal/agent/sealed_test.go, internal/baselineacp/analyzer_test.go
The fake ACPX process emits thought chunks, and tests cover intermediate results, oversized thoughts, final output, disposal, and updated timeout arguments.

Repository instructions and skill snapshots

Layer / File(s) Summary
Context-driven repository instructions
AGENTS.md, internal/cli/releaseplan_documentation_contract_test.go
Repository instructions are reorganized into scoped hierarchy blocks and validated by documentation contract tests.
Skill inventory and setup snapshots
skills-lock.json, skills/recommended.txt, internal/baseline/assets/setups/*, skills/baseline_skill_contract_test.go
The skill inventory adds exa-web-search, while setup references, tree digests, and expected upstream digests are refreshed.
Catalog and parity fixture refresh
internal/baseline/testdata/catalog.*, internal/baseline/testdata/parity-corpus/v1/*
Content-addressed catalog and parity metadata are updated for the refreshed setup snapshots.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant SealedACPX
  participant StreamParser
  participant BaselineAnalyzer
  participant HumanReview
  SealedACPX->>StreamParser: emit session update lines
  StreamParser-->>BaselineAnalyzer: return sealed prompt result
  BaselineAnalyzer->>BaselineAnalyzer: record discarded selections and proposals
  BaselineAnalyzer-->>HumanReview: provide findings
  HumanReview->>HumanReview: render warning lines
Loading

Possibly related PRs

Poem

I’m a rabbit reviewing rules in the spring,
Semantic crumbs make the snapshots sing.
Thought streams hop safely, bounded and bright,
Findings wave warnings through the human review night.
New skills join the burrow—what a delightful sight!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ma/doctor-skill-readiness

Comment @coderabbitai help to get the list of available commands.

@marcioaltoe
marcioaltoe merged commit be9c42c into main Jul 26, 2026
1 of 2 checks passed
@marcioaltoe
marcioaltoe deleted the ma/doctor-skill-readiness branch July 26, 2026 12:57
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