System Maintenance
Creative asset import policy is canonical in orchestration/CREATIVE_DIRECTION.md; keep the CLI opt-in, candidate mode, Human guidance, Security Assurance, and Scenario 264 synchronized.
Runtime Context 或 Integration Gate 改動時,執行 Scenario 198、完整 repository validation 與 exact-candidate Integration Gate,並維護 Change Impact 和 CORE_CHANGE_TEST_MATRIX 證據。
Retrieval relation extraction changes preserve the legacy retrieval_intelligence.py entry points. Run the focused extraction lifecycle, retrieval lifecycle and full repository Gate; lexical traversal uncertainty remains explicit.
Project Intelligence promotion eligibility and target confinement are implemented in project_intelligence_promotion.py; keep project_intelligence.py as the compatibility facade and preserve its Human approval and no-overwrite behavior with tests/evidence/module_extraction_lifecycle.py.
Evolution pre-analysis extraction likewise retains evolution_analysis.py as its CLI/import facade. The focused Radar lifecycle and module-identity checks preserve deterministic output and Human decision authority.
Documentation Impact Gate
Behavior-bearing observer and docs-only helper scripts require explicit canonical placement mappings. Reconcile the full documentation closure before marking a Core Change matrix READY.
Runtime Policy diagnostics are documented in the canonical Resource Authorization, Claude adapter and Scenario 177 sections; global Change Impact coverage remains partial.
Creative artwork documentation remains a separate placement surface; metadata scanning does not establish visual or provenance acceptance.
Native git -C <path> push validation follows the explicit target worktree, including its candidate SHA and scan evidence; invalid or dynamic target paths remain blocked.
Publication parser changes preserve exact-candidate binding: upstream branch shorthand is accepted only for the checked-out branch and is normalized to the observed full HEAD SHA/ref. The regular scan, authorization and required-check boundaries still apply.
Changes to local creative workflow contracts must update Scenario 236 and the user, technology, architecture, security, and orchestration references selected by the documentation-impact rules.
OpenCode adapter、Harness 或 Scenario 235 變更須依 placement contract 將新增內容放在各 canonical H2;只確認檔案清單完整不足以通過 base/head 預檢。
A Claude Code adapter change (for example the standard publication recipe) also touches the OpenCode compatibility notes, so the harness and character-artwork documentation rules apply together.
Publication Hook, Doctor and evidence-cache changes must close the canonical placement preview for the affected guard, authority, scan-evidence, tests and Scenario 261 paths before the candidate is finalized. This review records the unchanged content-safety, Skill, independent-review and Creative boundaries when shared Guard or documentation-map triggers select those topics.
Publication Hook, Doctor and evidence-cache changes must close the canonical placement preview for the affected guard, authority, scan-evidence, tests and Scenario 261 paths before the candidate is finalized.
FLUX 3 Klein schema compatibility updates belong to the existing Creative execution path and Scenario 236 evidence; they do not change character-artwork provenance, generation, or asset-import behavior.
Scenario 267's changes are synchronized through the required Harness, Project Intelligence and OpenCode adapter documentation before publication.
Creative raster and content-safety changes include the AVIF limits and Scenario 265 placement in the exact-candidate documentation review.
Character artwork keeps its existing source-to-candidate, hash-verification and create-only lifecycle; publication diagnosis adds no asset import or generation behavior.
Scenario 261 的 adapter 版本限制及安全恢復建議應同步到 Human 與 Agent canonical 文件。
Creative import changes map to the User Guide, Creative Direction protocol, Harness and Technology topics, architecture, security guidance, and Scenario 264. Review the exact placement closure while keeping global Impact Graph coverage unchanged.
Creative font assets use the shared bounded metadata scanner described in Runtime Content Safety; this check does not make licensing or visual-quality decisions.
The plan39 ComfyUI Resource Authorization lifecycle is tracked by Scenario 262 and its Core Change Matrix; its deterministic fixture uses loopback only and does not perform model inference.
Dynamic local ComfyUI workflow behavior is tracked by Scenario 268 and its Large/Core Change Matrix. Keep bounded schema parsing, runtime core-node classification, explicit input bindings, local model inventory checks, create-only import/output and uncertain-submit recovery synchronized; its synthetic fixture never claims real model inference. Audited topology templates and user-local profile draft/approve are tracked by Scenario 271; keep their evidence synthetic, offline and static.
Core publication changes close recursive Human and Agent documentation placement before the exact-candidate Gate.
Publication diagnostics are documented at the canonical Human and Agent topics, including safe native-hook output and read-only recovery behavior.
Cross-document publication diagnostics changes must keep the Human, Agent adapter and CLI guidance aligned, then close the required documentation impact set before publication. Do not interpret an absent gh required-check result as PENDING without independent policy evidence; unavailable policy is fail-closed. Extend stable reason codes without leaking exception text, and keep Host-denial observations separate from native permission proof.
Plan40 keeps known PublicationError causes on explicit stable codes and classifies unknown implementation failures as INTERNAL_DIAGNOSTIC_GAP with a safe error class. Prepare and Hook compare only allowlisted worktree/candidate/ref/mode/runtime observations. Optional Diagnostic ID traces use the existing configured AIPS_GOVERNANCE_AUDIT_LEDGER; lookup verifies chain integrity, and append failure never changes authorization. Do not create a default ledger or treat PLANNED, next_step: PUSH, or an observation fingerprint as authority.
新增 Skill 或改動 routing 時,同步更新 generated Skill Explorer、文件 placement/sync 規則、Scenario 259 與相關 Human/Agent 章節;使用 scripts/skill_catalog.py 重建頁面。
發布恢復使用 aips publish prepare 重新觀察目前候選與 live GitHub 狀態;既有 OPEN PR 不再建立,CLOSED/歧義 PR 停止,MERGED 必須驗證 exact PR head 與 merge commit 已納入 live base。觀察只由呼叫者選擇保存,不儲存 prompt、body 內容或憑證。
The creative workspace import flow is covered in the User Guide and canonical creative protocol, with the CLI and lifecycle paths reconciled.
Creative quality benchmark changes update the dataset and evidence contract alongside the creative workflow guidance, architecture overview, maintenance validation notes and Scenario 258. This evidence remains separate from native Host acceptance.
OpenCode adapter changes require exact-host evidence and synchronized Harness, Installation, Technology Guide and Scenario 235 descriptions of unsupported effects.
創作品質維護分開觀察必要條件漏判、生成/修正次數、重複缺陷與耗時。缺陷回饋、修正版 Profile/Bundle、比較報告保留 hash 關聯;既有 Profile 不原地修改。合成 lifecycle 只驗證流程,真實 vision 正確率需獨立實測。
The personal PR merge confirmation path is independent from character artwork generation and review; keep both authorization boundaries explicit when adapter documentation changes.
Shared CLI dispatch changes require creative/Harness documentation closure even when the new entry is publication-only; confirm existing creative authorization remains independent of external Git grants.
拆出的 Discovery、Query Terms、Creative Trace 與 Asset Validation 使用原 Facade 的文件歸屬。文件大小報告提供既有 H2 閱讀入口與機器可讀來源分類,保留單一 Canonical Registry。
When Project Intelligence candidate behavior changes, preserve its read-only status and verify the documentation placement and synchronization closure.
The creative authorization change updates the recursive character-artwork and Harness documentation closure; its exact candidate, changed-file digest and boundary evidence are bound by docs/qa/CORE_CHANGE_TEST_MATRIX.yaml.
The candidate report measures direct paths, closure additions, rule fan-in and repeated requirements. Repeated requirements are retained unless their content is shown to be redundant.
Creative executor, job-manifest, OpenCode prompt-grant or related scenario changes require synchronized Creative Direction, User Guide, Architecture Overview, Technology Guide and conformance evidence, plus the resolved documentation-placement closure.
Creative prompt compilation, capability ranking or local visual-review changes also require Scenario 234/236 coverage, privacy and authorization checks, and explicit evidence that advisory reports cannot complete Human review or user acceptance.
For behavior-preserving compiler extraction, bind the final candidate's Core Matrix to every documentation-closure path, verify exact prompt/recommendation parity and facade identity, and record architecture diagrams as unaffected because workflow boundaries do not change.
Creative readiness changes also keep fixed loopback discovery, sanitized provider recovery, and advisory-only Apple Silicon FP8 compatibility wording aligned across the adapter, Scenario 236 and canonical Human documentation.
Shared CLI router 更新可能觸發 Creative Direction 文件審查;Project Diagnostics 只讀,不會執行 Creative Profile、Provider 或 Artwork lifecycle。
固定模型配對新增或擴充時,同步更新 registry、固定 workflow、Creative Direction、Runtime 接入說明與 Scenario 236;資料 profile 只能重用已審核拓樸家族,執行證據與人工視覺接受仍分開。
角色圖片保留要求的媒材;以受限 configure 建立新的 Bundle,並載入校準、方向與視覺審查 skill。執行、圖片容器、人工審查與使用者接受分開回報。
Local character-art behavior is mapped through config/documentation-placement.yaml and config/documentation-sync.yaml; changes to its validator, Bundle, profile templates, OpenCode adapter, creative CLI routing or creative protocol keep the User Guide, Harness, Technology Guide, architecture overview, Scenario Conformance and Agent guidance in the same candidate. The synthetic lifecycle covers versioned no-overwrite preparation, fixed MFLUX capability/argv mapping, single-reference FLUX.1 edit, bounded multi-reference FLUX.2/Qwen edit, single-reference FLUX 3 Klein Base and Distilled generation on the audited topology, one-to-eight-reference dynamic ComfyUI edit with staged-byte hashes, the fixed Z-Image Turbo split-loader topology and fake providers only; exact-candidate validation never runs a project-configured engine, and a missing local engine remains BLOCKED_NO_ENGINE.
Version 0.76.0 adds no-overwrite Profile/Bundle preparation and fixed MFLUX CLI mapping; these changes do not install providers or models.
行為來源 scripts/project_intelligence_promotion.py、scripts/repository_governance_snapshot.py 已登錄 canonical Human 文件落點;GitHub governance snapshot 僅讀取 rulesets 與 branch protection,無遠端寫入能力。
Every system change must assess downstream documentation and behavior before completion.
| Area | Update when affected |
|---|---|
SYSTEM.md | routing, planning gates, precedence, context or completion behavior changes |
orchestration/* | detailed execution/model/instruction/planning behavior changes |
docs/ARCHITECTURE.md | runtime flow, planning flow, boundaries or update lifecycle changes |
README.md | Human first-entry behavior changes |
docs/human/GETTING_STARTED.md | Human quick-start changes |
docs/human/USER_GUIDE.md | Human-facing workflows/commands change |
docs/human/INSTALLATION.md | Human installation/update lifecycle changes |
docs/human/ARCHITECTURE_OVERVIEW.md | Human architecture overview changes |
docs/human/assets/*.svg | Human-facing architecture/lifecycle diagram changes |
docs/human/HARNESS.md | Global Harness / Adapter / ownership behavior changes |
harness/* | Global Harness / Adapter contract changes |
AGENTS.md | Agent bootloader changes |
examples/* | a new behavior needs a practical example |
tests/scenarios/* | routing/gate behavior changes or regressions need coverage |
| templates/schemas | persisted contract/state/planning/brand/creative/automation shapes change |
orchestration/CREATIVE_DIRECTION.md | creative workflow changes |
orchestration/BRAND_SYSTEM.md | brand workflow/precedence changes |
orchestration/CAPABILITY_INCUBATION.md | Role/Skill creation/reuse behavior changes |
orchestration/SECRET_HANDLING.md | credential acquisition/redaction/exposure behavior changes |
orchestration/CORE_CHANGE_TESTING.md | core-change test-selection/completion behavior changes |
orchestration/DETERMINISTIC_AUTOMATION.md | tool-vs-reasoning routing changes |
orchestration/PRODUCT_DELIVERY.md | complete-product lifecycle changes |
orchestration/RELEASE_READINESS.md | release/deployment readiness changes |
templates/product/* | Product Manifest / workspace contract changes |
templates/delivery/* | Local/deployment/release/runbook contract changes |
VERSION | release version changes |
CHANGELOG.md | every released behavioral change |
If an item is not affected, mark it N/A during change review rather than editing it unnecessarily.
Plan36 publication diagnostics preserve this topic's existing behavior and authority boundaries.
Scenario 269 documentation closure covers the Harness, Project Intelligence, CLI help and OpenCode compatibility rules for task-scoped Turn Context preparation and aips intelligence gc.
Scenario 272 covers the profile switch mechanism: strict defaults, fail-closed loading, TTY and typed-phrase confirmation for aips profile set, and the agent guard for profile writes.
Scenario 274 covers the two profile switches claude_coauthor_trailer and post_merge_refresh; both default to off and are changed only by a person through aips profile set.
Architecture Diagram Impact Check
本次更新 Project Intelligence 局部圖;頂層 runtime、Harness、Product Delivery 與安裝生命週期圖評估為 N/A,因沒有改變其流程或邊界。
Every Large/Core Change must explicitly assess architecture-diagram impact as part of the existing Documentation Impact Gate. This is not a new approval gate.
Trigger examples: Runtime/Routing/Context-loading flow changes; Harness/Adapter/instruction precedence changes; Project persistence/workspace lifecycle changes; complete-product/Release lifecycle changes; major Security/Quality/Review lifecycle changes; Install/Update/Uninstall behavior changes; a major new subsystem or boundary.
Required review set:
- docs/ARCHITECTURE.md Mermaid;
- docs/human/ARCHITECTURE_OVERVIEW.md;
- docs/human/assets/system-overview.svg;
- docs/human/assets/harness-overview.svg when Harness is affected;
- docs/human/assets/product-delivery-overview.svg when delivery is affected;
- docs/human/assets/project-intelligence-overview.svg when Turn Context / Project Intelligence / Change Impact is affected;
- docs/human/assets/system-lifecycle.svg when install/project lifecycle is affected.
For every relevant diagram: Affected → update diagram + explanation; Not affected → record N/A + concrete reason.
A Large/Core Change that materially changes a documented architecture flow but leaves the corresponding diagram stale is documentation-incomplete and must not be released as complete.
Self-improvement / Constitution / publish approval
Git Publish Approval binds the immutable candidate commit and target ref. Uncommitted files are reported separately and are not pushed with that commit; the exact-candidate Integration Gate still requires reproducible validation inputs.
Changes to this system first pass orchestration/SYSTEM_SELF_IMPROVEMENT.md.
If Constitution semantics are affected, the Constitutional Change Gate must complete before implementation. Material system changes also require Core Change Approval.
Before remote publication, present the Git Publish Proposal. A material difference from the approved implementation/publication plan requires re-approval.
Multi-file changes should normally be assembled into one coherent remote branch update after the logical change is complete. Avoid file-by-file remote commits/pushes that expose temporary incomplete repository states to CI. If incremental remote publication is necessary for collaboration or diagnosis, record that reason in the Git Publish Proposal.
Release checklist
- Confirm System Improvement Review and applicable Constitutional/Core Change approvals.
- Run
aips validate. - Review the Documentation Impact Gate.
- For Large/Core changes, complete Architecture Diagram Impact Check.
- Confirm Mermaid and affected Human SVG diagrams match actual behavior.
- Build the Impact-derived Test Matrix for the final Change Boundary and execute every applicable check.
- Confirm changed routing/gate behavior has scenario coverage.
- Confirm planning/creative/brand/automation/product-delivery templates match their protocols when affected.
- Confirm Human and Agent documentation audiences are synchronized when behavior affects them.
- Confirm applicable secret/credential leakage and handling review is complete; secret-scan evidence must not echo secret values.
- Update
VERSIONusing SemVer. - Update
CHANGELOG.md. - Ensure the system working tree is clean before publishing.
- Prepare the Git Publish Proposal and obtain explicit approval.
- Prefer independent review/PR for material system changes.
Versioning
Scenario 266 records content-safety verification while preserving existing maintenance and publication authority boundaries.
Scenario 266 provides local deterministic safety evidence; it does not substitute for independent review or grant approval.
Scenario 266 binds injection review to added candidate lines while Secret/PII scanning still covers the full candidate diff.
When the publication guard changes, keep every newly allowed command form paired with a still-denied publication-capable counterpart in GuardFalseDenialTest, and keep the live hook in sync by updating the installed AIPS system after merge.
The 0.83.0 candidate records shared Required Checks policy evidence and bounded Claude Code publication diagnostics.
Runtime Policy diagnostic changes require a candidate-bound Core Change Matrix covering profile-path privacy, no-fallback behavior, exact destination differences, Claude denial output and separation from native post-tool failure evidence.
The dev-friction integration adds aips publish ship, the protected-path guard, person-only aips profile switches, worktree Intelligence seeding and AIPS-owned ComfyUI job interrupt; each is covered by its own Core Change evidence in docs/qa/CORE_CHANGE_TEST_MATRIX.yaml and none grants publication or write authority.
Plan29 #6 is validated as an exact Core Change candidate with its own matrix and required repository check.
創作品質維護分開觀察必要條件漏判、生成/修正次數、重複缺陷與耗時。缺陷回饋、修正版 Profile/Bundle、比較報告保留 hash 關聯;既有 Profile 不原地修改。合成 lifecycle 只驗證流程,真實 vision 正確率需獨立實測。
Plan26 Phase 7 sets VERSION to 0.81.0 and moves the accumulated Unreleased notes intact under the matching changelog heading, leaving one empty ## Unreleased. This prepares exact-candidate readiness only; tag and GitHub Release creation remain separate actions requiring their own approval.
創作驗證分別記錄命令盤點、合成 tool/provider 測試、native host 驗證及真實模型推論。未提供權重時,品質/設備效能維持未驗證,不以流程通過推定改善成效。
Version 0.76.0 adds no-overwrite Profile/Bundle preparation and fixed MFLUX CLI mapping without installing providers or models.
The local creative execution and bounded Shell diagnostics ship in v0.75.0; they do not install providers or models.
OpenCode V2 lifecycle now verifies active Session-root Context, bounded creative asset metadata, version-aware recovery, effect-aware Shell decisions and privacy-limited trace; native v2.0.24 acceptance remains scoped to the tested host, with global governance ADVISORY.
OpenCode 相容證據需記錄實際版本與作業系統;AIPS 檔案完整性成功不代表任意 OpenCode 版本已完成原生驗證。
Standalone and shadow dependency-review artifacts retain exact base/head, run ID, actual JSON findings and outcome for 90 days. Parity compares canonical findings; missing outputs, different candidates or inaccessible artifacts stay UNKNOWN. Job success alone cannot promote the shadow. Record resolved toolchain fingerprints and repeat full Gates only for new changes or unresolved failures.
Python support facts live in config/system-facts.yaml and are mirrored in pyproject.toml. The required PR Gate tests Python 3.12; the weekly compatibility workflow smoke-tests 3.12, 3.13, and 3.14. Runtime-floor changes must keep System Reference, installation guidance, Technology Guide, and Scenario 210 aligned.
- MAJOR: incompatible governance/protocol/contract changes.
- MINOR: backward-compatible new behavior, role, skill, work mode, CLI capability or schema/planning extension.
- PATCH: backward-compatible bug fix, hardening, clarification, typo or non-behavioral documentation/evidence correction.
Major updates are not auto-applied by aips system preflight without explicit --allow-major. The legacy aips preflight command remains a compatible alias.
tests/validation/versioning_contracts.py verifies one leading Unreleased heading, unique strictly descending SemVer release headings, and VERSION equal to the newest release. Keep runtime dependency ranges in requirements files; constraints/tested.txt records the exact CI-tested set. Python support is declared separately from the tested Python version in pyproject.toml and config/system-facts.yaml.
Before readiness, move finalized release notes under the heading matching VERSION, leaving exactly one empty ## Unreleased section. scripts/version_tag_policy.py checks VERSION, exact candidate/main SHA, any existing tag destination, and that canonical section. Missing, duplicate, malformed, or non-empty sections block readiness. READY still requires separate explicit release approval; merging a PR does not create a version tag or backfill historical tags.
System facts and validation planning
Plan45 keeps publication command syntax validation ahead of candidate scanning. The reviewed exact changed-path set, Core Matrix binding and complete Documentation Impact closure are required before the candidate Gate.
Project Diagnostics 的 Core 候選同步更新公開命令事實、Capability Registry、Scenario 237、Lifecycle evidence 與文件閉包;精確候選仍須執行完整 Integration Gate,診斷 PASS 不代表發布核准。
The validator registry, exact-path CI provisioning plan, full-run Shadow Plan, and Integration Gate profile have separate responsibilities; none may silently omit required validators. Promotion of selective execution requires the complete reviewed shadow cohort.
config/system-facts.yaml and config/architecture-surfaces.yaml are the source for factual command/capability tables in docs/human/SYSTEM_REFERENCE.md. Run python scripts/system_facts.py --write after changing those facts and --check in validation. Keep explanatory prose in its canonical topic documents.
CI derives Node setup, Chromium downloads and optional OpenAPI evidence selection from exact candidate paths using scripts/ci_validation_plan.py. Python packages from all four validation requirement files are always installed under the tested constraints: install/preflight and legacy-migration fixtures require the complete Python environment even for documentation-only candidates. Unknown and sensitive paths select the full toolchain. The plan only skips unrelated browser downloads and optional lifecycle evidence; mandatory secret scanning, fast preflight, repository validation and the exact-candidate Integration Gate remain required.
The validate.yml concurrency group includes the pull-request action as well as its number, preventing an opened event from cancelling a separate classification-label validation while preserving same-action supersession.
Documentation audience
- Human docs use Traditional Chinese. Specialized terms include English on first use.
- Agent docs remain concise English unless a concrete reason requires otherwise.
- Do not maintain duplicate full Human guides in two languages by default.
docs/DOCUMENTATION_MAP.mdis the audience map.- When behavior changes, explicitly check both Human and Agent documentation impact.
Simplicity / reuse review
Before release, check:
- no unnecessary new Role when an existing Role can own the work;
- no new Skill that merely represents a visual style/artifact type;
- no duplicate Role/Skill IDs;
- repeated rules live in one authoritative protocol and are referenced elsewhere;
- bootloader/README remain short entry documents;
- deterministic data processing uses helpers when this materially reduces repeated model work.
Product delivery consistency
When end-to-end delivery behavior changes, verify together:
- PRODUCT.yaml contract;
- Product Creation Work Mode;
- Planning Package;
- Local Environment / Deployment Plan / Runbook;
- Release Readiness;
- Security Assurance interaction;
- Human architecture overview;
- production scenarios and validator coverage.
Subsystem consistency map
Interaction / requirement / external context
Implementation Resolution changes update orchestration/IMPLEMENTATION_RESOLUTION.md, its profile and language references, the structural validator, and Scenario 193 evidence together. Preserve contract authority, evidence provenance, ownership protection and UNVERIFIED semantics; a profile does not authorize migration or publication.
When these behaviors change, review together:
- Requirement clarification and Planning Package v2 → SYSTEM / ORCHESTRATOR / research, plan, requirement, experience, visual, domain, API and manifest templates / structural validator / reusable roles and skills / lazy domain references / Human Guide / architecture map / scenarios.
- External context resolution → connector-first protocol / provenance template / Human Guide / scenarios.
- Visual polish → Product Designer / Frontend Engineer / visual-quality-review / Design Work Mode / screenshots/state scenarios.
- Multi-perspective review → Quality Reviewer / code-review / Model Routing / Review templates / lesson persistence.
Product delivery / quality / visual state
When product-delivery behavior changes, review together:
- QUALITY_PLANNING / QUALITY_PROFILE / Planning Package / Product Delivery / Product Manifest / Release Readiness;
- LOCAL_COMPLETE / Production Enablement / PRODUCTION_VERIFIED lifecycle;
- Project Visual Profile / Visual Audit / Product Designer / Frontend Engineer / visual-quality-review;
- Human Guide, product-delivery architecture diagram and applicable scenarios.
Harness / Runtime adapters
The CLI installation lifecycle does not register a Runtime adapter. The Harness lifecycle evidence covers explicit registration, fail-closed UNKNOWN classification, refresh only for verified ACTIVE ownership, and uninstall preservation of unrecognized local files.
When Harness behavior changes, review together:
- harness/BOOTSTRAP + HARNESS_PROTOCOL + ADAPTER_CONTRACT;
- Runtime Adapter registry/files;
- HARNESS_RESOLUTION + INSTRUCTION_RESOLUTION;
- bin/aips install/uninstall/preflight/resolve/status/doctor;
- README / GETTING_STARTED / INSTALLATION / HARNESS;
- system-overview / harness-overview / system-lifecycle SVG;
- Ephemeral/Attached scenarios and ownership regression evidence.
Never trade away user-owned instruction/Skill preservation merely to improve automatic coverage.
Install / Preflight lifecycle evidence should run against isolated temporary Git repositories and local bare remotes. System runtime artifacts such as Python __pycache__/ / *.py[cod] must remain ignored so ordinary AIPS CLI execution cannot make the System repo fail its own clean-worktree preflight gate.
Project Intelligence / Change Impact
When Project Intelligence behavior changes, review together:
- PROJECT_IDENTITY / PROJECT_INTELLIGENCE / CHANGE_IMPACT / Project Knowledge compatibility;
- TURN_HARNESS / HARNESS_RESOLUTION / INSTRUCTION_RESOLUTION;
- Project Intelligence templates + workspace MANIFEST/STATE;
- project_intelligence.py / turn_context_hook.py / bin/aips;
- README / GETTING_STARTED / PROJECT_INTELLIGENCE / USER_GUIDE;
- project-intelligence / system / lifecycle diagrams;
- freshness, source-registry, HTML, migration, single-writer and Change Impact evidence.
Legacy Project Knowledge remains compatibility input only. New reusable understanding belongs in Project Intelligence.
Focused Intelligence context evidence must distinguish storage deduplication from runtime-context deduplication. Do not promote conflict/override/change-impact/monorepo/migration Scenarios until their full contracts are actually enforced and directly exercised.
Impact-derived regression testing
Requirement-planning evidence and impact-derived regression coverage stay bound to their own validated scope; a scanner pass does not approve requirements.
For the publication Core boundary, review Hook timing/redaction, Doctor policy states, exact evidence invalidation, upstream flag parsing and full candidate/history scanning against the final matrix-bound diff.
Runtime Policy destination-matching changes require evidence for exact host, port, method, and path matches plus fail-closed handling of unknown or malformed conditions; keep this distinct from Resource Authorization profile validation.
Independent-review evidence remains separate from Required Checks. When reviewing publication changes, verify AIPS_ENFORCE_REQUIRED_CHECKS and ensure its default affects only AIPS's own merge gate, not Doctor observations or GitHub rules.
Publication Hook recovery tests assert zero inline Doctor calls, immediate fail-closed guidance and safe Prepare timeout fields (Scenario 260/261); exact-candidate evidence is recorded in the Core Change Matrix.
Plan41 records scanner, CLI, documentation-closure, and exact-candidate Gate evidence in the canonical Core Change Test Matrix; its approved scope does not require independent review.
Publication policy changes test branch protection visibility, exact target policy, check-state classification and Hook no-write behavior.
The publication matrix covers candidate-versus-policy branch selection, HTTP error classes, safe Hook diagnostics and read-only retry classification on the exact candidate.
The publication matrix binds the exact changed-path set and records denied, unavailable, stale and no-mutation evidence before the Integration Gate.
aips publish prepare --auto-merge 僅規劃 exact-head GitHub auto-merge,並要求 non-empty passing required checks;既有 native Human confirmation 與 GitHub 後續要求仍適用。
OpenCode adapter changes must preserve version/platform/source binding in native acceptance. Review unsupported Shell, MCP/custom-tool and out-of-process effects as explicit limitations; keep missing legacy evidence UNVERIFIED and overall governance ADVISORY.
Personal-mode PR merge validation binds the per-call confirmation to the exact candidate head and required-check result; completed review evidence does not substitute for that confirmation.
The approved Core extension keeps ordinary merge confirmation and Gemini ask_user, while task-authorized Claude --auto still uses the exact-candidate guard and GitHub checks. Its M4A boundary validates the container, scans moov metadata and rejects malformed or >8 MiB files. Top-level product and Harness diagrams are N/A because the existing publication/scanner boundary is extended without changing component topology; the publication flow text and local Integration Gate cover the changed behavior.
For creative authorization changes, derive regression cases from the adapter, policy, executor, callers and consumers. Review changed and affected-but-unchanged nodes; do not infer repository-wide completeness from scoped graph evidence.
創作 runtime 變更驗證 user-only 授權、Context envelope、設定欄位與版本競爭、取消/換任務、媒材拒絕、損壞圖片及 provenance。真實推論與人工品質驗收需分開回報,不能由 fake engine PASS 代替。
Core adapter changes bind lifecycle, security-boundary, documentation-closure, and exact-candidate Gate evidence in docs/qa/CORE_CHANGE_TEST_MATRIX.yaml.
Risk-adaptive traversal changes use AST-extracted direct Python calls with bounded caller/consumer depth; unresolved dynamic dispatch and repository-wide partial graph coverage remain visible in evidence.
本次 Project Intelligence promotion helper 維持既有 facade、Human approval 與 no-overwrite 邊界;Scenario 223 證明 Evolution Radar 對候選排除原因提供決定性歸因。
Phase 4 generator adapter 維護需同步檢查 Profile schema、OpenAPI evidence、命令執行邊界、allowlist、Phase 3 generation records、原子回復、Scenario 196 與 Integration Gate fixture。Gate 僅執行隔離的假 generator lifecycle,不呼叫專案設定的實際 generator。更換 generator 或 version 時應重新審查 executable hash、版本輸出、argv 與生成差異,並執行專案原生測試。Phase 5 的 generator_reports 是 Profile 自願啟用的未追蹤本機報告;維護時檢查 schema/fingerprint、Git 祖先、Profile 前後雜湊、工具版本與 argv、輸入與輸出及 generation records。執行 tests/evidence/openapi_client_pilot_lifecycle.py 確認本機服務、client、證據鏈及負面路徑;新增產品不自動複製 AIPS 範例。
For every Large/Core Change, testing is derived from the final Change Boundary, not from a fixed minimum smoke suite.
Build and persist a matrix:
| Affected boundary | Static/Lint | Unit | Integration | Contract | E2E | Security | Migration/Recovery | CLI/Harness | Docs/Schema | N/A reason |
|---|
Rules:
- every materially affected boundary has applicable evidence;
- N/A requires a concrete reason;
- public contract changes require contract/consumer coverage;
- persistence/schema changes require migration/rollback/recovery evidence when applicable;
- Runtime/Harness/CLI changes require executable lifecycle/regression tests;
- security-boundary or credential-handling changes require security/secret-leakage evidence;
- documentation/schema/template contract changes require structural validation;
- if implementation expands the Change Boundary, recompute the matrix;
- failing required tests block completion/release;
- never remove a relevant test merely to obtain a green result.
Prefer the strongest practical deterministic evidence for affected behavior while avoiding unrelated full-suite cost that adds no confidence.
Governance enforcement consistency
When Approval Binding / Governance Enforcement changes, review together:
- Approval Record template + governance_guard.py;
- Git Publish/Core Change/System Improvement approval fields;
- Runtime adapter state/ownership and Claude/Gemini pre-tool hooks;
- TURN_CONTEXT_MANIFEST explanation metadata;
- Harness/System architecture diagrams;
- scenarios 096-100 and focused governance evidence.
Do not claim TOOL_GUARDED when the installed pre-tool guard is absent or unverifiable.
Durable Run State consistency
PermissionDenied diagnostics are separate from durable run state; they do not record checkpoints, prompts, or raw tool inputs.
恢復計畫與品質摘要都是唯讀觀察;讀取報告不會附加專案、刷新狀態、授予工具權限或改變生成/人工審核/接受狀態。
創作可靠性 Core candidate 保留完整 Gate、媒材拒絕及取消授權回歸。損壞 PNG fixture 必須失敗;合成測試不能替代真實模型與人工品質驗收。
OpenCode plugin recovery is version-aware and ownership-safe; doctor output distinguishes installation integrity from native runtime acceptance.
Read-only Run Dashboard and run projection fingerprints remain backed by shared canonical helpers; they introduce no second state source or write authority.
固定 Turn Context 或 task protocol routing 變更時,更新 canonical core/router、Runtime adapters、文件 placement、Scenario 與 impact-derived matrix;維持原有 Human approval 與 publication boundaries。
Standalone and shadow dependency-review artifacts retain exact base/head, run ID, actual JSON findings and outcome for 90 days. Parity compares canonical findings; missing outputs, different candidates or inaccessible artifacts stay UNKNOWN. Job success alone cannot promote the shadow. Record resolved toolchain fingerprints and repeat full Gates only for new changes or unresolved failures.
Task ownership lease 與共用 Scheduler state 必須以同一 task/execution identity 維持一致。過期 dirty work 不可自動重派;recovery 保留原 base revision 和 write set,最終以該 base 的完整 Git diff 對帳。
The Parallel Run Dashboard reads canonical checkpoints and related evidence through one sanitized projection. Keep it observational: approval, retry, cancellation, merge and publication remain outside the dashboard.
Event changes must preserve a single serialized sequence across run-state and telemetry writers. Observed Context, Retrieval and Gate stages record actual operation boundaries; when evidence is unavailable, observation is degraded and the original operation result is preserved.
When durable run state changes, review together:
- PROJECT_IDENTITY + RUN_RESUME;
- RUN_CHECKPOINT + workspace STATE;
- aips_identity.py + run_state.py + bin/aips run/identity routing;
- external user-state storage and read-only legacy migration;
- revision / branch / dirty workspace fingerprint behavior;
- EVENTS.jsonl redaction / no-transcript contract;
- resume/identity scenarios and executable lifecycle evidence;
- system/lifecycle diagrams.
Resume must never bypass current governance, security, impact or verification gates.
發布 preflight 的 git_identity 只在候選 commit 的 author 欄位接受 GitHub App 機器人 noreply 格式(<數字 ID>+<slug>[bot],identity.allowed_bot_author_patterns);committer 與本機 user.email 仍只接受一般 noreply。commit_messages PII 掃描前,identity.trailer_identities 的精確 trailer 身分(目前只有 Dependabot 的 Signed-off-by: dependabot[bot] 與 GitHub support 位址)只在同一機器人撰寫之 commit 的最後 trailer 區塊以 git-identity-metadata 取代;pii.email.v2 不變,其他位址仍會擋下,政策格式錯誤時 fail closed,機器人身分不授予任何權限。
Scenario Conformance consistency
When Scenario behavior/coverage changes, review together:
- tests/scenarios/*;
- tests/scenario_coverage.yaml;
- scripts/scenario_conformance.py + scripts/agent_eval.py;
- tests/agent_eval/cases/* + tests/agent_eval/results/*;
- tests/evidence/*;
- tests/validation/* + tests/validate_repository.py;
- orchestration/CONFORMANCE.md;
- docs/CONFORMANCE.md / USER_GUIDE;
- coverage claims in CHANGELOG/release evidence.
Before promoting legacy manual coverage: reconcile the Scenario to current canonical behavior, add direct evidence, then reclassify. For semantic behavior, Agent Eval requires an actual recorded observable Result bound to the exact Case fingerprint and passing deterministic scoring. Never infer automated coverage from Scenario count or an eval prompt alone.
Execution Isolation consistency
The local Integration Gate selects a complete Python 3.12 validation environment and reports missing dependencies before candidate scanning. For documentation changes it requires Node 24+ and VitePress at the exact version pinned by the candidate's package-lock.json. It uses the checkout's node_modules by default; AIPS_VITEPRESS_NODE_MODULES may point to an absolute external dependency directory for a clean checkout. The preflight invokes that bundle directly and never installs packages or contacts a registry. The E2B artifact workflow pins the Node 24 upload action; its existing synthetic-data and least-privilege boundaries remain in force.
When Execution Isolation behavior changes, review together:
- PROJECT_IDENTITY + EXECUTION_ISOLATION;
- execution-profile schema + workspace MANIFEST;
- execution_isolation.py + bin/aips isolation routing;
- repository-level writer ownership / workspace identity / dirty cleanup;
- truthful sandbox capability reporting;
- architecture docs/diagrams;
- scenarios 111-120 and identity/isolation lifecycle evidence.
The provider-neutral registry binds runtime class, data class, egress, mounts, credential scope, TTL and evidence freshness. A provider is available only when enabled, integration status is ready and fresh registry-bound verification passes. The initial E2B candidate remains disabled; its manual main smoke workflow uses only synthetic input and requires prior written provider-test consent.
High-risk external runtime actions also require an exact, unexpired Approval Record and fresh verified network-egress enforcement. A hook alone is not a sandbox; missing provider proof blocks the action.
High-risk external runtime actions also require an exact, unexpired Approval Record and fresh verified network-egress enforcement. A hook alone is not a sandbox; missing provider proof blocks the action.
Public repository / CI consistency
混合候選的逐檔文件豁免(Scenario 221):pure_dependency_update 逐檔檢查完整差異,回報完整 candidate_files 與 verified_files;Documentation Impact、Placement、Sync 只在候選路徑集合完全相符時,才從文件觸發匹配排除 verified pin 檔。整體 PURE_DEPENDENCY_UPDATE 仍要求所有候選檔都通過驗證。混合 semantic hunk、未辨識路徑、路徑或模式變更、未釘選/降版/格式錯誤、規劃路徑及分類或 Git 錯誤均維持原文件規則。完整路徑與 hash、依賴人工審查、secret/content scans、matrix、Integration Gate、Required Checks 與人工合併核准均不變,automatic_merge_authorized 仍為 false。
User-private Claude diagnostic logs are not repository artifacts and must not be committed or included in CI reports.
Publication preflight source and scenario changes must be represented in the canonical trigger maps; preview closure must include the Hook, authority, Doctor, exact scan evidence, tests and Scenario 261.
Validation workflow action updates retain immutable upstream commit pins and the Node/cache contract in the canonical candidate matrix. The pure-dependency documentation exemption applies only when the complete diff remains an allowlisted dependency-only change.
Content-safety pii.email.v2 only exempts the exact ASCII git service account in scp-style git@<host>:path and ssh:// Git remotes; every other email is still blocked. scripts/publication_transfer.py and its lifecycle test use the literal git@github.com: remote string instead of splicing it together to avoid the scanner.
Scenario 263 covers font parser bounds, staged blob size-before-read, scanner parity across commit/publication/history, and redacted diagnostics; exact-candidate validation remains required before publication.
The lucas-lab target requires PRs and the verify and visual-audit checks; force pushes and branch deletion are disabled with zero required approvals.
創作品質維護分開觀察必要條件漏判、生成/修正次數、重複缺陷與耗時。缺陷回饋、修正版 Profile/Bundle、比較報告保留 hash 關聯;既有 Profile 不原地修改。合成 lifecycle 只驗證流程,真實 vision 正確率需獨立實測。
Creative authorization lifecycle evidence covers fresh grants, revocation, root/session changes, scope expansion and output caps; native-host checks and real inference remain separately reported, and unavailable inference stays unverified.
The OpenCode native adapter is version-scoped to V2. CI and local acceptance distinguish plugin setup from model-context and permission-hook execution; unknown runtime behavior remains UNVERIFIED.
Evolution Effectiveness reports incomplete pre-analysis coverage instead of calling absent triage a zero shortlist. Oversized scheduled Radar Issues preserve the full UTF-8 body in a bounded digest-checked archive restored before monthly parsing.
外部 Intelligence metadata 不可寫時,可重建 metadata 保存在快取旁並回報 CACHE_ONLY;索引 freshness 仍由實際候選比對,canonical 來源與 graph 不會被替代。以 aips publish checks --pr <number> --head <sha> 查看最新 workflow/check 結果:舊 CANCELLED 不覆蓋較新的成功;目前取消、缺少必要 repository、等待或失敗均不會成為 PASS。PR 與 main 的 Gate 仍綁定各自候選;CI pip 快取以 requirements 雜湊作鍵,安裝與完整 Gate 每輪照常執行。合併後另核對註冊安裝版的 commit。
Weekly/manual advisory-security-inventory runs the pinned OSV Scanner reusable workflow and compares the existing project secret scanner's outcome with a full-history Gitleaks shadow scan. It is supplementary evidence only; the required candidate secret scan and repository Gate remain unchanged. Review findings or outcome differences before considering any future enforcement change.
installation-entrypoints jobs are independent and retain their existing PR paths and read-only permissions. Review their 5/10/10-minute limits when runtime evidence changes; the limits use 15× per-job P95 from the ten latest successful runs and upward five-minute rounding. Do not add cancellation concurrency unless shared state requires it and required evidence remains observable.
Read-only scheduled workflow limits use observed run timing and an explicit safety margin. Repository Health's three completed runs took 14, 14 and 19 seconds; its ten-minute job limit is provisional because the sample is small. The monthly reliability workflow uses the shared Python bootstrap and queues up to 100 same-cohort Issue reports without cancelling a running or pending report. It has no timeout until a successful run provides a timing baseline. The Validation Observation Collector keeps its existing 15-minute limit and no concurrency group so each scheduled/manual shadow observation remains available. Evolution Effectiveness queues up to 100 pending schedule/manual writes to the same period Issue without cancelling any report; explicitly selected periods remain separate.
排查 AUTH_CONFIGURATION_UNVERIFIED 時先確認 GH_CONFIG_DIR 與 XDG_CONFIG_HOME 的設定選擇,再檢查登入;不要複製憑證。Local preparation 保留原本 gh 設定目錄並拒絕不屬於指定 Python 3.12 venv 的執行檔。文件異動先用 preview 查閉包;docs impact 須解析正確 checkout。重用準備好的環境,候選固定後執行一次完整本地 Gate,保留 PR 與 main CI;以既有 timing evidence 評估慢項目。
Use aips publish environment from the intended checkout and inspect its source/target/Python diagnostic before validation. Reuse an existing environment with python3.12 bin/prepare-local-validation --venv <path> --check-only; a local --wheelhouse <path> supports offline Python dependency installation. Browser downloads remain separate prerequisites. GitHub logs/artifacts may redirect to external storage; keep domain approval explicit and use bounded Check summaries for initial diagnosis.
The validation workflow derives optional browser and OpenAPI dependency installation from the exact-candidate plan. Its required base and validation requirements remain unconditional; the matching browser/OpenAPI lifecycle evidence runs when selected, while the repository aggregate, secret scan, preflight and Integration Gate remain required.
Retrieval cache failures distinguish read access from stale-index refresh writes. A RETRIEVAL_CACHE_WRITE_ACCESS_DENIED result means SQLite could not open the rebuildable cache for update; allow cache and sidecar writes or set XDG_CACHE_HOME to a location writable by the current runtime, then retry. Keep invalid-index rebuilds (--force) for an index explicitly reported INVALID; do not use them to bypass ordinary sandbox write restrictions. Project Intelligence semantic refresh remains separate and must still re-read changed authoritative sources.
提交前的 aips publish preview --base <sha> --change-class <class> 會檢查工作樹(含未追蹤檔)的文件 H2 placement、Core Matrix base/hash 綁定與 PR 首次建立所需標籤。若 CLI 認證失效,aips publish plan 回報 AUTH_REQUIRED 與重新登入步驟,不會輸出憑證內容;最終 Gate 仍以乾淨的已提交候選執行。
The working-tree preview scans candidate additions and complete untracked files. The exact committed candidate still receives the mandatory final-tree and commit-history scan in Integration Gate.
Publication preflight treats an optional environment capability as NOT_REQUIRED when the exact candidate plan does not select it; only a selected browser check can block on loopback or browser readiness. Required repository validation, candidate secret scanning and the Integration Gate remain mandatory.
When publication preflight changes, keep the working-tree preview, content safety findings, configured Git identity checks and exact-candidate resolver aligned with CI.
The optional OpenAPI validator is installed only by aips openapi install into the managed AIPS venv using pinned requirements-openapi.txt; basic installation stays network-minimal. Keep aips openapi doctor, aips doctor, actionable missing-dependency errors and product-root CLI validation aligned. The installation-entrypoints workflow must prove fresh-install missing status, explicit setup and real validation from an independent product directory on Linux, plus dependency-free lifecycle contracts on Linux and macOS. Windows coverage describes the supported WSL launcher contract only.
Every publication candidate also runs the built-in strict secret scan before dependency installation in GitHub Actions and during local publication preflight. The Integration Gate repeats the scan as required candidate-bound evidence. Both use config/secret-scan.yaml, scan final content plus base..head history, ignore no inline bypass markers and fail closed on incomplete input. The generic assignment detector exempts only the documented generated-password and parameterized SQL value forms; high-entropy literals and provider-token/private-key detectors remain active. JSON is scanned through 8,000,000 bytes, other text through 2,000,000 bytes, and larger files block publication. WebM has no path exceptions: bounded EBML parsing scans declared text metadata and skips media payloads; malformed or unsupported structures and files above the configured 32 MiB default block publication. Keep the single repository required-check context; the Janitor aggregate continues to carry failures.
Before committing, aips publish preview --base <base> --change-class <class> reports documentation closure with the rule responsible for each required file and checks the candidate Core Matrix binding. After reviewing the final change boundary, aips publish matrix-sync --base <base> can refresh the canonical matrix base/hash fields. This does not mark the matrix ready or reconciled.
aips trajectory evaluate 與 Scenario 167 是 Eval-as-CI 的 deterministic evidence;更新 trajectory schema、policy 或 publish wiring 時,必須同步執行 Integration Gate、Repository validation 與文件 impact closure。
Portable Command 變更必須同時驗證 Registry、renderer、CLI lifecycle、MCP read-only facade、ownership conflict 與相關 canonical documentation;版本更新不得把 Host-native capability 誤標為已驗證。 本機與 GitHub 必須透過 scripts/publish_preflight.py 共用 base/head、change class、canonical matrix 與 diff-aware documentation base。發布提案前先執行 aips publish plan,確認 protected branch 路由與 PR label;未帶 AIPS_DOCS_DIFF_BASE 的一般 validation 不得宣稱為 CI-parity 證據。
本地首次執行 Gate 前,以 Python 3.12 執行 python3.12 bin/prepare-local-validation。它在系統暫存目錄建立獨立 venv,安裝與 CI 相同的四份 requirements(包含 OpenAPI validator)和 Playwright Chromium,接著檢查 ruff、mypy、瀏覽器及 localhost。之後可執行 python3.12 bin/prepare-local-validation --check-only --run --base <base-sha> --head <head-sha> --change-class core,用既有環境執行 exact-candidate Publication Preflight 與 Gate;它會將 PATH 指向 venv,並以暫存 XDG_CONFIG_HOME 隔離測試設定。若輸出 ENVIRONMENT_BLOCKED,先依診斷修復執行環境,再判讀程式測試結果。--check-only 不安裝套件;Gate 報告路徑可用 --output 指定。開發時先跑受影響測試;候選 commit 固定後只執行這一次完整 Gate,不需另外先跑 tests/validate_repository.py。Validator 直接執行 Python helper 或 lifecycle 腳本時,同一路徑不需再對該檔案另跑 py_compile;相同 lifecycle 在完整 validator 中只執行一次。包裝器會另輸出 .timing.json,列出每個 contract 模組與 lifecycle 的耗時;CI 也會保留 repository-validation-timing artifact 供比較。
直接呼叫 scripts/publish_preflight.py run 時,也會讓子程序優先使用目前 sys.executable 所在的 Python 目錄。先用 --check-only 檢查已準備好的 venv 與瀏覽器,再跑確切候選的完整 Gate;這可避免子程序從原始 PATH 誤用缺少依賴的 Python,並避免因此重跑完整驗證。GitHub 僅需既有 allowlist;不要為本機依賴準備擴大永久網路權限。
建立已核准的 Large/Core PR 時,在 gh pr create 同一命令附上 --label aips:large-change 或 --label aips:core-change,讓首次 opened 事件即使用正確分類。PR number 共用併發群組;較新的 PR action 會取代同 PR 舊 run,並按最新 labels 執行。檢查最新候選 SHA 的 required aggregate,避免把被取代的執行判成測試失敗。
若 Turn Context 回報 RETRIEVAL_CACHE_WRITE_ACCESS_DENIED,先確認目前 Runtime 可寫入 XDG_CACHE_HOME 下的 SQLite 檔案、父目錄及 sidecar;沙盒不允許時,為該 Runtime 指定可寫的 XDG_CACHE_HOME,再重試檢索。只有索引明確回報 INVALID 才以 --force 重建。唯讀連線失敗仍依 RETRIEVAL_CACHE_ACCESS_DENIED 檢查讀取權限;SEMANTIC_REFRESH_REQUIRED 表示來源內容變更,須依 Project Intelligence 流程檢視受影響語意主題。
公開 PR 的每個新 commit 都要使用 GitHub noreply author 與 committer 身分,並避免在 commit message、Co-authored-by trailer 與差異內容寫入個人資料。先在 GitHub Settings → Emails 開啟 Keep my email addresses private,讓 GitHub 網頁/API 合併使用 noreply;再從同頁複製 GitHub 提供的 noreply 位址,執行 git config --local user.email "<noreply 位址>"。以 git log -1 --format='%ae%n%ce' 確認本機 author/committer;不要把實際位址貼進 issue、PR 描述或驗證輸出。發布 preflight 會檢查候選範圍內的所有 commit message 與身份欄位。
PR 建議使用 GitHub merge commit 合併,避免 squash 產生未受本機檢查的 co-author trailer;確認帳號已啟用 email privacy 後,執行 gh pr merge <PR 編號> --merge。GitHub 不接受 --author-email 指定 noreply 的 merge commit author;啟用 email privacy 後由 GitHub 自動選用 noreply。維護者可在 GitHub repository Settings → General → Pull Requests 關閉 Allow squash merging,讓設定與發布政策一致。若政策尚未設定,合併前須確認選擇 Create a merge commit。
Validation workflow 先執行快速文件影響檢查與強制候選秘密掃描,再以同一 base/head 執行 repository_preflight.py;三者通過後才安裝完整驗證相依套件與 Playwright。測試契約檔 tests/validation/ears_requirement_contracts.py 僅要求 Scenario Conformance 文件閉包;修改需求規劃功能、範本或 canonical requirement 文件仍會觸發完整 Requirement Planning 文件閉包。GitHub Actions runner 固定 Ubuntu 24.04,artifact action 固定至官方 v7.0.1 完整 SHA;升級前須確認 runner image 與 action Node runtime 支援狀態。
Browser evidence 同樣必須先通過 version 與 isolated-profile headless smoke probe;系統 Chrome 啟動層失敗應標記為 environment blocker,不得誤報成產品回歸。
Publication preflight must run against an exact, clean candidate. It verifies recursive documentation impact, placement rules, candidate head/base and Core Matrix binding before the expensive Integration Gate; a dirty workspace or stale candidate is blocked rather than silently treated as the PR revision.
For GitHub API or Connector publication, use the exact-candidate transfer guard before creating a remote commit or updating any branch ref. First run aips publish environment; resolve ENVIRONMENT_BLOCKED in a capable validation environment before interpreting the full suite. After the final changed-file list is known, run aips publish preview --base <base-sha> and close its documentation and Matrix requirements. Commit the candidate and run aips publish preflight --base <base-sha> --head HEAD --output <report>.
Run python scripts/publication_transfer.py prepare --base <base-sha> --repository <owner/name> in that clean checkout. It rejects a GitHub origin that differs from the explicit destination, a stale or dirty candidate, and API candidates with more than one commit. Upload the listed changed blobs using their complete local bytes; check every returned blob SHA. Create the proposed tree from the exact remote base tree and check its returned SHA. Record the GitHub responses in a temporary JSON receipt containing repository, base_sha, tree_sha, and blobs (path-to-SHA for every changed non-deleted path). Run python scripts/publication_transfer.py verify --base <base-sha> --repository <owner/name> --receipt <receipt.json>; only READY_TO_PUBLISH permits creating the remote commit and ref. Recheck the remote main SHA immediately before the ref update; a moved base requires a new local candidate and verification. Never repair a malformed published intermediate commit with another commit: the strict candidate-history scan will still reject it. Keep the receipt outside the repository and do not place credentials or file contents in it.
When public repository hardening changes, review together:
- .github/workflows/validate.yml;
- .github/dependabot.yml;
- SECURITY.md;
- requirements.txt;
- immutable full-SHA action pinning;
- explicit least-privilege workflow permissions;
- validation trigger policy: automatic on PR synchronization and main pushes, manual via workflow_dispatch, not on every standalone feature-branch push;
- concurrency cancellation so a newer candidate or classification-label validation supersedes older work, while unrelated PR label events skip the expensive Gate and cannot cancel active candidate validation;
- atomic remote branch-update practice so CI receives coherent logical states instead of file-by-file intermediate states;
- validator contracts that check policy properties rather than freezing one dependency version. Publication Preflight 的 lifecycle fixture 會固定 Python module probe 成功,再分別模擬 loopback 與 browser 失敗,確保環境阻擋診斷不受 optional module availability 干擾;這不變更 runtime 行為。
文件同步路徑正規化(Scenario 221):Documentation Sync 只移除開頭一個 ./,不再用 lstrip("./") 逐字元剝除,使 config/documentation-sync.yaml 中的 .github/** 觸發條件真正生效;純依賴升級仍由 evaluate_candidate 先行豁免。
Validation architecture consistency
文件網站由 docs/human/ 的 Markdown、VitePress 設定與主題組成。技能目錄由 skills/INDEX.yaml、zh-TW locale 與釘選的 upstream manifest 產生。修改 registry 或目錄展示時,執行 python scripts/skill_catalog.py 更新 JSON 與舊版 HTML,再以 python scripts/skill_catalog.py --check 檢查生成差異,並執行 npm run docs:build。
本機使用正式建置預覽時,先執行 npm run docs:build 再執行 npm run docs:preview,並開啟 http://127.0.0.1:4173/ai-product-system/。此預覽沿用 GitHub Pages 的 /ai-product-system/ base;不要直接用 file:// 開啟 dist/index.html。即時文件與互動檢查使用 npm run docs:dev。
檢查 /SKILL_EXPLORER 的站內導覽、搜尋、複合篩選、錯誤備援,以及仍可開啟的 /skill-catalog.html。文件 build 不會發布網站;GitHub Pages 發布仍由既有 workflow 和人工 Git 決策處理。
Docs-only classification is review-only and never asserts tests are inapplicable; the exact candidate still runs its required Core Change matrix.
The Core Change Matrix binds profile-path redaction, no-fallback behavior, exact destination differences and Claude pre-tool versus native post-tool evidence.
The Skill Explorer lifecycle remains independently validated and is not evidence for Content Safety scanner behavior.
Qwen Image Edit Plus changes use a candidate-bound Core Change matrix covering ordered-port behavior, rejection cases, retained Qwen 2.1 compatibility, loopback integration, secret scanning, and documentation closure.
Validation-workflow action updates bind the verified immutable SHA, Node 24/cache contract, and complete changed-file set to the same matrix and exact-candidate Gate.
Scenario 235 keeps bounded Context diagnostics separate from Skill catalog evidence; native file denial is verified only for the supported OpenCode permission hook.
Publication diagnostics regression tests cover structured JSON failures, compatible text output, safe recovery, and unchanged publication authority.
Publication regression tests also cover quoted-heredoc PR text, recipe-bearing denials, PR-bound scan evidence and the 30-minute evidence TTL.
The publication guard change reuses existing authority and scanner contracts. It does not alter Skill Explorer admission, Skill trust, or independent review execution requirements.
Creative lifecycle 的 runtime-schema assertions 與最終 payload 檢查屬 adapter 相容性證據;維護文件不得將其描述為實際模型、MPS 或視覺品質驗收。
The dynamic ComfyUI lifecycle is included in Scenario 268 and the Large/Core Change Matrix; keep its synthetic evidence distinct from real inference and visual quality claims.
Scenario 236 lifecycle checks cover profile registry loading, bounded sampler validation, exact local component inventory, rejection of unreviewed topology families, FLUX 3 Klein TextGenerate schema/final-payload validation, and ordered multi-reference binding and hash checks. These synthetic checks do not claim Apple Silicon MPS inference or VAE output acceptance.
Scenario 044 lifecycle evidence proves attach/detach and preflight leave project files and Git metadata unchanged while preserving legacy .ai/ data.
Scenario 267 verifies READY+STALE local L2 writes together with the independent guard denials; the Core Change Matrix binds that evidence to the exact candidate.
Content-safety controls remain separate from skill discovery, installation, and author trust decisions.
Scenario 261 adds scanner-failure and pre-scan command-order evidence; this is separate from Skill Explorer inventory and runtime lifecycle evidence.
The Matt Pocock Skill Explorer remains a separate validation surface; Scenario 265 covers the AVIF scanner without changing Skill catalog evidence.
Publication diagnostics 的 Core matrix 分開驗證底層錯誤來源、safe hook payload、重試性與 Claude Code 版本路由;hook 內部錯誤必須拒絕操作且不得洩漏例外文字。
The shared OpenCode lifecycle runner owns separate creative-import and Skill Explorer cases; changes to one contract must not be reported as behavior changes to the other.
The full repository runner registers Scenario 263 and its commit-safety lifecycle; its evidence remains separate from the required exact-candidate Integration Gate.
Plan40 adds publication-diagnostic evidence without changing independent-review attestation or Skill Explorer routing; the exact-candidate repository Gate remains required for both existing boundaries.
Scenario 259 remains the independent contract for upstream Skill inventory and projection ownership; creative presets do not change its registry or install path.
Scenario 260/261 lifecycle, focused publication tests and the exact-candidate Integration Gate cover the new policy observation boundary.
Plan44 keeps COMMAND_FORM_UNSUPPORTED backward compatible while adding safe detail_code guidance for pipes, compound commands, wrappers and unsupported upstream push options. Claude's managed PostToolUseFailure:Bash hook reports observed native execution failure and a parsed exit code without raw host text; Scenario 261, runtime contracts, security redaction, exact candidate matrix and Integration Gate cover the boundary. It does not retry, grant authority or alter existing merge, squash-tree or Branch Hygiene cleanup behavior.
Plan50 adds allowlisted parser-node/segment evidence and one canonical repo-local literal cd prefix, while retaining fail-closed handling for path escape and additional shell commands. Claude Auto Mode PermissionDenied is captured by a separate observer that stores fixed fields and hashes only with private file permissions and bounded retention. Its settings group is AIPS-managed and removable without touching user hooks. The opt-in docs-only report is derived from Git status, never self-attests tests as not applicable, and does not replace secret scan, Human approval, reconciliation, or exact-candidate checks.
The publication validation matrix records the exact candidate, endpoint-status classifications and the no-mutation recovery invariant.
Publication Scenario 260 requires tests for exact merge flags, SHA pinning, Required Checks missing/unconfigured/unknown, privacy redaction and advisory-only Host recovery.
Publication maintenance uses aips publish doctor for read-only repository, protection, PR and Required Checks evidence. Permission-limited policy visibility is UNKNOWN and blocks; any policy change remains a separate administrator action. Scenario 260 covers the diagnostic contract.
Skill registry changes run the catalog contract and regenerate docs/human/public/skill-catalog.html; Scenario 259 keeps pinned external source copies/digests, overlap-based experimental/optional versus automatic routing, explicit grill-with-docs invocation, optional Writing triggers and manual routing acceptance visible. Upstream native installation changes run the Skill lifecycle and native projection contracts: all non-canonical IDs remain user-selectable regardless of disposition, canonical duplicates are skipped, and Codex/Claude projections require explicit invocation.
Upstream native Skill install/uninstall changes also run tests/evidence/skills_cli_lifecycle.py; verify source-kind isolation, shared-host references, idempotency, and preservation of modified or pre-existing files before publication.
The creative quality benchmark lifecycle validates dataset coverage, bounded failure stages, legacy evidence compatibility, and Human review/acceptance separation. Its synthetic artifacts do not count as real local model inference or visual-quality evidence.
OpenCode native acceptance is integration evidence only. Do not treat it as an Agent task outcome, production model measure or generated-image quality result.
The stable release-readiness workflow checks one exact main SHA and proposed version with read-only permissions. Scenario 214's install/preflight lifecycle verifies successful fast-forward and preservation of the installed SHA and VERSION when divergent history is refused; failed updates do not auto-merge, rebase, or roll back.
Branch Hygiene is a read-only maintenance capability: it reconciles current main, exact remote heads, active local checkouts and current PR state, then reports conservative dispositions. Any later cleanup still needs the exact current-main-bound manifest and its separate Human authorization.
Publication preflight resolves the live remote default branch and scans the exact candidate/history. Personal mode trusts the current origin, and a worktree does not isolate same-account credentials or .git/config. The exact-candidate Gate proves fitness only; merge requires task intent, exact PR head/default-base binding, and passing required checks.
Publication 維護需檢查 external issuer、公鑰輪替、grant expiry、SQLite single-use ledger 與 worktree isolation。服務 outage 不得改寫 APPROVED 或重用 consumed grant;重新簽發,並保留 Codex/OpenCode advisory capability truth。
The shared Python bootstrap preserves optional constraints on macOS Bash 3.2 by prepending them to its non-empty requirements argument array. Its lifecycle executes the actual shell body for constrained/unconstrained inputs, exact argument quoting and fail-closed empty requirements.
既有 Quality Ratchet 的 Ruff 基準為 685,Retrieval 模組為 4、下一階段目標為 3。Validation Observation 以相同候選的完整紀錄計算各 Change Class 的 P50/P95;缺少有效耗時時回報 UNKNOWN,仍執行完整 Gate。
Project Intelligence candidate contract and lifecycle checks are registered; they assert bounded output, unknown dynamic behavior and unchanged canonical graph coverage.
Creative Core Matrix rows bind profile contracts, local-only review authorization, scenario evidence and recursive documentation placement to the exact candidate.
CI 對每個候選安裝 requirements.txt、requirements-validation.txt、requirements-visual.txt 與 requirements-openapi.txt 的 Python 套件,確保必要的完整 CLI lifecycle fixtures 可執行;Node、文件建置套件與 Playwright Chromium 仍依精確候選路徑選擇。
The Creative matrix and lifecycle evidence cover prompt admission, revocation, output scope, local engine probing, batch recovery and the required documentation projections.
GitHub validation exports the fully provisioned Python interpreter as AIPS_VALIDATION_PYTHON after optional dependency installation and before the exact-candidate Gate, so isolated CLI fixtures use the required validation environment.
Required validation runs are grouped by PR and event action. This prevents opened and classification labeled events from cancelling each other's repository aggregate; later runs of the same action can still supersede stale work.
System Facts、Capability Registry、Scenario 237、文件放置與完整 Gate 都綁定同一精確候選;diagnose PASS 不是發布或獨立審查證據。
The creative lifecycle is owned once by repository validation; exact-candidate validation uses synthetic engines and never runs a user-configured generator.
OpenCode ownership、Skill description 與 Host 安裝生命週期由 tests/evidence/opencode_integration_lifecycle.py 驗證;既有 Host 與 MCP 回歸仍需通過。
Validation Observation 的耗時或成功記錄不能取代必要 lifecycle 的執行環境:CI 固定安裝完整 Python 套件後,仍以同一候選的完整 Gate 和遠端 repository 彙總判定結果,Chromium 下載與可選 evidence 維持精準計畫控制。
Plan21 Phase 2 keeps canonical JSON/hash and path/glob helpers in scripts/aips_common/; compatibility and caller-specific behavior are pinned by tests/evidence/shared_primitives_lifecycle.py, while graph coverage remains partial.
固定 Turn Context 或 task protocol routing 變更時,更新 canonical core/router、Runtime adapters、文件 placement、Scenario 與 impact-derived matrix;維持原有 Human approval 與 publication boundaries。固定核心 route scenario 亦須列入 registry、Conformance current view 與 recursive docs placement checks。
Skill metadata 修改後須重建 INDEX 並執行 tests/evidence/skill_index_lifecycle.py;完整 repository validation 也會執行此 lifecycle。Scenario 224 是人工語意驗收,225 是 registry lifecycle 證據,不可互換。Plan19 增加 per-module quality budgets、behavior-based Eval freshness 與 canonical capability projections;各報告仍是 evidence,不能代替完整 Gate 或擴張批准範圍。
新增或擴充 Skill 前,先完成 reuse/admission review;只修改 canonical SKILL.md frontmatter,再重建 INDEX。Skill-incubation Scenarios 241–256 記錄預期語意路由但屬 manual evidence;不得把它們算成自動模型驗收,也不得聲稱跨專案遊戲試作或玩家測試已完成。Documentation placement、scenario registry、Skill Index lifecycle 與完整 Integration Gate 一起驗證。
Shared Python CI bootstrap callers must declare their requirement files, tested constraints, and import smoke tests; the action runs pip check and does not own package versions.
tests/validate_repository.py classifies every OpenAPI-dependent lifecycle, including implementation_enforcement_lifecycle.py, under the exact candidate's optional-toolchain plan. When needs_openapi is false it skips those optional checks; an absent or invalid plan retains the full validation profile. The runner consumes AIPS_CI_VALIDATION_PLAN itself and removes it before loading contracts or launching lifecycle subprocesses, so selection metadata cannot change isolated test behavior. Secret scanning, the required repository aggregate and the Integration Gate remain mandatory.
tests/evidence/publish_preflight_lifecycle.py itself stays in the required aggregate under both plans. It runs OpenAPI action-level help and contract smoke only when both openapi_spec_validator and jsonschema are available; otherwise it checks top-level help and the clear missing-dependency error, with no traceback or output artifact.
The document-size audit measures tracked documentation and evidence against a 50,000-byte threshold. Oversized items are reported as non-blocking WARN; it never archives or moves files. Release history uses a manually maintained archive at docs/history/changelog/: keep Unreleased and the latest five full releases in CHANGELOG.md, retain every older version heading there as a stable link, and preserve full release sections in the version-band archive.
Dependency updates can be classified with python scripts/dependency_impact.py plan --ecosystem pip --name <package>. The policy recommends evidence for each known dependency class; unknown packages default to UNCLASSIFIED / HIGH. Recommendations do not change Dependabot behavior, approve updates, or permit automatic merges.
Post-merge 的本地 main 與 managed installation 同步位於 scripts/publish_post_merge.py;scripts/publish_preflight.py 維持舊 CLI facade。維護此邊界時,執行 publication-preflight 與 module-extraction lifecycle,再跑完整 Core Integration Gate。
Scenario 204 的 module-extraction lifecycle 核對既有 facade 與 temporal current-mode 契約,讓內部拆分維持可回歸驗證。
Selective Validation remains in FULL_RUN_SHADOW until an exact-artifact cohort covers at least 30 days, at least 30 unique pull requests, zero false-negative skips, conservative full-validation fallbacks, and deterministic full-run sampling. Each validation run retains one combined observation for 90 days. The daily Validation Observation Collector installs PyYAML from constraints/tested.txt before reading completed validate.yml runs with read-only Actions access, deduplicates reruns to the latest record per pull request, and calls scripts/validation_graduation.py; missing dependencies or missing, expired, cancelled, mismatched, or failed-attribution evidence blocks graduation. When the workflow run omits its pull request association, the collector resolves the exact head SHA through the read-only commit-to-pull-requests API and accepts only a unique PR in the same repository. If a full validation fails without a validator-specific failure record, all predicted skips are conservatively treated as failed. The evaluator reports validator-level run precision, skip precision, recall, and false-negative rate with their confusion counts; a null rate means its denominator is zero and is not evidence of zero risk. The evaluator reports READY_FOR_HUMAN_REVIEW only; a Human must separately decide whether to enable selective execution. The collector never changes which checks run. The 2026-10-11 one-day sample is NOT_READY: 19 workflow runs had complete artifact history, but only three unique PRs and three valid shadow records were available; ten records were incomplete or malformed. It contains 192 validator decisions, no observed failures, run precision 0, and undefined recall, skip precision, and false-negative rate. This is an initial descriptive sample, not graduation evidence. Its aggregate is recorded in docs/history/aips-review/PLAN29_VALIDATION_SHADOW_EVIDENCE.yaml. The collector job has a provisional 15-minute timeout: the available timing sample contains only two runs at about 31 seconds, too few for a reliable P95. Reassess the bound as more timing evidence accumulates. The scheduled and manual collector runs have no concurrency group because replacing a pending run could discard evidence.
scripts/validation_taxonomy.py checks that config/validation-scope.yaml and config/validation-graduation.yaml declare the same unique full-validation classes and path prefixes. Missing, malformed, duplicate, or divergent declarations fail closed; this audit is read-only and never enables selective execution.
config/repository-contract.yaml is a versioned parallel mirror of the legacy required_files list in tests/validation/static_contracts.py. The strict parser and lifecycle fixture require exact path-set parity and identical missing-file findings; the legacy list remains authoritative during this pilot. Other lists and authority cutover require a separate reviewed change.
The validation environment records exact Coverage.py and Hypothesis versions. Coverage reports branch measurements for the stable release selector without enforcing a percentage until touched-module baselines are established. Hypothesis property checks use deterministic settings. Ruff may not exceed its measured repository baseline of 687 findings; selected mypy modules keep the existing zero-error bound. The current Ruff debt ledger records 0 Project Intelligence facade findings (terminal zero budget) and 5 Retrieval Intelligence facade findings (next target 4). A touched facade must reduce its findings by at least 10% from the base revision while introducing no new touched-code findings. The bounded Impact Graph relation-candidate lifecycle measures 45.5% combined statement-and-branch coverage for its helper module; coverage remains report-only and this measurement does not establish a repository-wide minimum.
Repository Health reports advisory counts for workflows, validation modules, policy files and Integration Gate steps. These counts provide governance-complexity trend context and never affect health status or create a new gate. Monthly reliability reports continue collecting bounded evidence; SLO thresholds remain deferred until at least three complete monthly cohorts exist, then require human review and can only raise review flags.
Supply-chain checks use Dependency Review on PRs to block newly introduced high or critical vulnerabilities, configured CodeQL default setup for actions and python, and weekly advisory OpenSSF Scorecard reporting. The CodeQL initial validation run is asynchronous; verify its result and subsequent analysis before treating scan findings as available. Dependency Review and Scorecard actions remain pinned to full commit SHAs.
New installations request the stable channel by default and pin an exact vX.Y.Z tag only after verifying its commit and VERSION. Until a verified stable tag exists, stable installation fails closed with an explicit --channel main development-channel suggestion; source-checkout CI and development users pass that opt-in explicitly. Creating the first release tag remains governed by the separate signing and release approval policy.
OpenAPI evidence lifecycle checks run when the exact-candidate plan selects OpenAPI; the pinned dependency set is installed for those runs. Missing or invalid plans select the full profile, which retains OpenAPI evidence.
Portable Command contract 位於 tests/validation/portable_commands_contracts.py,涵蓋 registry、projection install、status、明確 grill-me guidance 與修改檔案 conflict;它不授予 merge 或 release authority。 tests/validate_repository.py is the stable CI/user entrypoint. Internal validation is modular:
Pull requests also run a bounded repository-preflight job in parallel with the existing validation path. Its exact-candidate findings are advisory; the required repository aggregate continues to depend on the complete Janitor Integration Gate and always runs the full repository validation. Label-only events skip this fast job.
tests/validation/static_contracts.py— schemas, indexes, documentation and static repository contracts;tests/validation/runtime_contracts.py— Harness / Runtime / Intelligence lifecycle checks;tests/validation/governance_resume.py— approval binding and durable-run behavior;tests/validation/conformance_isolation.py— Scenario Conformance, identity and isolation checks;tests/validation/syntax_contracts.py— shell syntax checks;tests/evidence/*— focused one-to-one executable evidence.
External Eval / Red-Team Interoperability contracts are checked by tests/validation/eval_interop_contracts.py; focused unit and lifecycle runners are invoked by the repository validator. Keep the top-level validator as an aggregator and preserve the lifecycle evidence's isolated local HTTP fixture.
Keep the top-level validator as an aggregator. New substantial validation belongs in the narrowest existing module or a focused evidence runner rather than expanding the entrypoint back into a monolith.
When registering a lifecycle scenario, update the conformance inventory assertions in conformance_isolation.py and the canonical Human/Agent conformance records in the same change. The current release inventory is 37 deterministic, 128 lifecycle and 54 agent_eval scenarios (219 automated, 2 manual, 221 total).
scripts/repository_preflight.py 先跑快速文件/schema/diff 檢查;通過後才進入完整 lifecycle。環境缺少 localhost bind 或 browser 時回報 ENVIRONMENT_BLOCKED,不混稱產品測試失敗。
The public bin/aips launcher must remain a small argument-preserving handoff to scripts/aips_cli.sh; preserve source-checkout and installed-symlink entry paths. Keep that facade limited to runtime path setup and ordered loading of the scripts/aips_cli/ modules; keep module extraction behavior-preserving and verify it from an unrelated working directory. Keep publication policy calculations in scripts/publish_preflight_policy.py, with Git and environment orchestration in scripts/publish_preflight.py. Validator imports belong to the explicit ordered tests/validation/registry.py; preserve import order, timing labels, error aggregation order, and the single execution owner for lifecycle evidence.
.github/actions/aips-python-bootstrap centralizes pinned Python setup, declared requirements/constraints and pip cache inputs for the MCP interoperability and Repository Health pilots. These workflows retain their read-only permissions and triggers. scripts/github_ruleset_policy.py compares complete supplied snapshots only; missing admin/bypass evidence is UNKNOWN, and the report never writes or activates repository settings.
Validation Observation treats a completed NOT_READY report as collected evidence, while operational errors remain blocking and --require-ready provides strict readiness behavior. The full repository Gate remains enabled. Dependency Review shadow results are recorded against the same candidate; the standalone high-severity check stays authoritative through the 2–4 week parity window.
Internal Retrieval Intelligence module extraction must preserve the retrieval_intelligence.py facade and its existing lifecycle behavior. tests/evidence/module_extraction_lifecycle.py verifies the storage helper exports; retrieval lifecycle and repository validation cover the existing index contract.
Publication recovery reports exact phase and sanitized evidence. ALREADY_MERGED proceeds to post-merge reconciliation for the exact head; diagnostics do not repeat publication or replace required checks.
Scenario 269 evidence runs in the existing Intelligence Context lifecycle and focused unit tests; aips intelligence gc is exercised only against temporary config directories.
Deterministic Scheduler / Integration Gate consistency
Shared publication guard changes must retain Core Matrix and exact-candidate Gate evidence for recursive substitution parsing, quoted/escaped heredoc handling, dynamic command denial, and literal publication scope.
Phase 3 enforcement changes also update scripts/implementation_enforcement.py, its versioned report schema, Scenario 195 and the existing Integration Gate profile/lifecycle evidence. Check report-only behavior before enabling path-scoped enforcement in a project; a missing current-run command report or stale generated/OpenAPI hash must not turn into PASS. Generated hashes verify recorded provenance, not generator execution.
Keep the local publication route on one explicit checkout. Its preflight checks Python/Ruff, loopback and browser readiness before lifecycle validation, then checks changed Markdown links and builds VitePress for documentation candidates. An external VitePress directory is accepted only when its installed version equals the candidate lockfile's exact version; the repository checkout remains clean and no install or registry access occurs. Use --project-root <repo> when the installed CLI validates a separate source checkout. Core/Large labels belong on the initial PR creation request when using gh; a connector that cannot set labels atomically requires the label event and its own fresh CI result. After merge, update a clean local main with fast-forward-only when it is behind origin/main; preserve a backup before reconciliation and block dirty or divergent histories.
Preview 對 Core Matrix 套用與 Gate 相同的就緒條件:可執行狀態、無 blockers、實際差異已核對、base/hash 相符。同步後若仍是 DRAFT 或有待處理項目,先完成審查並清除已解決的 blocker;READY_FOR_GATE 不是正式 Gate PASS。
在原始碼 checkout 驗證尚未安裝的修改時,使用 ./bin/aips,避免全域安裝的 CLI 指向另一份系統程式碼或 Matrix。受限 sandbox 若禁止 localhost bind,先用 prepare-local-validation 辨識 ENVIRONMENT_BLOCKED;恢復該能力後重新執行完整驗證,不略過測試。
被 concurrency 取消的舊 CI run 不執行 repository 彙總 job,現行 run 的 Janitor 失敗仍讓彙總 job 失敗。無關 PR 標籤事件會跳過 Janitor;只有該事件明確屬於無關標籤,且最新完整 Janitor 已成功、run title 綁定同一 PR/head/base/change class 時,repository aggregate 才以記錄在 Step Summary 的 no-op 成功結束。缺漏、失敗、取消、尚未完成或 stale evidence 均阻擋;Actions metadata 只需 repository job 的 actions: read 權限。檢查同一候選 SHA 的最新 required aggregate。
validate.yml 的 concurrency group 同時包含 PR number 與事件 action。這讓 opened 和分類 labeled 事件各自保留所需的 aggregate;同一 action 的新候選仍會取消舊 run,無關標籤仍不能取消候選驗證。
When deterministic scheduling or merge-candidate validation changes, review together:
orchestration/DETERMINISTIC_SCHEDULER.md+scripts/deterministic_scheduler.py;orchestration/INTEGRATION_GATE.md+scripts/integration_gate.py;orchestration/MULTI_REVIEW.md, review packet/evidence helpers, and Context Manifest / Task Graph review contracts;templates/review/REVIEW_REPORT.md/ evidence template and Integration Gate report contract;- Task Graph / Validation Profile / Integration Gate Report contracts;
- Execution Isolation single-writer behavior and Run Resume semantics;
- Core Change Test Matrix reuse and exact-candidate fingerprinting;
bin/aipsscheduler / integration-gate / janitor routing;.github/workflows/validate.ymlrequiredrepositoryaggregate compatibility;- Scenario 135–136 lifecycle evidence and coverage registry;
- Human Architecture Overview / User Guide / Technology Guide.
Large/Core candidate 使用唯一 canonical docs/qa/CORE_CHANGE_TEST_MATRIX.yaml;版本化矩陣可保留作歷史,但不能取代 CI 實際讀取路徑。
Do not let the Scheduler make semantic scope decisions, and do not let Integration Gate PASS create merge/release authority.
Branch lifecycle hygiene
Branch lifecycle checks bind cleanup proposals to observed refs and exact repository identity; user branches and committed work remain untouched without explicit authorization.
Branch cleanup inventory is read-only by default; a proposed exact-SHA candidate never authorizes deletion without separate Human approval.
Use config/branch-lifecycle.yaml and scripts/branch_hygiene.py before cleanup. Persistent operational branches are preserved; common short-lived prefixes are classified as ephemeral; unclassified branches are preserved by default. The report includes current SHA, matching merged PR state, branch age, integration status and a cleanup review recommendation. Integration recognition is conservative and squash-aware: direct ancestry is checked first, then per-commit patch equivalence, then a clean synthetic git merge-tree --write-tree whose result must be identical to the target tree. The policy is report_only; scheduled and main-push reports publish proposals and never delete refs. Cleanup requires a separate explicit workflow dispatch on protected main with apply_cleanup=true, plus the exact one-time reviewed manifest. The Plan19 branch snapshot is a timestamped proposal and remains unauthorized until separately reviewed against current exact SHAs.
Repository Health / Architecture Drift consistency
The capability registry is the authority for supported surfaces; generated architecture projections must pass python scripts/capability_registry.py check before release.
The capability registry records the candidate module and its lifecycle/contract evidence; generated projections must be regenerated and checked from that registry.
The Project Intelligence context helper is behind the existing facade and generated capability projections remain derived from the canonical registry.
新增 CLI 能力時同步維護 Capability Registry 與 Architecture Surface projection;aips project diagnose 的靜態檢查不取代這些 canonical consistency checks。
The canonical Capability Registry lists scripts/creative_execution.py, its Bundle, lifecycle, and Scenario under the existing Harness runtime surface; generated architecture projections are checked from that registry.
OpenCode remains an adapter within the existing Harness capability; generated architecture projections continue to derive from the Capability Registry.
The Capability Registry now lists the OpenCode native guard helper and plugin lifecycle as harness-runtime surfaces; generated architecture projections must be regenerated from that registry.
OpenCode 是既有 Harness Capability 的 Adapter;新投影與驗證路徑登錄於 capability registry,再生成架構投影。
Repository Health continues to treat generated capability projections as outputs of config/capability-registry.yaml; shared path/hash helpers do not become a second registry source.
Repository-wide architecture consistency is checked by scripts/repository_health.py using config/repository-health.yaml. The detailed contract is orchestration/REPOSITORY_HEALTH.md.
It reuses the Capability Registry, Scenario Conformance and Integration Gate. config/capability-registry.yaml is canonical for capability metadata and major surfaces; run python scripts/capability_registry.py check to detect stale generated indexes, and use generate only after an approved registry edit. The v1 Capability Map and config/architecture-surfaces.yaml remain generated consumer views. Review required paths, canonical docs, validation bindings, bounded major-script discovery, tests/scenario_coverage.yaml evidence, and .github/workflows/validate.yml plus config/integration-gate.yaml wiring.
Run:
python scripts/repository_health.py audit --config config/repository-health.yaml
PASS is consistency evidence only. Repository Health is Detect + Evidence + Human Review and has no automatic remediation, code-change, PR, merge, release or publication authority. Review evidence_binding together with the sorted input manifest: clean Git must report EXACT_REVISION/revision_reproducible=true; staged, unstaged or untracked state must report DIRTY_WORKTREE/revision_reproducible=false rather than pretending the current HEAD fully reproduces the audit. CI additionally uploads repository-health-report.json as exact-candidate evidence; this artifact is observational only and grants no authority.
Repository Health 定期維護觀測
.github/workflows/repository-health.yml 會每週定期執行一次 Repository Health,亦支援手動 workflow_dispatch。執行時只讀取目前預設分支的精確 revision,產生 repository-health-report.json、上傳短期 GitHub Actions artifact,並把摘要寫入 Job Summary。
- PASS:只留下觀測證據,不建立 Issue。
- DRIFT_DETECTED:依 deterministic evidence fingerprint 去重;同一 fingerprint 最多保留一個 open drift Issue,之後讓 workflow 明確失敗以顯示需要 Human review。
- Workflow 只使用 GitHub 自身控制平面發布 artifact/Issue;Repository Health detector 本身仍不需要
OPENAI_API_KEY、GEMINI_API_KEY或其他外部 Agent/provider credential。 - 此流程沒有
contents: write,不會自動修改程式碼、建立 implementation PR、merge、release 或自動修復 drift。
這個排程是 maintenance observation,不是新的治理 authority。正式變更仍走既有 System Self-Improvement、validation、PR、merge 與 release 流程。
Evolution Effectiveness monthly maintenance
.github/workflows/evolution-effectiveness.yml runs monthly on day 2 after the normal monthly Radar review. It reads durable Radar Issues/comments and writes a bounded Evolution Effectiveness [monthly] YYYY-MM Issue.
- no review flags → the metrics Issue is reconciled and closed as completed;
- one or more deterministic review flags → the metrics Issue stays/reopens for Human review;
- the workflow uses only
contents: readandissues: write; - no external Agent/provider credential is required;
- no source weight, enable/disable state, source URL or repository config is changed automatically.
This is observational maintenance evidence. Any actual source-policy adjustment remains a normal reviewed repository change.
Monthly maintenance reliability
.github/workflows/maintenance-reliability.yml runs on day 3 each month after Evolution Effectiveness and supports a manual calendar-month selection. scripts/maintenance_reliability.py collects at most 10 pages of 100 validation runs and merged PRs, at most 200 failed-run job details, and at most 1,000 changed paths per PR.
- The report records eligible PR validation pass rate, median/P95 runtime, explicit normalized Hotfix labels, repeated paths, keyword-based failure categories, exact merge-SHA
mainpush failures, and changed-file-count median/P95. - Truncated or unavailable history, missing run timestamps or missing changed-file counts make dependent values
UNKNOWNand set a review flag. Failure categories are name-based hints, not root-cause findings. - The workflow publishes a Job Summary, a 90-day bounded artifact and one deduplicated monthly review Issue. It stores normalized metadata and paths, not logs, prompts, secrets or raw API responses.
- Permissions are limited to
actions: read,contents: read,pull-requests: readandissues: write. The workflow cannot edit source, open implementation PRs, merge or release; all remediation requires the normal Human-reviewed change process. tests/evidence/maintenance_reliability_lifecycle.pycovers metric definitions, exact-SHA matching, incomplete input handling and API response shapes. Scenario 201 records its acceptance boundary.
Candidate validation derives optional browser provisioning from the exact changed paths. The repository validator skips browser-dependent render lifecycle checks only when a valid CI plan declares needs_browser: false; an absent or invalid plan retains the full validation profile. The required repository aggregate, secret scan, preflight and Integration Gate remain mandatory.
Plan21 Phase 0 recorded a clean origin/main full-validation baseline at 165,754 ms across 230 scenarios and 86 timing entries on Python 3.12.14. This is a single observation for later comparison, not a timeout-setting sample or a claimed trend. The required runner now also checks pinned digest, CLI and path-matching contracts before shared-primitives consolidation.
Controlled branch cleanup
Cleanup remains proposal-first and retains branches that contain committed work; automated maintenance only reports stale refs until a Human approves the exact deletion set.
發布恢復使用 aips publish prepare 重新觀察目前候選與 live GitHub 狀態;既有 OPEN PR 不再建立,CLOSED/歧義 PR 停止,MERGED 必須驗證 exact PR head 與 merge commit 已納入 live base。觀察只由呼叫者選擇保存,不儲存 prompt、body 內容或憑證。
一般 Branch Hygiene 仍是 report_only。唯讀報告以目前 main SHA、remote branch SHA 與 PR 狀態產生 KEEP、SUPERSEDED、REBASE_REQUIRED 或 CLEANUP_CANDIDATE 建議。這些狀態只描述觀察到的證據,不會關閉 PR、執行 rebase/merge 或授予刪除權限。只有在 repository maintainer 明確批准的 one-time manifest 中,AIPS 才可刪除 remote branch。
Runtime manifest 由人工核准的 immutable proposal artifact(run ID + fingerprint)產生,逐筆綁定 branch name、exact expected SHA 與 merged PR evidence;config/branch-cleanup-manifest.yaml 僅保留歷史相容紀錄,不再需要為 cleanup 提交新的 main commit。Protected-main 人工 dispatch cleanup job 在刪除前會重新驗證:
- branch 仍存在且 SHA 沒有漂移;
- manifest 的
baseline_main_sha必須等於此次檢查的目前maintip; - lifecycle 是
EPHEMERAL; - branch 已由 local Git integration proof,或 GitHub merged PR 的 exact head SHA/ref/base 證據,確認整合進
main; - manifest authorization 是
explicit_user_request + exact_manifest_only + one_time。
Protected dispatch 會逐筆重新讀取 merged PR,確認 merged_at、head SHA、head ref 與 base ref 全部符合 manifest。任何一筆失敗都會在第一個 delete 前 block 整批。清單中已有缺失的 branch 也會使整批拒絕,作為重播或上次部分執行的訊號;遠端拒絕任一 expected-SHA lease 或不支援 atomic push 時,整批停止,不採逐筆 fallback;後續必須重新檢查 refs 並取得新的人類 dispatch 核准。Persistent、unclassified、pending 或 manifest 外 branch 一律不刪。排程、push 與未啟用 cleanup 的人工 dispatch 都只有 contents: read;只有 protected-main 上明確啟用 cleanup 的 job 在這份 exact manifest 範圍內取得 contents: write。 一般 cleanup report 另外產生 fingerprint-bound proposal,列出 branch SHA、merged PR、merged date 與產生報告時的 main SHA。Proposal 本身不會擴大既有 exact-manifest authority;main baseline 或 branch 狀態變更後須重新產生並 review。
Runtime Content Safety Boundary
Diagnostic fields use allowlisted values and redaction; secret-scan failures remain fail-closed and are not treated as authorization evidence.
A structured CLI error is not scan evidence; incomplete or failed candidate/history scans continue to block publication.
Scan evidence is reused only for the identical candidate, operation, target, remote tip and policy digest; any drift requires a fresh Prepare scan.
The publication evidence record can only reuse a successful full Secret Scan for an unchanged exact candidate. It does not relax content-safety checks or replace final-tree/history scanning.
WebM files have no path exceptions and use bounded metadata scanning with a configurable 32 MiB default ceiling; ordinary text limits remain unchanged.
Candidate scanning exempts only the documented generated-password and parameterized SQL forms from generic literal-assignment detection. Provider tokens, private keys and high-entropy literals remain active; JSON is scanned through 8,000,000 bytes, other text through 2,000,000 bytes, and larger inputs block publication.
Review imported ComfyUI workflows as untrusted project content and preserve explicit action authorization when maintaining schema validation or recovery behavior.
Content-safety maintenance and publication Required Checks enforcement are separate controls; changing AIPS_ENFORCE_REQUIRED_CHECKS does not change scanner behavior.
Publication timeout handling keeps the content-safety boundary explicit: output omits raw command and exception text while the protected operation remains denied.
保留即時處理流程與所有安全檢查,僅調整偵測精確度;policy 變更需以固定良性/惡意樣本比較新舊結果,並驗證例外期限與精確範圍、診斷隱私、Git index/HEAD 不變性及 exact-candidate Gate。
The Claude native failure observer emits only bounded allowlisted fields and does not persist raw host errors or command text.
Runtime hook 的診斷輸出採 allowlist;只保留錯誤類別和穩定診斷資料,不記錄原始例外或命令。 Plan41 adds redacted Hook findings, strict ignore-marker handling and bounded PNG/JPEG/WebP/M4A/MP3 metadata inspection through the existing commit safety boundary. Plan42 extends the same boundary to bounded TTF/OTF/WOFF/WOFF2 metadata, checks staged Git object sizes before reading blobs, and keeps publication preview and exact-candidate history scanning aligned. Scenario 265 adds static AVIF EXIF/XMP within the same 8 MiB media limit and 1 MiB metadata cap; unsupported binaries and incomplete inspection remain fail closed.
Register every new persistence or publication sink in config/content-safety.yaml. Preserve the sanitize → hash → persist ordering for audit data and update scenarios when detector or sink policy behavior changes.
For Plan45 publication scanning, keep the literal executable/subcommand check ahead of candidate inspection. Classify scanner policy, base, object and candidate-file failures with allowlisted SECRET_SCAN_* diagnostics; never include exception messages, paths or secret values. Findings and incomplete scans remain fail-closed. Update Scenario 261 and the Core Change Test Matrix with any new scanner boundary.
Commit-form changes in the publication guard must prove that content not yet staged is scanned and that commit-time REVIEW findings still block.
Changes to PII detector grammar need a versioned rule ID, a hex-encoded positive/negative corpus with a v1/v2 comparison, shared detection/redaction predicates, and no PII exception path. Code-level chr(64) workarounds for Git remotes can be removed once the installed runtime carries pii.email.v2.
Scenario 269 refreshes only the CLI help golden vectors for aips intelligence gc; content-safety detection, sink policy and commit scanning are unchanged.