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
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI

on:
pull_request:
branches:
- main

permissions:
contents: read

jobs:
preflight:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]

steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}
cache: pip

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"

- name: Run preflight
run: make preflight

- name: Prove the installed wheel operates a home with nothing else present
run: make wheel-check
68 changes: 68 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Release

on:
push:
tags:
- "v[0-9]*"

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.12"
cache: pip

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"

- name: Run preflight
run: make preflight

- name: Verify tag matches package version
env:
RELEASE_TAG: ${{ github.ref_name }}
run: |
PACKAGE_VERSION=$(python -c 'from importlib.metadata import version; print(version("agent-memory-cli"))')
test "${RELEASE_TAG}" = "v${PACKAGE_VERSION}"

- name: Upload release artifacts
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: python-package-distributions
path: dist/
if-no-files-found: error

publish-pypi:
needs: build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/agent-memory-cli
permissions:
id-token: write

steps:
- name: Download release artifacts
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: python-package-distributions
path: dist/

- name: Publish distributions to PyPI with attestations
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
with:
attestations: true
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/.venv/
/build/
/dist/
/.pytest_cache/
/.ruff_cache/
*.egg-info/
__pycache__/
*.py[cod]

# Signing material never belongs in a memory home or its tooling
keys/
*.pem
*.key

# Coding-agent tooling: instruction files, per-agent configuration, workspace
# markers and worktrees. Local to a checkout, never part of the package.
.claude/
.codex/
CLAUDE.md
AGENTS.md
.oacp
.worktrees/
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Changelog

All notable changes to agent-memory are documented in this file. The format
follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the
project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.1.0 - 2026-09-06

### Added

- The `agent-memory-cli` distribution installs the `agent-memory` command, with no runtime dependencies ([Quick Start](README.md#quick-start)).
- `agent-memory init` builds the two-tier memory home from bundled templates and binds a repository ([init](docs/commands.md#init)).
- Home resolution follows a fixed precedence; an ancestor it cannot inspect is an error, not a fall-through ([status](docs/commands.md#status)).
- `agent-memory setup claude|codex` installs the runtime's session-start hook and memory workflow file ([setup](docs/commands.md#setup)).
- `agent-memory startup` prints the session-start read manifest: the memory files in order, never their content ([startup](docs/commands.md#startup)).
- `capture` records one decision; `recall` prints the manifest's files, cut at a character budget ([recall](docs/commands.md#capture-and-recall)).
- `debrief write` publishes a session debrief atomically, never replacing a published record ([debrief](docs/commands.md#debrief-write)).
- `archive` and `restore` move a memory file in and out of `memory/archive/`, following no symlink ([archive](docs/commands.md#archive-and-restore)).
- `enable`, `clone`, `pull`, `push` and `disable` operate a memory home as its own git repository ([sync](docs/commands.md#sync)).
- A memory commit carries only the paths the sync allowlist selects; `keys/` is refused at any depth ([sync](docs/commands.md#sync)).
- `status` reports which home resolved, whether its layout is in place and where sync stands ([status](docs/commands.md#status)).
- `doctor` checks the debrief store and the sync repository; it reads no memory content and repairs nothing ([doctor](docs/commands.md#doctor)).
- A `v*` tag publishes the distribution to PyPI with build attestations ([PyPI](https://pypi.org/project/agent-memory-cli/)).
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright 2026 kiloloop

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
PYTHON ?= python3

.PHONY: build lint preflight test wheel-check

lint:
$(PYTHON) -m ruff check .

test:
$(PYTHON) -m pytest -q

build:
$(PYTHON) -m build
$(PYTHON) -m twine check dist/*

preflight: lint test build

# Installs the freshly built wheel in a throwaway venv (no extras, no kernel) and
# proves it scaffolds and reads a memory home; add HOME_PATH=<path> to also run
# `status` against a live home.
wheel-check:
$(PYTHON) scripts/check_installed_wheel.py $(if $(HOME_PATH),--home $(HOME_PATH),)
Loading