@letra-ai/cli 0.4.1 → 0.6.1

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 (96) hide show
  1. package/dist/chunk-4QDEU6KP.js +2765 -0
  2. package/dist/chunk-6HSUVCTR.js +363 -0
  3. package/dist/chunk-BKAUN5QH.js +300 -0
  4. package/dist/chunk-BTPFUKHG.js +275 -0
  5. package/dist/chunk-EDD55PWL.js +119 -0
  6. package/dist/chunk-ELBTIPYN.js +256 -0
  7. package/dist/chunk-IEFSLCJL.js +837 -0
  8. package/dist/chunk-JMIC5NKB.js +235 -0
  9. package/dist/chunk-KGQLHMGZ.js +4494 -0
  10. package/dist/chunk-MJ2QXNH6.js +130 -0
  11. package/dist/chunk-MSF44WWE.js +443 -0
  12. package/dist/chunk-PDX44BCA.js +11 -0
  13. package/dist/chunk-QIVKP3EY.js +362 -0
  14. package/dist/client/assets/index-BuABgOyz.js +232 -0
  15. package/dist/client/assets/index-CpseCZh9.css +1 -0
  16. package/dist/client/favicon.svg +15 -3
  17. package/dist/client/index.html +10 -5
  18. package/dist/fallback-UXSZ4LNR.js +47 -0
  19. package/dist/flow-serve-MTB6KZMR.js +19 -0
  20. package/dist/focus-sync-3D3XWCTI.js +17 -0
  21. package/dist/generate-N22QOXUF.js +20 -0
  22. package/dist/harness/default/v0.1.0/flows/sdlc.yaml +179 -0
  23. package/dist/harness/default/v0.1.0/gates/all-acs-passing.yaml +8 -0
  24. package/dist/harness/default/v0.1.0/gates/has-spec-file.yaml +7 -0
  25. package/dist/harness/default/v0.1.0/gates/human-approved-code.yaml +8 -0
  26. package/dist/harness/default/v0.1.0/gates/human-approved-spec.yaml +8 -0
  27. package/dist/harness/default/v0.1.0/gates/security-clear.yaml +8 -0
  28. package/dist/harness/default/v0.1.0/policies/sdlc-default.json +20 -0
  29. package/dist/harness/default/v0.1.0/roles/analyst.yaml +9 -0
  30. package/dist/harness/default/v0.1.0/roles/builder.yaml +9 -0
  31. package/dist/harness/default/v0.1.0/roles/pr-bot.yaml +8 -0
  32. package/dist/harness/default/v0.1.0/roles/reviewer.yaml +10 -0
  33. package/dist/harness/default/v0.1.0/roles/security.yaml +8 -0
  34. package/dist/harness/default/v0.1.1/flows/flow-main.yaml +61 -0
  35. package/dist/harness/default/v0.1.1/flows/sdlc.yaml +179 -0
  36. package/dist/harness/default/v0.1.1/gates/all-acs-passing.yaml +8 -0
  37. package/dist/harness/default/v0.1.1/gates/has-spec-file.yaml +7 -0
  38. package/dist/harness/default/v0.1.1/gates/human-approved-code.yaml +8 -0
  39. package/dist/harness/default/v0.1.1/gates/human-approved-spec.yaml +8 -0
  40. package/dist/harness/default/v0.1.1/gates/security-clear.yaml +8 -0
  41. package/dist/harness/default/v0.1.1/policies/sdlc-default.json +20 -0
  42. package/dist/harness/default/v0.1.1/roles/analyst.yaml +9 -0
  43. package/dist/harness/default/v0.1.1/roles/builder.yaml +9 -0
  44. package/dist/harness/default/v0.1.1/roles/pr-bot.yaml +8 -0
  45. package/dist/harness/default/v0.1.1/roles/reviewer.yaml +10 -0
  46. package/dist/harness/default/v0.1.1/roles/security.yaml +8 -0
  47. package/dist/harness/default/v0.1.2/flows/flow-main.yaml +86 -0
  48. package/dist/harness/default/v0.1.2/flows/sdlc.yaml +179 -0
  49. package/dist/harness/default/v0.1.2/gates/all-acs-passing.yaml +8 -0
  50. package/dist/harness/default/v0.1.2/gates/has-spec-file.yaml +7 -0
  51. package/dist/harness/default/v0.1.2/gates/human-approved-code.yaml +8 -0
  52. package/dist/harness/default/v0.1.2/gates/human-approved-spec.yaml +8 -0
  53. package/dist/harness/default/v0.1.2/gates/security-clear.yaml +8 -0
  54. package/dist/harness/default/v0.1.2/policies/sdlc-default.json +20 -0
  55. package/dist/harness/default/v0.1.2/roles/analyst.yaml +9 -0
  56. package/dist/harness/default/v0.1.2/roles/builder.yaml +9 -0
  57. package/dist/harness/default/v0.1.2/roles/pr-bot.yaml +8 -0
  58. package/dist/harness/default/v0.1.2/roles/reviewer.yaml +10 -0
  59. package/dist/harness/default/v0.1.2/roles/security.yaml +8 -0
  60. package/dist/harness/default/v0.1.3/flows/flow-main.yaml +90 -0
  61. package/dist/harness/default/v0.1.3/flows/sdlc.yaml +179 -0
  62. package/dist/harness/default/v0.1.3/gates/all-acs-passing.yaml +8 -0
  63. package/dist/harness/default/v0.1.3/gates/has-spec-file.yaml +7 -0
  64. package/dist/harness/default/v0.1.3/gates/human-approved-code.yaml +9 -0
  65. package/dist/harness/default/v0.1.3/gates/human-approved-spec.yaml +9 -0
  66. package/dist/harness/default/v0.1.3/gates/security-clear.yaml +8 -0
  67. package/dist/harness/default/v0.1.3/policies/sdlc-default.json +20 -0
  68. package/dist/harness/default/v0.1.3/roles/analyst.yaml +9 -0
  69. package/dist/harness/default/v0.1.3/roles/builder.yaml +9 -0
  70. package/dist/harness/default/v0.1.3/roles/pr-bot.yaml +8 -0
  71. package/dist/harness/default/v0.1.3/roles/reviewer.yaml +10 -0
  72. package/dist/harness/default/v0.1.3/roles/security.yaml +8 -0
  73. package/dist/harness/default/v0.2.0/executors/registry.yaml +51 -0
  74. package/dist/harness/default/v0.2.0/flows/flow-main.yaml +247 -0
  75. package/dist/harness/default/v0.2.0/gates/code-reviewed.yaml +7 -0
  76. package/dist/harness/default/v0.2.0/gates/human-approved.yaml +10 -0
  77. package/dist/harness/default/v0.2.0/gates/security-clear.yaml +7 -0
  78. package/dist/harness/default/v0.2.0/gates/spec-approved.yaml +10 -0
  79. package/dist/harness/default/v0.2.0/policies/sdlc-default.json +20 -0
  80. package/dist/harness/default/v0.2.0/roles/analyst.yaml +16 -0
  81. package/dist/harness/default/v0.2.0/roles/implementer.yaml +17 -0
  82. package/dist/harness/default/v0.2.0/roles/reviewer.yaml +17 -0
  83. package/dist/harness/default/v0.2.0/roles/security.yaml +17 -0
  84. package/dist/health-record-YDVXEVLR.js +21 -0
  85. package/dist/index.js +2595 -3046
  86. package/dist/init-wizard-NODBBNKO.js +178 -0
  87. package/dist/push-5JEYSXBY.js +116 -0
  88. package/dist/registry-6VPIA3EG.js +18 -0
  89. package/dist/server-FUP3APZA.js +415 -0
  90. package/dist/service-OGF7BMCQ.js +21 -0
  91. package/dist/session-log-WTQ5JBEN.js +21 -0
  92. package/dist/sitrep-DJXTP3JO.js +16 -0
  93. package/package.json +11 -2
  94. package/dist/client/assets/index-9KbFvLoH.css +0 -1
  95. package/dist/client/assets/index-s9Re0Bnf.js +0 -84
  96. package/tsup.config.ts +0 -11
