Skip to content

asboyer/continuity-template

Repository files navigation

Continuity Template

Continuity Template is a stack-neutral operations scaffold for bootstrapping new software projects with persistent memory, engineering governance, and LLM-assisted development workflows.

This template is designed to make agentic coding as efficient as possible. It gives every session — human or AI — full project context from the first line, enforces standards automatically, and ensures nothing is lost between sessions.


About

Written by asboyer.

Most project templates solve the wrong problem. They give you a folder structure and a linter config, then leave you on your own. That works fine when a human is holding the full picture in their head — but the moment you bring an AI coding agent into the loop, it falls apart. The agent has no memory of what happened last session. It doesn't know your conventions unless you tell it every time. It doesn't know what milestone you're working toward, what decisions were already made, or what the product even is. So it guesses, and the guesses drift, and you spend more time correcting the AI than you save by using it.

This template exists because the problem isn't scaffolding — it's continuity.

What makes it different:

  • Persistent memory across sessions. MASTER_MEMORY.md is a shared brain that every session reads at the start and updates at the end. Nothing is lost.
  • Structured handoff, not hope. Every session closes with a specific next session starter note. The next agent — human or AI — picks up exactly where the last one left off.
  • Standards that enforce themselves. Coding conventions, commit formats, and PR requirements aren't suggestions in a wiki. They're loaded into the AI tool automatically via CLAUDE.md and AGENTS.md, enforced by pre-commit hooks, and verified in CI.
  • A prompt system, not a single prompt. Bootstrap, implementation, refactor, health check, business planning, roadmap — each session type has a purpose- built prompt with failure modes, validation rules, and explicit boundaries.
  • Stack-neutral by design. No language assumptions. The bootstrap prompt asks what you're building with and configures the tooling for you. Python, Node, Go, Rust, whatever — the governance layer is the same.
  • Built for how AI tools actually work. CLAUDE.md and AGENTS.md are auto-loaded by Claude Code, Cursor, and GitHub Copilot. The session read order, source precedence rules, and boundary constraints are picked up automatically. You don't paste prompts — you just start working.

The goal is simple: copy this template, run the bootstrap, and have a project where every session — first or fiftieth — starts with full context and ends with a clean handoff.


Quick Start

Three commands from idea to a fully configured, ready-to-build project:

# 1. Clone and initialize
git clone https://github.com/asboyer/continuity-template.git my_project && cd my_project
scripts/init_project.sh --project-name "My Project"

# 2. Open Claude Code and bootstrap with your idea
claude
# Then in the session:
# /bootstrap I want to build a habit tracker that syncs across devices

That's it. Claude will:

  1. Ask a few clarifying questions about the idea if needed
  2. Propose a concrete tech stack and wait for your sign-off
  3. Populate all operations files with project-specific content
  4. Configure the Makefile, pre-commit hooks, and .env.example for your stack
  5. Define the first milestone and the first 3 tasks

When you're done for the day: /close-session — Claude updates the memory and handoff docs. Next time you open the project: /start-session — Claude reads all context and tells you exactly where to pick up.

# Optional: verify everything initialized correctly
make init-check
make check

The initializer script:

  • removes template git history and reinitializes the repo,
  • creates a single initialization commit when git identity is configured,
  • renames .github/workflows/ci.yml.template to .github/workflows/ci.yml,
  • moves the template README to docs/TEMPLATE_SETUP_INSTRUCTIONS.md,
  • creates a new project-facing README.md,
  • installs pre-commit when possible, then activates the hooks.

Other AI tools (Cursor, GitHub Copilot): AGENTS.md loads project context automatically. Use the prompts in prompts/ manually for bootstrap and handoff — paste the prompt content at the start of a session.


What This Template Contains

operations/ — The Project Brain

This is where all project knowledge lives. Every session starts by reading these files and ends by updating them.

