@helmiq/crew 0.1.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 (209) hide show
  1. package/defaults/personas/architect.persona.yaml +72 -0
  2. package/defaults/personas/engineer.persona.yaml +137 -0
  3. package/defaults/personas/persona-spec.schema.yaml +149 -0
  4. package/defaults/personas/reviewer.persona.yaml +47 -0
  5. package/defaults/rubrics/adr.rubric.yaml +48 -0
  6. package/defaults/rubrics/code-review.rubric.yaml +39 -0
  7. package/defaults/rubrics/pull-request.rubric.yaml +40 -0
  8. package/dist/actions/actions.test.d.ts +2 -0
  9. package/dist/actions/actions.test.d.ts.map +1 -0
  10. package/dist/actions/actions.test.js +158 -0
  11. package/dist/actions/direct-dispatcher.d.ts +10 -0
  12. package/dist/actions/direct-dispatcher.d.ts.map +1 -0
  13. package/dist/actions/direct-dispatcher.js +27 -0
  14. package/dist/actions/dispatcher.d.ts +11 -0
  15. package/dist/actions/dispatcher.d.ts.map +1 -0
  16. package/dist/actions/dispatcher.js +1 -0
  17. package/dist/actions/index.d.ts +7 -0
  18. package/dist/actions/index.d.ts.map +1 -0
  19. package/dist/actions/index.js +3 -0
  20. package/dist/actions/registry.d.ts +13 -0
  21. package/dist/actions/registry.d.ts.map +1 -0
  22. package/dist/actions/registry.js +40 -0
  23. package/dist/actions/resolver.d.ts +47 -0
  24. package/dist/actions/resolver.d.ts.map +1 -0
  25. package/dist/actions/resolver.js +43 -0
  26. package/dist/cli/cli.test.d.ts +2 -0
  27. package/dist/cli/cli.test.d.ts.map +1 -0
  28. package/dist/cli/cli.test.js +392 -0
  29. package/dist/cli/run.d.ts +45 -0
  30. package/dist/cli/run.d.ts.map +1 -0
  31. package/dist/cli/run.js +236 -0
  32. package/dist/common/errors.d.ts +76 -0
  33. package/dist/common/errors.d.ts.map +1 -0
  34. package/dist/common/errors.js +74 -0
  35. package/dist/config/config.test.d.ts +2 -0
  36. package/dist/config/config.test.d.ts.map +1 -0
  37. package/dist/config/config.test.js +691 -0
  38. package/dist/config/index.d.ts +7 -0
  39. package/dist/config/index.d.ts.map +1 -0
  40. package/dist/config/index.js +4 -0
  41. package/dist/config/loader.d.ts +16 -0
  42. package/dist/config/loader.d.ts.map +1 -0
  43. package/dist/config/loader.js +56 -0
  44. package/dist/config/model-resolver.d.ts +24 -0
  45. package/dist/config/model-resolver.d.ts.map +1 -0
  46. package/dist/config/model-resolver.js +39 -0
  47. package/dist/config/resolver.d.ts +22 -0
  48. package/dist/config/resolver.d.ts.map +1 -0
  49. package/dist/config/resolver.js +115 -0
  50. package/dist/config/schemas.d.ts +266 -0
  51. package/dist/config/schemas.d.ts.map +1 -0
  52. package/dist/config/schemas.js +115 -0
  53. package/dist/context/artifact-reader.d.ts +12 -0
  54. package/dist/context/artifact-reader.d.ts.map +1 -0
  55. package/dist/context/artifact-reader.js +92 -0
  56. package/dist/context/assembler.d.ts +22 -0
  57. package/dist/context/assembler.d.ts.map +1 -0
  58. package/dist/context/assembler.js +126 -0
  59. package/dist/context/code-reader.d.ts +14 -0
  60. package/dist/context/code-reader.d.ts.map +1 -0
  61. package/dist/context/code-reader.js +56 -0
  62. package/dist/context/context.test.d.ts +2 -0
  63. package/dist/context/context.test.d.ts.map +1 -0
  64. package/dist/context/context.test.js +260 -0
  65. package/dist/context/index.d.ts +9 -0
  66. package/dist/context/index.d.ts.map +1 -0
  67. package/dist/context/index.js +5 -0
  68. package/dist/context/section-extractor.d.ts +9 -0
  69. package/dist/context/section-extractor.d.ts.map +1 -0
  70. package/dist/context/section-extractor.js +32 -0
  71. package/dist/context/token-budget.d.ts +11 -0
  72. package/dist/context/token-budget.d.ts.map +1 -0
  73. package/dist/context/token-budget.js +22 -0
  74. package/dist/control/control.test.d.ts +2 -0
  75. package/dist/control/control.test.d.ts.map +1 -0
  76. package/dist/control/control.test.js +137 -0
  77. package/dist/control/id-generator.d.ts +12 -0
  78. package/dist/control/id-generator.d.ts.map +1 -0
  79. package/dist/control/id-generator.js +20 -0
  80. package/dist/control/index.d.ts +5 -0
  81. package/dist/control/index.d.ts.map +1 -0
  82. package/dist/control/index.js +3 -0
  83. package/dist/control/lock-manager.d.ts +13 -0
  84. package/dist/control/lock-manager.d.ts.map +1 -0
  85. package/dist/control/lock-manager.js +72 -0
  86. package/dist/control/run-state.d.ts +16 -0
  87. package/dist/control/run-state.d.ts.map +1 -0
  88. package/dist/control/run-state.js +55 -0
  89. package/dist/engine/composite.d.ts +34 -0
  90. package/dist/engine/composite.d.ts.map +1 -0
  91. package/dist/engine/composite.js +192 -0
  92. package/dist/engine/composite.test.d.ts +2 -0
  93. package/dist/engine/composite.test.d.ts.map +1 -0
  94. package/dist/engine/composite.test.js +1947 -0
  95. package/dist/engine/engine.test.d.ts +2 -0
  96. package/dist/engine/engine.test.d.ts.map +1 -0
  97. package/dist/engine/engine.test.js +334 -0
  98. package/dist/engine/index.d.ts +10 -0
  99. package/dist/engine/index.d.ts.map +1 -0
  100. package/dist/engine/index.js +5 -0
  101. package/dist/engine/llm-client.d.ts +27 -0
  102. package/dist/engine/llm-client.d.ts.map +1 -0
  103. package/dist/engine/llm-client.js +46 -0
  104. package/dist/engine/simple.d.ts +21 -0
  105. package/dist/engine/simple.d.ts.map +1 -0
  106. package/dist/engine/simple.js +59 -0
  107. package/dist/engine/tool-dispatch.d.ts +37 -0
  108. package/dist/engine/tool-dispatch.d.ts.map +1 -0
  109. package/dist/engine/tool-dispatch.js +146 -0
  110. package/dist/engine/tool-dispatch.test.d.ts +2 -0
  111. package/dist/engine/tool-dispatch.test.d.ts.map +1 -0
  112. package/dist/engine/tool-dispatch.test.js +348 -0
  113. package/dist/engine/tool-filter.d.ts +13 -0
  114. package/dist/engine/tool-filter.d.ts.map +1 -0
  115. package/dist/engine/tool-filter.js +25 -0
  116. package/dist/evaluation/evaluation.test.d.ts +2 -0
  117. package/dist/evaluation/evaluation.test.d.ts.map +1 -0
  118. package/dist/evaluation/evaluation.test.js +490 -0
  119. package/dist/evaluation/evaluator.d.ts +19 -0
  120. package/dist/evaluation/evaluator.d.ts.map +1 -0
  121. package/dist/evaluation/evaluator.js +78 -0
  122. package/dist/evaluation/index.d.ts +4 -0
  123. package/dist/evaluation/index.d.ts.map +1 -0
  124. package/dist/evaluation/index.js +2 -0
  125. package/dist/evaluation/scorer.d.ts +38 -0
  126. package/dist/evaluation/scorer.d.ts.map +1 -0
  127. package/dist/evaluation/scorer.js +94 -0
  128. package/dist/index.d.ts +47 -0
  129. package/dist/index.d.ts.map +1 -0
  130. package/dist/index.js +28 -0
  131. package/dist/providers/index.d.ts +2 -0
  132. package/dist/providers/index.d.ts.map +1 -0
  133. package/dist/providers/index.js +1 -0
  134. package/dist/providers/provider-factory.d.ts +11 -0
  135. package/dist/providers/provider-factory.d.ts.map +1 -0
  136. package/dist/providers/provider-factory.js +30 -0
  137. package/dist/publication/frontmatter.d.ts +21 -0
  138. package/dist/publication/frontmatter.d.ts.map +1 -0
  139. package/dist/publication/frontmatter.js +15 -0
  140. package/dist/publication/git-ops.d.ts +18 -0
  141. package/dist/publication/git-ops.d.ts.map +1 -0
  142. package/dist/publication/git-ops.js +74 -0
  143. package/dist/publication/index.d.ts +9 -0
  144. package/dist/publication/index.d.ts.map +1 -0
  145. package/dist/publication/index.js +5 -0
  146. package/dist/publication/provenance-writer.d.ts +27 -0
  147. package/dist/publication/provenance-writer.d.ts.map +1 -0
  148. package/dist/publication/provenance-writer.js +21 -0
  149. package/dist/publication/publication.test.d.ts +2 -0
  150. package/dist/publication/publication.test.d.ts.map +1 -0
  151. package/dist/publication/publication.test.js +235 -0
  152. package/dist/publication/publisher.d.ts +32 -0
  153. package/dist/publication/publisher.d.ts.map +1 -0
  154. package/dist/publication/publisher.js +113 -0
  155. package/dist/publication/secret-scanner.d.ts +6 -0
  156. package/dist/publication/secret-scanner.d.ts.map +1 -0
  157. package/dist/publication/secret-scanner.js +19 -0
  158. package/dist/tools/index.d.ts +4 -0
  159. package/dist/tools/index.d.ts.map +1 -0
  160. package/dist/tools/index.js +2 -0
  161. package/dist/tools/registry.d.ts +15 -0
  162. package/dist/tools/registry.d.ts.map +1 -0
  163. package/dist/tools/registry.js +288 -0
  164. package/dist/tools/registry.test.d.ts +2 -0
  165. package/dist/tools/registry.test.d.ts.map +1 -0
  166. package/dist/tools/registry.test.js +131 -0
  167. package/dist/tools/tool-groups.d.ts +20 -0
  168. package/dist/tools/tool-groups.d.ts.map +1 -0
  169. package/dist/tools/tool-groups.js +48 -0
  170. package/dist/tools/tool-groups.test.d.ts +2 -0
  171. package/dist/tools/tool-groups.test.d.ts.map +1 -0
  172. package/dist/tools/tool-groups.test.js +127 -0
  173. package/dist/types/artifact-store.d.ts +33 -0
  174. package/dist/types/artifact-store.d.ts.map +1 -0
  175. package/dist/types/artifact-store.js +9 -0
  176. package/dist/types/evaluation-rubric.d.ts +18 -0
  177. package/dist/types/evaluation-rubric.d.ts.map +1 -0
  178. package/dist/types/evaluation-rubric.js +1 -0
  179. package/dist/types/index.d.ts +10 -0
  180. package/dist/types/index.d.ts.map +1 -0
  181. package/dist/types/index.js +1 -0
  182. package/dist/types/llm-provider.d.ts +47 -0
  183. package/dist/types/llm-provider.d.ts.map +1 -0
  184. package/dist/types/llm-provider.js +8 -0
  185. package/dist/types/persona-spec.d.ts +79 -0
  186. package/dist/types/persona-spec.d.ts.map +1 -0
  187. package/dist/types/persona-spec.js +1 -0
  188. package/dist/types/project-config.d.ts +28 -0
  189. package/dist/types/project-config.d.ts.map +1 -0
  190. package/dist/types/project-config.js +1 -0
  191. package/dist/types/provenance.d.ts +67 -0
  192. package/dist/types/provenance.d.ts.map +1 -0
  193. package/dist/types/provenance.js +1 -0
  194. package/dist/types/run-state.d.ts +11 -0
  195. package/dist/types/run-state.d.ts.map +1 -0
  196. package/dist/types/run-state.js +1 -0
  197. package/dist/types/tool-runtime.d.ts +43 -0
  198. package/dist/types/tool-runtime.d.ts.map +1 -0
  199. package/dist/types/tool-runtime.js +30 -0
  200. package/dist/workspace/detect.d.ts +11 -0
  201. package/dist/workspace/detect.d.ts.map +1 -0
  202. package/dist/workspace/detect.js +28 -0
  203. package/dist/workspace/detect.test.d.ts +2 -0
  204. package/dist/workspace/detect.test.d.ts.map +1 -0
  205. package/dist/workspace/detect.test.js +53 -0
  206. package/dist/workspace/index.d.ts +2 -0
  207. package/dist/workspace/index.d.ts.map +1 -0
  208. package/dist/workspace/index.js +1 -0
  209. package/package.json +51 -0
