Skip to content

feat(mcp): integrate layered instructions with explicit Agent identity - #568

Merged
imshashank merged 225 commits into
mainfrom
fix/layered-agent-instructions-current
Nov 17, 2026
Merged

imshashank merged 225 commits into
mainfrom
fix/layered-agent-instructions-current

Conversation

@imshashank

@imshashank imshashank commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Adds Team and Project instructions, explicit bound-Agent guidance and policy-aware omission of hidden optional project guidance. Settings preserve untouched instructions, and project duplication copies them. Continues #530 with contributor history preserved.

Prevents a development-login click from being lost before React hydration by keeping its controls disabled until handlers are ready. The behavioral server-render/hydration regression fails without the fix; actual browser CI now passes the previously failing case. Production keeps this development-only login disabled.

Reviewed head c20aeda integrates actual main 8abaf0b. Its entire tree equals verified source d6ead55: canonical full verification passed 7,387 tests, zero failures/skips, actual runner and outer exit 0, unchanged source and a final eight-target idle/catalog check. All 17 reviewed auth files, 84 migration-history paths and lock bytes are preserved. All six fresh application CI jobs, CodeQL, recovery matrix, documentation/link checks and the normal preview checks pass. All review threads are resolved. The earlier failed 881eb87 CI run remains intact; no failed-job rerun or waiver was used.

Production migration 0041 was applied canonically once. Separate read-only Bun and Node checks confirm exactly 42 ledger entries and all required schema objects, including Team/Project instructions; the full required-catalog check passed. The release wrapper's unexpected-output stop after command exit 0 is preserved separately. No migration retry, reset, baseline or downgrade occurred.

Normal preview https://orbit-e9kaprnvc-magicapi.vercel.app (dpl_DaqJjh99GVk3h6esnW16fmFehUkP) is READY, bound to this exact Git source/project. Its actual required schema check passed. Public production aliases, all five scheduler definitions/owner and firewall12 remained unchanged. Preview readiness does not claim live third-party transactions or unrestricted preview backend access.

Ready for normal squash merge. #530 closes only after this replacement lands. Refs #530, #567, #571. Closes #409.

Pallavikumarimdb and others added 30 commits September 24, 2026 00:07
@github-actions github-actions Bot removed the area: auth Sign-in, sessions, passkeys, OAuth label Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

Current review hold: general Playwright job 133886390880 failed at published 881eb87. The trace contains no sign-in POST: the initial click completed before the development login component hydrated. A deterministic browser regression reproduces this ordering and passes with a minimal hydration guard; fresh full verification is running before the fix is published. The failed CI run remains intact. Provider/document work can proceed independently; instructions migration 0041 and this merge stay gated on the repaired source.

Copy link
Copy Markdown
Contributor Author

Went through the instructions layer on its own, on top of #571. The policy and MCP read paths are right: team needs team:manage, project needs project:manage, the MCP write tools do not expose the field, and it keys off the grant's Agent identity rather than a member flag. The dirty field fix from #530 is in with tests.

One thing I would not ship as is. updateTeam publishes the whole team row to the organization scope as well as the team scope, and the row now carries instructions. Every web client subscribes to the org scope, so a member or guest who is not on the team receives its instructions on each edit, while listTeams only returns a team to its members and admins. Please strip instructions from the org scope payload or split the action, and add a test for who receives it.

Two more on the output. layerInstructions joins raw text under ## Workspace, ## Team and ## Project, and project text is editable by any member, so a member can write a ## Workspace heading inside a project and have it read as admin guidance. Returning the layers as separate fields would fix that. get_issue also returns the same string twice, once inside issue and once at the top level.

Order matters here: this needs #567 and then #571 in first, since 0041 chains through their 0039 and 0040. When it is squashed, please add a Co-authored-by line for Pallavi so her commit from #530 keeps its credit.


Generated by Claude Code

@github-actions github-actions Bot removed area: policy Roles, permissions and authorization area: integrations GitHub, Slack and webhooks dependencies Dependency updates labels Nov 17, 2026
@github-actions github-actions Bot removed the area: docs-feature The docs product and its editor label Nov 17, 2026
@imshashank imshashank added the preview Enables a Preview for an otherwise eligible draft after CI succeeds label Nov 17, 2026 — with ChatGPT Codex Connector
@vercel

vercel Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
orbit Ready Ready Preview Nov 17, 2026 9:25am UTC

Request Review

@imshashank
imshashank marked this pull request as ready for review November 17, 2026 09:35
@imshashank
imshashank requested a review from pulkitxm as a code owner November 17, 2026 09:35
@imshashank
imshashank merged commit 39af4cf into main Nov 17, 2026
19 checks passed
@imshashank
imshashank deleted the fix/layered-agent-instructions-current branch November 17, 2026 09:35

This branch was successfully deployed

1 active deployment
Preview — c20aedac Deployed Nov 17, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: database Schema, migrations, queries, seed area: mcp The MCP server, its tools and its OAuth area: web The Next.js app and its UI documentation Docs, the README, or anything that explains Orbit preview Enables a Preview for an otherwise eligible draft after CI succeeds tests Test coverage and test infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Team and project level agent instructions, layered over the workspace ones

5 participants