@digital-agora/friday 0.0.0-stage → 0.10.0

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 (67) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +296 -2
  3. package/bundles/friday-claude-0.1.0.zip +0 -0
  4. package/bundles/friday-opencode-0.1.0.zip +0 -0
  5. package/dist/adapters/adapter.js +6 -0
  6. package/dist/adapters/claude/guards.js +40 -0
  7. package/dist/adapters/claude/index.js +161 -0
  8. package/dist/adapters/claude/runtime.js +645 -0
  9. package/dist/adapters/claude/workflows.js +323 -0
  10. package/dist/adapters/drivers.js +300 -0
  11. package/dist/adapters/index.js +16 -0
  12. package/dist/adapters/opencode/index.js +232 -0
  13. package/dist/adapters/skill.js +327 -0
  14. package/dist/build.js +77 -0
  15. package/dist/cli.js +197 -0
  16. package/dist/frontmatter.js +16 -0
  17. package/dist/graph.js +218 -0
  18. package/dist/handoff.js +329 -0
  19. package/dist/install.js +137 -0
  20. package/dist/ir.js +177 -0
  21. package/dist/load.js +42 -0
  22. package/dist/paths.js +24 -0
  23. package/dist/prompts.js +230 -0
  24. package/dist/specialize.js +237 -0
  25. package/dist/step-schemas.js +444 -0
  26. package/dist/types.js +8 -0
  27. package/dist/validate.js +576 -0
  28. package/pack/conventions/changesets.yaml +20 -0
  29. package/pack/conventions/ci-workflows.yaml +16 -0
  30. package/pack/conventions/config-secrets.yaml +16 -0
  31. package/pack/conventions/data-classification.yaml +16 -0
  32. package/pack/conventions/decisions.yaml +13 -0
  33. package/pack/conventions/git.yaml +28 -0
  34. package/pack/conventions/hexagonal.yaml +31 -0
  35. package/pack/conventions/security-code.yaml +17 -0
  36. package/pack/conventions/testing.yaml +44 -0
  37. package/pack/conventions/typescript-node.yaml +16 -0
  38. package/pack/model-policy.yaml +80 -0
  39. package/pack/orchestrations/architecture-decision.yaml +52 -0
  40. package/pack/orchestrations/bugfix-tdd.yaml +67 -0
  41. package/pack/orchestrations/data-analysis.yaml +23 -0
  42. package/pack/orchestrations/discovery.yaml +214 -0
  43. package/pack/orchestrations/feature-delivery.yaml +129 -0
  44. package/pack/orchestrations/prompt-delivery.yaml +155 -0
  45. package/pack/orchestrations/prompt-discovery.yaml +201 -0
  46. package/pack/orchestrations/release.yaml +40 -0
  47. package/pack/pack.yaml +137 -0
  48. package/pack/personas/architect.yaml +18 -0
  49. package/pack/personas/backend-engineer.yaml +21 -0
  50. package/pack/personas/data-analyst-non-pii.yaml +14 -0
  51. package/pack/personas/data-analyst-pii.yaml +28 -0
  52. package/pack/personas/devops-engineer.yaml +19 -0
  53. package/pack/personas/frontend-engineer.yaml +18 -0
  54. package/pack/personas/git-steward.yaml +24 -0
  55. package/pack/personas/lead-developer.yaml +23 -0
  56. package/pack/personas/prompt-engineer.yaml +38 -0
  57. package/pack/personas/qa-engineer.yaml +24 -0
  58. package/pack/personas/security-steward.yaml +20 -0
  59. package/package.json +47 -4
  60. package/schemas/convention.schema.yaml +46 -0
  61. package/schemas/handoff.schema.yaml +303 -0
  62. package/schemas/model-policy.schema.yaml +33 -0
  63. package/schemas/orchestration.schema.yaml +224 -0
  64. package/schemas/pack.schema.yaml +168 -0
  65. package/schemas/persona.schema.yaml +41 -0
  66. package/schemas/specialization-patch.schema.yaml +39 -0
  67. package/schemas/specialization.schema.yaml +57 -0
