read-style-guide.mjs
sha256:b5f647cb9c409f563d4671fe3fc05ddea01fabfed9b41fc11cb923588e1c1baf
mirror: GitHub Phase A durable MCP OAuth (#270)
Human
minor
⚠ breaking
10 days ago
| 1 | /** |
| 2 | * Skill: read-style-guide |
| 3 | * |
| 4 | * Returns the canonical voice + boundaries note for one of the three projects. |
| 5 | * Every conveyor-belt agent calls this FIRST, before generating any content, |
| 6 | * so the output stays grounded in the project's documented voice. |
| 7 | * |
| 8 | * Vault path convention: |
| 9 | * vault/projects/<project>/style-guide/voice-and-boundaries.md |
| 10 | * |
| 11 | * @param {ReturnType<import('./hub-client.mjs').createHubClient>} hub |
| 12 | * @param {{ project: 'born-free' | 'store-free' | 'knowtation' }} args |
| 13 | * @returns {Promise<{ path: string, frontmatter: object, body: string }>} |
| 14 | */ |
| 15 | import { assertProject } from './hub-client.mjs'; |
| 16 | |
| 17 | export async function readStyleGuide(hub, args) { |
| 18 | const project = assertProject(args.project); |
| 19 | const path = `projects/${project}/style-guide/voice-and-boundaries.md`; |
| 20 | |
| 21 | let note; |
| 22 | try { |
| 23 | note = await hub.getNote(path); |
| 24 | } catch (e) { |
| 25 | if (e.status === 404) { |
| 26 | throw Object.assign( |
| 27 | new Error( |
| 28 | `style_guide_missing: vault/${path} does not exist on the Hub. ` + |
| 29 | `Create it with the project's voice rules before running agents for ${project}.` |
| 30 | ), |
| 31 | { code: 'STYLE_GUIDE_MISSING', project, path, cause: e } |
| 32 | ); |
| 33 | } |
| 34 | throw e; |
| 35 | } |
| 36 | |
| 37 | return { |
| 38 | path: note.path ?? path, |
| 39 | frontmatter: note.frontmatter ?? {}, |
| 40 | body: typeof note.body === 'string' ? note.body : '', |
| 41 | }; |
| 42 | } |
File History
4 commits
sha256:b5f647cb9c409f563d4671fe3fc05ddea01fabfed9b41fc11cb923588e1c1baf
mirror: GitHub Phase A durable MCP OAuth (#270)
Human
minor
⚠
10 days ago
sha256:d8c648b20a4d53b2673c5c082ee7edfa7b2fc9b11080832da1f38807b6bf940b
fix(7C-L1b): route hosted delegation proposals through cani…
Human
minor
⚠
30 days ago
sha256:2827ba9e7632a4b141c50caf1e8f7d77abbc3515be20e7465f2bccb0ac4edf91
fix: repair endpoint now sets has_active_subscription when …
Human
minor
⚠
50 days ago
sha256:6a102aafafdfe7e70a24f4e59740200f0ee713ce7915f1b53e9d4ba5ee8b4410
Initial Muse snapshot
Human
82 days ago