Skip to content

fix: accept an existing bounded AGENTS.md for cursor, copilot and gemini init - #140

Merged
PatrickSys merged 3 commits into
factory/038from
night/agents-md-runtime-aliases
Dec 4, 2026
Merged

PatrickSys merged 3 commits into
factory/038from
night/agents-md-runtime-aliases

Conversation

@PatrickSys

@PatrickSys PatrickSys commented Dec 3, 2026 •

Copy link
Copy Markdown
Owner

What

init --tools cursor, --tools copilot and --tools gemini now accept an existing AGENTS.md with a managed Workspine block when there is no generation manifest.

Why

After deleting .work/ to reinstall, a repository can still have its managed AGENTS.md. All three aliases use the root AGENTS adapter, but preflight only let --tools agents refresh the file without a manifest.

Fix

This PR stacks on #128 (factory/038) and uses its fence-aware parser to decide whether the root AGENTS.md has a managed block. Init refuses files with no managed block, including files that only show the markers in a fenced example. First-time insertion into an unmarked file stays setup-only.

Testing

  • Tested on macOS
  • Tested on Windows
  • Tested on Linux

node tests/gsdd.governance-alias-init.test.cjs fails on #128 for all three aliases with AGENTS.md exists without a generation manifest. All 22 tests pass on this branch, including 3 refresh cases and 19 refusal cases.

node tests/gsdd.init.test.cjs and node tests/gsdd.setup.test.cjs pass on both revisions. The rebased commit passes 105 init tests and 35 setup tests on Windows with Node 24.14.1.

Checklist

  • Follows GSD style
  • Update CHANGELOG.md by hand. Release notes are generated from the commit message.
  • Uses existing dependencies

Breaking Changes

None.

@vercel

vercel Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
workspine Ready Ready Preview Dec 4, 2026 5:32am UTC

@PatrickSys
PatrickSys force-pushed the night/agents-md-runtime-aliases branch from 0361533 to 43651d4 Compare December 3, 2026 13:00
@PatrickSys
PatrickSys changed the base branch from main to factory/038 December 3, 2026 13:00
@PatrickSys
PatrickSys marked this pull request as ready for review December 3, 2026 13:11
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-03T13:12:31.100932Z 43651d4 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Agent-Harness: codex-cli
Agent-Session: 01a23f7c-383a-7782-8edb-6396656b6389
@PatrickSys
PatrickSys merged commit ca896b9 into factory/038 Dec 4, 2026
4 checks passed
PatrickSys added a commit that referenced this pull request Dec 4, 2026
Port the root governance compatibility fix from #140 and reuse the same marker parser for preflight and rendering.

Agent: codex/01a23fec-5602-7f61-b9c5-cd3a4f6a5087

This branch was successfully deployed

1 active deployment
Preview — 4673c73e Deployed Dec 4, 2026 by vercel[bot]
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.

1 participant