@@ -0,0 +1,247 @@
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
+ gate: security-clear
190
+ preferredExecutor: opencode
191
+ phases:
192
+ initialState: scan
193
+ states:
194
+ scan:
195
+ id: scan
196
+ label: Scan
197
+ description: Scan for vulnerabilities
198
+ actions:
199
+ - type: command
200
+ cmd: "letra flow phases <ITEM-ID>"
201
+ transitions:
202
+ - target: decide
203
+ decide:
204
+ id: decide
205
+ label: Decide
206
+ description: Approve or reject
207
+ actions:
208
+ - type: command
209
+ cmd: "letra flow handoff --to human --summary 'Security clear.'"
210
+ transitions:
211
+ - target: handoff-approve
212
+ - target: handoff-reject
213
+ handoff-approve:
214
+ id: handoff-approve
215
+ label: Handoff Approve
216
+ description: Handoff to human
217
+ actions:
218
+ - type: command
219
+ cmd: "letra flow handoff --to human --summary 'Security clear. Awaiting approval.'"
220
+ handoff-reject:
221
+ id: handoff-reject
222
+ label: Handoff Reject
223
+ description: Handoff back to implementer
224
+ actions:
225
+ - type: command
226
+ cmd: "letra flow handoff --to implementer --summary 'Vulnerability found.'"
227
+ activity:
228
+ implement:
229
+ objective: "Analyze security, vulnerabilities, and dependencies."
230
+ commands:
231
+ - command: "letra flow handoff --to human --summary 'Security clear. Awaiting approval.'"
232
+ label: "Handoff to Human"
233
+ - command: "letra flow handoff --to implementer --summary 'Vulnerability found: [desc]'"
234
+ label: "Handoff back to Implementer"
235
+ mustNotDo:
236
+ - "Do not implement corrections"
237
+ nextActions:
238
+ - label: "Scan"
239
+ description: "Check for vulnerabilities, secrets, dependency issues."
240
+
241
+ - id: done
242
+ name: Done
243
+ order: 5
244
+ zone: done
245
+ description: Item is complete.
246
+ agents: []
247
+ 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: "All checks passed. Item is complete."
9
+ request-changes: "Needs more work. Return to implementer."
10
+ reject: "Item is not viable. Reject."
@@ -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: "Spec is clear and complete. Proceed to implementation."
9
+ request-changes: "Spec needs revisions. Return to analyst."
10
+ reject: "Spec is not viable. Reject item."
@@ -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
+ };