File Purpose When to Update
core/CORE_MISSION.md What the product does, why it exists, non-negotiable principles. This is the tie-breaker for all product decisions. Rarely — only when the mission fundamentally changes.
core/MASTER_MEMORY.md The shared brain across all sessions. Contains project overview, architecture, current state, known issues, and a session log. Every session — append a session log entry and update current state.
engineering/ROADMAP_PROGRESS.md The active milestone, what's shipped, what remains, and what's next. This is the execution handoff between sessions. Every session — update status, remaining work, and next session note.
engineering/ENGINEERING_STANDARDS.md Naming conventions, commit format, PR requirements, and the LLM execution checklist. This is the engineering contract. When standards evolve. Reference from day one.
engineering/ARCHITECTURE_OVERVIEW.md System components, data flow, external dependencies, interfaces, and observability approach. When architecture changes.
engineering/DECISIONS_LOG.md Table of major decisions with rationale and links to detailed records. When a significant decision is made.
engineering/CONTRIBUTING_WORKFLOW.md Step-by-step workflow for any contributor: what to read, how to implement, how to close a session. When workflow changes.
engineering/BOOTSTRAP_CHECKLIST.md Required setup checklist for turning this template into a real project. During initial setup and bootstrap audits.
engineering/NEXT_SESSION_TEMPLATE.md Template for the "next session starter" note that closes every session. Reference only — fill in a copy at end of each session.
engineering/DECISION_TEMPLATE.md Template for individual decision records. See decisions/001_use_operations_scaffold.md for a filled example. Reference only — copy for each new decision.
engineering/ENV_SETUP_TEMPLATE.md Local development setup instructions: prerequisites, install steps, env vars, run commands. When setup steps change.
engineering/PR_TEMPLATE.md Pull request description template with required sections. Reference only — use when opening PRs.
engineering/CHANGELOG_TEMPLATE.md Changelog format for releases. Reference only — copy for each release.
engineering/INCIDENT_TEMPLATE.md Post-incident report template with timeline, root cause, and action items. Reference only — copy for each incident.
engineering/decisions/ Directory of individual decision records. Add a new file for each major decision.
business/BUSINESS_PLAN.md Business plan: problem, market, model, financials, KPIs. When business strategy changes.
business/MARKETING_PLAN.md Marketing plan: positioning, channels, campaigns, measurement. When GTM strategy changes.

prompts/ — The Session Playbook

Prompts are instructions you give to an AI tool (or follow yourself) at the start of different session types. They define what to read, what to do, and what to output.

Prompt When to Use What It Does
start/CORE_PROJECT_BOOTSTRAP_PROMPT.md First session only Initializes all operations files, asks for your mission and tech stack, sets up the first milestone.
coding_prompts/LLM_HANDOFF_PROMPT_TEMPLATE.md Every implementation session Reads project context, implements the highest-priority task, validates, updates docs, and writes a next session starter.
coding_prompts/REFACTOR_SETUP_PROMPT_TEMPLATE.md When cleaning up code Guides safe, incremental refactoring with behavior parity and test-first requirements.
coding_prompts/SESSION_HEALTH_CHECK_PROMPT.md Every few sessions Audits operations docs for staleness, placeholder rot, and cross-file inconsistencies. Read-only — reports issues without modifying files.
business_prompts/BUSINESS_PLAN_PROMPT_TEMPLATE.md When creating/updating business strategy Generates a complete business plan from project context.
business_prompts/ROADMAP_PLAN_PROMPT_TEMPLATE.md When planning milestones Creates an execution roadmap aligned to the business plan.
business_prompts/MARKETING_PLAN_PROMPT_TEMPLATE.md When planning GTM Creates a marketing plan aligned to the business plan and mission.

Prompt order matters. See prompts/PROMPT_USAGE_ORDER.md for the full sequencing guide, decision rules, and session close requirements.

Bootstrap is not complete until operations/engineering/BOOTSTRAP_CHECKLIST.md has been reviewed.

.claude/commands/ — Claude Code Slash Commands

These are project-level slash commands available in every Claude Code session. They wrap the prompts above so you never have to paste anything manually.

Command When to Use What It Does
/bootstrap [idea] Once, immediately after init_project.sh Interviews you on your idea and stack, then populates all operations files, configures tooling, and defines the first milestone. The fastest path from zero to ready-to-build.
/start-session Every session Reads all 6 operations files, reports current milestone and last session outcome, identifies the immediate task, and asks for confirmation before starting.
/close-session Every session Appends a session log entry to MASTER_MEMORY.md, updates ROADMAP_PROGRESS.md, and optionally syncs new learnings back to .claude/rules/.

Usage in Claude Code:

/bootstrap I want to build a recipe app where friends can share and rate each other's meals
/start-session
/close-session

.claude/skills/ — Reusable Workflow Skills

Skills are structured, multi-step workflows the AI follows for recurring tasks. Unlike slash commands (which handle session lifecycle), skills handle domain work: adding features, making architecture decisions, brainstorming, and updating business strategy. Each skill loads the right context, enforces constraints, confirms before writing, and updates all relevant ops docs in one pass.

The template ships with four project-agnostic skills:

