Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/downstream-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ on:
default: main
type: string
template_ref:
description: Template Git ref to test
description: Git ref in dapi/memory-bank to test
required: false
default: main
default: f1f04de843aef45a2425d4a7351d577bbf89e940
type: string

permissions:
Expand All @@ -33,7 +33,8 @@ jobs:
- name: Run compatibility fixture
env:
CLI_REF: ${{ inputs.cli_ref || 'main' }}
TEMPLATE_REF: ${{ inputs.template_ref || 'main' }}
TEMPLATE_REPOSITORY_URL: https://github.com/dapi/memory-bank.git
TEMPLATE_REF: ${{ inputs.template_ref || 'f1f04de843aef45a2425d4a7351d577bbf89e940' }}
REPORT_DIR: ${{ runner.temp }}/downstream-canary
run: bash scripts/downstream-smoke.sh
- name: Upload canary evidence
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/local-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,37 @@ jobs:
env:
E2E_BINARY: ${{ runner.temp }}/memory-bank-cli
run: bash scripts/e2e-init-update.sh
- name: Check out supported manifestless legacy source
uses: actions/checkout@v7
with:
repository: dapi/memory-bank
ref: f1f04de843aef45a2425d4a7351d577bbf89e940
path: .fixtures/legacy-source
persist-credentials: false
- name: Verify real bridge source-format compatibility
env:
E2E_BINARY: ${{ runner.temp }}/memory-bank-cli
LEGACY_SOURCE: ${{ github.workspace }}/.fixtures/legacy-source
run: bash scripts/e2e-source-format.sh

- name: Check out reviewed component producer
uses: actions/checkout@v7
with:
repository: dapi/memory-bank
ref: f695db6a703e5409f10c9988e6460b41068fe30c
fetch-depth: 0
path: .fixtures/component-source
persist-credentials: false
- name: Verify component contracts and transaction fixtures
env:
MEMORY_BANK_COMPONENT_SOURCE: ${{ github.workspace }}/.fixtures/component-source
MEMORY_BANK_LEGACY_SOURCE: ${{ github.workspace }}/.fixtures/legacy-source
run: |
go test ./...
go vet ./...
- name: Verify actual-binary component acceptance
env:
E2E_BINARY: ${{ runner.temp }}/memory-bank-cli
MEMORY_BANK_COMPONENT_SOURCE: ${{ github.workspace }}/.fixtures/component-source
MEMORY_BANK_LEGACY_SOURCE: ${{ github.workspace }}/.fixtures/legacy-source
run: python3 scripts/e2e-components.py
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,21 @@ and this project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.ht

## [Unreleased]

- Install schema-2 component presets (`core`, `docs`, `full`, `legacy`) and additive
adapters on Linux/macOS, with composition-aware README and AGENTS blocks.
- Create base documents independently from explicit flow adoption; bind adopted
documents to immutable contract bundles and support evidence-backed transitions
and identity-preserving moves.
- Migrate the pinned legacy source through deterministic previews, explicit
classification/ownership resolutions and exact plan-digest consent.
- Validate component state before mutations and retain durable recovery journals,
including prepared-draft snapshots, when rollback or cleanup cannot finish.

- Gate installation sources by a pinned legacy compatibility list or strict source-format
declaration; reject unknown formats before planning or changing downstream files.
- Add the JSON `capabilities --require` handshake for installation entrypoints.


## [2.3.0] - 2026-09-06

### Added
Expand Down
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,33 @@ Existing locks from the legacy payload roots are migrated conservatively:
unchanged files adopt canonical ownership, while local customization is
preserved for explicit resolution.

## Source compatibility

Before planning any `init`, `pull` or doctor repair, the CLI checks the pinned
source format. The supported manifestless source is Memory Bank commit
`f1f04de843aef45a2425d4a7351d577bbf89e940`. Unknown manifestless commits are
rejected before downstream writes, including saved pull plans.

Custom legacy sources must commit `memory-bank-source.json` at the checkout
root (outside `template/`) and consumers must explicitly repin that commit:

```json
{"schema_version":1,"payload_format":"legacy/v1","capabilities":["legacy/v1"]}
```

This bridge supports legacy payloads only. Component payloads require a later
CLI. Check capabilities before invoking an installer:

```sh
memory-bank-cli capabilities --require legacy/v1
```

The command emits JSON and returns nonzero for an unsupported capability.
Keep the previous CLI/source pair to continue using an undeclared custom
source without changing it. See the [bridge contract](docs/source-format-bridge.md)
for the supported-source boundary and wire format, and the
[component delivery plan](docs/component-delivery.md) for the subsequent work.

## Analyse an execution handoff

Inspect an Execution Handoff without changing the handoff or Memory Bank:
Expand Down
64 changes: 64 additions & 0 deletions docs/component-delivery.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Component installation delivery

Tracker: [CLI #62](https://github.com/dapi/memory-bank-cli/issues/62).
Source: [memory-bank #141](https://github.com/dapi/memory-bank/issues/141).
CLI owner: memory-bank-cli. The shared protocol belongs to the
[template contract](https://github.com/dapi/memory-bank/blob/feat/141-component-adoption/docs/components.md).
The [FT-141 brief](https://github.com/dapi/memory-bank/blob/feat/141-component-adoption/memory-bank/features/FT-141/brief.md)
owns imported requirements and acceptance; this file owns CLI realization and evidence routing.

Grounded CLI revision: `ac7101c307e65566787bdb32a1bdad40b9a8b995`.
`internal/ownership/update.go` provides a handle-relative payload/agent/lock transaction.
`internal/ownership/source.go` verifies pinned blobs but lacks a component source gate.
`internal/doctor/governance.go` applies feature lifecycle checks type-wide.
Baseline `env -u GOROOT go test ./...` passes all packages on 2026-09-07.

## Gates and realization

CLI-01 follows the independently reviewed [bridge plan](source-format-bridge.md).
The shared design and W2 execution-plan gates are complete; CLI-02/03 are implemented in
[PR 64](https://github.com/dapi/memory-bank-cli/pull/64), stacked on bridge PR 63. CLI code, tests
and evidence stay here. The slice is independently verifiable with synthetic source fixtures;
the template PR supplies the final cross-repository source integration.

| Step | Imported requirement | CLI surface | Verification |
| --- | --- | --- | --- |
| CLI-01 | REQ-06/08 | ownership/source_format.go; source verification; capabilities command | Real bridge/pre-bridge binary fixtures; incompatible sources cannot mutate |
| CLI-02 | REQ-01/02/04 | ownership/components.go; Lock/Options/run and resolution planning | Preset/adapter/ownership, no-op, stale-plan and rollback tests |
| CLI-03 | REQ-03/04/05 | ownership/documents.go; validator; doctor/lint; document commands | Creation/adoption, tampering, immutable rules, selectors and legacy migration |

## Acceptance and evidence

Imported SC-01…06 and NEG-01…05 are mandatory CLI checks; SC-07/08 additionally use the actual
template payload. Concrete test names, commands and CI results are recorded in the PR as they
are delivered. Required local checks: `env -u GOROOT go test ./...`, `env -u GOROOT go vet ./...`, existing hermetic
init/pull E2E and component fixtures. Required GitHub Actions must be green on the reviewed
commit. Independent code-converge implementation and simplify review must have no actionable
findings. Unexecuted checks are not evidence.

## Rollout

Prepare the bridge commit and record its actual binary identity before component support.
Component source must wait for supporting CLI. No live downstream mutation, merge or release
publication belongs to this task. Related PRs state the required release order explicitly.

The reviewed [component runtime plan](component-runtime-plan.md) owns W2 CLI execution
sequencing. CTR-01/ADR-002 and the shared Solution Ready gate were accepted before implementation.

## Implemented verification surfaces

`internal/contracts` validates portable paths, deterministic wire encodings, frozen bundles,
registry continuity, reference relocation and base/flow rules. `internal/ownership` integrates
those contracts with composition, document operations, migration previews, resolution plans
and the existing pinned transaction writer. A prepared `--from` draft receives a durable
private snapshot for recovery; it remains an unchanged read precondition through cleanup.

The local acceptance run passes the complete Go suite and vet, 28 existing E2Es, source-format
fixtures and `scripts/e2e-components.py` against the actual producer. CI repeats these checks
using immutable producer and legacy source commits. Specific fixtures include all six base
types remaining unadopted, registry/marker/identity/type tampering, renderer-1 upgrade,
ambiguous migration resolution, unchanged legacy finding multisets, selector transition
rollback, adapter closure and complete recovery with restored read inputs.

The PR records the final immutable review revisions and CI links. No merge, release or live
migration is claimed by this implementation checkpoint.
Loading
Loading