@letra-ai/cli 0.5.3 → 0.6.2

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/chunk-6HSUVCTR.js +363 -0
  2. package/dist/chunk-BKAUN5QH.js +300 -0
  3. package/dist/chunk-DMOLJWWW.js +3321 -0
  4. package/dist/chunk-EDD55PWL.js +119 -0
  5. package/dist/chunk-H64RC3YS.js +254 -0
  6. package/dist/chunk-JMIC5NKB.js +235 -0
  7. package/dist/chunk-L6YKDTAQ.js +275 -0
  8. package/dist/chunk-MJ2QXNH6.js +130 -0
  9. package/dist/chunk-OIHMDOIN.js +1326 -0
  10. package/dist/chunk-PDX44BCA.js +11 -0
  11. package/dist/chunk-URUC6ZZP.js +4781 -0
  12. package/dist/client/assets/index-EyRsq1SH.css +1 -0
  13. package/dist/client/assets/index-WfKR7Xp6.js +232 -0
  14. package/dist/client/favicon.svg +16 -4
  15. package/dist/client/index.html +25 -20
  16. package/dist/fallback-MQLGS4KL.js +46 -0
  17. package/dist/flow-serve-G5MSSB3G.js +18 -0
  18. package/dist/focus-sync-3D3XWCTI.js +17 -0
  19. package/dist/generate-UPFERQMD.js +20 -0
  20. package/dist/harness/default/v0.1.0/flows/sdlc.yaml +179 -0
  21. package/dist/harness/default/v0.1.0/gates/all-acs-passing.yaml +8 -0
  22. package/dist/harness/default/v0.1.0/gates/has-spec-file.yaml +7 -0
  23. package/dist/harness/default/v0.1.0/gates/human-approved-code.yaml +8 -0
  24. package/dist/harness/default/v0.1.0/gates/human-approved-spec.yaml +8 -0
  25. package/dist/harness/default/v0.1.0/gates/security-clear.yaml +8 -0
  26. package/dist/harness/default/v0.1.0/policies/sdlc-default.json +20 -0
  27. package/dist/harness/default/v0.1.0/roles/analyst.yaml +9 -0
  28. package/dist/harness/default/v0.1.0/roles/builder.yaml +9 -0
  29. package/dist/harness/default/v0.1.0/roles/pr-bot.yaml +8 -0
  30. package/dist/harness/default/v0.1.0/roles/reviewer.yaml +10 -0
  31. package/dist/harness/default/v0.1.0/roles/security.yaml +8 -0
  32. package/dist/harness/default/v0.1.1/flows/flow-main.yaml +61 -0
  33. package/dist/harness/default/v0.1.1/flows/sdlc.yaml +179 -0
  34. package/dist/harness/default/v0.1.1/gates/all-acs-passing.yaml +8 -0
  35. package/dist/harness/default/v0.1.1/gates/has-spec-file.yaml +7 -0
  36. package/dist/harness/default/v0.1.1/gates/human-approved-code.yaml +8 -0
  37. package/dist/harness/default/v0.1.1/gates/human-approved-spec.yaml +8 -0
  38. package/dist/harness/default/v0.1.1/gates/security-clear.yaml +8 -0
  39. package/dist/harness/default/v0.1.1/policies/sdlc-default.json +20 -0
  40. package/dist/harness/default/v0.1.1/roles/analyst.yaml +9 -0
  41. package/dist/harness/default/v0.1.1/roles/builder.yaml +9 -0
  42. package/dist/harness/default/v0.1.1/roles/pr-bot.yaml +8 -0
  43. package/dist/harness/default/v0.1.1/roles/reviewer.yaml +10 -0
  44. package/dist/harness/default/v0.1.1/roles/security.yaml +8 -0
  45. package/dist/harness/default/v0.1.2/flows/flow-main.yaml +86 -0
  46. package/dist/harness/default/v0.1.2/flows/sdlc.yaml +179 -0
  47. package/dist/harness/default/v0.1.2/gates/all-acs-passing.yaml +8 -0
  48. package/dist/harness/default/v0.1.2/gates/has-spec-file.yaml +7 -0
  49. package/dist/harness/default/v0.1.2/gates/human-approved-code.yaml +8 -0
  50. package/dist/harness/default/v0.1.2/gates/human-approved-spec.yaml +8 -0
  51. package/dist/harness/default/v0.1.2/gates/security-clear.yaml +8 -0
  52. package/dist/harness/default/v0.1.2/policies/sdlc-default.json +20 -0
  53. package/dist/harness/default/v0.1.2/roles/analyst.yaml +9 -0
  54. package/dist/harness/default/v0.1.2/roles/builder.yaml +9 -0
  55. package/dist/harness/default/v0.1.2/roles/pr-bot.yaml +8 -0
  56. package/dist/harness/default/v0.1.2/roles/reviewer.yaml +10 -0
  57. package/dist/harness/default/v0.1.2/roles/security.yaml +8 -0
  58. package/dist/harness/default/v0.1.3/flows/flow-main.yaml +90 -0
  59. package/dist/harness/default/v0.1.3/flows/sdlc.yaml +179 -0
  60. package/dist/harness/default/v0.1.3/gates/all-acs-passing.yaml +8 -0
  61. package/dist/harness/default/v0.1.3/gates/has-spec-file.yaml +7 -0
  62. package/dist/harness/default/v0.1.3/gates/human-approved-code.yaml +9 -0
  63. package/dist/harness/default/v0.1.3/gates/human-approved-spec.yaml +9 -0
  64. package/dist/harness/default/v0.1.3/gates/security-clear.yaml +8 -0
  65. package/dist/harness/default/v0.1.3/policies/sdlc-default.json +20 -0
  66. package/dist/harness/default/v0.1.3/roles/analyst.yaml +9 -0
  67. package/dist/harness/default/v0.1.3/roles/builder.yaml +9 -0
  68. package/dist/harness/default/v0.1.3/roles/pr-bot.yaml +8 -0
  69. package/dist/harness/default/v0.1.3/roles/reviewer.yaml +10 -0
  70. package/dist/harness/default/v0.1.3/roles/security.yaml +8 -0
  71. package/dist/harness/default/v0.2.0/executors/registry.yaml +51 -0
  72. package/dist/harness/default/v0.2.0/flows/flow-main.yaml +249 -0
  73. package/dist/harness/default/v0.2.0/gates/code-reviewed.yaml +7 -0
  74. package/dist/harness/default/v0.2.0/gates/human-approved.yaml +10 -0
  75. package/dist/harness/default/v0.2.0/gates/security-clear.yaml +7 -0
  76. package/dist/harness/default/v0.2.0/gates/spec-approved.yaml +10 -0
  77. package/dist/harness/default/v0.2.0/policies/sdlc-default.json +20 -0
  78. package/dist/harness/default/v0.2.0/roles/analyst.yaml +16 -0
  79. package/dist/harness/default/v0.2.0/roles/implementer.yaml +17 -0
  80. package/dist/harness/default/v0.2.0/roles/reviewer.yaml +17 -0
  81. package/dist/harness/default/v0.2.0/roles/security.yaml +17 -0
  82. package/dist/health-record-YDVXEVLR.js +21 -0
  83. package/dist/index.js +1951 -2530
  84. package/dist/init-wizard-NODBBNKO.js +178 -0
  85. package/dist/push-VJRSQGUD.js +116 -0
  86. package/dist/registry-6VPIA3EG.js +18 -0
  87. package/dist/server-P6GKRWDX.js +423 -0
  88. package/dist/service-2JN2KI4D.js +29 -0
  89. package/dist/session-log-WTQ5JBEN.js +21 -0
  90. package/dist/sitrep-OKNZJICV.js +16 -0
  91. package/package.json +37 -28
  92. package/dist/chunk-56GTTLC4.js +0 -1322
  93. package/dist/chunk-QWT5M4XU.js +0 -643
  94. package/dist/client/assets/index-CuLfFw4K.js +0 -85
  95. package/dist/client/assets/index-iyLqZcWx.css +0 -1
  96. package/dist/generate-BF5R5GGA.js +0 -7
  97. package/dist/sitrep-SI6ZFIAM.js +0 -10
  98. package/tsup.config.ts +0 -11
