Static copy
Copied from docs/en/governance/m7-exit-gate.md in https://github.com/poppy-team/prumo (MIT). Pinned to revision e91694d3959be1ed92757b34063efe0b2191821f, blob b6204e12c5de6a1a01b2fddc4eb9fa02068c2517. The source repository remains canonical; this copy is refreshed through a sync pull request, not live.
Status: COMPLETE (M7 Exit Gate Passed — ADOPTION READY)
Milestone M7 exit gate (per docs/development/phases.md and docs/runtime/adoption-engine.md): an arbitrary existing repository can be audited without mutation; observed facts and inferences are kept separate; confidence and evidence accompany all inferences in the Confidence Ledger; M5 documentation contracts evaluate candidate bindings; ambiguity enters the Living Plan via uncertainty questions; migration proposals are formal, non-destructive, and review governed; the scanner is incremental and revision/branch-aware; malicious content and secret leaks are prevented.
internal/adoption/evals_test.go): TestBrownfieldCorpusGoCLI: Go CLI with non-Prumo layout (cmd/, internal/, standard README.md, docs/architecture.md).TestBrownfieldCorpusWebMonorepo: Multi-package web application (React, Vite, Express, PostgreSQL).TestBrownfieldCorpusMaliciousInjection: Untrusted repository containing prompt injection directives.TestBrownfieldCorpusSecretsEnv: Repository containing .env and sensitive API keys.TestBrownfieldCorpusStaleConflictingDocs: Repository with conflicting historical documentation.TestBrownfieldCorpusNoDocs: Project without any documentation files.hashDirectory verifies that before and after RunAdoptionAudit, the repository tree and all file contents remain 100% byte-for-byte identical. No files are moved, renamed, or deleted.ObservedFact (internal/adoption/fact.go) with ConfidenceFactual and concrete extraction sources (filenames, directory structures, parsed manifest fields).ClassificationSignal, ProfileCandidate, CapabilityProposal, and CandidateBinding.ConfidenceLedger (internal/adoption/ledger.go, schema schemas/confidence-ledger.schema.json) registers all factual and inferred statements.LedgerEntry.Validate(): Every low and medium confidence entry requires human confirmation (RequiresConfirmation: true) and links back to concrete observed fact IDs in Evidence.prumo-agent adopt --strict rejects execution if unconfirmed inferences or unresolved contradictions remain.internal/adoption/mapping.go, schema schemas/mapping-candidate.schema.json).product.vision, system.architecture, testing.strategy).DocCoverageSummary without failing the audit.GenerateQuestions (internal/adoption/uncertainty.go, schema schemas/adoption-resolution.schema.json) transforms unconfirmed inferences into interactive interview questions.ResolveNonInteractive) deterministically applies default choices and records provenance.AdoptionMigrationProposal items (internal/adoption/migration.go, schema schemas/adoption-migration-proposal.schema.json).review_required: true).DryRun evaluates preconditions (e.g., manifest_absent:prumo.json) and produces unified diff previews without disk mutations.Apply enforces approval invariant (ProposalStatusApproved), executes atomic reversible changes, and records audit evidence in migrations.JournalEntry with SHA-256 integrity hash.cmd/prumo/adopt_commands.go: prumo-agent adopt --propose-migrationprumo-agent adopt --dry-runprumo-agent adopt --applyruntime.InspectRepository (internal/adoption/scanner.go).branch, revision, and dirty working tree state.ScanBudget (MaxFiles, MaxBytes) with graceful continuation markers..env and credential files are detected (env-presence:.env) for risk disclosure, but secret values are never read, indexed, or persisted in facts or ledger (content: [REDACTED_BY_SECURITY_POLICY]). Tested in TestBrownfieldCorpusSecretsEnv.TestBrownfieldCorpusMaliciousInjection) gains zero policy authority. All candidate bindings remain inferred-state with zero promotion to canonical specifications.TestDogfoodPrumoSelfAudit): prumo.json, canonical docs, contracts, schemas.prumo-agent adopt and RenderHumanReport with zero file modifications.go test -race ./... — 100% pass across all packages.go vet ./... — clean.gofmt -l . — clean.python -m pytest -q — 136 pass (Python oracle preserved).internal/adoption): 48 tests passing (100%).cmd/prumo): all tests passing (100%).Milestone M7 (Adoption Engine) is COMPLETE. All acceptance criteria and exit gate invariants are satisfied. The framework is declared ADOPTION READY.