Skip to content

feat(doctrine): distribute orchestrator directive via public doctrine seed#205

Open
chitcommit wants to merge 1 commit into
mainfrom
fix/orchestrator-directive-doctrine-seed
Open

feat(doctrine): distribute orchestrator directive via public doctrine seed#205
chitcommit wants to merge 1 commit into
mainfrom
fix/orchestrator-directive-doctrine-seed

Conversation

@chitcommit
Copy link
Copy Markdown
Contributor

@chitcommit chitcommit commented May 28, 2026

Summary

  • Adds orchestrator_directive { version, text, sha256 } to the PUBLIC GET /api/v1/doctrine/seed response (no auth, no secret).
  • The standing ORCHESTRATOR MODE directive now rides the global doctrine seed; ch1tty SessionStart hooks cache .text to ~/.ch1tty/canon/cache/orchestrator-directive.txt, with embedded heredoc fallback.
  • sha256 covers the exact UTF-8 bytes of .text (len=605, byte-identical to the local hook heredoc): 3c82749eccce0420fe2effd0e4a3279d3499a7a334c2a5b578f75ec00cdb9d86.

Deploy blocker (needs operator action — NOT introduced by this PR)

wrangler deploy --env production fails with a pre-existing binding error, independent of this one-field change:

Service binding 'SVC_EVIDENCE' references environment 'production' on Worker
'chittyevidence' which was not found. [code: 10144]

Root cause: wrangler.jsonc binds SVC_EVIDENCE -> service "chittyevidence", environment "production", but the deployed evidence worker is named chittyevidence-db with no named production env. Neither name nor env matches a live worker. This blocks every connect deploy. Resolution (rename binding to chittyevidence-db + drop environment field, or deploy a chittyevidence prod env) is left to the operator to avoid altering service wiring.

Test plan

  • Resolve the SVC_EVIDENCE binding drift, then wrangler deploy --env production.
  • curl -s https://connect.chitty.cc/api/v1/doctrine/seed | jq '.orchestrator_directive.version, (.orchestrator_directive.text|length)' -> "1.0.0", 605.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • API now includes orchestrator mode with work delegation to subagents and durable routines.

Review Change Stack

… seed

Adds an orchestrator_directive {version, text, sha256} object to the public
GET /api/v1/doctrine/seed response so the standing ORCHESTRATOR MODE directive
is distributed globally (no auth, no secret). ch1tty SessionStart hooks cache
.text and inject it each session, falling back to an embedded copy if the seed
is unreachable. sha256 covers the exact UTF-8 bytes of .text (len=605).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 28, 2026 15:05
@cloudflare-workers-and-pages
Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
chittyconnect cb6a26d May 28 2026, 03:05 PM

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 76a85af5-3fab-4c98-a1c4-53f14f34de70

📥 Commits

Reviewing files that changed from the base of the PR and between 96fad90 and cb6a26d.

📒 Files selected for processing (1)
  • src/index.js

📝 Walkthrough

Walkthrough

The /api/v1/doctrine/seed endpoint response is extended with an orchestrator_directive block containing a versioned sha256 digest and directive text instructing consumers to operate in orchestrator mode.

Changes

Orchestrator directive seed response

Layer / File(s) Summary
Orchestrator directive in seed response
src/index.js
The doctrine seed endpoint response includes a new orchestrator_directive object with version, sha256 digest, and text fields that instruct consumers to delegate work to subagents in orchestrator mode.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A directive takes flight,
To orchestrate work with delight,
Subagents aligned,
With sha256 signed,
The seed now guides paths bright! 🌱

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is incomplete compared to the template. Critical sections are missing: Security & Access checklist, Docs checklist, and Validation checklist are not addressed. Add the required checklists for Security & Access (secrets, access model, labels), Docs (documentation updates), and Validation (CI status). Mark items as completed or explain why they don't apply.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and specifically describes the main change: adding an orchestrator directive to the public doctrine seed endpoint.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/orchestrator-directive-doctrine-seed

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a public orchestrator_directive block (version, sha256, text) to the GET /api/v1/doctrine/seed response so that downstream ch1tty SessionStart hooks can fetch and cache the standing ORCHESTRATOR MODE directive globally.

Changes:

  • Inserts orchestrator_directive { version, sha256, text } into the doctrine seed JSON.
  • Distributes the standing directive over the existing unauthenticated doctrine seed endpoint.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 28, 2026

Actionable comments posted: 0

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