@@ -0,0 +1,249 @@
1
+ id: flow-main
2
+ version: "0.2.0"
3
+ name: Main Flow
4
+ description: Standard SDLC flow with agent orchestration and handoff protocol.
5
+ defaultPolicy: sdlc-default
6
+ stages:
7
+ - id: backlog
8
+ name: Backlog
9
+ order: 0
10
+ zone: todo
11
+ description: Items waiting to be prioritized.
12
+ agents: []
13
+ gate: null
14
+
15
+ - id: design
16
+ name: Design
17
+ order: 1
18
+ zone: doing
19
+ description: Analyst analyzes spec, creates ACs, defines context.
20
+ agents:
21
+ - analyst
22
+ gate: spec-approved
23
+ preferredExecutor: opencode
24
+ phases:
25
+ initialState: analyze
26
+ states:
27
+ analyze:
28
+ id: analyze
29
+ label: Analyze
30
+ description: Read and understand the spec
31
+ actions:
32
+ - type: command
33
+ cmd: "letra flow phases <ITEM-ID>"
34
+ transitions:
35
+ - target: define
36
+ define:
37
+ id: define
38
+ label: Define ACs
39
+ description: Create acceptance criteria
40
+ actions:
41
+ - type: command
42
+ cmd: "letra flow ac <ITEM-ID> <AC-NUMBER>"
43
+ transitions:
44
+ - target: handoff
45
+ gate: spec-approved
46
+ handoff:
47
+ id: handoff
48
+ label: Handoff
49
+ description: Handoff to implementer
50
+ actions:
51
+ - type: command
52
+ cmd: "letra flow handoff --to implementer --summary 'Spec analyzed. ACs defined.'"
53
+ activity:
54
+ design:
55
+ objective: "Analyze the spec and define acceptance criteria."
56
+ mustRead:
57
+ - path: constitution.md
58
+ reason: "Constitutional principles must guide analysis"
59
+ - path: glossary.md
60
+ reason: "Domain terms must be consistent"
61
+ commands:
62
+ - command: "letra flow handoff --to implementer --summary 'Spec analyzed. ACs defined.'"
63
+ label: "Handoff to Implementer"
64
+ mustNotDo:
65
+ - "Do not implement code"
66
+ - "Do not skip acceptance criteria definition"
67
+ nextActions:
68
+ - label: "Analyze"
69
+ description: "Read spec, understand requirements, create ACs."
70
+
71
+ - id: code
72
+ name: Code
73
+ order: 2
74
+ zone: doing
75
+ description: Implementer writes code, implements ACs, runs tests.
76
+ agents:
77
+ - implementer
78
+ gate: code-reviewed
79
+ preferredExecutor: opencode
80
+ phases:
81
+ initialState: implement
82
+ states:
83
+ implement:
84
+ id: implement
85
+ label: Implement
86
+ description: Implement acceptance criteria
87
+ actions:
88
+ - type: command
89
+ cmd: "letra ac done <AC-ID>"
90
+ transitions:
91
+ - target: test
92
+ test:
93
+ id: test
94
+ label: Test
95
+ description: Run tests and validate
96
+ actions:
97
+ - type: command
98
+ cmd: "letra validate"
99
+ transitions:
100
+ - target: handoff
101
+ handoff:
102
+ id: handoff
103
+ label: Handoff
104
+ description: Handoff to reviewer
105
+ actions:
106
+ - type: command
107
+ cmd: "letra flow handoff --to reviewer --summary 'Implementation complete.'"
108
+ activity:
109
+ implement:
110
+ objective: "Implement acceptance criteria one by one."
111
+ commands:
112
+ - command: "letra ac done <AC-ID>"
113
+ label: "Complete AC"
114
+ - command: "letra flow handoff --to reviewer --summary 'Implementation complete.'"
115
+ label: "Handoff to Reviewer"
116
+ mustNotDo:
117
+ - "Do not skip tests"
118
+ - "Do not approve your own work"
119
+ nextActions:
120
+ - label: "Implement"
121
+ description: "Implement ACs with regression tests."
122
+
123
+ - id: review
124
+ name: Review
125
+ order: 3
126
+ zone: doing
127
+ description: Reviewer checks adherence, quality, and regression.
128
+ agents:
129
+ - reviewer
130
+ gate: null
131
+ preferredExecutor: opencode
132
+ phases:
133
+ initialState: review
134
+ states:
135
+ review:
136
+ id: review
137
+ label: Review
138
+ description: Review code quality and adherence
139
+ actions:
140
+ - type: command
141
+ cmd: "letra flow phases <ITEM-ID>"
142
+ transitions:
143
+ - target: decide
144
+ decide:
145
+ id: decide
146
+ label: Decide
147
+ description: Approve or reject
148
+ actions:
149
+ - type: command
150
+ cmd: "letra flow handoff --to security --summary 'Review approved.'"
151
+ transitions:
152
+ - target: handoff-approve
153
+ - target: handoff-reject
154
+ handoff-approve:
155
+ id: handoff-approve
156
+ label: Handoff Approve
157
+ description: Handoff to security
158
+ actions:
159
+ - type: command
160
+ cmd: "letra flow handoff --to security --summary 'Review approved.'"
161
+ handoff-reject:
162
+ id: handoff-reject
163
+ label: Handoff Reject
164
+ description: Handoff back to implementer
165
+ actions:
166
+ - type: command
167
+ cmd: "letra flow handoff --to implementer --summary 'Review rejected.'"
168
+ activity:
169
+ review:
170
+ objective: "Review code for adherence, quality, and regression."
171
+ commands:
172
+ - command: "letra flow handoff --to security --summary 'Review approved.'"
173
+ label: "Handoff to Security"
174
+ - command: "letra flow handoff --to implementer --summary 'Review rejected. Issues: [list]'"
175
+ label: "Handoff back to Implementer"
176
+ mustNotDo:
177
+ - "Do not implement corrections"
178
+ nextActions:
179
+ - label: "Review"
180
+ description: "Check code quality, test coverage, regression."
181
+
182
+ - id: security
183
+ name: Security
184
+ order: 4
185
+ zone: doing
186
+ description: Security agent analyzes vulnerabilities and dependencies.
187
+ agents:
188
+ - security
189
+ # Security checks run automatically; the final transition to Done is
190
+ # released only by the human-approved gate handled by the UI/API.
191
+ gate: human-approved
192
+ preferredExecutor: opencode
193
+ phases:
194
+ initialState: scan
195
+ states:
196
+ scan:
197
+ id: scan
198
+ label: Scan
199
+ description: Scan for vulnerabilities
200
+ actions:
201
+ - type: command
202
+ cmd: "letra flow phases <ITEM-ID>"
203
+ transitions:
204
+ - target: decide
205
+ decide:
206
+ id: decide
207
+ label: Decide
208
+ description: Approve or reject
209
+ actions:
210
+ - type: command
211
+ cmd: "letra flow handoff --to human --summary 'Security clear.'"
212
+ transitions:
213
+ - target: handoff-approve
214
+ - target: handoff-reject
215
+ handoff-approve:
216
+ id: handoff-approve
217
+ label: Handoff Approve
218
+ description: Handoff to human
219
+ actions:
220
+ - type: command
221
+ cmd: "letra flow handoff --to human --summary 'Security clear. Awaiting approval.'"
222
+ handoff-reject:
223
+ id: handoff-reject
224
+ label: Handoff Reject
225
+ description: Handoff back to implementer
226
+ actions:
227
+ - type: command
228
+ cmd: "letra flow handoff --to implementer --summary 'Vulnerability found.'"
229
+ activity:
230
+ implement:
231
+ objective: "Analyze security, vulnerabilities, and dependencies."
232
+ commands:
233
+ - command: "letra flow handoff --to human --summary 'Security clear. Awaiting approval.'"
234
+ label: "Handoff to Human"
235
+ - command: "letra flow handoff --to implementer --summary 'Vulnerability found: [desc]'"
236
+ label: "Handoff back to Implementer"
237
+ mustNotDo:
238
+ - "Do not implement corrections"
239
+ nextActions:
240
+ - label: "Scan"
241
+ description: "Check for vulnerabilities, secrets, dependency issues."
242
+
243
+ - id: done
244
+ name: Done
245
+ order: 5
246
+ zone: done
247
+ description: Item is complete.
248
+ agents: []
249
+ gate: null
@@ -0,0 +1,7 @@
1
+ id: code-reviewed
2
+ name: Code Reviewed
3
+ type: automated
4
+ blocking: true
5
+ blocksHandoff: false
6
+ description: Automated code review checks (lint, typecheck, tests).
7
+ policyRef: policies/sdlc-default.json
@@ -0,0 +1,10 @@
1
+ id: human-approved
2
+ name: Human Approved
3
+ type: human
4
+ blocking: true
5
+ blocksHandoff: true
6
+ description: Final human approval before marking item as done.
7
+ decisions:
8
+ approve: done
9
+ request-changes: code
10
+ reject: backlog
@@ -0,0 +1,7 @@
1
+ id: security-clear
2
+ name: Security Clear
3
+ type: automated
4
+ blocking: true
5
+ blocksHandoff: false
6
+ description: Automated security scan (no critical vulnerabilities, no exposed secrets).
7
+ policyRef: policies/sdlc-default.json
@@ -0,0 +1,10 @@
1
+ id: spec-approved
2
+ name: Spec Approved
3
+ type: human
4
+ blocking: true
5
+ blocksHandoff: true
6
+ description: Human approves the spec before implementation begins.
7
+ decisions:
8
+ approve: code
9
+ request-changes: design
10
+ reject: backlog
@@ -0,0 +1,20 @@
1
+ {
2
+ "id": "sdlc-default",
3
+ "version": "0.2.0",
4
+ "review": {
5
+ "minReviewers": 1,
6
+ "requireHuman": false,
7
+ "allowAgentToComment": true,
8
+ "allowAgentToApprove": false
9
+ },
10
+ "security": {
11
+ "blockOnCritical": true,
12
+ "blockOnHigh": true,
13
+ "allowAgentToOverride": false
14
+ },
15
+ "pr": {
16
+ "requireDescription": true,
17
+ "requireChecksPassing": true,
18
+ "allowAgentToMerge": false
19
+ }
20
+ }
@@ -0,0 +1,16 @@
1
+ id: analyst
2
+ label: Analyst
3
+ description: Analyzes specs, creates ACs, defines context for implementation.
4
+ allowedStages:
5
+ - design
6
+ capabilities:
7
+ - read_code
8
+ - write_spec
9
+ - generate_doc
10
+ handoff:
11
+ blocksHandoff: false
12
+ allowedTargets:
13
+ - implementer
14
+ requireEvidence: true
15
+ ttlMinutes: 30
16
+ prompt-template: roles/prompts/analyst.md
@@ -0,0 +1,17 @@
1
+ id: implementer
2
+ label: Implementer
3
+ description: Writes code, implements ACs, runs tests.
4
+ allowedStages:
5
+ - code
6
+ capabilities:
7
+ - read_code
8
+ - write_code
9
+ - run_tests
10
+ handoff:
11
+ blocksHandoff: false
12
+ allowedTargets:
13
+ - reviewer
14
+ - security
15
+ requireEvidence: true
16
+ ttlMinutes: 30
17
+ prompt-template: roles/prompts/implementer.md
@@ -0,0 +1,17 @@
1
+ id: reviewer
2
+ label: Reviewer
3
+ description: Reviews code adherence, quality, and regression.
4
+ allowedStages:
5
+ - review
6
+ capabilities:
7
+ - read_code
8
+ - review_code
9
+ - run_tests
10
+ handoff:
11
+ blocksHandoff: false
12
+ allowedTargets:
13
+ - implementer
14
+ - security
15
+ requireEvidence: true
16
+ ttlMinutes: 30
17
+ prompt-template: roles/prompts/reviewer.md
@@ -0,0 +1,17 @@
1
+ id: security
2
+ label: Security
3
+ description: Analyzes security, vulnerabilities, and dependencies.
4
+ allowedStages:
5
+ - security
6
+ capabilities:
7
+ - read_code
8
+ - security_scan
9
+ - dependency_audit
10
+ handoff:
11
+ blocksHandoff: false
12
+ allowedTargets:
13
+ - implementer
14
+ - human
15
+ requireEvidence: true
16
+ ttlMinutes: 30
17
+ prompt-template: roles/prompts/security.md
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ ackEntry,
4
+ dismissEntry,
5
+ getActiveEntries,
6
+ getSummary,
7
+ loadHealthRecord,
8
+ mergeScanResults,
9
+ saveHealthRecord
10
+ } from "./chunk-MJ2QXNH6.js";
11
+ import "./chunk-6HSUVCTR.js";
12
+ import "./chunk-PDX44BCA.js";
13
+ export {
14
+ ackEntry,
15
+ dismissEntry,
16
+ getActiveEntries,
17
+ getSummary,
18
+ loadHealthRecord,
19
+ mergeScanResults,
20
+ saveHealthRecord
21
+ };