Continuity ships three utility scripts that cover the full lifecycle of a workspace: initial scaffolding, placeholder validation before deployment, and ongoing audit of the state file structure. Each script is standalone bash — no dependencies beyond a POSIX shell — and accepts a directory argument so it can target any workspace path, not just the current directory.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/bitwikiorg/continuity/llms.txt
Use this file to discover all available pages before exploring further.
Script overview
| Script | What it does | Usage |
|---|---|---|
scripts/init-agent.sh | Creates the full directory scaffold with .gitkeep files | ./scripts/init-agent.sh /target/directory |
scripts/check-placeholders.sh | Fails if any {{UPPER_CASE}} markers remain unfilled | ./scripts/check-placeholders.sh /your/workspace/ |
skills/continuity/scripts/state-file-audit.sh | Read-only audit of broken paths, missing files, and stale state | bash state-file-audit.sh /path/to/workspace |
init-agent.sh
init-agent.sh creates the complete Continuity directory structure in a target directory. It uses mkdir -p to create all required subdirectories in one pass and then touches a .gitkeep file in each directory so they are tracked by git even when empty. The script does not copy or generate any template files — those come from the repository and are versioned there.
.md files from the repository into the target directory and replace all {{PLACEHOLDER}} markers before the agent boots.
The script creates the directory structure only. Template files —
STATE.md, TODO.md, AGENTS.md, and all others — are copied from the repository and versioned there. The scaffold and the templates are separate: init-agent.sh builds the container; you populate it.check-placeholders.sh
check-placeholders.sh scans a workspace directory for any remaining {{UPPER_CASE}} markers in .md, .json, and .sh files. It exits with code 0 if all placeholders have been replaced and code 1 if any remain, making it suitable as a CI pre-flight check or a local gate before deploying a new agent workspace.
state-file-audit.sh
state-file-audit.sh is a read-only diagnostic that checks the structural health of a Continuity workspace. It does not modify any files. It checks for four categories of problems and exits with code 1 if any required checks fail.
What the audit checks
Broken path references
Broken path references
Scans all
.md files for references that contain continuity/ — a pattern that indicates the file was copied from the repository without updating internal paths to match the deployment location.Required file existence
Required file existence
Checks that the five required files are present:
AGENTS.md, STATE.md, TODO.md, INIT.md, and SNAPSHOT.md. Reports optional files (MEMORY.md, PLAN.md, LEARNINGS.md, WARNING.md, CHECKPOINT.md) as informational warnings if absent. Also verifies that completed/ and snapshots/ directories exist.TODO discipline
TODO discipline
Warns if
TODO.md contains markers for completed items (## Done, DONE, or strikethrough ~~). Completed items should be moved to completed/ — leaving them in TODO.md causes the active task list to grow unbounded.Unfilled placeholder check
Unfilled placeholder check
Scans all
.md files for {{ patterns that are not part of template documentation. Functionally equivalent to check-placeholders.sh but scoped to markdown files and integrated into the broader audit report.