Skill When to Use What It Does
add-feature When the user has a specific feature to scope and track Aligns the feature against CORE_MISSION, scopes it to a milestone, updates ROADMAP_PROGRESS.md, and optionally BUSINESS_PLAN.md / MARKETING_PLAN.md.
arch-decision When evaluating a tech tradeoff or making a stack choice Structures the discussion, compares alternatives against mission and locked decisions, writes a decision file, and updates DECISIONS_LOG.md and ARCHITECTURE_OVERVIEW.md.
brainstorm When exploring ideas without committing to anything yet Loads all ops context, facilitates open ideation grounded in the mission and roadmap, then offers to hand off to /add-feature or /arch-decision. Read-only until the user confirms.
business-update When updating pricing, positioning, audience segments, or campaign strategy Loads BUSINESS_PLAN.md and MARKETING_PLAN.md, scopes the change, diffs current vs. proposed, confirms before writing, and logs to MASTER_MEMORY.md.

Usage in Claude Code:

/add-feature
/brainstorm

During bootstrap, create a project-specific skill for any complex core domain — a payment flow, a scoring system, a data pipeline. Encode its non-negotiable constraints once so they don't have to be re-explained every session. Place it at .claude/skills/<domain>/SKILL.md.

The rules-updater agent (run by /close-session) will automatically route session learnings back to the relevant skill file when a domain-specific skill exists for the topic.

.agents/skills/ — Cross-Tool Skills (Codex, Copilot, etc.)

The .agents/skills/ directory mirrors the workflow skills in a format compatible with non-Claude AI tools — GitHub Copilot, Codex, and any tool that reads the AGENTS.md standard. Skills here follow the same SKILL.md convention and contain the same structured workflows.

Skill Purpose
add-feature Scope a feature against the mission and roadmap (mirror of .claude/skills/)
arch-decision Evaluate a tech tradeoff and record the decision (mirror)
brainstorm Read-only ideation grounded in ops context (mirror)
business-update Update business and marketing plan docs (mirror)
start-session Load all context, verify repo state, and produce a session brief
close-session Commit, update ops docs, run consistency check, and trigger rules-updater
rules-updater Extract session learnings and write them back to the appropriate rules/skill file

Project-specific skills (e.g., a payment flow or scoring system) can be added to .agents/skills/<domain>/SKILL.md alongside the generic ones.

Root Files

File Purpose
CLAUDE.md Auto-loaded by Claude Code every request. Kept intentionally lean: stack, commands, source precedence, and a pointer to .claude/rules/. Detailed conventions live in the rules files, not here.
AGENTS.md Auto-loaded by Cursor, GitHub Copilot, and other agents. Mirrors CLAUDE.md format. Also kept lean — points to .claude/rules/ for details.
.claude/commands/ Project-level slash commands for Claude Code. /bootstrap — idea to initialized project. /start-session — read context and identify task. /close-session — write session log and update handoff docs.
.claude/rules/ Modular rule files loaded by Claude Code based on context. session.md — read order and log schema. git.md — commit/PR standards. boundaries.md — hard limits. code-style.md — language/framework conventions. Add project-specific rules (e.g., data-model.md) here.
.claude/skills/ Structured workflow skills for recurring domain tasks. Ships with add-feature, arch-decision, brainstorm, and business-update. Add project-specific skills (e.g., for a core domain like payments or a scoring system) during bootstrap.
.claude/agents/ Custom subagent definitions (.md files). Each agent has a name, description, allowed tools, and a domain-specific checklist. Ships with rules-updater — syncs session learnings back to .claude/rules/ and .claude/skills/.
.agents/skills/ Cross-tool workflow skills for Codex, GitHub Copilot, and any AGENTS.md-compatible tool. Mirrors .claude/skills/ and adds session lifecycle skills: start-session, close-session, and rules-updater.
.claude/settings.json Project-level Claude Code config: PostToolUse hooks (e.g., Prettier auto-format on every file write), permission deny rules for secrets.
.worktreeinclude List of files (e.g., .env) to copy into worktrees created by claude --worktree. Ensures credentials are available in isolated branches.
Makefile Stack-neutral build targets: lint, format-check, test, check, init-check. Configure via LINT_CMD, FORMAT_CHECK_CMD, TEST_CMD.
.pre-commit-config.yaml Pre-commit hooks for whitespace, YAML/JSON validation, merge conflict detection, private keys, and large files. Add language-specific hooks for your stack.
.github/workflows/ci.yml.template CI workflow template. Rename to .github/workflows/ci.yml when you instantiate a real project from this template.
.github/dependabot.yml Keeps GitHub Actions versions up to date automatically.
.github/ISSUE_TEMPLATE/ Structured templates for bug reports, feature requests, and tech debt.
.env.example Example environment variables. Copy to .env and fill in real values. Never commit .env.
.editorconfig Editor-agnostic formatting: 4-space indent, UTF-8, LF line endings, tabs for Makefile.
.markdownlint-cli2.yaml Markdown lint config tuned for template files (allows long lines, inline HTML, multiple headings).
SECURITY.md Security policy template with vulnerability reporting instructions.
.gitignore Ignores common environment files, caches, build outputs, editor state, logs, and stack-specific local artifacts.