@@ -0,0 +1,33 @@
1
+ # Which model runs which kind of work. Every agent variant and every workflow step is checked against it.
2
+ $id: https://friday.digital-agora/schemas/model-policy.schema.yaml
3
+ title: ModelPolicy
4
+ type: object
5
+ additionalProperties: false
6
+ required: [taskKinds, enforce, targets]
7
+ properties:
8
+ enforce:
9
+ description: strict fails validation when a step overrides the policy without `override.reason`; warn only reports it.
10
+ enum: [strict, warn]
11
+ taskKinds:
12
+ type: object
13
+ minProperties: 1
14
+ additionalProperties:
15
+ type: object
16
+ additionalProperties: false
17
+ required: [model, why, contract]
18
+ properties:
19
+ model: { enum: [haiku, sonnet, opus] }
20
+ effort: { enum: [low, medium, high, xhigh, max] }
21
+ why: { type: string }
22
+ contract: { type: string, description: What an agent of this kind must and must not do. }
23
+ targets:
24
+ description: Tier -> the model id each target expects.
25
+ type: object
26
+ additionalProperties:
27
+ type: object
28
+ additionalProperties: false
29
+ required: [haiku, sonnet, opus]
30
+ properties:
31
+ haiku: { type: string }
32
+ sonnet: { type: string }
33
+ opus: { type: string }
@@ -0,0 +1,224 @@
1
+ # An orchestration is a tree of steps, compiled to a workflow script, a skill, or both (outputs).
2
+ # Upstream orchestrations ask questions and end in a handoff; downstream ones start from an
3
+ # approved handoff and never ask.
4
+ $id: https://friday.digital-agora/schemas/orchestration.schema.yaml
5
+ title: Orchestration
6
+ type: object
7
+ additionalProperties: false
8
+ required: [id, description, stream, orchestrator, steps]
9
+ properties:
10
+ id: { type: string, pattern: "^[a-z][a-z0-9-]{1,40}$" }
11
+ description: { type: string }
12
+ stream: { enum: [upstream, downstream] }
13
+ orchestrator: { type: string, description: Persona id that owns the run. }
14
+ outputs:
15
+ description: >-
16
+ What the adapters generate. workflow (the default when unset): a deterministic workflow
17
+ script where the target has one, plus a skill that drives it. skill: one structured skill
18
+ that sizes the work (sizing) and runs the steps itself, delegating each to the agent the
19
+ step names. Both: the structured skill, which hands a large run to the workflow script.
20
+ type: array
21
+ minItems: 1
22
+ uniqueItems: true
23
+ items: { enum: [workflow, skill] }
24
+ default: [workflow]
25
+ sizing:
26
+ description: >-
27
+ With a skill output only. How the skill measures the work before the first step: it counts each
28
+ signal from the request and the repository and adds the counts up. Below medium it runs one
29
+ agent at a time; from medium, a parallel group's agents run at the same time; from large,
30
+ the workflow script runs (outputs has workflow) or each parallel group runs as a small
31
+ workflow where the target has workflow scripts.
32
+ type: object
33
+ additionalProperties: false
34
+ required: [signals, medium, large]
35
+ properties:
36
+ signals:
37
+ description: What to count, one thing per entry; each instance counts one point.
38
+ type: array
39
+ minItems: 1
40
+ items: { type: string }
41
+ medium: { type: integer, minimum: 1, description: Points from which the work is medium. }
42
+ large: { type: integer, minimum: 2, description: Points from which the work is large. }
43
+ maxAgentsPerWorkflow:
44
+ description: The most agents one small workflow may start (default 6).
45
+ type: integer
46
+ minimum: 2
47
+ maximum: 10
48
+ requires:
49
+ description: >-
50
+ What a downstream workflow starts from: an approved handoff (delivery) or pending
51
+ changesets (release).
52
+ type: array
53
+ maxItems: 1
54
+ items: { enum: [handoff, changesets] }
55
+ inputs:
56
+ type: object
57
+ additionalProperties:
58
+ type: object
59
+ additionalProperties: false
60
+ required: [description]
61
+ properties:
62
+ description: { type: string }
63
+ required: { type: boolean }
64
+ maxRounds:
65
+ description: >-
66
+ Upstream only: how many question rounds the driver runs before it stops and asks the user
67
+ to freeze the scope or explicitly allow more rounds. Without it the loop is unbounded.
68
+ type: integer
69
+ minimum: 1
70
+ maximum: 10
71
+ maxItemsPerRound:
72
+ description: >-
73
+ Upstream only: the most open items shown to the user in one round (contradictions always
74
+ show). The rest are returned in heldBack and come back next round. args.maxItemsPerRound wins.
75
+ type: integer
76
+ minimum: 1
77
+ closeOutFromRound:
78
+ description: >-
79
+ Upstream only: from this round on the driver offers the close-out rule (args.closeOut):
80
+ only items that change behaviour or contradict a recorded answer go to the user; the rest
81
+ take the recommended option.
82
+ type: integer
83
+ minimum: 1
84
+ deferNonBlocking:
85
+ description: >-
86
+ Upstream only: automatically defer open questions, assumptions and gaps explicitly marked
87
+ blocking: false, so discovery continues without asking the user about non-blockers.
88
+ type: boolean
89
+ retro:
90
+ description: >-
91
+ The agent that ends every finished run (done, failed, blocked, needs-upstream,
92
+ awaiting-approval; not needs-input) by writing docs/friday/<workId>/retro.md: stops,
93
+ reversed answers, red rounds and causes, upstream returns, and proposed Friday improvements.
94
+ $ref: "#/$defs/agentRef"
95
+ steps:
96
+ type: array
97
+ minItems: 1
98
+ items: { $ref: "#/$defs/step" }
99
+
100
+ $defs:
101
+ common:
102
+ type: object
103
+ properties:
104
+ id: { type: string, pattern: "^[a-z][a-z0-9-]{1,40}$" }
105
+ title: { type: string }
106
+ model: { enum: [haiku, sonnet, opus] }
107
+ effort: { enum: [low, medium, high, xhigh, max] }
108
+ when:
109
+ description: Run only when the handoff holds pii (pii) or holds none (non-pii).
110
+ enum: [pii, non-pii]
111
+ level:
112
+ description: >-
113
+ The promptPyramid level this step builds (decision 33). It runs after the level below is
114
+ approved and before its own level's approval step.
115
+ type: string
116
+ checkpoint:
117
+ description: >-
118
+ The checkpoint (pack.yaml checkpoints) this step builds, or an approval step approves
119
+ (decision 39). A person approves it; a change to it reopens every approval after it.
120
+ type: string
121
+ override:
122
+ type: object
123
+ additionalProperties: false
124
+ required: [reason]
125
+ properties: { reason: { type: string } }
126
+ agentRef:
127
+ type: object
128
+ additionalProperties: false
129
+ required: [persona, taskKind]
130
+ properties:
131
+ persona: { type: string, description: 'Persona id, or "{{stack}}" to pick the engineer for the task''s stack.' }
132
+ taskKind: { type: string, description: 'Task kind, or "{{task.taskKind}}".' }
133
+ allowedTaskKinds: { type: array, items: { type: string } }
134
+ step:
135
+ type: object
136
+ required: [id, type]
137
+ properties:
138
+ type:
139
+ enum: [agent, clarify, gap-analysis, parallel, sequential, foreach, tdd-pair, gate, handoff, integration-loop, preflight, approval]
140
+ allOf:
141
+ - $ref: "#/$defs/common"
142
+ - if: { properties: { type: { const: agent } } }
143
+ then:
144
+ required: [persona, taskKind, prompt]
145
+ properties:
146
+ output:
147
+ description: The shape the agent returns; briefs is one task brief per task (decision 40).
148
+ enum: [result, tasks, briefs, review, git]
149
+ - if: { properties: { type: { const: clarify } } }
150
+ then: { required: [persona, taskKind, topic] }
151
+ - if: { properties: { type: { const: gap-analysis } } }
152
+ then:
153
+ required: [persona, taskKind]
154
+ properties:
155
+ rerunUntil: { const: no-open-gaps }
156
+ consolidate:
157
+ type: boolean
158
+ description: >-
159
+ Merge every open item of the round into one list, drop what is settled or not
160
+ blocking (with the reason), and report contradictions for the user to pick.
161
+ - if: { properties: { type: { enum: [parallel, sequential] } } }
162
+ then:
163
+ required: [steps]
164
+ properties:
165
+ steps: { type: array, minItems: 1, items: { $ref: "#/$defs/step" } }
166
+ - if: { properties: { type: { const: foreach } } }
167
+ then:
168
+ required: [over, steps]
169
+ properties:
170
+ over: { type: string, description: 'Path to a list: "handoff.tasks" or "<stepId>.tasks".' }
171
+ order: { enum: [dependsOn, none] }
172
+ steps: { type: array, minItems: 1, items: { $ref: "#/$defs/step" } }
173
+ - if: { properties: { type: { const: tdd-pair } } }
174
+ then:
175
+ required: [test, impl, verify, maxRounds, testScope]
176
+ properties:
177
+ testScope:
178
+ description: Pyramid levels this loop may run; must be within testPyramid.loopLevels.
179
+ type: array
180
+ minItems: 1
181
+ items: { type: string }
182
+ test: { $ref: "#/$defs/agentRef" }
183
+ impl: { $ref: "#/$defs/agentRef" }
184
+ verify: { $ref: "#/$defs/agentRef" }
185
+ maxRounds: { type: integer, minimum: 1, maximum: 10 }
186
+ - if: { properties: { type: { const: gate } } }
187
+ then:
188
+ required: [persona, taskKind, prompt, maxLoops]
189
+ properties:
190
+ maxLoops: { type: integer, minimum: 0, maximum: 5 }
191
+ onFail: { $ref: "#/$defs/agentRef" }
192
+ - if: { properties: { type: { const: integration-loop } } }
193
+ then:
194
+ required: [integrate, testScope, followup, maxRounds]
195
+ properties:
196
+ integrate: { $ref: "#/$defs/agentRef" }
197
+ testScope:
198
+ description: Pyramid levels integration runs (normally all of them).
199
+ type: array
200
+ minItems: 1
201
+ items: { type: string }
202
+ followup:
203
+ description: Steps each follow-up task goes through (normally a tdd-pair on loopLevels).
204
+ type: array
205
+ minItems: 1
206
+ items: { $ref: "#/$defs/step" }
207
+ maxRounds: { type: integer, minimum: 1, maximum: 5 }
208
+ - if: { properties: { type: { const: handoff } } }
209
+ then: { required: [persona, taskKind] }
210
+ - description: >-
211
+ Downstream, the first step of a workflow with task loops (decision 48): installs the
212
+ workspace once and resolves every handoff prerequisite and version pin, or goes back
213
+ upstream.
214
+ if: { properties: { type: { const: preflight } } }
215
+ then: { required: [persona, taskKind] }
216
+ - if: { properties: { type: { const: approval } } }
217
+ then:
218
+ description: >-
219
+ Upstream only: the run always stops here and a person in the level's approver role
220
+ approves the level or asks for a change (decision 33). No agent runs it.
221
+ oneOf: [{ required: [level] }, { required: [checkpoint] }]
222
+ not: { anyOf: [{ required: [persona] }, { required: [taskKind] }] }
223
+ # Shared optional fields of the leaf step types.
224
+ additionalProperties: true
@@ -0,0 +1,168 @@
1
+ # Friday pack manifest: the root of a pack directory (packs/<id>/pack.yaml).
2
+ $id: https://friday.digital-agora/schemas/pack.schema.yaml
3
+ title: Pack
4
+ type: object
5
+ additionalProperties: false
6
+ required: [id, name, version, description, stacks, targets]
7
+ properties:
8
+ id: { type: string, pattern: "^[a-z][a-z0-9-]{1,40}$" }
9
+ name: { type: string }
10
+ version: { type: string, pattern: "^\\d+\\.\\d+\\.\\d+$" }
11
+ description: { type: string }
12
+ sources:
13
+ description: >-
14
+ Project repositories the conventions are taken from ("document, don't invent"). Generic
15
+ rules may instead cite an external https:// URL (decision 30).
16
+ type: array
17
+ items: { type: string }
18
+ stacks:
19
+ description: Stack name -> engineer persona id. A task's `stack` picks its implementer.
20
+ type: object
21
+ additionalProperties: { type: string }
22
+ analysts:
23
+ description: Data class -> analyst persona id. "{{analyst}}" in a step resolves through it.
24
+ type: object
25
+ additionalProperties: false
26
+ required: [pii, non-pii]
27
+ properties:
28
+ pii: { type: string }
29
+ non-pii: { type: string }
30
+ targets:
31
+ type: array
32
+ items: { enum: [claude, opencode] }
33
+ minItems: 1
34
+ dataAccess:
35
+ type: object
36
+ additionalProperties: false
37
+ properties:
38
+ piiTools:
39
+ description: Tool names (e.g. MCP tools) that can return personal data. Denied to non-pii personas.
40
+ type: array
41
+ items: { type: string }
42
+ testPyramid:
43
+ description: >-
44
+ Test levels, bottom first. The per-task loop (TDD pairs) may run only loopLevels; the
45
+ integration loop runs every level and turns failures into follow-up tasks.
46
+ type: object
47
+ additionalProperties: false
48
+ required: [levels, loopLevels, forbiddenInLoop]
49
+ properties:
50
+ levels:
51
+ type: array
52
+ minItems: 2
53
+ items:
54
+ type: object
55
+ additionalProperties: false
56
+ required: [id, description, commands]
57
+ properties:
58
+ id: { type: string, pattern: "^[a-z][a-z0-9-]*$" }
59
+ description: { type: string }
60
+ commands: { type: array, minItems: 1, items: { type: string } }
61
+ source: { type: string }
62
+ loopLevels:
63
+ description: The bottom levels a task loop may run. Must be a prefix of levels.
64
+ type: array
65
+ minItems: 1
66
+ items: { type: string }
67
+ forbiddenInLoop:
68
+ description: Substrings of commands a task loop must never run (emulator suites, e2e).
69
+ type: array
70
+ minItems: 1
71
+ items: { type: string }
72
+ promptPyramid:
73
+ description: >-
74
+ How the prompt of a product's LLM feature is built, bottom first (decision 32). Each level is
75
+ built by its specialists from the approved levels below it and ends when a person in the
76
+ approver role approves it; nothing above starts before. A failing eval goes back to the
77
+ lowest level that explains it. Generic: its sources are external pages (decision 30).
78
+ type: object
79
+ additionalProperties: false
80
+ required: [levels]
81
+ properties:
82
+ levels:
83
+ type: array
84
+ minItems: 2
85
+ items:
86
+ type: object
87
+ additionalProperties: false
88
+ required: [id, description, specialists, approver, source]
89
+ properties:
90
+ id: { type: string, pattern: "^[a-z][a-z0-9-]*$" }
91
+ description: { type: string }
92
+ specialists:
93
+ description: The agents that build the level, each a persona and one of its task kinds.
94
+ type: array
95
+ minItems: 1
96
+ items:
97
+ type: object
98
+ additionalProperties: false
99
+ required: [persona, taskKind]
100
+ properties:
101
+ persona: { type: string }
102
+ taskKind: { type: string }
103
+ approver:
104
+ description: The role of the person who approves the level (e.g. product-owner); never an agent.
105
+ type: string
106
+ pattern: "^[a-z][a-z0-9-]*$"
107
+ source: { type: string, pattern: "^https://", description: The external page the level is documented from. }
108
+ checkpoints:
109
+ description: >-
110
+ Human stops outside the prompt pyramid (decision 39): an approval step names a level or one
111
+ of these. The run always stops there for a person in the approver role.
112
+ type: array
113
+ items:
114
+ type: object
115
+ additionalProperties: false
116
+ required: [id, description, approver, source]
117
+ properties:
118
+ id: { type: string, pattern: "^[a-z][a-z0-9-]*$" }
119
+ description: { type: string }
120
+ approver:
121
+ description: The role of the person who approves it (e.g. requester); never an agent.
122
+ type: string
123
+ pattern: "^[a-z][a-z0-9-]*$"
124
+ source: { type: string }
125
+ guardrails:
126
+ description: >-
127
+ Pack rules the generated agents cannot break. A skill or a prompt makes a rule likely to be
128
+ followed; a guardrail is enforced before the tool runs (Claude Code agent hooks, OpenCode
129
+ permissions where the target has them).
130
+ type: object
131
+ additionalProperties: false
132
+ properties:
133
+ loopCommands:
134
+ description: >-
135
+ Agents of these task kinds work inside task loops: a shell command containing one of
136
+ testPyramid.forbiddenInLoop is blocked before it runs.
137
+ type: object
138
+ additionalProperties: false
139
+ required: [taskKinds]
140
+ properties:
141
+ taskKinds: { type: array, minItems: 1, items: { type: string } }
142
+ protectedTests:
143
+ description: >-
144
+ Agents of these task kinds make tests pass: they may not edit a file whose path matches
145
+ one of the patterns (JavaScript regular expressions on the /-separated path). Fix the
146
+ code, not the test; a test that is wrong is a blocker.
147
+ type: object
148
+ additionalProperties: false
149
+ required: [taskKinds, patterns]
150
+ properties:
151
+ taskKinds: { type: array, minItems: 1, items: { type: string } }
152
+ patterns: { type: array, minItems: 1, items: { type: string } }
153
+ approvedPrompts:
154
+ description: >-
155
+ Files that hold an approved prompt pyramid level (decision 35): the record in
156
+ docs/friday/<workId>/prompt/ and the copies the product loads. Agents of these task kinds
157
+ may create such a file once, when it does not exist yet, and never change it after; a
158
+ stale or wrong one is a blocker for a person. Patterns are JavaScript regular
159
+ expressions on the /-separated path.
160
+ type: object
161
+ additionalProperties: false
162
+ required: [taskKinds, patterns]
163
+ properties:
164
+ taskKinds: { type: array, minItems: 1, items: { type: string } }
165
+ patterns: { type: array, minItems: 1, items: { type: string } }
166
+ contract:
167
+ description: Text added to every generated agent prompt (the "assumptions kill" rule lives here).
168
+ type: string
@@ -0,0 +1,41 @@
1
+ # A persona becomes one agent per task kind (<persona>--<taskKind>), each with the model the policy gives that kind.
2
+ $id: https://friday.digital-agora/schemas/persona.schema.yaml
3
+ title: Persona
4
+ type: object
5
+ additionalProperties: false
6
+ required: [id, name, role, description, taskKinds, dataAccess, prompt]
7
+ properties:
8
+ id: { type: string, pattern: "^[a-z][a-z0-9-]{1,40}$" }
9
+ name: { type: string }
10
+ role: { type: string }
11
+ description: { type: string, description: When to delegate to this persona. Used as the agent description. }
12
+ taskKinds:
13
+ type: array
14
+ minItems: 1
15
+ uniqueItems: true
16
+ items: { type: string }
17
+ taskKindNotes:
18
+ description: Extra instructions for one variant only.
19
+ type: object
20
+ additionalProperties: { type: string }
21
+ tools:
22
+ description: Claude Code tool names. Omit to inherit all tools.
23
+ type: array
24
+ items: { type: string }
25
+ disallowedTools:
26
+ type: array
27
+ items: { type: string }
28
+ permissionMode: { enum: [default, acceptEdits, plan, bypassPermissions, dontAsk] }
29
+ maxTurns: { type: integer, minimum: 1 }
30
+ conventions:
31
+ description: Convention ids. Those that emit a skill are listed in the agent's `skills:` frontmatter.
32
+ type: array
33
+ items: { type: string }
34
+ mcpServers:
35
+ type: array
36
+ items: { type: string }
37
+ pairsWith: { type: string, description: Persona id this one works with (e.g. engineer <-> qa). }
38
+ dataAccess:
39
+ description: none, non-pii (must refuse personal data) or pii (personal-data-safe use cases only).
40
+ enum: [none, non-pii, pii]
41
+ prompt: { type: string, minLength: 20 }
@@ -0,0 +1,39 @@
1
+ # Patches a specialization applies to the pack's own conventions and personas (decision 41). The
2
+ # merged convention or persona is then checked against its full schema.
3
+ $id: https://friday.digital-agora/schemas/specialization-patch.schema.yaml
4
+ title: Specialization patch
5
+ $defs:
6
+ convention:
7
+ description: >-
8
+ A patch of a base convention (same id). Each rule replaces the base rule with its id or is
9
+ appended; remove drops base rules; the other fields given replace the base's.
10
+ type: object
11
+ additionalProperties: false
12
+ required: [id]
13
+ properties:
14
+ id: { type: string }
15
+ stack: { type: string }
16
+ description: { type: string }
17
+ appliesTo: { type: object }
18
+ regions: { type: object }
19
+ layout: { type: string }
20
+ emit: { type: array, items: { enum: [rule, skill] } }
21
+ rules: { type: array, items: { type: object } }
22
+ remove:
23
+ description: Ids of base rules to drop.
24
+ type: array
25
+ items: { type: string }
26
+ persona:
27
+ description: >-
28
+ A patch of a base persona (same id). conventions are added, prompt is appended under the
29
+ specialization's name, taskKindNotes merge per task kind, role and description replace.
30
+ type: object
31
+ additionalProperties: false
32
+ required: [id]
33
+ properties:
34
+ id: { type: string }
35
+ role: { type: string }
36
+ description: { type: string }
37
+ conventions: { type: array, items: { type: string } }
38
+ prompt: { type: string, minLength: 20 }
39
+ taskKindNotes: { type: object, additionalProperties: { type: string } }
@@ -0,0 +1,57 @@
1
+ # A specialization adds to Friday's pack and overrides it (decision 41). It lives in a folder of its
2
+ # own: specialization.yaml (this schema), conventions/*.yaml and personas/*.yaml. A convention with
3
+ # a new id is a full convention; one with a base id is a patch, merged rule by rule, and the
4
+ # specialization wins. A persona file patches a base persona; a specialization adds no personas,
5
+ # orchestrations or model policy, so the model policy and the test pyramid rules stay enforced.
6
+ $id: https://friday.digital-agora/schemas/specialization.schema.yaml
7
+ title: Specialization
8
+ type: object
9
+ additionalProperties: false
10
+ required: [id, name]
11
+ properties:
12
+ id: { type: string, pattern: "^[a-z][a-z0-9-]{1,40}$" }
13
+ name: { type: string }
14
+ version: { type: string, pattern: "^\\d+\\.\\d+\\.\\d+$" }
15
+ extends:
16
+ description: >-
17
+ Specializations this one builds on (decision 53): folders relative to this one, or package
18
+ names resolved from it. Each is applied before this one, once, so this one wins over them.
19
+ type: array
20
+ items: { type: string }
21
+ description:
22
+ type: string
23
+ description: Replaces the pack's description in the bundles built with this specialization.
24
+ sources:
25
+ description: >-
26
+ Project repositories this specialization's rules cite (<repo>/<path>). Added to the pack's
27
+ sources; Friday's own pack lists none.
28
+ type: array
29
+ items: { type: string }
30
+ testPyramid:
31
+ type: object
32
+ additionalProperties: false
33
+ properties:
34
+ levels:
35
+ description: Per level id (it must exist in the pack), the fields given replace the pack's.
36
+ type: array
37
+ items:
38
+ type: object
39
+ additionalProperties: false
40
+ required: [id]
41
+ properties:
42
+ id: { type: string }
43
+ description: { type: string }
44
+ commands: { type: array, minItems: 1, items: { type: string } }
45
+ source: { type: string }
46
+ forbiddenInLoop:
47
+ description: Added to the pack's forbiddenInLoop.
48
+ type: array
49
+ items: { type: string }
50
+ dataAccess:
51
+ type: object
52
+ additionalProperties: false
53
+ properties:
54
+ piiTools:
55
+ description: Added to the pack's piiTools.
56
+ type: array
57
+ items: { type: string }