@@ -0,0 +1,72 @@
1
+ persona:
2
+ name: architect
3
+ identity:
4
+ role: 'Senior Solution Architect'
5
+ skills:
6
+ - adr-plan
7
+ - adr-write
8
+ - adr-review
9
+ perception:
10
+ always_read:
11
+ - artifact: standards
12
+ scope: { type: coding-standards }
13
+ - artifact: architecture
14
+ scope: { type: solution }
15
+ per_task:
16
+ adr-workflow:
17
+ - artifact: requirements
18
+ scope: { epic: '{{ .EPIC_ID }}' }
19
+ - artifact: adr-register
20
+ scope: {}
21
+ tasks:
22
+ adr-workflow:
23
+ mode: composite
24
+ trigger: [manual]
25
+ sub_agents:
26
+ - name: planner
27
+ skill: adr-plan
28
+ reads: [requirements, architecture, adr-register, codebase-structure]
29
+ produces: decision-plan
30
+ tools: [read-artifact, read-code]
31
+
32
+ - name: writer
33
+ skill: adr-write
34
+ reads: [decision-plan, requirements, architecture, adr-register]
35
+ produces: adr-drafts
36
+ tools: [read-artifact, write-artifact, read-code]
37
+
38
+ - name: reviewer
39
+ skill: adr-review
40
+ reads: [adr-drafts, architecture, adr-register]
41
+ produces: adr-review
42
+ tools: [read-artifact]
43
+ gate: 'all ADRs pass quality checks'
44
+ on_fail: writer
45
+ max_loops: 2
46
+
47
+ published_artifact: adr-summary
48
+ quality_gate: self-eval
49
+
50
+ tools:
51
+ permitted:
52
+ - read-artifact
53
+ - write-artifact
54
+ - read-code
55
+ denied:
56
+ - write-code
57
+ - git-write
58
+ - git-operations
59
+ - shell
60
+ - send-notifications
61
+ - write-strategy-artifacts
62
+ writable_paths:
63
+ - architecture/decisions/
64
+
65
+ cadence:
66
+ scheduled: []
67
+ event: []
68
+
69
+ evaluation:
70
+ self_eval_model: claude-sonnet
71
+ rubric: rubrics/adr.rubric.yaml
72
+ multi_model: false
@@ -0,0 +1,137 @@
1
+ # Engineer Persona Specification
2
+
3
+ persona:
4
+ name: engineer
5
+
6
+ identity:
7
+ role: 'Senior Software Engineer'
8
+
9
+ skills:
10
+ - feature-implement
11
+ - code-implement
12
+ - implementation-plan
13
+ - code-review
14
+ - quality-check
15
+ - test-write
16
+ - self-review
17
+ - pr-author
18
+
19
+ perception:
20
+ always_read:
21
+ - artifact: standards
22
+ scope: { type: coding-standards }
23
+ - artifact: backlog
24
+ scope: { status: ready }
25
+
26
+ per_task:
27
+ implement-story:
28
+ - artifact: requirements
29
+ scope: { epic: '{{ .EPIC_ID }}' }
30
+ - artifact: design
31
+ scope: { epic: '{{ .EPIC_ID }}' }
32
+ - artifact: codebase
33
+ scope: { paths: '{{ .RELEVANT_PATHS }}' }
34
+
35
+ address-feedback:
36
+ - artifact: review
37
+ scope: { story: '{{ .STORY_ID }}' }
38
+ - artifact: codebase
39
+ scope: { paths: '{{ .RELEVANT_PATHS }}' }
40
+
41
+ tasks:
42
+ implement-story:
43
+ mode: composite
44
+ trigger: [manual, scheduled]
45
+ sub_agents:
46
+ - name: planner
47
+ skill: implementation-plan
48
+ reads: [requirements, design, codebase-structure]
49
+ produces: implementation-plan
50
+ tools: [read-artifact]
51
+
52
+ - name: implementer
53
+ skill: code-implement
54
+ reads: [implementation-plan, codebase]
55
+ produces: code-changes
56
+ tools: [code, git, shell]
57
+
58
+ - name: test-writer
59
+ skill: test-write
60
+ reads: [code-changes, requirements]
61
+ produces: test-files
62
+ tools: [code, git, shell]
63
+
64
+ - name: quality-checker
65
+ skill: quality-check
66
+ reads: [code-changes, test-files]
67
+ produces: quality-report
68
+ tools: [shell, code, git]
69
+ max_iterations: 3
70
+
71
+ - name: self-reviewer
72
+ skill: self-review
73
+ reads: [code-changes, design, standards]
74
+ produces: self-review
75
+ gate: 'no blocking issues'
76
+ on_fail: implementer
77
+ max_loops: 2
78
+
79
+ - name: pr-author
80
+ skill: pr-author
81
+ reads: [code-changes, requirements, self-review]
82
+ produces: pull-request
83
+ tools: [git]
84
+
85
+ published_artifact: pull-request
86
+ quality_gate: human-review
87
+
88
+ address-feedback:
89
+ mode: composite
90
+ trigger: [manual, event]
91
+ sub_agents:
92
+ - name: feedback-reader
93
+ skill: code-review
94
+ reads: [review, code-changes]
95
+ produces: feedback-plan
96
+
97
+ - name: implementer
98
+ skill: code-implement
99
+ reads: [feedback-plan, codebase]
100
+ produces: code-changes
101
+ tools: [code, git, shell]
102
+
103
+ - name: quality-checker
104
+ skill: quality-check
105
+ reads: [code-changes]
106
+ produces: quality-report
107
+ tools: [shell, code, git]
108
+ max_iterations: 3
109
+
110
+ published_artifact: code-changes
111
+ quality_gate: self-eval
112
+
113
+ tools:
114
+ permitted:
115
+ - read-artifact
116
+ - write-artifact
117
+ - code
118
+ - git-operations
119
+ - shell
120
+ - read-delivery-signals
121
+ denied:
122
+ - write-strategy-artifacts
123
+ - write-standards
124
+ - send-notifications
125
+
126
+ cadence:
127
+ scheduled:
128
+ - cron: '0 9 * * 1-5'
129
+ task: implement-story
130
+ event:
131
+ - on: review-feedback-received
132
+ task: address-feedback
133
+
134
+ evaluation:
135
+ self_eval_model: claude-sonnet
136
+ rubric: rubrics/pull-request.rubric.yaml
137
+ multi_model: false
@@ -0,0 +1,149 @@
1
+ # Persona Specification Schema
2
+ #
3
+ # Defines the structure for all persona YAML files. A persona is a fully
4
+ # specified delivery role with identity, skills, perception, tasks, tools,
5
+ # cadence, and evaluation. Skills from `@helmiq/crew-skills` supply prompt content
6
+ # resolved at load time.
7
+
8
+ schema:
9
+ name: persona-spec
10
+ version: '0.1'
11
+
12
+ # Top-level structure
13
+ # persona:
14
+ # name: string (required) Unique persona identifier
15
+ # identity: Identity (required)
16
+ # skills: array[string] (required)
17
+ # perception: Perception (required)
18
+ # tasks: map[string, Task] (required)
19
+ # tools: ToolPermissions (required)
20
+ # cadence: Cadence (required)
21
+ # evaluation: EvaluationConfig (required)
22
+
23
+ fields:
24
+ # Identity -- who the persona is
25
+ persona.name:
26
+ type: string
27
+ required: true
28
+ description: >
29
+ Unique persona identifier (e.g., "engineer", "reviewer", "pm").
30
+ Used as the key for config resolution and run metadata.
31
+
32
+ persona.identity.role:
33
+ type: string
34
+ required: true
35
+ description: Human-readable role title (e.g., "Senior Software Engineer").
36
+
37
+ # Skills -- prompt content from @helmiq/crew-skills
38
+ persona.skills:
39
+ type: array[string]
40
+ required: true
41
+ description: >
42
+ Skill names from the `@helmiq/crew-skills` package that this persona uses.
43
+ The runtime resolves each skill name to its `.prompt.md` content at load time.
44
+
45
+ # Perception -- what artifacts the persona reads
46
+ persona.perception.always_read:
47
+ type: array[ContextRef]
48
+ required: false
49
+ description: Artifacts read on every task regardless of task type.
50
+
51
+ persona.perception.per_task:
52
+ type: map[string, array[ContextRef]]
53
+ required: true
54
+ description: >
55
+ Per-task context scope declarations. Keys are task names defined
56
+ in persona.tasks; values are arrays of ContextRef.
57
+
58
+ # ContextRef structure:
59
+ # artifact: string (required) Artifact type identifier
60
+ # scope: map[string, string] Scope filters; values may use {{ .VAR }} per ADR-0002
61
+ # sections: array[string] Named sections to extract
62
+ # when: string Conditional expression evaluated at runtime
63
+
64
+ # Tasks -- what the persona can do
65
+ # Each task is either simple (single LLM call) or composite (sub-agent chain).
66
+
67
+ # Simple task fields:
68
+ # mode: "simple" (required)
69
+ # trigger: array[TriggerType] (required) manual | scheduled | event
70
+ # skill: string (required) Skill name (resolved to .prompt.md in @helmiq/crew-skills)
71
+ # reads: array[string] Named artifacts this task reads
72
+ # produces: string (required) Named artifact this task outputs
73
+ # tools: array[string] Tool subset (restricts persona-level)
74
+ # published_artifact: string Which output is published
75
+ # quality_gate: QualityGateType self-eval | human-review | multi-model
76
+
77
+ # Composite task fields (per ADR-0001):
78
+ # mode: "composite" (required)
79
+ # trigger: array[TriggerType] (required)
80
+ # sub_agents: array[SubAgent] (required) Ordered pipeline
81
+ # published_artifact: string (required) Which sub-agent output is published
82
+ # quality_gate: QualityGateType
83
+
84
+ # SubAgent fields (per ADR-0001):
85
+ # name: string (required) Unique within the task
86
+ # skill: string (required) Skill name (resolved to .prompt.md in @helmiq/crew-skills)
87
+ # reads: array[string] (required) Named artifacts or work products
88
+ # produces: string (required) Named work product
89
+ # tools: array[string] Tool subset; inherits persona.tools.permitted if omitted
90
+ # max_iterations: integer Retry count on failure
91
+ # gate: string Gate condition after completion
92
+ # on_fail: string Jump-back target (must reference earlier sub-agent name)
93
+ # max_loops: integer Cap on jump-back cycles
94
+
95
+ # Tools -- security boundary
96
+ persona.tools.permitted:
97
+ type: array[string]
98
+ required: true
99
+ description: Tools this persona may use. Only these are provided to the LLM.
100
+
101
+ persona.tools.denied:
102
+ type: array[string]
103
+ required: true
104
+ description: Tools explicitly denied. Never provided to the LLM regardless of prompt.
105
+
106
+ # Cadence -- when the persona runs
107
+ persona.cadence.scheduled:
108
+ type: array[ScheduleEntry]
109
+ required: false
110
+ description: Cron-triggered tasks.
111
+ # ScheduleEntry: { cron: string, task: string }
112
+
113
+ persona.cadence.event:
114
+ type: array[EventEntry]
115
+ required: false
116
+ description: Event-triggered tasks.
117
+ # EventEntry: { on: string, task: string }
118
+
119
+ # Evaluation -- quality assurance
120
+ persona.evaluation.self_eval_model:
121
+ type: string
122
+ required: false
123
+ description: >
124
+ Model alias for self-evaluation. Overrides the project default model
125
+ in Phase 1; overrides the activity default per ADR-0003 hierarchy
126
+ in later phases.
127
+
128
+ persona.evaluation.rubric:
129
+ type: string
130
+ required: true
131
+ description: File path to the evaluation rubric.
132
+
133
+ persona.evaluation.multi_model:
134
+ type: boolean
135
+ required: false
136
+ default: false
137
+ description: Enable multi-model evaluation (Phase 5).
138
+
139
+ # Validation constraints (enforced by Zod in Epic 1)
140
+ constraints:
141
+ - on_fail must reference a name earlier in the sub_agents array (no forward jumps, no self-reference)
142
+ - tools in a sub-agent must be a subset of persona.tools.permitted
143
+ - evaluation.self_eval_model must be a model alias in the project LLM provider registry
144
+ - template variables ({{ .VAR }}) are only permitted in scope values, sections, and sub-agent reads
145
+ - all skill names in persona.skills, task skill, and sub-agent skill must resolve to a .prompt.md file in the skills package
146
+
147
+ enums:
148
+ TriggerType: [manual, scheduled, event]
149
+ QualityGateType: [self-eval, human-review, multi-model]
@@ -0,0 +1,47 @@
1
+ persona:
2
+ name: reviewer
3
+ identity:
4
+ role: 'Senior Code Reviewer'
5
+ skills:
6
+ - code-review
7
+ perception:
8
+ always_read:
9
+ - artifact: standards
10
+ scope: { type: coding-standards }
11
+ per_task:
12
+ review-pr:
13
+ - artifact: pr-diff
14
+ scope: { story: '{{ .STORY_ID }}' }
15
+ - artifact: design
16
+ scope: { epic: '{{ .EPIC_ID }}' }
17
+ - artifact: requirements
18
+ scope: { epic: '{{ .EPIC_ID }}' }
19
+ - artifact: review
20
+ scope: { story: '{{ .STORY_ID }}' }
21
+ when: 're-review'
22
+ tasks:
23
+ review-pr:
24
+ mode: simple
25
+ trigger: [manual, event]
26
+ skill: code-review
27
+ produces: review-report
28
+ tools: [read-artifact, read-code, git-read, shell]
29
+ quality_gate: self-eval
30
+ tools:
31
+ permitted:
32
+ - read-artifact
33
+ - write-artifact
34
+ - read-code
35
+ - git-read
36
+ - shell
37
+ denied:
38
+ - write-code
39
+ - git-write
40
+ cadence:
41
+ event:
42
+ - on: pr-created
43
+ task: review-pr
44
+ evaluation:
45
+ self_eval_model: claude-sonnet
46
+ rubric: rubrics/code-review.rubric.yaml
47
+ multi_model: false
@@ -0,0 +1,48 @@
1
+ # Architecture Decision Record Evaluation Rubric
2
+
3
+ rubric:
4
+ artifact_type: adr-summary
5
+ scoring_scale: 10
6
+ pass_threshold: 7
7
+
8
+ criteria:
9
+ - name: ADRs follow project template
10
+ weight: blocking
11
+ description: >
12
+ Each ADR follows the structure in architecture/decisions/adr-template.md:
13
+ context and problem statement, decision drivers, considered options,
14
+ decision outcome with rationale, consequences, and confirmation method.
15
+ Score 7+ if template structure is complete. Score below 7 if any
16
+ required section is missing or empty.
17
+
18
+ - name: Options analysis is balanced
19
+ weight: blocking
20
+ description: >
21
+ Each ADR presents at least two genuinely distinct options with
22
+ substantive pros and cons. The analysis does not set up a straw-man
23
+ for the preferred option. Score 7+ if options are balanced and
24
+ viable. Score below 7 if analysis is one-sided or options are trivially
25
+ different.
26
+
27
+ - name: Rationale is justified by analysis
28
+ weight: blocking
29
+ description: >
30
+ The decision outcome follows logically from the stated decision
31
+ drivers and options analysis. The rationale references specific
32
+ pros/cons that drove the choice, not just assertions. Score 7+ if
33
+ rationale is evidence-based. Score below 7 if the decision feels
34
+ predetermined or unjustified.
35
+
36
+ - name: Consequences are documented
37
+ weight: important
38
+ description: >
39
+ Both positive consequences (benefits) and negative consequences
40
+ (trade-offs) are documented. Consequences are specific to the project,
41
+ not generic. Score 7+ if consequences are concrete and actionable.
42
+
43
+ - name: No contradictions with existing ADRs
44
+ weight: important
45
+ description: >
46
+ New ADRs do not contradict existing accepted ADRs without explicitly
47
+ noting the supersession. Related ADRs are referenced where applicable.
48
+ Score 7+ if consistent. Score below 7 if contradictions exist.
@@ -0,0 +1,39 @@
1
+ # Code Review Evaluation Rubric
2
+
3
+ rubric:
4
+ artifact_type: code-review
5
+ scoring_scale: 10
6
+ pass_threshold: 7
7
+
8
+ criteria:
9
+ - name: Acceptance criteria addressed
10
+ weight: blocking
11
+ description: >
12
+ The review verifies whether the PR satisfies all acceptance criteria
13
+ from the story. Score 7+ if coverage is thorough. Score below 7 if
14
+ acceptance criteria are not checked.
15
+
16
+ - name: Blocking issues are substantive
17
+ weight: blocking
18
+ description: >
19
+ Any blocking findings identify real defects or standard violations,
20
+ not stylistic preferences. Score 7+ if findings are substantive.
21
+ Score below 7 if blocking issues are trivial or unsubstantiated.
22
+
23
+ - name: Verdict is justified
24
+ weight: blocking
25
+ description: >
26
+ The approve/changes-requested verdict is supported by the findings.
27
+ Score 7+ if the verdict logically follows from the review content.
28
+
29
+ - name: Suggestions are actionable
30
+ weight: important
31
+ description: >
32
+ Non-blocking suggestions include enough context for the engineer
33
+ to act on them without further clarification.
34
+
35
+ - name: Review covers design compliance
36
+ weight: advisory
37
+ description: >
38
+ The review checks whether the implementation matches the technical
39
+ design and architecture decisions.
@@ -0,0 +1,40 @@
1
+ # Pull Request Evaluation Rubric
2
+
3
+ rubric:
4
+ artifact_type: pull-request
5
+ scoring_scale: 10
6
+ pass_threshold: 7
7
+
8
+ criteria:
9
+ - name: Tests cover acceptance criteria
10
+ weight: blocking
11
+ description: >
12
+ All acceptance criteria from the story have corresponding test cases.
13
+ Score 7+ if coverage is complete. Score below 7 if any acceptance
14
+ criterion lacks a test.
15
+
16
+ - name: Code follows existing patterns
17
+ weight: blocking
18
+ description: >
19
+ Implementation follows the codebase's established architecture,
20
+ naming conventions, and module structure. Score 7+ if patterns are
21
+ respected. Score below 7 if the code introduces inconsistent
22
+ approaches.
23
+
24
+ - name: No security vulnerabilities introduced
25
+ weight: blocking
26
+ description: >
27
+ No secrets in code, no unsafe input handling, no new attack surfaces.
28
+ Score 7+ if clean. Score below 7 if any security concern is found.
29
+
30
+ - name: PR description links to story and design
31
+ weight: important
32
+ description: >
33
+ PR description references the story ID, acceptance criteria, and
34
+ relevant design decisions. Score 7+ if traceability is clear.
35
+
36
+ - name: Code is readable and maintainable
37
+ weight: advisory
38
+ description: >
39
+ Code is well-structured, appropriately commented where non-obvious,
40
+ and easy to understand for a new contributor.
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=actions.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.test.d.ts","sourceRoot":"","sources":["../../src/actions/actions.test.ts"],"names":[],"mappings":""}