From eff4261a067132bcaa1029ce77131decac44a27c Mon Sep 17 00:00:00 2001 From: Maximiliano Rios Date: Mon, 11 May 2026 23:20:10 -0400 Subject: [PATCH 1/2] chore: add release workflow and crates.io metadata for v0.1.0 Wire up the first official release path: a tag-triggered workflow that builds binaries for linux-gnu x86_64, macos arm64/x86_64, and windows-msvc x86_64, attaches them with SHA-256 checksums to a draft GitHub release, and publishes to crates.io. Cargo.toml gains the description, license, repository, homepage, readme, keywords, and categories fields required for a crates.io publish. --- .github/workflows/release.yml | 103 ++++++++++++++++++ .../df31d357-3578-40f6-ac0b-787c9471b9d1.json | 47 ++++++++ Cargo.toml | 7 ++ 3 files changed, 157 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 .memex/nodes/df31d357-3578-40f6-ac0b-787c9471b9d1.json diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..c7beb97 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,103 @@ +name: Release + +on: + push: + tags: + - 'v*' + +env: + CARGO_TERM_COLOR: always + RUST_BACKTRACE: 1 + +permissions: + contents: write + +jobs: + build: + name: build ${{ matrix.target }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - target: x86_64-unknown-linux-gnu + os: ubuntu-latest + archive: tar.gz + - target: aarch64-apple-darwin + os: macos-latest + archive: tar.gz + - target: x86_64-apple-darwin + os: macos-13 + archive: tar.gz + - target: x86_64-pc-windows-msvc + os: windows-latest + archive: zip + steps: + - uses: actions/checkout@v4 + + - name: Install Rust stable + uses: dtolnay/rust-toolchain@stable + with: + targets: ${{ matrix.target }} + + - name: Build release binary + run: cargo build --release --target ${{ matrix.target }} + + - name: Package (unix) + if: matrix.archive == 'tar.gz' + shell: bash + run: | + archive="memex-${GITHUB_REF_NAME}-${{ matrix.target }}.tar.gz" + tar -C "target/${{ matrix.target }}/release" -czvf "$archive" memex + shasum -a 256 "$archive" > "$archive.sha256" + + - name: Package (windows) + if: matrix.archive == 'zip' + shell: pwsh + run: | + $archive = "memex-$env:GITHUB_REF_NAME-${{ matrix.target }}.zip" + Compress-Archive -Path "target\${{ matrix.target }}\release\memex.exe" -DestinationPath $archive + $hash = (Get-FileHash -Algorithm SHA256 $archive).Hash.ToLower() + "$hash $archive" | Out-File -Encoding ASCII "$archive.sha256" + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: memex-${{ matrix.target }} + path: | + memex-*.tar.gz + memex-*.zip + memex-*.sha256 + + release: + name: Create GitHub release + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/download-artifact@v4 + with: + path: artifacts + merge-multiple: true + + - name: Publish draft release + uses: softprops/action-gh-release@v2 + with: + draft: true + name: ${{ github.ref_name }} + tag_name: ${{ github.ref_name }} + generate_release_notes: true + files: artifacts/* + + publish-crate: + name: Publish to crates.io + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: dtolnay/rust-toolchain@stable + + - name: cargo publish + run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/.memex/nodes/df31d357-3578-40f6-ac0b-787c9471b9d1.json b/.memex/nodes/df31d357-3578-40f6-ac0b-787c9471b9d1.json new file mode 100644 index 0000000..d75777c --- /dev/null +++ b/.memex/nodes/df31d357-3578-40f6-ac0b-787c9471b9d1.json @@ -0,0 +1,47 @@ +{ + "id": "df31d357-3578-40f6-ac0b-787c9471b9d1", + "parent_ids": [ + "8e228c8f-ca76-48eb-9c25-4d8e629d869b" + ], + "git_ref": "chore/prepare-v0.1.0-release (178c2ce6)", + "created_at": "2026-05-12T03:17:05.774785Z", + "updated_at": "2026-05-12T03:19:48.328252Z", + "summary": { + "goal": "Prepare v0.1.0 release: complete Cargo.toml metadata, add CHANGELOG/RELEASING docs, wire cargo-dist release workflow, expand README install section", + "decisions": [ + "Hand-rolled .github/workflows/release.yml instead of cargo-dist (per approved plan). cargo-dist install is slow (5-10 min) and cargo dist init is interactive; hand-rolled yaml is ~80 lines, well-understood, no new tool dependency, and easier to audit. Matrix covers linux-gnu x86_64, macos arm64 + x86_64 (via macos-13 runner), and windows-msvc x86_64.", + "Cut as v0.1.0 (matching current Cargo.toml). 0.x signals API-may-shift; defer a deliberate 1.0 until the CLI surface settles.", + "License declared as GPL-3.0-only in Cargo.toml, matching the existing LICENSE file (GNU GPL v3, no 'or later' clause in the header).", + "Release workflow publishes to crates.io in the same run as the GitHub release. Requires a CARGO_REGISTRY_TOKEN secret on the repo — documented as a one-time prerequisite in RELEASING.md." + ], + "rejected_approaches": [ + { + "description": "Use cargo-dist (axodotdev) to generate the release workflow", + "reason": "Plan recommended this, but install is slow (5-10 min) and `cargo dist init` is interactive. cargo-dist also recently rebranded to `dist` with shifting config syntax. For memex (single-binary CLI, modest target matrix), a ~80-line hand-rolled workflow is more transparent, has no extra tool dependency, and is easier to audit. Trade-off: we own the matrix and packaging logic instead of inheriting upstream improvements." + }, + { + "description": "Address the 7 open P2 issues before cutting v0.1.0", + "reason": "All 7 are medium-priority polish (1 edge-case bug on UTF-8 goal truncation, 5 code-quality cleanups, 2 CI infra ideas, 1 docs). None block correct behavior at v0.1.0 surface. Holding the release on P2 cleanup invites scope creep; ship v0.1.0 on what landed in main and treat the issues as v0.1.1 backlog." + }, + { + "description": "Generate a Homebrew tap as part of v0.1.0", + "reason": "Requires a separate homebrew-memex repo and additional automation. Punt to a later release once binary distribution via GitHub releases is proven stable. Users on macOS can still `cargo install memex` or download the prebuilt binary." + } + ], + "open_threads": [ + "CARGO_REGISTRY_TOKEN secret must be added to the repo Settings before the v0.1.0 tag is pushed — otherwise the publish-crate job will fail and the GitHub release draft will still be created but crates.io will lack v0.1.0. RELEASING.md documents this prerequisite.", + "Release workflow has not yet run on a real tag — config is best-guess from spec. First v0.1.0 tag is also a smoke test of the workflow itself; expect possible iteration if a matrix entry or packaging step fails." + ], + "key_artifacts": [ + "Cargo.toml", + ".github/workflows/release.yml", + "CHANGELOG.md", + "RELEASING.md", + "README.md", + "AGENTS.md" + ] + }, + "raw_transcript_ref": null, + "tags": [], + "status": "Resolved" +} \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 2af7951..8ed189d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,6 +3,13 @@ name = "memex" version = "0.1.0" edition = "2021" rust-version = "1.74" +description = "A CLI tool for organizing AI-assisted development into a versioned, navigable DAG of conversation nodes." +license = "GPL-3.0-only" +repository = "https://github.com/maxrios/memex" +homepage = "https://github.com/maxrios/memex" +readme = "README.md" +keywords = ["cli", "ai", "llm", "dag", "developer-tools"] +categories = ["command-line-utilities", "development-tools"] [[bin]] name = "memex" -- knotmirror 0.0.1 From eae34d7dc72d408da200354eea2d471bd68146ef Mon Sep 17 00:00:00 2001 From: Maximiliano Rios Date: Mon, 11 May 2026 23:20:17 -0400 Subject: [PATCH 2/2] docs: add CHANGELOG, RELEASING, and v0.1.0 install instructions Introduce CHANGELOG.md (Keep-a-Changelog format) with the v0.1.0 inaugural entry summarizing the headline CLI surface. Add RELEASING.md documenting the cut process (version bump, changelog roll, verify, tag). README install section now leads with `cargo install memex` and prebuilt binaries from GitHub releases. AGENTS.md gains a pointer to RELEASING.md alongside the other repo-specific conventions. --- AGENTS.md | 2 ++ CHANGELOG.md | 32 ++++++++++++++++++++++++++++++++ README.md | 12 ++++++++++++ RELEASING.md | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 98 insertions(+) create mode 100644 CHANGELOG.md create mode 100644 RELEASING.md diff --git a/AGENTS.md b/AGENTS.md index f5db497..cdc80e8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -90,6 +90,8 @@ Conventions specific to *developing memex itself* (not in the skill): Title ends with `(closes #N)` when the PR resolves an issue. +- **Releases.** The cut process lives in [RELEASING.md](RELEASING.md). Tags matching `v*` trigger the release workflow, which builds binaries for Linux/macOS/Windows, attaches them to a draft GitHub release, and publishes to crates.io. + ## Documentation hygiene After implementing any change, check whether it affects user-visible behavior, CLI output, or workflow guidance: diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..0d37c05 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,32 @@ +# Changelog + +All notable changes to memex are documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +## [0.1.0] - 2026-05-11 + +The first tagged release of memex — a CLI for organizing AI-assisted development as a versioned, navigable DAG of conversation nodes. + +### Added + +- `memex init` — initialize a `.memex/` graph in the current project, with a sensible default `.memex/.gitignore` excluding the per-developer `state.json`. +- `memex node create` — create a new node with a `--parent` and `--goal`, optionally `--tag`. +- `memex node edit` — append `--decision`, `--artifact`, `--open-thread`, or `--rejected` entries to the active node; overwrite the `--goal` or full `--summary`. Opens `$EDITOR` over a TOML temp file when no flags are passed. +- `memex node show` — print a node by ID (or the active node by default). +- `memex node list` — list all nodes with status, parent, and goal. +- `memex node resolve` / `abandon` / `reopen` — transition node status. Destructive transitions require confirmation. +- `memex graph view` — ASCII tree view of the DAG with status markers. +- `memex context` — render the project root's goal/decisions, the trimmed ancestor chain, and the active node into a single payload. `--format markdown|xml|plain`, `--depth N`, `--id ` for targeting an arbitrary node. +- `memex search ` — full-text search across node goals, decisions, artifacts, open threads, and rejected approaches. +- Node IDs accept any unambiguous prefix (e.g. `abc1` for `abc12345-...`). +- GitHub Actions CI runs `cargo fmt --check`, `cargo clippy -D warnings`, `cargo test --all-targets`, and `cargo audit` on every push/PR to `main`, across Linux, macOS, and Windows. +- A `memex-check` workflow validates that each PR includes a corresponding `.memex/nodes/` file with a valid parent reference. +- Claude Code plugin under `claude-plugin/` shipping a `memex` skill that triggers in any repo with a `.memex/` directory. +- Release workflow (`.github/workflows/release.yml`) builds binaries for `x86_64-unknown-linux-gnu`, `aarch64-apple-darwin`, `x86_64-apple-darwin`, and `x86_64-pc-windows-msvc`, attaches them with SHA-256 checksums to a draft GitHub release, and publishes to crates.io on tag push. + +[Unreleased]: https://github.com/maxrios/memex/compare/v0.1.0...HEAD +[0.1.0]: https://github.com/maxrios/memex/releases/tag/v0.1.0 diff --git a/README.md b/README.md index b5387ca..3b43aed 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,18 @@ Conversations are ephemeral and flat, but real development is hierarchical and b ## Installation +### From crates.io + +``` +cargo install memex +``` + +### Prebuilt binaries + +Download the archive for your platform from the [latest GitHub release](https://github.com/maxrios/memex/releases/latest) and extract the `memex` binary onto your `PATH`. Each archive ships with a `.sha256` checksum file for verification. + +### From source + ``` cargo build --release cp target/release/memex /usr/local/bin/ diff --git a/RELEASING.md b/RELEASING.md new file mode 100644 index 0000000..bebeac4 --- /dev/null +++ b/RELEASING.md @@ -0,0 +1,52 @@ +# Releasing memex + +This document describes how to cut a release. The release workflow at `.github/workflows/release.yml` runs on every `v*` tag, builds binaries for Linux, macOS (Intel + Apple Silicon), and Windows, attaches them with SHA-256 checksums to a draft GitHub release, and publishes the crate to crates.io. + +## Prerequisites (one-time) + +- A `CARGO_REGISTRY_TOKEN` secret on the GitHub repo, scoped to publish the `memex` crate on [crates.io](https://crates.io/). Generate at and add via repo Settings → Secrets and variables → Actions. + +## Cutting a release + +1. Pick a version. memex follows [SemVer](https://semver.org/): bump `MINOR` for new features, `PATCH` for bug fixes only. While the project is in `0.x`, MINOR bumps may include breaking changes. + +2. From a clean `main`: + + ``` + git checkout main && git pull + ``` + +3. Update `version` in `Cargo.toml` and run `cargo build` once so `Cargo.lock` picks up the new version. + +4. In `CHANGELOG.md`, move entries from `## [Unreleased]` into a new dated section for the version, and update the version-comparison links at the bottom. + +5. Verify locally: + + ``` + cargo fmt --all -- --check + cargo clippy --all-targets -- -D warnings + cargo test --all-targets + cargo package --no-verify + ``` + + All must pass. + +6. Commit (one commit is fine for the version bump + changelog): + + ``` + git add Cargo.toml Cargo.lock CHANGELOG.md + git commit -m "chore: release v" + git push + ``` + +7. Tag and push the tag: + + ``` + git tag v + git push origin v + ``` + +8. Watch the release workflow in GitHub Actions. When it finishes: + - Confirm the draft GitHub release has all four target archives + checksums attached. + - Confirm `https://crates.io/crates/memex` shows the new version. + - Promote the draft release to published. -- knotmirror 0.0.1