Skip to content

Latest commit

 

History

History
80 lines (56 loc) · 2.52 KB

INSTALL_TEMPLATE.md

File metadata and controls

80 lines (56 loc) · 2.52 KB

Install Intent-Driven Template

This file is for OpenCode. Follow these instructions when a user asks you to add this template to an existing project.

Goal

Install the intent-driven OpenSpec and OpenCode template files into the user's current project without overwriting project-specific work blindly.

This first-time install guide does not cover upgrade/version tracking. Handle upgrade instructions in a separate change.

Source Template

Clone a fresh local copy of the template repository outside the target project:

git clone https://github.com/intent-driven-dev/intent-driven-template.git

If the user already has a local clone, you may use it after checking its current branch and status.

Target Project Review

Before copying files, inspect the target project:

  • Check README.md, AGENTS.md, opencode.json, openspec/, .opencode/, and .agents/ if they exist.
  • Identify existing OpenSpec, OpenCode, agent, or skill configuration.
  • Preserve user-specific instructions and project conventions.
  • Do not delete or replace existing files without explaining the conflict and getting user approval.

Files To Install

Copy these template files and directories into the target project when they do not already exist:

  • openspec/
  • .opencode/
  • .agents/
  • opencode.json

Merge these files when they already exist:

  • AGENTS.md
  • README.md, only if the user explicitly wants project documentation updated

Install Steps

  1. Clone or locate the source template repository.
  2. Inspect the target project for existing configuration and documentation.
  3. Copy missing template directories and files into the target project.
  4. Merge AGENTS.md by adding the OpenSpec git-discipline instruction without removing existing user instructions.
  5. If opencode.json, openspec/, .opencode/, or .agents/ already exist, compare the template version with the target version and ask the user before replacing or restructuring anything.
  6. Keep the target project's product code, package files, application docs, and existing tests unchanged unless the user explicitly asks for changes.
  7. Verify the resulting file tree and summarize exactly what changed.

Validation

After installation, run the safest available checks for the target project:

git status --short

If OpenSpec is available, also run:

openspec schema validate intent-driven

If OpenCode or OpenSpec commands are unavailable, report that clearly and leave the installed files in place for the user to verify later.