Initializer

Run scripts/init_project.sh --project-name "Your Project" immediately after cloning this repository for a new project.

The script is intentionally opinionated:

  • It deletes the inherited .git/ directory and creates a fresh repository.
  • It keeps the default branch as master unless you override it.
  • It activates the CI workflow by renaming the template workflow file.
  • It moves this template README to docs/TEMPLATE_SETUP_INSTRUCTIONS.md.
  • It writes a project README stub so the new repository has its own top-level documentation.
  • It installs pre-commit when possible, then activates the hooks.

If you need a different branch name or want to skip the first commit, run:

scripts/init_project.sh \
  --project-name "Your Project" \
  --default-branch main \
  --skip-commit

The generated project README is based on docs/PROJECT_README_TEMPLATE.md.


How Sessions Work

Starting a Session

  1. The AI tool (or you) reads the files listed in the session start read order (defined in .claude/rules/session.md):

    • operations/core/CORE_MISSION.md
    • operations/core/MASTER_MEMORY.md
    • operations/engineering/ROADMAP_PROGRESS.md
    • operations/engineering/ENGINEERING_STANDARDS.md
    • operations/engineering/ARCHITECTURE_OVERVIEW.md
    • operations/engineering/DECISIONS_LOG.md
  2. The active milestone and immediate objective are identified from ROADMAP_PROGRESS.md.

  3. Work begins on the highest-priority scoped task.

During a Session

  • Implement, then validate (lint + tests + manual checks).
  • If a significant decision is made, create a decision record and log it.
  • Follow the coding standards for naming, commits, and PR structure.

Closing a Session

Every session must end with:

  1. A session log entry in MASTER_MEMORY.md containing:

    • Date (YYYY-MM-DD)
    • Objective pursued
    • Outcome (completed / partial / blocked)
    • Key decisions made
    • Next step
  2. An updated status in ROADMAP_PROGRESS.md (what shipped, what remains, risks).

  3. A Next Session Starter note — a specific, actionable first task for whoever picks up next.

Source Precedence

When documents conflict:

  • Latest explicit user instruction > roadmap > master memory > older docs.
  • Core mission is the tie-breaker for product-direction tradeoffs.

Configuring for Your Stack

The template ships with no language assumptions. During bootstrap, the AI tool will ask what stack you are using and configure:

  • Makefile — sets LINT_CMD, FORMAT_CHECK_CMD, TEST_CMD for your toolchain.
  • .pre-commit-config.yaml — uncomments or adds hooks for your language (examples for ruff/Python and eslint/JS are included as comments).
  • .env.example — adds any stack-specific environment variables.
  • .github/workflows/ci.yml — after you rename the template file, set any repository-specific environment or command defaults needed by CI.

You can also configure manually:

# Example: Node.js project
make check \
  LINT_CMD="npm run lint" \
  FORMAT_CHECK_CMD="npm run format:check" \
  TEST_CMD="npm test"

To make the configuration permanent, edit the defaults at the top of the Makefile.


Maintenance

  • Run scripts/init_project.sh when turning this template into a real repository. It activates the CI workflow, resets git history, and creates the project-facing README for you.
  • Review operations/engineering/BOOTSTRAP_CHECKLIST.md before declaring the project ready for feature work.
  • Run make init-check after bootstrap to verify all operations files are initialized with real content.
  • Run the health check prompt (prompts/coding_prompts/SESSION_HEALTH_CHECK_PROMPT.md) every few sessions to catch stale docs and cross-file drift.
  • Dependabot keeps GitHub Actions versions current automatically.
  • Pre-commit hooks run on every commit locally. CI mirrors the same checks to catch anything bypassed with --no-verify.

File Map

