Write handover snapshots under docs and ignore worktrees

This commit is contained in:
rob
2026-11-04 13:23:26 +00:00
parent 03e15dd531
commit 767b424a4c
5 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -1,2 +1,2 @@
/snapshots/ /docs/snapshots/
/.worktrees/ /.worktrees/
+3 -3
View File
@@ -9,12 +9,12 @@ This is a replaceable, supplementary transfer snapshot. Current repository code,
## Current work ## Current work
TASK-001 is implementation-ready, awaiting Captain validation. The script writes handover ZIPs to the ignored `snapshots/` folder. Captain authorized a commit and merge to a `codex` branch so the script can be run there; this is not task acceptance or deployment authorization. TASK-001 is implementation-ready, awaiting Captain validation. The script writes handover ZIPs to the ignored `docs/snapshots/` folder. Captain authorized a commit and merge to a `codex` branch so the script can be run from the project root; this is not task acceptance or deployment authorization.
## Validation record ## Validation record
- Two sample ZIPs were created. Archive inspection found the required source and six context files, no forbidden paths or file types, and no prior ZIP in the second snapshot. - Sample ZIPs were created. Archive inspection found the required source and six context files, no forbidden paths or file types, and no prior ZIP in the second snapshot. The revised `docs/snapshots/` location was also checked.
- `git check-ignore` confirmed `snapshots/` and its ZIP files are ignored. - `git check-ignore` confirmed `docs/snapshots/`, its ZIP files, and `.worktrees/` are ignored.
- No frontend, API, runtime, or deployment validation was required for this repository utility. - No frontend, API, runtime, or deployment validation was required for this repository utility.
## Decisions and next action ## Decisions and next action
+3 -3
View File
@@ -8,10 +8,10 @@ This file holds accepted, scoped implementation work. It is not a speculative ba
- Status: Implementation-ready / awaiting Captain validation - Status: Implementation-ready / awaiting Captain validation
- Objective: Provide a repeatable local script that archives the project into a ZIP suitable for ChatGPT handover. - Objective: Provide a repeatable local script that archives the project into a ZIP suitable for ChatGPT handover.
- Scope: Add the script under `scripts/`, write ZIPs under `snapshots/`, add `snapshots/` to a root `.gitignore`, and provide brief usage documentation. Include project source and context, including uncommitted documentation, while excluding generated dependencies, local environments, runtime data, secrets, Git metadata, and prior archives. - Scope: Add the script under `scripts/`, write ZIPs under `docs/snapshots/`, add `docs/snapshots/` and `.worktrees/` to a root `.gitignore`, and provide brief usage documentation. Include project source and context, including uncommitted documentation, while excluding generated dependencies, local environments, runtime data, secrets, Git metadata, and prior archives.
- Non-goals: Change application behavior, deploy, upload the ZIP, or alter repository history. - Non-goals: Change application behavior, deploy, upload the ZIP, or alter repository history.
- Acceptance criteria: One documented command creates a ZIP in `snapshots/`; a root `.gitignore` ignores that folder; its contents include application source and the six context files; `node_modules`, `.venv`, `api/share`, local environment files, database/runtime files, `.git`, caches, and generated output are absent; repeated runs do not include earlier ZIPs. - Acceptance criteria: One documented command from the project root creates a ZIP in `docs/snapshots/`; a root `.gitignore` ignores that folder and `.worktrees/`; its contents include application source and the six context files; `node_modules`, `.venv`, `api/share`, local environment files, database/runtime files, `.git`, caches, and generated output are absent; repeated runs do not include earlier ZIPs.
- Relevant areas: `scripts/`, `snapshots/`, root `.gitignore`, `api/`, `react/`, `docs/`, and existing ignore rules. - Relevant areas: `scripts/`, `docs/snapshots/`, root `.gitignore`, `api/`, `react/`, `docs/`, and existing ignore rules.
- Dependencies and unresolved decisions: Captain selected the script and ZIP locations and approved this task's branch/worktree convention. The script includes safe untracked files, including the context files. Captain review remains before completion; merge and release conventions remain pending in `DECISIONS.md`. - Dependencies and unresolved decisions: Captain selected the script and ZIP locations and approved this task's branch/worktree convention. The script includes safe untracked files, including the context files. Captain review remains before completion; merge and release conventions remain pending in `DECISIONS.md`.
- Risks: Accidental inclusion of secrets or shared files; omission of useful untracked context. The script needs an explicit exclusion list and archive-content inspection. - Risks: Accidental inclusion of secrets or shared files; omission of useful untracked context. The script needs an explicit exclusion list and archive-content inspection.
- Validation plan: Create a sample ZIP, list its entries, check required inclusions and forbidden paths, and run a second snapshot to verify prior ZIPs stay excluded. Review the task diff against the approved base. - Validation plan: Create a sample ZIP, list its entries, check required inclusions and forbidden paths, and run a second snapshot to verify prior ZIPs stay excluded. Review the task diff against the approved base.
+1 -1
View File
@@ -6,6 +6,6 @@ From the repository root, run:
python3 scripts/create_snapshot.py python3 scripts/create_snapshot.py
``` ```
The script writes a timestamped ZIP into `snapshots/`. It includes the application source, `AGENTS.md`, `docs/`, and `scripts/`, including safe untracked files. It omits Git metadata, task worktrees, dependency directories, local environment files, local databases, shared files, caches, generated builds, prior snapshots, symlinks, and common key/credential files. The root `.gitignore` ignores `snapshots/`. The script writes a timestamped ZIP into `docs/snapshots/`. It includes the application source, `AGENTS.md`, `docs/`, and `scripts/`, including safe untracked files. It omits Git metadata, task worktrees, dependency directories, local environment files, local databases, shared files, caches, generated builds, prior snapshots, symlinks, and common key/credential files. The root `.gitignore` ignores `docs/snapshots/` and `.worktrees/`.
Inspect the ZIP contents before uploading it if you have added new local data or sensitive file types to the project. Inspect the ZIP contents before uploading it if you have added new local data or sensitive file types to the project.
+1 -1
View File
@@ -8,7 +8,7 @@ from zipfile import ZIP_DEFLATED, ZipFile
ROOT = Path(__file__).resolve().parent.parent ROOT = Path(__file__).resolve().parent.parent
OUTPUT = ROOT / "snapshots" OUTPUT = ROOT / "docs" / "snapshots"
ROOT_ENTRIES = ("AGENTS.md", ".gitignore", "README.md", "api", "react", "docs", "scripts") ROOT_ENTRIES = ("AGENTS.md", ".gitignore", "README.md", "api", "react", "docs", "scripts")
EXCLUDED_DIRS = { EXCLUDED_DIRS = {
".git", ".worktrees", ".venv", "venv", "node_modules", "share", ".git", ".worktrees", ".venv", "venv", "node_modules", "share",