Skip to content

feat: agent-driven development workflows, templates, and declarative sync manifest - #68

Merged
gerchowl merged 85 commits into
devfrom
feature/67-declarative-sync-manifest
Feb 20, 2026
Merged

gerchowl merged 85 commits into
devfrom
feature/67-declarative-sync-manifest

Conversation

@gerchowl

@gerchowl gerchowl commented Feb 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Closes #61
Closes #63
Closes #64
Closes #67
Closes #73
Closes #80
Closes #84
Closes #90

Key files

File Purpose
scripts/sync_manifest.py Declarative manifest: what to sync + transforms
.cursor/commands/*.md 14 new agent workflow commands
.cursor/rules/*.mdc 3 new always-on rules (coding-principles, tdd, changelog)
.cursor/skills/worktree:*/SKILL.md 7 autonomous worktree skills
.cursor/skills/inception:*/SKILL.md 4 inception phase skills
.cursor/worktrees.json Native Cursor worktree initialization
justfile.worktree tmux + cursor-agent CLI worktree recipes
.github/ISSUE_TEMPLATE/*.yml 6 issue templates + config.yml
.github/pull_request_template.md Enhanced PR template
scripts/prepare-build.sh Now calls sync_manifest.py instead of bash function
assets/workspace/.devcontainer/scripts/version-check.sh Version-check notification + upgrade instructions
assets/workspace/.devcontainer/scripts/post-attach.sh Wired version-check into lifecycle
assets/workspace/.devcontainer/justfile.base Added check and devcontainer-upgrade recipes

Transforms applied to workspace template

  • .pre-commit-config.yaml: remove generate-docs hook, generalize Bandit paths, comment out validate-commit-msg args
  • .github/dependabot.yml: remove Docker ecosystem section
  • .cursor/rules/commit-messages.mdc: remove repo-specific doc link
  • .cursor/commands/tdd.md, verify.md: generalize test recipe names

Test plan

  • CI passes (build image, project checks, image tests, integration tests)
  • just sync-workspace produces correct output
  • uv run python scripts/sync_manifest.py list --transformed shows 4 transformed entries
  • YAML validation passes on generated workspace .pre-commit-config.yaml and dependabot.yml
  • New issue templates render correctly on GitHub
  • just worktree-list runs without error
  • .cursor/worktrees.json is valid JSON

gerchowl and others added 15 commits February 17, 2026 23:01
…late enhancements

Add new issue templates (refactor, documentation, ci/build), a Cursor
rule for changelog updates, a template chooser config, and enhance
existing templates with a Changelog Category dropdown and the PR
template with an explicit Changelog Entry section. This closes the
agent workflow loop from issue to commit to PR.

Refs: #61
Add 11 Cursor commands covering the full development lifecycle
(brainstorm, plan, execute-plan, start-issue, create-issue, tdd,
review, verify, check-ci, fix-ci, debug) and an always-on TDD rule
enforcing RED-GREEN-REFACTOR discipline.

Refs: #63
Add 11 Cursor commands covering the full development lifecycle
(brainstorm, plan, execute-plan, start-issue, create-issue, tdd,
review, verify, check-ci, fix-ci, debug) and an always-on TDD rule
enforcing RED-GREEN-REFACTOR discipline.

Refs: #63
The sync-workspace hook is devcontainer-repo-specific and should not
be included in the workspace template. Downstream projects don't have
scripts/sync-workspace.sh, causing pre-commit install-hooks to fail
during container image builds.

Refs: #63
Python yaml.dump() was creating malformed YAML with duplicate keys
and wrong indentation. Reverted to text-based sed/awk approach that
preserves original formatting while removing hook blocks and empty
repo stanzas.

Refs: #63
- Comment out transformed files in sync-manifest.txt (now handled by sync-workspace.sh)
- Auto-fix markdown formatting (pymarkdown) and trailing whitespace in docs
- Auto-fix typos in CONTRIBUTE.md, README.md, justfile

These are pre-existing formatting issues caught by CI that are now fixed.

Refs: #63
The docs/COMMIT_MESSAGE_STANDARD.md file was still referenced in
sync-manifest.txt but wasn't being copied by sync-workspace.sh,
causing test_manifest_files to fail. Added explicit copy to sync script.

Refs: #63
Consolidate the dual sync systems (sync-manifest.txt + prepare-build.sh
bash function, and sync-workspace.sh shell script) into a single
declarative Python manifest (scripts/sync_manifest.py).

The manifest defines both which files to sync and what transformations
to apply, making it the single source of truth for workspace template
generation. Transforms include removing devcontainer-specific hooks,
generalizing paths, and stripping Docker config sections.

- Add scripts/sync_manifest.py with Entry, Sed, RemoveLines,
  RemoveBlock, RemovePrecommitHooks, ReplaceBlock, StripTrailingBlankLines
- Update prepare-build.sh to call sync_manifest.py instead of bash fn
- Add just sync-workspace recipe calling same script
- Update test_manifest_files to skip checksums for transformed entries
- Update BATS tests for new prepare-build.sh structure
- Remove scripts/sync-manifest.txt (replaced by Python manifest)

Refs: #67
Merge agent-friendly issue templates, changelog Cursor rule, and PR
template enhancements from #61 into the consolidated branch. Re-synced
workspace templates to pick up new files (refactor.yml, documentation.yml,
ci_build.yml, config.yml, changelog.mdc). Updated CHANGELOG to include
both #61 and #67 entries.

Refs: #61, #63, #67
@gerchowl gerchowl changed the title feat: add Cursor commands/rules and declarative workspace sync manifest feat: agent-driven development workflows, templates, and declarative sync manifest Feb 18, 2026
@gerchowl

Copy link
Copy Markdown
Contributor Author

Idea: Use GitHub issue bodies for implementation plan tracking instead of docs/plans/ files

The current /plan command writes plans to docs/plans/YYYY-MM-DD-<name>-plan.md and /execute-plan reads from there. An alternative approach: write and track the implementation plan directly in the GitHub issue body (using task lists / checkboxes), and have the agent update task status there as work progresses.

How it would work

  • /plan reads the issue, breaks it into tasks, then appends or replaces a "## Implementation Plan" section in the issue body (via gh issue edit --body).
  • /execute-plan reads the issue body, picks up unchecked tasks, executes them, and checks them off in the issue body as they complete.
  • The issue becomes the single source of truth for both what needs doing and what's done.

Pros of issue-body plans

Single source of truth Plan lives where the work is tracked — no separate file to keep in sync with the issue.
Visible to the whole team Anyone looking at the issue instantly sees progress — no need to find and read a local docs/plans/ file or check it out.
No repo clutter Avoids accumulating plan markdown files in docs/plans/ that become stale after merge.
GitHub-native progress Task lists in issue bodies render as progress bars in issue lists and project boards.
Cross-agent continuity A new agent session (or different worktree) can pick up where the last left off — just read the issue body. No need to find the right plan file.
Audit trail via issue edit history GitHub tracks every edit to the issue body, so you get a changelog of plan evolution for free.

Cons / risks of issue-body plans

API rate limits Frequent gh issue edit calls (after every 2-3 task batch) could hit GitHub API rate limits, especially with multiple agents.
Concurrent edit conflicts If two agents or a human edit the issue body at the same time, last-write-wins — edits can be lost. docs/plans/ files at least get merge conflict detection via git.
Size limits GitHub issue bodies have a ~65k character limit. Complex plans with detailed sub-tasks could get close. Plan files have no practical limit.
Less structured Markdown in an issue body is harder to parse reliably than a dedicated plan file with a known schema. Edge cases in formatting could trip up the agent.
Offline / local-first workflows Plan files work without network access; issue-body plans require connectivity for every read/write.
Pollutes issue body The issue body serves double duty (problem description + implementation plan), which can make it long and harder for humans to scan. A <details> collapse could mitigate this.
/plan origin (superpowers repo) The current /plan + /execute-plan pattern comes from the superpowers community repo. Keeping the file-based approach means we stay compatible with that ecosystem and its updates. Diverging means maintaining our own variant.

Possible hybrid approach

Use both: write a concise task checklist into the issue body for visibility and cross-agent continuity, but keep the detailed plan (file paths, verification steps, dependencies) in docs/plans/ for structured parsing and offline use. The issue body becomes the "dashboard" and the plan file is the "spec".


Worth discussing whether the visibility and cross-agent continuity benefits outweigh the API/concurrency risks, or whether a hybrid gives us the best of both worlds.

@gerchowl

Copy link
Copy Markdown
Contributor Author

Correction on the "offline" con above: The offline/local-first argument is pretty much irrelevant — the agents require network access anyway (GitHub API, MCP servers, tool calls, etc.). If the network is down, the agent can't work regardless of where the plan lives. So that con effectively drops off the list.

@gerchowl

Copy link
Copy Markdown
Contributor Author

Additional thought: tie /plan to issue context as a precondition

Rather than allowing /plan to run in isolation, we should enforce that a plan can only be created/executed when the agent is already on an issue branch (or runs /start-issue first to get on one). This means:

  1. /plan checks that the current branch matches <type>/<issue_number>-* (per our branch naming convention).
  2. If not on an issue branch, it refuses and tells the agent to run /start-issue first.
  3. The plan is then inherently scoped to that issue — the issue number is known, the issue body is accessible, and there's no ambiguity about what the plan is for.

Why this matters for the issue-body approach:

  • If /plan always knows which issue it's working on, writing the plan into the issue body becomes trivial — no guessing, no "which issue?" prompts.
  • It also prevents orphaned plan files in docs/plans/ that aren't tied to any issue.
  • The workflow becomes: /start-issue → /plan (writes to issue body) → /execute-plan (reads from issue body, checks off tasks) → /submit-pr. Clean linear pipeline, single source of truth throughout.

This also works with the file-based approach — even if we keep docs/plans/, gating /plan behind issue context means the plan file can be named docs/plans/<issue_number>-<summary>-plan.md and always references back to its issue. But it makes the argument for issue-body plans stronger since the issue is already the anchor point.

@c-vigo

c-vigo commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

From changelog.mdc:

- **Skip** for `chore` commits that are purely internal (dependency bumps, CI-only config tweaks, formatting) unless they have user-visible impact.

Are we sure about this? I'd argue that a version bump by dependabot should be documented in the CHANGELOG.

@c-vigo

c-vigo commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

I'd try to reduce token utilization with e.g. commit-messages.mdc:

---
description: Commit message format and rules (type, Refs)
alwaysApply: false
triggers:
  - command: "commit-msg"
---

Just an example, may be others.

@c-vigo

c-vigo commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

For plans, I would propose adding them as comments to an existing issue:

  • Preserves history
  • Limit of 262144 bytes (65536-262144 characters depending on UTF8-encoded size) as per this link
  • Does not trigger a sync-issue workflow, but we can manually run it targeting the topic branch so keep other branches clean

If so, pipeline could be:

  • Agent proposes a plan in a temporary MD file.
  • User reviews, optionally modifies and eventually approves.
  • Agent publishes a comment on the issue using gh with proper formatting.
  • Agent triggers a sync-issue manual dispatch targetting the issue branch
  • Agent waits, verifies sync-issue workflow progress and pulls
  • Plan is available as latest comment in issue file

Note on issue comment formatting:

  • If the content starts with # (H1): All headers in that content are bumped down one level (# becomes ##, ## becomes ###, etc., up to ###### which stays as-is). This avoids clashing with the synced file's own H1 headers.
  • If the content does NOT start with # : Headers are left completely untouched. So if a comment only uses ## or lower, nothing changes.

@gerchowl

Copy link
Copy Markdown
Contributor Author

If so, pipeline could be:

  • Agent proposes a plan in a temporary MD file.
  • User reviews, optionally modifies and eventually approves.
  • Agent publishes a comment on the issue using gh with proper formatting.
  • Agent triggers a sync-issue manual dispatch targetting the issue branch
  • Agent waits, verifies sync-issue workflow progress and pulls
  • Plan is available as latest comment in issue file

dont think a wait is needed. whatever is added as a comment persists in that chat. also the sync-issue round trip will introduce wait? bad for DX?

@c-vigo

c-vigo commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

Question: can (or already does) sync_manifest.py replace utils.py?

@c-vigo

c-vigo commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

dont think a wait is needed. whatever is added as a comment persists in that chat. also the sync-issue round trip will introduce wait? bad for DX?

It makes the plan persistently available locally, e.g. if you launch another plan. One can trigger the workflow but not wait for faster dev time.

c-vigo and others added 13 commits February 19, 2026 14:59
Update branch naming pattern to allow worktree/<issue_number> format
used by autonomous worktree system.

Refs: #90
Co-authored-by: Cursor <[email protected]>
Template includes sections for Problem Statement, Proposed Solution,
Alternatives, Impact, Phasing, and References.

Refs: #90
Co-authored-by: Cursor <[email protected]>
Template includes sections for Architecture, Components, Data Flow,
Technology Stack, Testing, Security, Performance, and Deployment.

Refs: #90
Co-authored-by: Cursor <[email protected]>
First phase of inception pipeline for divergent problem exploration.
Guides users through problem framing, stakeholder mapping, prior art
research, assumptions surfacing, and risk identification.

Outputs a Problem Brief (RFC with Problem Statement section filled).

Refs: #90
Co-authored-by: Cursor <[email protected]>
Second phase of inception pipeline for convergent scoping. Guides
users through solution ideation, in/out decisions, build vs buy
assessment, feasibility checks, and phasing.

Outputs a complete RFC with Proposed Solution and Alternatives.

Refs: #90
Co-authored-by: Cursor <[email protected]>
Third phase of inception pipeline for architecture evaluation. Includes
pattern discovery from certified repos (system-design-101,
system-design-primer, karanpratapsingh/system-design,
awesome-scalability, awesome-software-architecture), pattern comparison,
component topology, tech stack evaluation, and blind spot checking.

Outputs a Design Document with architecture validated against patterns.

Refs: #90
Co-authored-by: Cursor <[email protected]>
Fourth phase of inception pipeline for decomposition into GitHub issues.
Handles work breakdown, spike identification, dependency mapping,
milestone assignment, effort estimation, and issue creation.

Outputs GitHub parent/sub-issues with links to RFC and Design docs.

Refs: #90
Co-authored-by: Cursor <[email protected]>
Added /inception-explore, /inception-scope, /inception-architect, and
/inception-plan commands to the custom commands reference.

Refs: #90
Co-authored-by: Cursor <[email protected]>
Added entry under Unreleased/Added for the inception:* skill family,
including all four phases, document templates, certified architecture
references, and purpose.

Refs: #90
Co-authored-by: Cursor <[email protected]>
Comprehensive README explaining the four-phase inception pipeline,
when to use/skip each phase, scaling by idea size, document templates,
and example flows for small/medium/large ideas.

Refs: #90
Co-authored-by: Cursor <[email protected]>
Added explicit warning to worktree:execute and worktree:pr skills to
never add cursor-agent as a co-author in commit messages. This ensures
commits are attributed only to the human user, not the AI assistant.

Refs: #90
Co-authored-by: Cursor <[email protected]>
Merge inception:* skill family (#90) into PR #68.

Adds four-phase pre-development product-thinking pipeline with RFC and
Design document templates, certified architecture reference repos, and
explicit co-author warnings in commit skills.

Refs: #90, #68
Co-authored-by: Cursor <[email protected]>
gerchowl and others added 6 commits February 19, 2026 18:33
Generalize skills and rules for repo-agnostic reuse:
- ci:fix: add branch-aware note to step 2
- code:review: dynamic base-branch lookup instead of hardcoded dev
- code:tdd: generic justfile references, verify-green preamble step
- changelog.mdc: repo-agnostic URL, dep bumps included, sort/edit rules
- design:brainstorm: require ## Design heading
- issue:triage: update path to docs/issues/
- Token reduction: branch-naming, changelog, commit-messages rules
  switched from alwaysApply to trigger-based activation
- Label taxonomy: document setup-labels.sh reconciliation workflow
- Sync workspace and remove stale code:tdd transforms from manifest

Refs: #67
Call version-check.sh at the end of post-attach.sh with graceful
failure (|| true) so update checks run on attach without disrupting
the workflow. Also fix silent-mode test that incorrectly matched
"check" substring in the filename instead of checking arguments.

Refs: #60
…dency

bats-assert v2.1.0 had a bogus runtime dependency on the `verbose` npm
package, which pulled in 50+ ancient, unmaintained transitive packages
(engine.io, sockjs, request, ws, etc.) with 13 known vulnerabilities.
v2.2.0 drops this dependency entirely.

- Bump bats-assert from v2.1.0 to v2.2.0
- Remove 13 GHSA exceptions from dependency-review-allow.txt
- Retain only GHSA-wvrr-2x4r-394v (bats-file false positive)

Refs: #37
…uites

- Remove 9 premature init-workspace.bats tests for unimplemented
  is_git_dirty feature (tests written before implementation)
- Fix prepare-build.bats grep pattern: use `sync_manifest.py.*sync`
  to tolerate shell quoting between filename and subcommand

Refs: #67
Comment thread scripts/gh_issues.py Resolved
worktree-start now derives proper branch names (e.g. feature/79-summary)
using agent CLI for intelligent title-to-kebab-case conversion instead of
the non-standard worktree/<issue> pattern. All worktree skill preconditions
updated to reference branch-naming.mdc as the single source of truth.
- Parse Closes/Fixes/Resolves #N from PR body for issue-PR mapping
- Fetch parent/sub-issue relationships in parallel via REST API
- Render parent issues with ▸ prefix, sub-issues with └ prefix
- Guarantee Title column visibility with min_width

Refs: #84
…-os/devcontainer into feature/67-declarative-sync-manifest

@gerchowl gerchowl left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests for this file? and for its deployment with the container image?

created an issue for that. also want to update the table a bit.

@gerchowl
gerchowl merged commit 20f3174 into dev Feb 20, 2026
6 checks passed
@c-vigo
c-vigo deleted the feature/67-declarative-sync-manifest branch February 20, 2026 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants