shared-flow-authoring

Authors and arbitrates the shared _shared.json contract-flow file for cross-feature API test coverage.

Updated Apr 7, 2026
One-click install
npx skills add https://github.com/hontauadrian/sfx-app-empty-test --skill shared-flow-authoring-hontauadrian
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: shared-flow-authoring
Source: https://github.com/hontauadrian/sfx-app-empty-test/tree/main/.claude/skills/shared-flow-authoring
Command: npx skills add https://github.com/hontauadrian/sfx-app-empty-test --skill shared-flow-authoring-hontauadrian

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Coordinators in a multi-agent build pipeline need a single source of truth for cross-feature API contract declarations (actors, resources, fixtures, error envelopes, test endpoints) and a way to arbitrate when feature leads disagree about shared flow declarations. Without it, feature files duplicate declarations, merge conflicts fire at load time, and builders keep failing against stale flow files. ## Core Features & Use Cases - _shared.json ownership: Seeds and maintains global actors (anonymous, bearer, Keycloak ROPC, api-key, oauth-scoped), cross-feature resources, fixtures, error-envelope config, and test-endpoint registry entries. - Cross-task flow arbitration: Resolves flow_escalation mails from leads, deciding which feature file owns a flow whose endpoints span multiple features using the leaf-action placement rule. - Worktree-aware edits: Writes mid-chunk fixes directly into each affected builder's git worktree so probe failures resolve in one commit instead of mail round-trips. - Use Case: After finishing a product plan, a coordinator seeds _shared.json with Keycloak-backed role actors and the project's error envelope, then later arbitrates a FLOW_MERGE_CONFLICT between two feature files by promoting the disputed actor into _shared.json. ## Quick Start Invoke this skill after completing product-plan to seed _shared.json with global actors, fixtures, and the error envelope for the new initiative.

Frequently Asked Questions about shared-flow-authoring

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I seed _shared.json for a new product plan?▼

Walk the nine-step read-code-first gate: read the spec, auth modules, tenant modules, existing fixtures and flow files, then author _shared.json with a minimal diff and re-run pnpm probe:smoke. Declare only actors, resources, fixtures, and envelope config, never behavior assertions.

What belongs in _shared.json versus a per-task flow file?▼

_shared.json holds declarations only: global actors, cross-feature resources, fixtures, error envelope, and test-endpoint registry entries. Behavior assertions like expect.bodyHas or status checks belong in the per-task file owned by the lead whose chunk delivers that endpoint.

How do I declare a Keycloak-backed actor for generated apps?▼

Read infra/keycloak/manifest.json and dev-seed.json first, then declare a bearer-in-body actor with an ROPC login block using ${env:...} interpolation for the issuer URL, client credentials, and seeded user. Never hardcode hosts or ports since worktrees assign dynamic ports.

Why does a builder keep failing after I fixed _shared.json?▼

Each agent runs in its own git worktree with no auto-sync. For mid-chunk fixes, edit _shared.json directly inside each affected builder's worktree under .overstory/worktrees/<builder-name>/ and commit there, then send a flow_update mail with the resolved path.

Which feature file owns a flow spanning multiple features?▼

The leaf-action rule places the flow in the file whose endpoint completes the interaction, meaning the file owning the culminating assertion. Earlier features' resources are referenced via extends, never redeclared, to avoid FLOW_MERGE_CONFLICT.

Can builders or mergers author flow files?▼

No. The flows-path-boundary.js hook blocks writes from builder and merger profiles with FLOW_OWNERSHIP_VIOLATION. Only lead and coordinator roles can author flow files; builders must mail the lead with a flow_mismatch instead.