From 0b90c5716fed5d82877033c5e1be16760dd87ffe Mon Sep 17 00:00:00 2001 From: Don Syme Date: Sat, 10 Oct 2026 10:49:09 +0100 Subject: [PATCH] Initialize fresh Repo Assist memory Create the schema-valid notes file on first use without migrating or modifying legacy memory branches. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/repo-assist.md | 2 +- workflows/repo-assist.md | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/docs/repo-assist.md b/docs/repo-assist.md index ea9f9ba..1c7d2f2 100644 --- a/docs/repo-assist.md +++ b/docs/repo-assist.md @@ -122,7 +122,7 @@ Every non-command-mode run that performs work, whether scheduled or manually dis Repo Assist uses one schema-validated `notes.json` file to carry concise, actionable state across runs. It records backlog cursors, unresolved issue interactions, fix attempts, the latest engineering checks, maintainer-completed monthly actions, and a short priority queue. The workflow verifies remembered facts against current repository state before acting, replaces superseded entries, and removes stale records rather than accumulating a run-by-run activity log. -Repo Assist stores this file on the dedicated `memory/repo-assist-memory` branch. Repositories upgrading from an earlier Repo Assist version start with fresh memory on this branch; legacy memory branches are not migrated or modified. +Repo Assist stores this file on the dedicated `memory/repo-assist-memory` branch. Repositories upgrading from an earlier Repo Assist version start with fresh memory on this branch; Repo Assist initializes a missing `notes.json`, while legacy memory branches are not migrated or modified. ### Guidelines Repo Assist Follows diff --git a/workflows/repo-assist.md b/workflows/repo-assist.md index 9f47e46..0b17a98 100644 --- a/workflows/repo-assist.md +++ b/workflows/repo-assist.md @@ -219,6 +219,27 @@ safe-outputs: target: "*" steps: + - name: Initialize Repo Assist memory + env: + MEMORY_DIR: /tmp/gh-aw/repo-memory/default + run: | + if [[ ! -f "$MEMORY_DIR/notes.json" ]]; then + cat > "$MEMORY_DIR/notes.json" <<'EOF' + { + "version": 1, + "cursors": { + "labelling_after": null, + "investigation_after": null + }, + "issues": [], + "fixes": [], + "checks": [], + "completed_actions": [], + "priorities": [] + } + EOF + fi + - name: Fetch repo data for task weighting env: GH_TOKEN: ${{ github.token }}