Skip to content
This repository was archived by the owner on Aug 24, 2026. It is now read-only.

docs(decisions): ADR-0053 archive 记忆层仓与旧 ADR 归档迁移(W1-C1 .github#164) - #72

Merged
randypanding merged 1 commit into
mainfrom
adr/w1c1-archive
Aug 21, 2026
Merged

docs(decisions): ADR-0053 archive 记忆层仓与旧 ADR 归档迁移(W1-C1 .github#164)#72
randypanding merged 1 commit into
mainfrom
adr/w1c1-archive

Conversation

@randypanding

Copy link
Copy Markdown
Contributor

动机

宪法 §1 记忆层/拆家原则(旧 ADR 不删除,标 active/superseded/archived 迁记忆层)+ §13 推论二(archive=数据飞轮战略资产)。W1-C1(.github#164)的决策背书 ADR。

变更清单

  • 新增 decisions/ADR-0053-archive-repo-and-adr-migration.md(单文件,无其他变更)

AC 映射(.github#164)

  • 本 ADR 为 #164 三条 AC(迁移可解析/adr-required 查索引/REPOS.yaml 申报)的决策背书;AC 实证由后续迁移 PR 与 .github PR 提供。

设计要点

  • 字节保真 + 状态在索引(正本 sha256 校验,状态不写进 archive 文件)
  • 文件名保留(org-gate v1.4.2 / gate.yml adr-required 按文件名校验 → 零级联)
  • 双世界兼容(INDEX.yaml 存在=索引世界;缺=旧世界回退)
  • drift: ADR-0083 正本未迁 archive(INDEX 已登记幽灵 archive_path) #96 扩展点:INDEX entry 预留 substantive 字段位
  • 回滚:反向脚本按 INDEX 从 archive 恢复 decisions/ 正文

测试方法

  • validate.yml adr-required:本 PR 引用 ADR-0053,且 ADR-0053 已在本 PR head decisions/ 存在 ✓
  • validate/simulate/meta-validate(head 自洽)照常跑

风险与回滚

  • 单文件新增,无行为变更;回滚 = revert 本 PR。

Copilot AI lite review requested due to automatic review settings August 21, 2026 11:17
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@randypanding, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 9 minutes

Limit details: You’ve used all 10 included reviews currently available.

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b488fc87-3714-42ae-b851-78dedf154870

📥 Commits

Reviewing files that changed from the base of the PR and between 86a55a3 and 8086381.

📒 Files selected for processing (1)
  • decisions/ADR-0053-archive-repo-and-adr-migration.md

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

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

docs(decisions): Add ADR-0053 for archive repo + ADR migration plan

📝 Documentation 🕐 10-20 Minutes

Grey Divider

AI Description

• Add ADR-0053 documenting the archive (memory-layer) repo and ADR migration strategy
• Define INDEX.yaml tombstone/index model for lifecycle + sha256 byte-fidelity verification
• Specify gate/drift-check behavior for index-vs-legacy “two-world” compatibility
Diagram

graph TD
  ADR053["ADR-0053 (this PR)"] --> INDEX["decisions/INDEX.yaml (planned)"] --> GATE[".github adr-required gate (planned)"]
  INDEX --> ARCHIVE["archive repo adr/ (planned)"]
  GATE --> ARCHIVE
  INDEX --> DRIFT["drift-check §10 (planned)"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Embed lifecycle/status in ADR files
  • ➕ No separate INDEX.yaml to maintain
  • ➕ Status travels with the document when copied/moved
  • ➖ Breaks “byte-fidelity” archival requirement (requires rewriting originals)
  • ➖ Forces changes to existing gate checks and risks cascading diffs across many files
2. Keep archive within same repo (git tags/branch/folder)
  • ➕ Avoids external-repo runtime dependency for gates
  • ➕ Simpler access control and availability model
  • ➖ Harder to enforce append-only invariants in a multi-purpose repo
  • ➖ Higher risk of accidental rewrites and noisier history; less clear “memory layer” separation
3. Generate INDEX.yaml automatically (derived index)
  • ➕ Eliminates manual index drift risk
  • ➕ Can be validated/produced deterministically in CI
  • ➖ Still needs a source of truth for lifecycle/superseded metadata
  • ➖ Adds tooling complexity earlier than necessary

Recommendation: The PR’s chosen direction (separate append-only archive repo + byte-identical copies, with lifecycle/status living only in INDEX.yaml and “two-world” fallback) is a strong fit for the stated constraints: file-name stability for existing gates, strict provenance via sha256, and minimal cascade during migration. The main tradeoff is introducing an external dependency for CI; the ADR’s proposed verify workflow and fail-closed semantics are appropriate mitigations.

Files changed (1) +72 / -0

Documentation (1) +72 / -0
ADR-0053-archive-repo-and-adr-migration.mdAdd ADR-0053 defining archive repo + ADR migration/index strategy +72/-0

Add ADR-0053 defining archive repo + ADR migration/index strategy

• Introduces ADR-0053 documenting the creation of an append-only archive repository for byte-identical ADR originals. Specifies an INDEX.yaml tombstone/index scheme for lifecycle/status metadata, gate behavior for index-vs-legacy compatibility, and verification/rollback principles for migration.

decisions/ADR-0053-archive-repo-and-adr-migration.md

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds ADR-0053 to document the W1-C1 decision and process for migrating historical ADR originals into a dedicated archive repository while keeping agent-registry/decisions/ as an index/tombstone layer (supporting the governance and future gate changes described in .github#164).

Changes:

  • Add decisions/ADR-0053-archive-repo-and-adr-migration.md defining the archive repo, byte-faithful migration approach, and decisions/INDEX.yaml tombstone index design.
  • Document expected gate/drift-check behavior for “index world vs legacy world” compatibility during rollout.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.


- status: accepted(2026-08-21)
- deciders: 人(owner randypanding)+ AI
- 关联: .github#164(W1-C1 工作卡)、宪法 specs/IR-0003/constitution.md §1(记忆层/拆家原则)、§13 推论二(数据飞轮)、.github#96(ADR 实质校验——索引格式为其预留扩展点)
@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (2) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. INDEX path inconsistent 🐞 Bug ≡ Correctness
Description
ADR-0053 names the tombstone index as agent-registry/decisions/INDEX.yaml but later refers to
fetching decisions/INDEX.yaml, creating an ambiguous single source of truth for implementers and
gate authors. This inconsistency can cause follow-up scripts/workflows to read/write the wrong
location and break the intended “index world” behavior.
Code

decisions/ADR-0053-archive-repo-and-adr-migration.md[R32-34]

+3. **墓碑索引 = `agent-registry/decisions/INDEX.yaml`**(机器可读,随 ADR 同仓
+   同 PR 治理):`version/source_commit/migrated_at/entries[]`,每 entry 含
+   number/title/file/lifecycle/decision_status/archive_path/content_sha256,
Relevance

●●● Strong

Recent accepted precedent fixes documentation-to-workflow path mismatches that could make gates or
implementers use the wrong location.

PR-#10
PR-#21

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The ADR defines the tombstone index path as agent-registry/decisions/INDEX.yaml, but later (in the
same ADR) describes gate behavior that pulls decisions/INDEX.yaml instead, which are not the same
literal path string and will be interpreted differently by readers and implementers.

decisions/ADR-0053-archive-repo-and-adr-migration.md[32-37]
decisions/ADR-0053-archive-repo-and-adr-migration.md[51-56]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
ADR-0053 uses two different path forms for the same INDEX.yaml file (`agent-registry/decisions/INDEX.yaml` vs `decisions/INDEX.yaml`). This makes the ADR ambiguous and increases the risk that downstream implementation PRs build against the wrong path.

### Issue Context
This ADR is intended to be the decision backbone for the migration and gate changes. It should name a single canonical location for the index (and if cross-repo, specify it consistently).

### Fix Focus Areas
- decisions/ADR-0053-archive-repo-and-adr-migration.md[32-56]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Constitution path likely wrong 🐞 Bug ⚙ Maintainability
Description
ADR-0053 references a constitution document at specs/IR-0003/constitution.md, but existing ADRs in
this repo refer to the constitution as specs/constitution.md. This mismatch makes the reference
hard to resolve and is likely to send readers to a non-canonical (or nonexistent) path.
Code

decisions/ADR-0053-archive-repo-and-adr-migration.md[5]

+- 关联: .github#164(W1-C1 工作卡)、宪法 specs/IR-0003/constitution.md §1(记忆层/拆家原则)、§13 推论二(数据飞轮)、.github#96(ADR 实质校验——索引格式为其预留扩展点)
Relevance

●●● Strong

Recent accepted precedent fixes inconsistent documented paths and canonical repository references in
ADR-related documentation.

PR-#10
PR-#21

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
ADR-0053 uses specs/IR-0003/constitution.md, while an earlier ADR in the same repo refers to the
constitution as specs/constitution.md, indicating the new ADR’s reference is inconsistent with
existing repo documentation conventions.

decisions/ADR-0053-archive-repo-and-adr-migration.md[5-5]
decisions/ADR-0023-ai-web-school-governance-onboarding.md[61-67]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
ADR-0053 cites the constitution using a path format that conflicts with other ADRs, which makes it unclear what the authoritative location is.

### Issue Context
Earlier accepted ADRs in this repository already established a path reference style for the constitution.

### Fix Focus Areas
- decisions/ADR-0053-archive-repo-and-adr-migration.md[5-5]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
✅ Compliance rules (platform): 11 rules
Review mode: ⚖️ Balanced: This is a documentation-only ADR, but it defines repository migration, indexing, gate behavior, runtime dependencies, and rollback contracts, so correctness has meaningful behavioral and governance impact despite the single-file change.

Grey Divider

Tip of the day
💡 Did you know, you can tweak Display preferences with a live preview to see your comment before it ships

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment on lines +32 to +34
3. **墓碑索引 = `agent-registry/decisions/INDEX.yaml`**(机器可读,随 ADR 同仓
同 PR 治理):`version/source_commit/migrated_at/entries[]`,每 entry 含
number/title/file/lifecycle/decision_status/archive_path/content_sha256,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

1. Index path inconsistent 🐞 Bug ≡ Correctness

ADR-0053 names the tombstone index as agent-registry/decisions/INDEX.yaml but later refers to
fetching decisions/INDEX.yaml, creating an ambiguous single source of truth for implementers and
gate authors. This inconsistency can cause follow-up scripts/workflows to read/write the wrong
location and break the intended “index world” behavior.
Agent Prompt
### Issue description
ADR-0053 uses two different path forms for the same INDEX.yaml file (`agent-registry/decisions/INDEX.yaml` vs `decisions/INDEX.yaml`). This makes the ADR ambiguous and increases the risk that downstream implementation PRs build against the wrong path.

### Issue Context
This ADR is intended to be the decision backbone for the migration and gate changes. It should name a single canonical location for the index (and if cross-repo, specify it consistently).

### Fix Focus Areas
- decisions/ADR-0053-archive-repo-and-adr-migration.md[32-56]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


- status: accepted(2026-08-21)
- deciders: 人(owner randypanding)+ AI
- 关联: .github#164(W1-C1 工作卡)、宪法 specs/IR-0003/constitution.md §1(记忆层/拆家原则)、§13 推论二(数据飞轮)、.github#96(ADR 实质校验——索引格式为其预留扩展点)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

2. Constitution path likely wrong 🐞 Bug ⚙ Maintainability

ADR-0053 references a constitution document at specs/IR-0003/constitution.md, but existing ADRs in
this repo refer to the constitution as specs/constitution.md. This mismatch makes the reference
hard to resolve and is likely to send readers to a non-canonical (or nonexistent) path.
Agent Prompt
### Issue description
ADR-0053 cites the constitution using a path format that conflicts with other ADRs, which makes it unclear what the authoritative location is.

### Issue Context
Earlier accepted ADRs in this repository already established a path reference style for the constitution.

### Fix Focus Areas
- decisions/ADR-0053-archive-repo-and-adr-migration.md[5-5]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@randypanding
randypanding added this pull request to the merge queue Aug 21, 2026
Merged via the queue into main with commit 345a168 Aug 21, 2026
14 checks passed
@randypanding
randypanding deleted the adr/w1c1-archive branch August 21, 2026 11:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants