@openora/create 0.4.1-canary.35 → 0.4.1-canary.350

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/generated/versions.d.ts +11 -0
  3. package/dist/generated/versions.d.ts.map +1 -0
  4. package/dist/generated/versions.js +11 -0
  5. package/dist/generated/versions.js.map +1 -0
  6. package/dist/index.js +48 -93
  7. package/dist/index.js.map +1 -1
  8. package/dist/render.d.ts +15 -0
  9. package/dist/render.d.ts.map +1 -0
  10. package/dist/render.js +125 -0
  11. package/dist/render.js.map +1 -0
  12. package/package.json +8 -6
  13. package/template/README.md.tpl +12 -7
  14. package/template/__dot__claude/settings.json.tpl +22 -12
  15. package/template/__dot__env.example +10 -0
  16. package/template/__dot__gitignore +5 -0
  17. package/template/__dot__rulesync/commands/check.md +11 -10
  18. package/template/__dot__rulesync/commands/doctor.md.tpl +17 -0
  19. package/template/__dot__rulesync/commands/scaffold-module.md +3 -2
  20. package/template/__dot__rulesync/commands/scaffold-plugin.md +19 -3
  21. package/template/__dot__rulesync/commands/scaffold-route.md +1 -0
  22. package/template/__dot__rulesync/commands/start.md +2 -2
  23. package/template/__dot__rulesync/hooks/_shared.mjs +26 -13
  24. package/template/__dot__rulesync/hooks/guard-core.mjs.tpl +76 -28
  25. package/template/__dot__rulesync/hooks/guard-generated.mjs +15 -13
  26. package/template/__dot__rulesync/hooks/guard-mr.mjs +81 -0
  27. package/template/__dot__rulesync/hooks/guard-subagent.mjs +22 -6
  28. package/template/__dot__rulesync/hooks/post-edit.mjs.tpl +116 -0
  29. package/template/__dot__rulesync/hooks.json +27 -4
  30. package/template/__dot__rulesync/rules/conventions.md +99 -119
  31. package/template/__dot__rulesync/rules/db-conventions.md +6 -72
  32. package/template/__dot__rulesync/rules/e2e-conventions.md +33 -7
  33. package/template/__dot__rulesync/rules/frontend-conventions.md.tpl +35 -0
  34. package/template/__dot__rulesync/rules/oss-boundaries.md.tpl +78 -0
  35. package/template/__dot__rulesync/rules/overview.md +18 -82
  36. package/template/__dot__rulesync/skills/create-plugin/{SKILL.md → SKILL.md.tpl} +12 -23
  37. package/template/__dot__rulesync/skills/create-pr/SKILL.md.tpl +38 -0
  38. package/template/__dot__rulesync/skills/create-task/{SKILL.md → SKILL.md.tpl} +14 -22
  39. package/template/__dot__rulesync/skills/create-ui-module/{SKILL.md → SKILL.md.tpl} +12 -10
  40. package/template/__dot__rulesync/skills/enhance-prompt/{SKILL.md → SKILL.md.tpl} +4 -4
  41. package/template/__dot__rulesync/skills/handoff/SKILL.md +95 -0
  42. package/template/__dot__rulesync/skills/review/SKILL.md.tpl +277 -0
  43. package/template/__dot__rulesync/skills/ship/SKILL.md.tpl +157 -0
  44. package/template/__dot__rulesync/skills/ship/handoff.md.tpl +48 -0
  45. package/template/__dot__rulesync/skills/ship/watch-pr.mjs +172 -0
  46. package/template/__dot__rulesync/skills/ui-verify/SKILL.md.tpl +120 -0
  47. package/template/__dot__rulesync/skills/ui-verify/layout-check.check.sh +58 -0
  48. package/template/__dot__rulesync/skills/ui-verify/layout-check.js +163 -0
  49. package/template/__dot__rulesync/subagents/builder.md.tpl +115 -0
  50. package/template/__dot__rulesync/subagents/compliance-reviewer.md +78 -0
  51. package/template/__dot__rulesync/subagents/debugger.md.tpl +86 -0
  52. package/template/__dot__rulesync/subagents/deployer.md.tpl +54 -0
  53. package/template/__dot__rulesync/subagents/expert.md +28 -34
  54. package/template/__dot__rulesync/subagents/planner.md.tpl +39 -0
  55. package/template/__dot__rulesync/subagents/quality-reviewer.md.tpl +112 -0
  56. package/template/__dot__rulesync/subagents/security-reviewer.md.tpl +85 -0
  57. package/template/__dot__rulesync/subagents/tester.md.tpl +102 -0
  58. package/template/__dot__rulesync/sync.json.tpl +26 -0
  59. package/template/apps/api/package.json.tpl +2 -2
  60. package/template/apps/api/src/extensions.config.ts.tpl +12 -0
  61. package/template/apps/api/src/main.ts.tpl +1 -4
  62. package/template/apps/api/src/seed.ts.tpl +8 -1
  63. package/template/docker-compose.yml +13 -0
  64. package/template/docs/agents/cross-repo.md.tpl +37 -0
  65. package/template/docs/agents/forge.md.tpl +54 -0
  66. package/template/docs/agents/issue-tracker.md.tpl +42 -0
  67. package/template/docs/standards/comments.md +16 -0
  68. package/template/docs/standards/database.md +77 -0
  69. package/template/docs/standards/enforcement.md +12 -0
  70. package/template/docs/standards/errors.md +30 -0
  71. package/template/docs/standards/frontend.md +60 -0
  72. package/template/docs/standards/functions.md +38 -0
  73. package/template/docs/standards/git-delivery.md +20 -0
  74. package/template/docs/standards/module-structure.md +37 -0
  75. package/template/docs/standards/testing.md +88 -0
  76. package/template/docs/standards/types.md +31 -0
  77. package/template/package.json.tpl +15 -9
  78. package/template/rulesync.jsonc +3 -3
  79. package/template/tools/oss-worktree.mjs.tpl +105 -0
  80. package/template/tools/review-precheck.mjs +531 -0
  81. package/template/tools/sync-agents.mjs +257 -0
  82. package/dist/generated/core-version.d.ts +0 -2
  83. package/dist/generated/core-version.d.ts.map +0 -1
  84. package/dist/generated/core-version.js +0 -2
  85. package/dist/generated/core-version.js.map +0 -1
  86. package/template/__dot__rulesync/commands/doctor.md +0 -16
  87. package/template/__dot__rulesync/hooks/post-edit.mjs +0 -57
  88. package/template/__dot__rulesync/rules/oss-boundaries.md +0 -31
  89. package/template/__dot__rulesync/skills/add-feature/SKILL.md +0 -113
  90. package/template/__dot__rulesync/skills/add-feature/handoff.md +0 -58
  91. package/template/__dot__rulesync/skills/create-pr/SKILL.md +0 -55
  92. package/template/__dot__rulesync/skills/review/SKILL.md +0 -110
  93. package/template/__dot__rulesync/subagents/builder.md +0 -93
  94. package/template/__dot__rulesync/subagents/debugger.md +0 -82
  95. package/template/__dot__rulesync/subagents/deployer.md +0 -66
  96. package/template/__dot__rulesync/subagents/qa.md +0 -88
  97. package/template/__dot__rulesync/subagents/quality-reviewer.md +0 -67
  98. package/template/__dot__rulesync/subagents/security-reviewer.md +0 -54
@@ -8,94 +8,30 @@ globs:
8
8
 
9
9
  # Agent instructions
10
10
 
11
- Canonical brief for AI agents (Claude Code, GitHub Copilot, Codex) and humans working on
12
- this repo. Every per-tool instruction file (`AGENTS.md` - shared, also Codex's brief;
13
- `CLAUDE.md`; `.github/copilot-instructions.md`) plus Codex's `.codex/config.toml` and the
14
- subagent and command mirrors are generated by
15
- [rulesync](https://github.com/dyoshikawa/rulesync) from the single source in `.rulesync/`
16
- (`rules/`, `subagents/`, `commands/`, `mcp.json`). Edit the source under `.rulesync/`, then
17
- run `pnpm gen:agents`. Do not hand-edit the generated files.
11
+ This repo is a downstream igaming operator built on the OSS platform (`@openora/*`). Every per-tool instruction file (`AGENTS.md`, `CLAUDE.md`, `.github/copilot-instructions.md`, `.codex/config.toml`) and the subagent and command mirrors are generated by [rulesync](https://github.com/dyoshikawa/rulesync) from `.rulesync/`. Edit the source, run `pnpm gen:agents`, never hand-edit a generated file.
18
12
 
19
- This repo is a downstream igaming operator built on the OSS platform (`@openora/*`).
13
+ Sibling rules (load on demand; don't reopen settled questions):
20
14
 
21
- Apply every rule file in `.rulesync/rules/`:
15
+ - `conventions` - the always-on code standard, with a table routing each kind of change to its deep-dive file in `docs/standards/`.
16
+ - `oss-boundaries` - never patch `@openora/*` in place; core changes go through an OSS worktree; enforced import/module boundaries.
17
+ - `e2e-conventions` - Playwright specs against the real stack, fixtures, page objects, API specs.
18
+ - `db-conventions` - SQL / Drizzle rules for the tables an overlay owns.
19
+ - `frontend-conventions` - React/UI rules for the operator's apps and shared UI package.
22
20
 
23
- - `conventions` - the code standard (naming, types, functions, frontend, module + package structure, errors, testing, git).
24
- - `oss-boundaries` - OSS core is read-only; enforced import/module boundaries.
25
- - `db-conventions` - SQL / Drizzle rules for tables an overlay owns.
26
- - `e2e-conventions` - dual-mode Playwright specs, fixtures, mocks, page objects.
21
+ ## Agent files: generated from the template, or owned here
27
22
 
28
- ## HARD RULE: never modify OSS core
23
+ Most of `.rulesync/` (skills, subagents, commands, hooks, the shared rules) and `docs/standards/` are generated: `pnpm install` renders them from `@openora/create`'s consumer template at the pinned `@openora/*` version, using the variables in `.rulesync/sync.json`. They are gitignored via the managed `synced-agents` block in `.gitignore`, so they never appear in a diff and cannot drift - editing one locally is pointless, the next install overwrites it. Change it upstream in the template instead. This repo owns and tracks the rules and skills the template does not ship, plus the `consumerOwned` overrides in `.rulesync/sync.json`; operator-specific facts belong there or in `sync.json` vars.
29
24
 
30
- `@openora/*` is a third-party dependency - treat it like any published npm package. You may READ it for reference, never write to it.
25
+ ## How you work here
31
26
 
32
- - Do NOT edit anything in `node_modules/**` or in the linked OSS checkout. Edit/Write to those paths is denied in `.claude/settings.json`; do not try to work around it with `sed`, shell redirection, or a script.
33
- - Locally patching a dependency is an anti-pattern: it is lost on reinstall and diverges from the published package every other operator uses.
34
- - You extend the platform from the OUTSIDE only - overlay plugins, adapter rebindings, UI plugins, config. Never fork or hand-edit core.
35
- - If something can only be fixed in core, STOP and report it as an upstream bug/feature request for the OSS repo (describe the problem, expected behavior, where you think it lives). Do not patch it here.
36
-
37
- ## Getting started
38
-
39
- When the user opens Claude Code or asks to build something, call the `start` MCP tool (server: `oss`) and follow the script it returns.
40
-
41
- Trigger phrases: "start", "help", "what can I build", "what can I do", "I want to build X", "how do I begin", "getting started".
42
-
43
- ## Enhance the ask first (pre-step)
44
-
45
- Before acting on any non-trivial request - and before delegating to an agent - run the `enhance-prompt` skill on the raw ask: restate the intent, gather scoped context (your tracker / roadmap / team chat / local docs), surface the blocking ambiguities, and produce the brief you actually execute. Skip it only when the ask is already precise. Subagents act on the brief they are handed - they do not re-enhance it.
46
-
47
- ## How you work here: collect requirements, delegate everything else
48
-
49
- Your one human-facing job is to **gather thorough requirements** from the user - interview them (goal, actors, value flow, rules, lifecycle, compliance, UI, edge cases, success criteria, out of scope) until you could hand a stranger a buildable spec. The `start` / `enhance-intent` tools give you the checklist.
50
-
51
- Once requirements are confirmed, **delegate the rest to the agents** via the Task tool - you orchestrate, you do not implement feature code yourself:
52
-
53
- 1. `expert` - formalizes the requirements into acceptance criteria, flags compliance/gaps.
54
- 2. `builder` - implements (`pnpm gen ...`, code, wiring).
55
- 3. `qa` - writes/runs the E2E test against the acceptance criteria.
56
-
57
- Only return to the user to resolve genuine decisions they alone can make.
27
+ - Before acting on a non-trivial request, and before delegating, run the `enhance-prompt` skill on the raw ask. Skip it only when the ask is already precise. Subagents act on the brief they are handed; they do not re-enhance it.
28
+ - Your human-facing job is gathering requirements until a stranger could build from them; the `start` / `enhance-intent` MCP tools give the checklist. Then delegate to the subagents (`expert` -> `builder` -> `tester`) and return to the user only for decisions they alone can make.
29
+ - A task that names a ticket key starts by reading the whole ticket per `docs/agents/issue-tracker.md`. Never write to the tracker unless the user asks for that exact write.
30
+ - `pnpm verify` on the committed tree is the gate before a merge/pull request; the `guard-mr` hook refuses to open one until it has passed on HEAD.
58
31
 
59
32
  ## What this repo is
60
33
 
61
- - `apps/api/` - thin Hono + oRPC API entry, your own `extensions.config.ts`
62
- - this is a headless api consumer; build your frontend in its own repo and consume the api over HTTP via `@openora/react`
63
- - `@openora/*` packages are linked from a sibling OSS checkout via `pnpm.overrides`
64
-
65
- ## How to extend
66
-
67
- | What you want | Command |
68
- | -------------------------------------------- | ------------------ |
69
- | New behavior / routes | `pnpm gen plugin` |
70
- | Swap a vendor (payment / KYC / notification) | `pnpm gen adapter` |
71
-
72
- Register new plugins in `apps/api/src/extensions.config.ts`. Adapters must be listed AFTER the module that owns the default binding (last registration of a DI token wins).
73
-
74
- ## Agents (spawn via the Task tool)
75
-
76
- Delegate work to these scoped agents - the `start` / `enhance-intent` playbooks tell you when to use each:
77
-
78
- - `expert` - turns a fuzzy product ask into requirements + acceptance criteria (jurisdiction rules, player journey). Advisory, writes no code. Use BEFORE building anything non-obvious.
79
- - `builder` - senior fullstack engineer. Implements overlays, swaps adapters, mounts UI pages.
80
- - `qa` - writes/runs Playwright E2E tests; triages whether a bug is in OSS core (upstream) or your overlay (local fix).
81
- - `debugger` - root-causes failures, build-time (Next/Turbopack, tsc, module resolution) and runtime (Chrome DevTools: console/network/DOM). Spawn it whenever something errors or behaves wrong; it finds the cause and routes the fix.
82
- - `quality-reviewer` - reviews a diff: boundaries, conventions, frontend rules, perf, duplication. Findings only.
83
- - `security-reviewer` - reviews a diff: authz, secrets/PII, money paths, input validation. Findings only.
84
-
85
- This repo consumes OSS core as linked packages - never edit `@openora/*` source. If a bug is in core, report it upstream; extend from the outside via plugins.
86
-
87
- ## MCP tools available (server: `oss`)
88
-
89
- This server reads the platform CATALOG (not OSS source) - it tells you what exists so you extend without forking. Call these instead of grepping:
90
-
91
- - `start` - onboarding flow (call when the user asks what to build)
92
- - `enhance-intent` - turn a fuzzy ask into a grounded spec + playbook
93
- - `dev:infra` - start/stop/status docker compose (postgres :5432)
94
- - `catalog-overview` - START HERE: counts + adapter seams + config fields
95
- - `list-adapters` - vendor swap seams (interface + token + status)
96
- - `list-routes [module]` - oRPC route namespaces
97
- - `list-events` - cross-module domain events you can subscribe to
98
- - `list-slots` - named UI slots you can fill from a UI plugin
99
- - `describe-module <name>` - one module's group, tables, routes
100
- - `schema-get <name>` - locate a Zod contract schema's file
101
- - `get-config-schema` - the igaming-config fields a consumer can set
34
+ - `apps/api/` - thin Hono + oRPC API entry, your own `extensions.config.ts`.
35
+ - This is a headless API consumer; build your frontend in its own repo and consume the API over HTTP via `@openora/react`.
36
+ - `@openora/*` packages are pinned npm dependencies.
37
+ - New behaviour, a vendor swap or a mounted page: the `create-plugin` skill picks the generator.
@@ -1,19 +1,17 @@
1
1
  ---
2
2
  name: create-plugin
3
-
3
+ targets: ['*']
4
4
  description: >
5
- Guided creation of an extension - the right way to add behavior or swap a vendor without
5
+ Guided creation of a {{name}} extension - the right way to add behavior or swap a vendor without
6
6
  touching `@openora/*` core. Interviews for intent, classifies the seam (plugin / adapter /
7
7
  page / route), runs the matching scaffold command, wires extensions.config.ts, and enforces
8
8
  boundaries + audit + db rules. Use on "create plugin", "add an extension", "swap KYC/PSP",
9
9
  "mount a page", "/create-plugin <name>".
10
10
  ---
11
11
 
12
- # create-plugin
12
+ # create-plugin ({{name}})
13
13
 
14
- The platform is extended from the **outside only** (overlay plugin / adapter rebind / UI page /
15
- config) - never by editing `@openora/*`. This skill picks the correct seam and scaffolds it.
16
- Domain questions go to `expert` first; review the result with `review`.
14
+ The platform is extended from the **outside only** (overlay plugin / adapter rebind / UI page / config) - never by editing `@openora/*`. This skill picks the correct seam and scaffolds it. Domain questions go to `expert` first; review the result with `review`.
17
15
 
18
16
  ## 1. Classify the seam (ask if unclear)
19
17
 
@@ -24,23 +22,17 @@ Domain questions go to `expert` first; review the result with `review`.
24
22
  | Mount a react-sdk page on a route | page | `pnpm gen page <route>` |
25
23
  | Add one route to an existing add-on/overlay | route | `/scaffold-route <add-on> <METHOD> <path>` |
26
24
 
27
- If the behavior genuinely cannot be expressed from the outside, STOP - it's an OSS-core change.
28
- Hand off via the `add-feature` skill's `handoff.md`. Do not patch the linked OSS checkout.
25
+ If the behavior genuinely cannot be expressed from the outside, STOP - it's an OSS-core change. Hand off via the `ship` skill's `handoff.md`. Never patch `{{ossDir}}`.
29
26
 
30
27
  ## 2. Ground first
31
28
 
32
- - Read `.claude/rules/overview.md` (what you may and may not touch) and
33
- `.claude/rules/db-conventions.md` (if the extension owns tables).
34
- - Inspect what already exists with the `oss` MCP: `catalog-overview`, `list-adapters` (token +
35
- default binding to swap), `list-routes` (collision check), `list-slots`, `list-events`.
36
- - For a domain rule you can't safely assume (a limit, a KYC threshold, a jurisdiction behavior),
37
- spawn `expert` before scaffolding.
29
+ - Read `CLAUDE.md` / `AGENTS.md` (the rendered `overview` rule: what you may and may not touch), `.claude/rules/oss-boundaries.md`, and `.claude/rules/db-conventions.md` + `docs/standards/database.md` (if the extension owns tables).
30
+ - Inspect what already exists with the `oss` MCP: `catalog-overview`, `list-adapters` (token + default binding to swap), `list-routes` (collision check), `list-slots`, `list-events`.
31
+ - For a domain rule you can't safely assume (a limit, a KYC threshold, a jurisdiction behavior), spawn `expert` before scaffolding.
38
32
 
39
33
  ## 3. Scaffold + wire
40
34
 
41
- Run the command from step 1, then fill the `// AGENT: implement here` regions. Register the plugin
42
- in `apps/api/src/extensions.config.ts`. **Order matters for adapters** - last registration of a DI
43
- token wins, so list a swap AFTER the module that owns the default binding.
35
+ Run the command from step 1, then fill the `// AGENT: implement here` regions. Register the plugin in `apps/api/src/extensions.config.ts`. **Order matters for adapters** - last registration of a DI token wins, so list a swap AFTER the module that owns the default binding.
44
36
 
45
37
  ```ts
46
38
  // good - swap binds after the owning module, so it replaces the default
@@ -52,12 +44,9 @@ plugins: [myCustomPspAdapter, walletModule];
52
44
 
53
45
  ## 4. Non-negotiables
54
46
 
55
- - **Boundaries**: import only package entrypoints (`@openora/core`, not `.../src` or `.../dist`).
56
- No imports between extensions; cross-extension data goes through the oRPC client or a schema subpath.
57
- - **Tables**: live in the overlay's own `src/schema/index.ts`; follow `db-conventions` (snake_case,
58
- `timestamp({ withTimezone: true })`). Run `pnpm db:migrate` after.
59
- - **Audit every mutation**: each state-changing action emits a domain event the `audit` add-on
60
- subscribes to, or resolves `AUDIT_WRITER` and calls `record(...)`. A mutation with no audit is not done.
47
+ - **Boundaries**: import only package entrypoints (`@openora/core`, not `.../src` or `.../dist`). No imports between extensions; cross-extension data goes through the oRPC client or a schema subpath.
48
+ - **Tables**: live in the overlay's own `src/schema/index.ts`; follow `docs/standards/database.md` (snake_case, `timestamp({ withTimezone: true })`). Run `pnpm db:migrate` after.
49
+ - **Audit every mutation**: each state-changing action emits a domain event the `audit` add-on subscribes to, or resolves `AUDIT_WRITER` and calls `record(...)`. A mutation with no audit is not done.
61
50
  - **Validate at the edge**: Zod schemas for every route input/output; no inline `fetch`/SQL in handlers.
62
51
 
63
52
  ## 5. Verify
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: create-pr
3
+ targets: ['*']
4
+ description: Commit, push, and open a pull request on this repo's forge, targeting the branch `docs/agents/forge.md` names. Use on "create pr", "create mr", "open a pr/mr", "/create-pr", or "promote <branch>".
5
+ ---
6
+
7
+ # create-pr ({{name}})
8
+
9
+ `docs/agents/forge.md` is the source of truth for this repo's forge: which CLI to use, how to open and read a pull request, and where a change lands. Read it first - the steps below never hardcode a forge command.
10
+
11
+ ## Steps
12
+
13
+ 1. **Determine source + target.** `git branch --show-current`, then take the target from the "Where a change lands" section of `docs/agents/forge.md`.
14
+ 2. **Land the paired OSS change first, if there is one.** It is paired when `{{ossDir}}/.worktrees/<branch, / as +>` exists or `git -C {{ossDir}} branch --list <branch>` matches. First finish step 3 of "Changing OSS core" in the `oss-boundaries` rule (verify, OSS review, no open BLOCK). Then run steps 3-7 inside that worktree under the OSS repo's own delivery rules (`<worktree>/docs/standards/skills/delivery.md`: `gh`, its PR template, `pnpm verify`, public-record rules), with its own explicit push confirmation. Reuse an open OSS PR (`gh pr list --head <branch>` in the worktree).
15
+ 3. **Scope the commit.** `git status -s`. Commit ONLY changes that belong to this unit of work. If unrelated/pre-existing edits are present, do NOT bundle them - stage your files explicitly and tell the user what you left out. Never `git add -A` blindly when foreign changes are in the tree.
16
+ 4. **Commit.** Conventional-commit message (`feat:`, `fix:`, `docs:`, `refactor:`, `chore:`); the scope is a commitlint-enum package or app, never the ticket key; for ticket work the key goes at the END of the subject (e.g. `feat(web): add deposit limits ({{trackerKey}}-123)`). No "Co-Authored-By" / "Generated with" trailers.
17
+ 5. **Verify the commit.** Run `pnpm verify` on the committed, clean tree: it is the pre-MR gate and records the verified commit. The `guard-mr` hook refuses to open the pull request until that record matches HEAD. Don't push a red tree.
18
+ 6. **Push** the current branch - but STOP and get an explicit per-action "yes push" from the user FIRST. The one exception: run by `ship` without `--ask`, the `/ship` invocation is that yes for its ticket branch only. Report the commit SHA, then ask. Invoking this skill is NOT push authorization. Pushing to a shared/env branch (`{{mrTarget}}`, `stage`, `prod`) without that explicit yes is forbidden. Only after the yes: `git push -u origin <current>`.
19
+ 7. **Open the pull request** using the command in `docs/agents/forge.md` (only after the push is confirmed and done). Reuse an open request for the same source -> target instead of creating a duplicate, and never delete a long-lived branch on merge.
20
+ 8. **Report** the pull-request URL back to the user, and the OSS PR URL when paired.
21
+
22
+ ## Pull-request description
23
+
24
+ - State the user-facing change and its reason briefly.
25
+ - Add short, reproducible local test steps for the changed behavior (for example, `pnpm dev` then the relevant URLs or user flow).
26
+ - Close the ticket by key at the end: `Closes <KEY>-n` if this PR finishes it, else `Refs <KEY>-n` (see `docs/agents/issue-tracker.md`).
27
+ - Do not include a generic verification-command list: CI already reports those checks.
28
+ - **Attach the manual-verification evidence.** The videos are what a reviewer reads as proof of a user-visible change: one short clip per acceptance criterion, embedded under that criterion, the before/after pair on a fix. A screenshot only where a clip adds nothing, such as a second theme. Upload each file to the forge and embed the markdown it returns - `docs/agents/forge.md` says how (its "Attach evidence" section). A local path under `apps/e2e/test-results/` shows a reviewer nothing; never put one in a description. An API-only change attaches the request/response trace instead. Paste the `tester` pass's verdict table next to it. Skip this only when nothing user-visible changed.
29
+ - **Diagram the flow.** A change that adds or changes a flow across components (a request path through gates and a vendor, a state machine, an async job or webhook, a new module or overlay) embeds a fenced `mermaid` block (`flowchart` or `sequenceDiagram`), right after the summary - GitHub and GitLab both render it. Name nodes as the code does, keep it under ~15 nodes, include the refusal and failure branches. No flow (copy, styling, deps, a one-file fix): no diagram.
30
+ - **End with a "Tests" list** - one line per test this PR adds, drawn from what the manual pass exercised (happy path, the hostile paths, the authz negatives), naming its tier (unit / API E2E / browser E2E) and path. A change that needs none says why in one line.
31
+ - A paired change links neither way: the shared branch name pairs the two requests. The OSS repo is public, so its PR never names this repo or the operator; this request may be read by people outside the team, so it never names or links the OSS repo.
32
+
33
+ ## Rules
34
+
35
+ - NEVER push without an explicit per-action "yes push" from the user (or `/ship` on its ticket branch, see step 6). Invoking this skill does NOT authorize a push. Report the commit SHA, ask, then push only on yes.
36
+ - `pnpm verify` must pass on the commit you push.
37
+ - Keep the pull request scoped to one concern; split unrelated changes into separate ones.
38
+ - No AI-attribution trailers anywhere - not in the commit, not in the pull-request title or description. No "Generated with", no "Co-Authored-By: Claude", no robot-emoji footer.
@@ -1,38 +1,33 @@
1
1
  ---
2
2
  name: create-task
3
-
4
- description: Create or rewrite this operator's Jira tickets in a lean, bulleted, easy-to-scan format. Use on "create task", "new ticket", "rewrite ticket", "/create-task", or any ticket-key description work.
3
+ targets: ['*']
4
+ description: Create or rewrite this operator's Jira tickets in a lean, bulleted, easy-to-scan format. Use on "create task", "new ticket", "rewrite ticket", "/create-task", or any {{trackerKey}}-XXX description work.
5
5
  ---
6
6
 
7
- # create-task
7
+ # create-task ({{name}})
8
8
 
9
- Template and clean up Jira tickets for this operator's project so they are short,
10
- scannable, and free of filler. Use for new tasks and for rewriting bloated ones.
9
+ Template and clean up Jira tickets for this operator's project so they are short, scannable, and free of filler. Use for new tasks and for rewriting bloated ones.
11
10
 
12
11
  ## Jira coordinates
13
12
 
14
13
  - Tool: the **Atlassian** MCP - read the issue, create/edit the issue.
15
- - `cloudId`: `<your-jira-cloud-id>`
16
- - Project key: `<your-project-key>` (ticket keys look like `<KEY>-XXX`)
14
+ - `cloudId`: `{{jiraCloudId}}` (`{{jiraSite}}`)
15
+ - Project key: `{{trackerKey}}` (ticket keys look like `{{trackerKey}}-XXX`)
17
16
  - Always pass `contentFormat: "markdown"` and `responseContentFormat: "markdown"`.
18
17
 
19
18
  ## Writing rules
20
19
 
21
20
  - Lead with **Goal** (1-2 lines). Reader should get the point in 5 seconds.
22
21
  - Everything else is **bullets**. No long prose paragraphs.
23
- - Cut: progress logs, "we decided to instead", history, anything not actionable.
24
- State the current decision, not how we got there.
22
+ - Cut: progress logs, "we decided to instead", history, anything not actionable. State the current decision, not how we got there.
25
23
  - Short dashes `-` only, never long dashes. ASCII only.
26
24
  - Use `->` for flows, `x3` for counts, backticks for commands/env vars/paths.
27
- - Name the owner-confirmed decisions inline with date + who (e.g. "confirmed with
28
- <owner> 2026-06-15") so they are not relitigated.
29
- - Scope tightly. Push anything bigger into a separate ticket and say so in
30
- **Out of scope**.
25
+ - Name the owner-confirmed decisions inline with date + who (e.g. "confirmed with <owner> 2026-06-15") so they are not relitigated.
26
+ - Scope tightly. Push anything bigger into a separate ticket and say so in **Out of scope**.
31
27
 
32
- ## Gotchas
28
+ ## Jira gotchas
33
29
 
34
- - **No markdown checkboxes.** `- [ ]` renders as literal `\[ \]` in Jira. Use plain
35
- `-` bullets for task lists and acceptance criteria.
30
+ - **No markdown checkboxes.** `- [ ]` renders as literal `\[ \]` in Jira. Use plain `-` bullets for task lists and acceptance criteria.
36
31
  - Markdown `##` headings and `**bold**` convert cleanly; tables convert too.
37
32
  - Re-read the issue via the **Atlassian** MCP after writing only if the render looked off.
38
33
 
@@ -64,14 +59,11 @@ scannable, and free of filler. Use for new tasks and for rewriting bloated ones.
64
59
  - <observable, testable outcomes>
65
60
  ```
66
61
 
67
- For infra/DevOps tickets, swap **Scope** for **Provision** (AWS services as bullets)
68
-
69
- - **One-time bootstrap**. Link a prior infra ticket as a worked example if one exists.
62
+ Infra/DevOps tickets: swap **Scope** for **Provision** (services as bullets) + a **One-time bootstrap** section. Link a prior infra ticket as a worked example if one exists.
70
63
 
71
64
  ## Flow
72
65
 
73
- 1. If rewriting: read the issue via the **Atlassian** MCP (markdown) for current state + summary.
66
+ 1. If rewriting: read the issue whole per `docs/agents/issue-tracker.md` (`atlassian-read`; comments and images included) - a rewrite that drops a decision buried in a comment or a screenshot is a regression.
74
67
  2. Pull any missing context the ticket references (Slack decision, sibling ticket).
75
- 3. Draft against the template. Confirm scope splits with the user before creating
76
- new tickets.
68
+ 3. Draft against the template. Confirm scope splits with the user before creating new tickets.
77
69
  4. Create or edit the issue via the **Atlassian** MCP. Report the ticket key + URL.
@@ -2,15 +2,17 @@
2
2
  name: create-ui-module
3
3
  targets: ['*']
4
4
  description: >
5
- Create a frontend feature module in apps/backoffice or apps/web following ADR-0001's
6
- modular architecture: standard folder shape, co-located locales, DI hooks, pure
7
- components, barrel entry, route wiring. Use on "create module", "new feature module",
5
+ Create a frontend feature module in apps/backoffice or apps/web following the modular
6
+ architecture in the `frontend-conventions` rule: standard folder shape, co-located
7
+ locales, DI hooks, pure components, barrel entry, route wiring. Use on "create module", "new feature module",
8
8
  "add a backoffice/web module", "/create-ui-module <app> <name>".
9
9
  ---
10
10
 
11
- # create-ui-module (consumer)
11
+ # create-ui-module ({{name}})
12
12
 
13
- Scaffold a feature module under `src/modules/<name>/` per ADR-0001 (`docs/adr/0001-modular-architecture.md`). The shape is lint-enforced (`tools/oxlint-module-structure.mjs`: folder structure, `use-` hook naming, kebab-case files, client-component naming). Copy an existing module as the reference - `apps/backoffice/src/modules/roles/` is canonical.
13
+ Applies once this repo has UI apps (`apps/web` / `apps/backoffice`); an api-only repo has no `src/modules/` to scaffold into.
14
+
15
+ Scaffold a feature module under `src/modules/<name>/` per the modular architecture in `frontend-conventions` and `docs/standards/frontend.md`. Where the repo ships a module-structure lint rule, it enforces the shape (folder structure, `use-` hook naming, kebab-case files, client-component naming). Copy an existing module in the same app as the reference.
14
16
 
15
17
  ## 1. Resolve input
16
18
 
@@ -32,7 +34,7 @@ src/modules/<name>/
32
34
  `locales/index.ts` pattern (exact):
33
35
 
34
36
  ```ts
35
- import { registerTranslations } from '@<scope>/ui';
37
+ import { registerTranslations } from '{{scope}}/ui';
36
38
  import en from './en.json';
37
39
 
38
40
  export const locales = { en };
@@ -43,16 +45,16 @@ Components use `useTranslation(ns)`; no hardcoded copy. Non-`en` files mirror `e
43
45
 
44
46
  ## 3. Wire the route
45
47
 
46
- - backoffice: `src/routes/_authed/<name>.tsx` -> `createFileRoute` with `component` imported from `@/modules/<name>` (see `src/routes/_authed/roles.tsx`).
48
+ - backoffice: `src/routes/_authed/<name>.tsx` -> `createFileRoute` with `component` imported from `@/modules/<name>`; mirror a sibling route file.
47
49
  - web: the App Router page under `app/(shell)/<name>/` imports from `@/modules/<name>`; client components get `'use client'` line 1 + `.client.tsx` suffix.
48
50
 
49
51
  ## 4. Non-negotiables
50
52
 
51
53
  - No cross-module imports - cross-module effects go through query cache invalidation, never a direct import.
52
54
  - Outside code imports ONLY the barrel via `@/modules/<name>`; inside the module use relative paths.
53
- - Hooks take their clients (oRPC/API) as parameters (see `roles/hooks/use-iam-client-deps.ts`) so they're testable without global mocks.
54
- - Follow the conventions rule's Frontend + Modular architecture sections (daisyUI, theme tokens, hoisted `styles` const, React Compiler - no manual memo).
55
+ - Hooks take their clients (oRPC/API) as parameters via a `use-<domain>-client-deps.ts` hook so they're testable without global mocks.
56
+ - Follow the `frontend-conventions` rule + `docs/standards/frontend.md` (daisyUI, theme tokens, hoisted `styles` const, React Compiler - no manual memo).
55
57
 
56
58
  ## 5. Verify
57
59
 
58
- `/check` green (the structure lint runs inside `pnpm check:lint`); route renders (`pnpm dev`). Hand to `review` before an MR.
60
+ `/check` green (any structure lint runs inside `pnpm check:lint`); route renders (`pnpm dev`). Hand to `review` before an MR.
@@ -3,14 +3,14 @@ name: enhance-prompt
3
3
  targets: ['*']
4
4
  description: >
5
5
  Normalize any raw request into a grounded, structured brief before acting. The auto pre-step
6
- for orchestration skills and subagents: extract the real intent, gather scoped context (your
7
- tracker + roadmap + team chat + local docs), surface only blocking ambiguities, and emit
6
+ for orchestration skills and subagents: extract the real intent, gather scoped context (Jira +
7
+ Confluence + Slack + roadmap + local docs), surface only blocking ambiguities, and emit
8
8
  objective / scope / constraints / deliverables / guardrails. Routes build-type asks into
9
9
  `enhance-intent`. Skips asks that are already precise. Use on any fuzzy, broad, or multi-part
10
10
  request, or at the start of a skill or agent that received a raw ask.
11
11
  ---
12
12
 
13
- # enhance-prompt
13
+ # enhance-prompt ({{name}})
14
14
 
15
15
  Turn a raw, rambling ask into a brief a stranger could execute - before any file is touched. A one-line ask is a starting point, not a spec; a wrong reading executed confidently wastes far more than the enhancement costs.
16
16
 
@@ -27,7 +27,7 @@ Match effort to the ask: a small task gets a one-line restatement, not a full br
27
27
 
28
28
  1. **Restate the intent** in one line. If your restatement might be wrong, gather context or ask - don't guess.
29
29
  2. **Classify**: build (feature / adapter / page / route) · review or audit · debug · refactor · docs · research · ops. For a **build** ask, hand off to the `enhance-intent` MCP tool (server `oss`) - it adds the platform catalog, requirements checklist, and `pnpm gen` playbook - and stop here.
30
- 3. **Gather scoped context** - targeted, never a data dump (token budget matters). Pull only what changes the plan: your issue tracker / roadmap, product specs and design decisions, recent team-chat decisions, local `docs/` + ADRs, past sessions. Scope first (which project, epic, timeframe), then fetch. Roadmap and known-issue threads are signal; general chatter is noise.
30
+ 3. **Gather scoped context** - targeted, never a data dump (token budget matters). Pull only what changes the plan: Jira + Confluence via `atlassian-read` per `docs/agents/issue-tracker.md` (roadmap + related tickets, specs / decisions - comments and images included), Slack (recent decisions, `slack-reader`), local `docs/` + ADRs, past sessions. Scope first (which project, epic, timeframe), then fetch. Roadmap and known-issue threads are signal; general chatter is noise.
31
31
  4. **Surface blocking ambiguities only** - the questions whose answers change what you build. Resolve the rest with stated defaults. Don't interrogate.
32
32
  5. **Emit the brief**, sized to the task.
33
33
 
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: handoff
3
+ description: >
4
+ Package the current task into a self-contained prompt another agent (a
5
+ teammate, or a fresh Claude session in another repo) can execute without this
6
+ conversation. Gathers context from the chat so far plus live repo/environment
7
+ state, then emits a copy-pasteable handoff. Use on "hand this off", "prompt for
8
+ another agent", "write a handoff", when routing an OSS-core change into the
9
+ platform repo, or /handoff [what to hand off | target agent/repo]. Produces a
10
+ copy-pasteable prompt and may use any tool to gather context; the one hard line
11
+ is never force-push.
12
+ allowed-tools:
13
+ - Read
14
+ - Grep
15
+ - Glob
16
+ - Write
17
+ - Edit
18
+ - Bash
19
+ disallowed-tools:
20
+ - Bash(git push --force:*)
21
+ - Bash(git push -f:*)
22
+ - Bash(git push --force-with-lease:*)
23
+ - Bash(git push --force-with-lease)
24
+ - Bash(git push -f)
25
+ ---
26
+
27
+ # handoff - write a self-contained prompt for another agent
28
+
29
+ Turn "what we're doing" into a prompt a _stranger_ agent can act on with zero access to this
30
+ chat. The receiver has none of our context, so the prompt must carry all of it.
31
+
32
+ Common use here: an OSS-core change that should run in a separate session. Any paired change can
33
+ be made here, in an OSS worktree - see "Changing OSS core" in the `oss-boundaries` rule. When it
34
+ runs elsewhere, the receiver is a teammate or a new agent session rooted in the platform
35
+ checkout, and either way it needs a standalone brief.
36
+
37
+ Optional argument = what to hand off / who to (e.g. `the OSS core publish fix`, `to a teammate in
38
+ the platform repo`, a repo path, an issue/MR#). No argument -> hand off the current in-flight task.
39
+
40
+ ## Rules
41
+
42
+ - **One hard line: never force-push** (`git push --force` / `-f` / `--force-with-lease`), in any
43
+ repo, ever - it rewrites shared history. Every other tool is fair game. The skill's main output
44
+ is still the prompt; take further action (commit, push, spawn, launch) only on explicit confirmation.
45
+ - **Self-contained.** The receiver can't see this conversation. Inline every fact they need:
46
+ exact paths, branch/remote names, IDs (MR/PR/ticket), commands, versions, error strings.
47
+ No "as discussed", no "the file we changed", no unresolved pronouns.
48
+ - **Facts over memory.** Verify the moving parts against live state (git, files, CLIs) before
49
+ writing them - don't trust half-remembered branch names or versions.
50
+ - **No secrets.** Never inline tokens, passwords, or `.env` values. Reference the env var name.
51
+ - **Scope, don't dump.** Include what's load-bearing for the task; link/name the rest.
52
+
53
+ ## Step 1 - Resolve scope
54
+
55
+ From the argument + the conversation, state in one line: the goal, the target repo/dir, and (if
56
+ known) the agent type or persona best suited. If genuinely ambiguous, ask one clarifying question;
57
+ otherwise proceed with the obvious reading and note the assumption.
58
+
59
+ ## Step 2 - Gather live context
60
+
61
+ Pull only what the task touches (skip irrelevant ones):
62
+
63
+ - Repo/env: `pwd`; `git -C <dir> remote -v`; `git -C <dir> branch --show-current`;
64
+ `git -C <dir> status --short`; recent `git log --oneline -5`. Note default/target branch.
65
+ - Work state: relevant file paths (verify they exist), functions/symbols, versions/pins,
66
+ exact error messages or failing job names, IDs (MR/PR/ticket/pipeline).
67
+ - Conventions the receiver must follow: point at the repo's rules (`CLAUDE.md`,
68
+ `.rulesync/`, `AGENTS.md`) rather than restating them; call out any that bit us.
69
+ - What's already done vs. what remains (so they don't redo or undo work).
70
+
71
+ ## Step 3 - Emit the handoff
72
+
73
+ Output one fenced markdown block (so it copy-pastes cleanly), using these headings - drop any
74
+ that don't apply, never pad:
75
+
76
+ - **Task** - one imperative sentence: the outcome wanted.
77
+ - **Environment** - repo(s), absolute path(s), remote(s), current + target branch, sibling deps.
78
+ - **Background** - the why + current state + root cause/findings already established. This is
79
+ where prior investigation goes so it isn't repeated.
80
+ - **Do this** - ordered, concrete steps. Name files/symbols/commands. Mark decisions that need
81
+ a human ("report the plan first, don't push").
82
+ - **Verify** - the exact commands/gates that must pass, and the expected green result.
83
+ - **Constraints** - boundaries (read-only zones, "never push without explicit yes", conventional
84
+ commits, branch-off-target, don't touch X). Inherit the repo's rules; restate only the sharp edges.
85
+
86
+ After the block, in <=2 lines: state the key assumption you made, and offer to (a) tweak the
87
+ prompt, (b) save it to a file, or (c) launch it now (spawn a teammate with a suitable agent type,
88
+ or hand it to the operator to paste into a session rooted in the target repo). Only save or launch
89
+ on explicit confirmation.
90
+
91
+ ## Quality bar
92
+
93
+ A good handoff passes this test: **hand it to someone who has never seen this repo or chat, and
94
+ they can start in under a minute and finish without asking you anything.** If a step assumes
95
+ context the block doesn't contain, fix the block.