Ship default plan types with templates, installable via rake - #187
Merged
Conversation
Eleven default plan types as markdown files (YAML front matter + template body) under engine/db/default_plan_types/: Engineering Design, Exploration, PRD, Project 1-Pager, Research, Technical Documentation, Implementation Plan, Test Plan, Handoff, Scratchpad, General. Each description names the audience and moment of reading; templates carry per-section guidance as HTML comments (invisible on render, visible to agents reading template_content). Scratchpad and General deliberately ship without templates; no default_tags are set (tags stay orthogonal to types). PlanTypes::InstallDefaults creates missing types and fills blank fields on existing ones — a host's hand-edited descriptions and templates are never overwritten unless force. Exposed as `rails coplan:plan_types:install_defaults` (FORCE=1 to overwrite) and wired into the engine seed, so fresh installs get the full set. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 27a8ff49d1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…hipped values The installer specs assumed an empty coplan_plan_types table, but the PG CI job seeds before rspec and a data migration installs General — start from a clean table like engine_seed_spec does. FORCE=1 now means "back to the shipped defaults" on every field: a custom template or default_tags on a type that ships without them (Scratchpad, General) is cleared instead of surviving the overwrite. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#182 taught agents to pick a type and follow its template — but templates were admin-authored free text and every instance starts empty. This ships opinionated defaults as code.
The default set
Eleven types under
engine/db/default_plan_types/(YAML front matter + markdown template body, so they're reviewable and PR-able):Templates carry per-section guidance as HTML comments: invisible when rendered (CoPlan strips raw HTML), fully visible to agents reading
template_content. Nodefault_tagsare set — tags stay orthogonal to types, per the organizing principles.The installer
CoPlan::PlanTypes::InstallDefaults— creates missing types, fills blank fields on existing ones, and never overwrites host edits unless forced. Wired into the engine seed (fresh installs get the full set) and exposed as:Verified against a simulated pre-templates instance (custom Research description, blank templates): the run created the 9 missing types, filled the blank templates, and left the hand-written description untouched.
Full suite: 1507 examples, 0 failures.
🤖 Generated with Claude Code