.
├── CLAUDE.md                          # AI context (Claude Code) — lean pointer to .claude/rules/
├── AGENTS.md                          # AI context (cross-tool standard) — lean pointer to .claude/rules/
├── SECURITY.md                        # Vulnerability reporting policy
├── Makefile                           # Stack-neutral build targets
├── .pre-commit-config.yaml            # Pre-commit hook config
├── .editorconfig                      # Editor formatting rules
├── .markdownlint-cli2.yaml            # Markdown lint config
├── .env.example                       # Example environment variables
├── .gitignore                         # Git ignore rules
├── .worktreeinclude                   # Files copied into claude --worktree branches (e.g. .env)
├── .claude/
│   ├── settings.json                  # Claude Code hooks + deny rules (Prettier, secrets)
│   ├── commands/
│   │   ├── bootstrap.md               # /bootstrap — idea → initialized project
│   │   ├── start-session.md           # /start-session — read context, identify task
│   │   └── close-session.md           # /close-session — write session log, update handoff
│   ├── rules/
│   │   ├── session.md                 # Session read order and log schema
│   │   ├── git.md                     # Commit conventions and PR standards
│   │   ├── boundaries.md              # Hard limits (never modify, never commit)
│   │   └── code-style.md              # Language/framework conventions (replace during bootstrap)
│   ├── skills/
│   │   ├── add-feature/SKILL.md       # Scope a feature and update roadmap + business docs
│   │   ├── arch-decision/SKILL.md     # Evaluate a tradeoff and record the decision
│   │   ├── brainstorm/SKILL.md        # Read-only ideation grounded in ops context
│   │   └── business-update/SKILL.md   # Update business and marketing plan docs
│   └── agents/
│       └── rules-updater.md           # Syncs session learnings back to rules and skill files
├── .agents/
│   └── skills/
│       ├── add-feature/SKILL.md       # Mirror of .claude/skills/add-feature (cross-tool)
│       ├── arch-decision/SKILL.md     # Mirror of .claude/skills/arch-decision (cross-tool)
│       ├── brainstorm/SKILL.md        # Mirror of .claude/skills/brainstorm (cross-tool)
│       ├── business-update/SKILL.md   # Mirror of .claude/skills/business-update (cross-tool)
│       ├── start-session/SKILL.md     # Load context, verify state, produce session brief
│       ├── close-session/SKILL.md     # Commit, update ops docs, run consistency check
│       └── rules-updater/SKILL.md     # Extract learnings and write back to rules/skill files
├── .github/
│   ├── workflows/ci.yml.template      # CI pipeline (rename to ci.yml after bootstrap)
│   ├── dependabot.yml                 # Dependency updates
│   └── ISSUE_TEMPLATE/                # Bug, feature, tech debt templates
├── src/                               # Application source code
├── tests/                             # Test suite
├── docs/                              # User/developer documentation
├── scripts/                           # Utility and automation scripts
├── operations/
│   ├── core/
│   │   ├── CORE_MISSION.md            # Mission and principles
│   │   └── MASTER_MEMORY.md           # Persistent project memory
│   ├── engineering/
│   │   ├── ROADMAP_PROGRESS.md        # Active milestone and status
│   │   ├── ENGINEERING_STANDARDS.md
│   │   ├── ARCHITECTURE_OVERVIEW.md
│   │   ├── CONTRIBUTING_WORKFLOW.md
│   │   ├── DECISIONS_LOG.md
│   │   ├── decisions/                 # Individual decision records
│   │   ├── BOOTSTRAP_CHECKLIST.md
│   │   ├── DECISION_TEMPLATE.md
│   │   ├── ENV_SETUP_TEMPLATE.md
│   │   ├── NEXT_SESSION_TEMPLATE.md
│   │   ├── PR_TEMPLATE.md
│   │   ├── CHANGELOG_TEMPLATE.md
│   │   └── INCIDENT_TEMPLATE.md
│   └── business/
│       ├── BUSINESS_PLAN.md
│       └── MARKETING_PLAN.md
└── prompts/
    ├── PROMPT_USAGE_ORDER.md           # Master sequencing guide
    ├── start/
    │   └── CORE_PROJECT_BOOTSTRAP_PROMPT.md
    ├── coding_prompts/
    │   ├── LLM_HANDOFF_PROMPT_TEMPLATE.md
    │   ├── REFACTOR_SETUP_PROMPT_TEMPLATE.md
    │   └── SESSION_HEALTH_CHECK_PROMPT.md
    └── business_prompts/
        ├── BUSINESS_PLAN_PROMPT_TEMPLATE.md
        ├── ROADMAP_PLAN_PROMPT_TEMPLATE.md
        └── MARKETING_PLAN_PROMPT_TEMPLATE.md

About

A stack-neutral project template for agentic coding with persistent memory, structured handoffs, engineering standards, and clean project initialization.

Topics

Resources

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors