3.4 KiB
3.4 KiB
Autonomous Adaptation Method
This reference defines the safe foundation for adaptive self-iteration.
Scope
Adaptive iteration is proposal-only until a human explicitly approves a patch application workflow. The current implementation may:
- read one user-provided local source file;
- redact sensitive text before storing evidence excerpts;
- summarize repeated preferences and operational signals;
- produce adaptation proposals with target files, risks, tests, and rollback plans.
- dry-run an approved patch through
adapt-apply, after patch hash, approval, and target allowlist checks pass. - apply a patch only when the operator passes
--applyand the approval ledger names the reviewer, reason, patch hash, target files, verification commands, and rollback plan. - automatically reverse an applied patch when
--run-verificationfails, unless the operator explicitly passes--no-rollback-on-failure.
It must not:
- scan shell history, browser history, chat logs, mail, or private folders by default;
- infer permanent user memory from a single comment;
- write source files as part of scan or proposal generation;
- write source files through
adapt-applywithout explicit--apply; - apply a patch whose target files are outside both the proposal and approval allowlists;
- leave a failed verified apply in place by default;
- count proposals as completed implementation evidence.
Flow
adapt-scanreads an explicit source path and writesreports/user_patterns.jsonplusreports/user_patterns.md.adapt-proposereads the pattern report and writesreports/adaptation_proposals.jsonplusreports/adaptation_proposals.md.- A reviewer decides whether any proposal is worth implementing.
adapt-apply --write-templatecreatesreports/adaptation_approval_ledger.jsonandreports/adaptation_regression_report.jsonso the review surface exists before any patch is applied.adapt-apply --proposal-id <id> --patch-file <patch>defaults to a dry-run and records patch, target, approval, regression, and rollback evidence.adapt-apply --apply --run-verificationmay write files only after approval, patch hash, allowlist,git apply --check, and safe regression command checks pass.- If a verification command fails after a patch is applied,
adapt-applyrunsgit apply -R <patch>by default and recordsfailed-rolled-backplus rollback evidence inreports/adaptation_regression_report.json.
Evidence Standard
Each proposal should include:
- the repeated pattern that triggered it;
- redacted excerpts, never unredacted raw content;
- target files and change intent;
- risk level and boundary;
- verification commands;
- rollback plan;
- a clear
proposal-onlystatus.
Each approved application should include:
- reviewer, reason, approval date, and optional expiry;
- exact patch SHA-256;
- target file allowlist;
- regression commands restricted to local
maketargets or local Python verifier scripts; - rollback command or plan.
- rollback result if regression failed after an apply attempt.
Review Boundary
The adaptive loop improves iteration quality, but it does not replace normal review. Any proposal touching trigger behavior, reports, packaging, telemetry, privacy, or governance must still pass the same tests and release gates as a manually designed change. adapt-apply evidence proves that an approved patch path was checked or applied; it does not make world-class external or human evidence complete.