diff --git a/.gitignore b/.gitignore index 9908c73..72122b6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -/snapshots/ +/docs/snapshots/ /.worktrees/ diff --git a/docs/HANDOFF.md b/docs/HANDOFF.md index 35742e4..18538d3 100644 --- a/docs/HANDOFF.md +++ b/docs/HANDOFF.md @@ -9,12 +9,12 @@ This is a replaceable, supplementary transfer snapshot. Current repository code, ## 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 -- 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. -- `git check-ignore` confirmed `snapshots/` and its ZIP files are ignored. +- 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 `docs/snapshots/`, its ZIP files, and `.worktrees/` are ignored. - No frontend, API, runtime, or deployment validation was required for this repository utility. ## Decisions and next action diff --git a/docs/TASKS.md b/docs/TASKS.md index 7a8d60e..c414372 100644 --- a/docs/TASKS.md +++ b/docs/TASKS.md @@ -8,10 +8,10 @@ This file holds accepted, scoped implementation work. It is not a speculative ba - Status: Implementation-ready / awaiting Captain validation - 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. -- 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. -- Relevant areas: `scripts/`, `snapshots/`, root `.gitignore`, `api/`, `react/`, `docs/`, and existing ignore rules. +- 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/`, `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`. - 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. diff --git a/scripts/README.md b/scripts/README.md index eb81ec8..a722394 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -6,6 +6,6 @@ From the repository root, run: 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. diff --git a/scripts/create_snapshot.py b/scripts/create_snapshot.py index f6c4896..bab6e9d 100644 --- a/scripts/create_snapshot.py +++ b/scripts/create_snapshot.py @@ -8,7 +8,7 @@ from zipfile import ZIP_DEFLATED, ZipFile ROOT = Path(__file__).resolve().parent.parent -OUTPUT = ROOT / "snapshots" +OUTPUT = ROOT / "docs" / "snapshots" ROOT_ENTRIES = ("AGENTS.md", ".gitignore", "README.md", "api", "react", "docs", "scripts") EXCLUDED_DIRS = { ".git", ".worktrees", ".venv", "venv", "node_modules", "share",