Skip to content

docs: council Phase C lean-out plan + safety audit (rebased)#154

Merged
Gradata merged 4 commits into
mainfrom
rebase/council-phase-c
May 1, 2026
Merged

docs: council Phase C lean-out plan + safety audit (rebased)#154
Gradata merged 4 commits into
mainfrom
rebase/council-phase-c

Conversation

@Gradata

@Gradata Gradata commented May 1, 2026

Copy link
Copy Markdown
Owner

Clean rebase of #147. Cherry-picked Phase C commit(s) only, drops stale m1 base.

oliver added 4 commits May 1, 2026 09:03
…night)

Source: claude --print --model claude-opus-4-7 ran the lean-out audit
2026-04-30 02:00-02:12. Agent prepared the plan but couldn't Write the
file directly (permission gate). Plan extracted from stdout.

Headlines:
- Baseline: SDK 68,717 LOC / 249 files. Target: 43,861 (-36%)
- Scoring: keep _confidence.py (FSRS/Bayesian); pragmatist disagrees, prefers Beta
- Modules: only 1 of 3 'duplicate pairs' is real (inspection.py)
- Correction APIs: correct() canonical; rest private/renamed
- Cloud: REMOVE _cloud_sync.py, MOVE cloud/* to extra
- MCP/daemon/contrib/adapters/mining/sidecar/22 hooks → extras

Architect (90 days) vs Pragmatist (60 days) disagreement flagged.
Wildcard lens failed (deepseek 500); 6 of 7 voices in synthesis.

Full council #2 launch report at
~/.hermes/council_reports/council_2026-04-30T02-02-45.md.
Per-candidate verification using rg/search across ~/.claude/, SpritesWork/,
~/.hermes/, and Gradata's own src+tests. Findings invalidate several
'DELETE' recommendations from LEANOUT_PLAN:

- _cloud_sync.py: NOT dead. Imported by tests, doctor, migrations, hooks.
  Move to [cloud] extra, do not delete.
- scoring/memory_extraction.py: NOT 'broken import'. Has dedicated test +
  brain.py reference. Audit before deletion.
- daemon.py: KEEP as extra. Phase B just wired BrainLockedError into it.
- hooks/implicit_feedback.py: KEEP. Phase B just hardened it.
- correction_detector privatize: DEPRECATE-rename across releases, not
  immediate.

Confirmed safe to delete: graduation/scoring.py (0 imports verified).
Confirmed safe rename: events_bus.py, _config.py (deprecation alias needed).

Live Brain snapshot at ~/.hermes/brain-snapshot-20260430-0845/critical/.
Phase B (242c408) is independently mergeable.
…etes, Phase B 3970/3970 pytest pass

Pragmatist's DELETE list (notifications/onboard/safety) verified UNSAFE:
- notifications.py: PUBLIC API (__init__.py exports Notification), Brain.subscribe()
- onboard.py: Brain.init() canonical bootstrap (README headline)
- safety.py: PII redaction used by _core.py

Phase B test sweep: 3970 passed, 0 failed, 4:34 wall.
Phase B branch is provably non-regressive — safe to push.
…elete failed (test_graduation_scoring imports it)

Lesson: '0 production import sites' != 'safe to delete'. Test coverage
counts. Opt-in features with dedicated test files = real surface area.

After full verification pass, NONE of the 14 LEANOUT_PLAN deletions
should ship without first migrating their tests + verifying again.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@coderabbitai

coderabbitai Bot commented May 1, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 9b5c46fe-b302-4f9a-93a3-6c21b402255b

📥 Commits

Reviewing files that changed from the base of the PR and between 0d42c6b and 03cfe3a.

📒 Files selected for processing (2)
  • Gradata/LEANOUT_PLAN.md
  • Gradata/VERIFIED_LEANOUT.md

📝 Walkthrough
  • Adds LEANOUT_PLAN.md: Phase C lean-out planning document establishing baseline SDK metrics (68,717 LOC / 249 files) with -36% reduction target, council findings to standardize APIs (e.g., Brain.correct() as canonical), and planned module deletions/moves
  • Adds VERIFIED_LEANOUT.md: Safety audit documenting partial verification of lean-out plan against actual code dependencies, test imports, and documentation references
  • Key finding: None of 14 original deletion candidates verified as safe to delete; audit identified actual dependencies in _cloud_sync.py, daemon.py, scoring/memory_extraction.py, and other flagged modules requiring migration or moving to extras rather than deletion
  • Phase B test suite passed (3970/3970 tests) confirming current codebase stability
  • Documents explicit disagreement items on deletion vs. move-behind-extras strategy and timeline length with medium/high confidence flags on individual decisions
  • Only rename/deprecation-alias operations identified as potentially safe pending further call-site updates
  • No breaking changes, security fixes, or new public APIs (documentation-only)

Walkthrough

Introduces two new planning and verification documentation files for a lean-out initiative: one establishing baseline metrics, reduction targets, and a phased execution strategy; the other documenting safety audit results and verified deletion/deprecation candidates for the Gradata repository.

Changes

Cohort / File(s) Summary
Lean-out planning documentation
Gradata/LEANOUT_PLAN.md, Gradata/VERIFIED_LEANOUT.md
New documentation files recording baseline SDK metrics, code reduction targets, council decisions on API standardization, module consolidation and subsystem relocation, enumerated v1.0 kernel surface, 16-step PR execution plan, and partial verification audit results for proposed deletions with breaking-change annotations and next-step/rollback strategies.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested labels

docs

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch rebase/council-phase-c

Review rate limit: 2/5 reviews remaining, refill in 30 minutes and 48 seconds.

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

@Gradata Gradata merged commit 5f5f87f into main May 1, 2026
7 of 9 checks passed
@Gradata Gradata deleted the rebase/council-phase-c branch May 1, 2026 16:07
@coderabbitai coderabbitai Bot added the docs label May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant