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
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,18 @@ Install from a reviewed checkout with Rust 1.95 or later:
```sh
cargo install --path . --locked
allstack --help
allstack -C /path/to/target-repository init --check --profile rust
allstack -C /path/to/target-repository init --profile rust
allstack -C /path/to/target-repository doctor
```

The target needs an existing authorized feature branch, a GitHub `origin`, initialized Chronis, indexed documentation, workflow methods, and a frozen verification policy. Both coding hosts need their normal authentication and permissions. Follow the [CLI guide](docs/reference/cli.md) for setup and the complete Codex → Claude Code → Codex sequence.
`init` bundles workflow methods, indexed CLI documentation, repository-local Codex/Claude guidance, private-store ignores, and Chronis initialization. The explicit Rust profile requires `Cargo.toml` and `Cargo.lock`; an existing valid `--policy <path>` supports custom verification. Conflicting managed files are preserved and block writes. Reruns fill missing resources without replacing existing policies or repository instructions. Review initialized inputs before committing them.

The [installed-bootstrap verification report](docs/reports/2026-10-24-repository-bootstrap-verification.md) records fresh setup with actual Chronis and generated-policy execution while source-checkout reads were denied.

The [fresh-repository delivery report](docs/reports/2026-10-24-fresh-repository-delivery-verification.md) extends that proof through authenticated Codex → Claude Code → Codex handoffs, five executed acceptance tests, and a newly published [example PR](https://github.com/all-source-os/allstack-example/pull/1).

Starting a run needs an existing authorized feature branch, a GitHub `origin`, clean indexed inputs, and a frozen verification policy. Both coding hosts need their normal authentication and permissions. `doctor` reads setup and executable availability without opening mutable run stores; it does not authenticate hosts. Follow the [CLI guide](docs/reference/cli.md) for setup and the complete Codex → Claude Code → Codex sequence.

Each command holds an exclusive kernel lock on the local store. There is no persistent coordinator daemon or IPC service. Epoch checks fence Allstack-managed transitions; native tools used outside Allstack remain outside that boundary.

Expand Down
7 changes: 7 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,21 @@

## Design

- [2026-10-24: Installed CLI repository bootstrap](plans/2026-10-24-repository-bootstrap-design.md) — fresh-repository setup and installed-artifact verification.

- [2026-10-24: Cross-host plan → build → verify → ship](plans/2026-10-24-cross-host-workflow-design.md) — product boundary, component ownership, state transitions, recovery, and implementation sequence.

## Reference

- [Fresh repository authenticated delivery verification](reports/2026-10-24-fresh-repository-delivery-verification.md) — installed initialization, real Codex/Claude execution, five passing tests, new remote publication, and Chronis/Prime readback.

- [Installed repository bootstrap verification](reports/2026-10-24-repository-bootstrap-verification.md) — source-denied installed executable, real Chronis, idempotent setup, and generated-policy execution.

- [Cross-host workflow verification](reports/2026-10-24-cross-host-workflow-verification.md) — authenticated host runs, exact-commit gates, recovery observations, and supported limits.

- [First-release acceptance scenarios](reference/release-acceptance.md) — complete host journeys, failure cases, and required release evidence.
- [Forward handoff request](reference/handoff-forward-request.md) and [reverse handoff request](reference/handoff-reverse-request.md) — real-host fixture requirements.
- [Fresh repository delivery request](reference/fresh-repository-delivery-request.md) — installed initialization followed by an authenticated host journey and exact-commit publication.
- [CLI and recovery guide](reference/cli.md) — prerequisites, frozen verification policy, host handoffs, and publication recovery.
- [Delivery workflow definition](../workflows/delivery.toml) — versioned workflow data and method references.
- [Codex host guidance](../hosts/codex/SKILL.md) — managed Codex execution boundary.
Expand Down
51 changes: 51 additions & 0 deletions docs/plans/2026-10-24-repository-bootstrap-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Installed CLI repository bootstrap

Status: accepted implementation design on `feat/repository-bootstrap`.

Confidence: rock. The existing runtime and actual host journeys are proven; the missing path is preparing a different repository from the installed executable without copying files from the Allstack checkout.

## Outcome

A developer installs Allstack, enters an existing Git repository, and runs `allstack init` with an explicit supported verification profile or an existing verification policy. The executable installs its bundled workflow methods and repository-local guidance for both hosts, indexes documentation, ignores private runtime stores, and initializes Chronis. `doctor` identifies remaining prerequisites. No hosted AllSource account or Allstack source checkout is required.

Bootstrap never creates branches, commits, pushes, publishes, authenticates hosts, or installs global skills. Starting a managed run still requires the existing authority and branch checks.

## Approach

1. **Bundled Rust bootstrap command, recommended.** Ship authored templates with the executable using compile-time resources. Preflight every destination before writing. This reuses the installed CLI, path safety checks, bounded process supervisor, and existing workflow data.
2. **Downloadable template archive.** Keeps the binary smaller but requires a second artifact, version matching, and a separate conflict-safe installer.
3. **Documented manual copy.** Adds no runtime behavior but retains the missing installed-user path and leaves host-guidance links dependent on their original checkout layout.

Use the first approach. Add no dependency or configuration layer unless the accepted behavior requires one.

## Interface and ownership

- `allstack init --check` returns the proposed files, missing prerequisites, and conflicts without repository writes or Chronis initialization.
- Applying initialization requires an explicit Rust/Cargo test profile or an existing valid verification policy. Do not guess a project's required checks or emit a test gate that cannot establish execution.
- Preserve existing custom policies and documentation. Refuse conflicting managed templates before applying the batch. Identical files are an idempotent success.
- Install workflow data and methods under `workflows/`, the CLI reference under indexed `docs/reference/`, and guidance under repository-local Codex and Claude skill directories. Installed links must resolve from those locations.
- Append only missing private-store ignore rules and documentation index entries. Preserve unrelated bytes and existing repository instructions.
- Initialize Chronis through `cn init --toon` only after successful preflight, and only when the project store is absent. Surface uncertain outcomes and support rerunning initialization.
- Report template version/digests and actual created, unchanged, appended, or conflicting paths. Do not record initialization as a successful delivery run.

Presentation parses bootstrap arguments. Infrastructure owns bundled resources and filesystem/process effects. Bootstrap does not open the mutable run engine before preflight; dry-run process evidence must not create an unignored `.allstack/` inside the target. The existing run domain and transition history remain unchanged.

`doctor` reports setup completeness separately from executable availability and authentication. Read actual files, policy validity, ignore behavior, Chronis presence, and component state. Executable version probes continue to mean availability only.

## Safety and recovery

Reject path traversal and symlink destinations. Preflight all managed paths, then use guarded atomic writes that cannot overwrite a file introduced after preflight. A partial filesystem or Chronis failure must name completed and remaining work; rerunning converges without overwriting user changes. Never add a force-overwrite or permission-bypass mode to make a fixture pass.

The target may have existing documentation, ignore rules, and policies. Initialization must work there without replacing user-owned content. Configuration changes remain reviewable and uncommitted until the developer follows their repository's normal Git process.

## Acceptance and proof

- An executable installed into an isolated prefix initializes a fresh Rust fixture repository without access to the Allstack source tree at runtime.
- Check mode creates no repository files; conflicts preserve destination bytes and do not initialize Chronis.
- Applying initialization creates complete indexed resources, valid policy data, correctly located host guidance, ignored runtime storage, and a real Chronis project store.
- A second initialization is idempotent. A changed managed file is preserved and reported as a conflict. Symlink/path-escape attempts fail.
- `doctor` reports actual missing prerequisites before initialization and setup readiness after it, without claiming host authentication.
- Black-box tests invoke the real CLI and real Git/Chronis boundaries where available. Retain an indexed report with installed binary digest, exact commands, and observed results.
- Existing runtime tests, the four handoff fixture tests, formatting, Clippy, dependency checks, and Linux/macOS CI remain green on the one implementation commit.

Deliver through one new PR from `feat/repository-bootstrap`, based on current `main`, after explicit branch permission. No release tag, package-registry publication, new catalog workflow, or merge is part of this continuation.
12 changes: 8 additions & 4 deletions docs/reference/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,19 @@ Use one Unix machine with Git, GitHub CLI, Rust/Cargo, Chronis `cn`, Codex CLI,

Install from the reviewed Allstack checkout with `cargo install --path . --locked`. The Rust package requires Rust 1.95 or later. `allstack --help` and each subcommand's `--help` expose the installed interface.

Put the installed executable directory on the `PATH` inherited by both coding hosts. A custom `cargo install --root <prefix>` needs `<prefix>/bin` there as well. Keep the selected policy environment stable from verification through shipping. The [fresh-repository verification](../reports/2026-10-24-fresh-repository-delivery-verification.md) records the complete authenticated journey and actual destination readbacks.

Prepare the target repository before starting:

1. Use an existing feature branch whose creation the user authorized. Confirm its PR has not merged. Allstack does not create branches.
2. Initialize project task storage with `cn init --toon` when `.chronis/` does not exist. Allstack uses this repository's Chronis store through `cn --toon`.
3. Provide `docs/README.md`, a request document, `workflows/delivery.toml`, and the referenced `workflows/methods/plan.md` and `workflows/methods/build.md` documents. Use the versioned delivery definition and methods from this repository as the starting point.
4. Provide the verification policy described below. Commit the prepared inputs through the repository's normal authorized process so the starting tree is clean. Ignore `.allstack/` and machine-local Chronis storage; do not commit either store.
2. Inspect bundled setup with `allstack init --check --profile rust`, then apply with `allstack init --profile rust`. The explicit Rust profile requires `Cargo.toml` and `Cargo.lock`. For existing verification data, use `allstack init --policy <repository-relative-path>` instead. Check mode creates no target files or project store.
3. Initialization installs `workflows/delivery.toml`, referenced methods, `docs/reference/allstack.md`, its documentation index entry, and repository-local skills in `.agents/skills/allstack-delivery/` and `.claude/skills/allstack-delivery/`. It appends private-store ignores and initializes Chronis with `cn init --toon` only when the target store is absent. Existing custom policies, instructions, and documentation remain intact. Different managed resources are conflicts; resolve them explicitly before rerunning.
4. Review the policy described below against the repository's required checks. Add and index a request document. Commit the prepared inputs through the repository's normal authorized process so the starting tree is clean. Initialization does not run gates, create a branch, commit, publish, authenticate hosts, or install global skills. Partial failures name completed paths; inspect their effects before rerunning. There is no force-overwrite mode.
5. Ensure repository setup works in a new detached worktree. Gitignored dependencies and build output are not included in source snapshots. Prepare required local inputs explicitly before invoking managed work.

Run `allstack -C /path/to/target-repository doctor`. Its JSON reports the actual repository and state directory, local durability mode, coordinator model, Prime scope, and probed tool versions. A successful `--version` probe establishes executable availability; it does not establish authentication, model access, or host behavior.
Run `allstack -C /path/to/target-repository doctor` (add `--policy <path>` for a custom policy). Its JSON separates `setup_ready` from `executables_ready`, reports missing/conflicting resources, actual ignore behavior, tracked private files, Chronis engine readback, and tool versions. It does not open mutable AllSource/Prime run stores. A successful `--version` probe establishes executable availability; it does not establish authentication, model access, or host behavior.

`init --check` returns `ready: false` with planned paths, digests, conflicts, and missing prerequisites when setup cannot be applied. Existing Chronis engine readback is explicitly deferred until apply; opening its engine could write storage metadata. Check-mode readiness covers resource and executable preflight, with that readback still outstanding. Applying failed preflight stops before writing managed resources or initializing Chronis. Symlinks, traversal, reserved policy destinations, and nonregular/multiply-linked files are refused. File creation cannot replace a destination introduced after preflight. Index/ignore updates append bytes after comparing the original contents. Concurrent edits can require inspection and a rerun.

## Frozen verification policy

Expand Down
15 changes: 15 additions & 0 deletions docs/reference/fresh-repository-delivery-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Fresh repository delivery exercise

Implement `handoff_receipt` in the initialized example repository's `src/lib.rs`:

```rust
pub fn handoff_receipt(from: &str, to: &str) -> Result<String, &'static str>
```

Accept exactly `codex` and `claude-code`. A transfer must change hosts. Return `FROM -> TO` for either supported direction. Reject empty, unknown, unchanged, whitespace-padded, and differently cased host names. Do not normalize input.

Keep the public signature and existing test assertions. Change only `src/lib.rs`; preserve the frozen verification policy, workflow methods, documentation, repository instructions, host skills, and dependency configuration. The coordinator owns Chronis, commits, branches, verification, and publication. Do not change those from a managed host call. Use normal host permissions without bypass flags.

Acceptance: all five integration tests execute and pass through the generated `workflows/verification.toml`; formatting and whitespace gates pass on the exact delivered commit. Retained evidence must show authenticated Codex planning, an immutable handoff to Claude Code for implementation, a fresh Codex epoch recovering authoritative context, verified source, and a matching remote commit/open PR. Chronis task completion and source-linked Prime outcome must be read back after publication.

The example begins with a failing valid-transfer assertion. A planning response, compilation, manually edited result, or zero selected tests cannot establish completion.
Loading
Loading