-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPRD.html
More file actions
3877 lines (3856 loc) · 164 KB
/
Copy pathPRD.html
File metadata and controls
3877 lines (3856 loc) · 164 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc 3.10.2" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>DevAgent - Product Requirements Document</title>
<style>
/* Default styles provided by pandoc.
** See https://pandoc.org/MANUAL.html#variables-for-html for config info.
*/
html {
color: #1a1a1a;
background-color: #fdfdfd;
}
body {
margin: 0 auto;
max-width: 36em;
padding-left: 50px;
padding-right: 50px;
padding-top: 50px;
padding-bottom: 50px;
hyphens: auto;
overflow-wrap: break-word;
text-rendering: optimizeLegibility;
font-kerning: normal;
}
@media (max-width: 600px) {
body {
font-size: 0.9em;
padding: 12px;
}
h1 {
font-size: 1.8em;
}
}
@media print {
html {
background-color: white;
}
body {
background-color: transparent;
color: black;
}
p, h2, h3 {
orphans: 3;
widows: 3;
}
h2, h3, h4 {
page-break-after: avoid;
}
}
p {
margin: 1em 0;
}
a {
color: #1a1a1a;
}
a:visited {
color: #1a1a1a;
}
img {
max-width: 100%;
}
svg {
height: auto;
max-width: 100%;
}
h1, h2, h3, h4, h5, h6 {
margin-top: 1.4em;
}
h5, h6 {
font-size: 1em;
font-style: italic;
}
h6 {
font-weight: normal;
}
ol, ul {
padding-left: 1.7em;
margin-top: 1em;
}
li > ol, li > ul {
margin-top: 0;
}
blockquote {
margin: 1em 0 1em 1.7em;
padding-left: 1em;
border-left: 2px solid #e6e6e6;
color: #606060;
}
code {
white-space: pre-wrap;
font-family: Menlo, Monaco, Consolas, 'Lucida Console', monospace;
font-size: 85%;
margin: 0;
hyphens: manual;
}
pre {
margin: 1em 0;
overflow: auto;
}
pre code {
padding: 0;
overflow: visible;
overflow-wrap: normal;
}
.sourceCode {
background-color: transparent;
overflow: visible;
}
hr {
border: none;
border-top: 1px solid #1a1a1a;
height: 1px;
margin: 1em 0;
}
table {
margin: 1em 0;
border-collapse: collapse;
width: 100%;
overflow-x: auto;
display: block;
font-variant-numeric: lining-nums tabular-nums;
}
table caption {
margin-bottom: 0.75em;
}
tbody {
margin-top: 0.5em;
border-top: 1px solid #1a1a1a;
border-bottom: 1px solid #1a1a1a;
}
th {
border-top: 1px solid #1a1a1a;
padding: 0.25em 0.5em 0.25em 0.5em;
}
td {
padding: 0.125em 0.5em 0.25em 0.5em;
}
header {
margin-bottom: 4em;
text-align: center;
}
#TOC li {
list-style: none;
}
#TOC ul {
padding-left: 1.3em;
}
#TOC > ul {
padding-left: 0;
}
#TOC a:not(:hover) {
text-decoration: none;
}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: 1.5em;}
div.column{flex: auto;}
@media screen {
div.columns{gap: min(4vw, 1.5em);}
div.column{overflow-x: auto;}
}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
/* The extra [class] is a hack that increases specificity enough to
override a similar rule in reveal.js */
ul.task-list[class]{list-style: none;}
ul.task-list li input[type="checkbox"] {
font-size: inherit;
width: 0.8em;
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
}
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
/* CSS for syntax highlighting */
html { -webkit-text-size-adjust: 100%; }
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
pre.numberSource code > span
{ position: relative; left: -4em; counter-increment: source-line; }
pre.numberSource code > span > a:first-child::before
{ content: counter(source-line);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
color: #aaaaaa;
}
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
div.sourceCode
{ }
@media screen {
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
code span.al { color: #ff0000; font-weight: bold; } /* Alert */
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code span.at { color: #7d9029; } /* Attribute */
code span.bn { color: #40a070; } /* BaseN */
code span.bu { color: #008000; } /* BuiltIn */
code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code span.ch { color: #4070a0; } /* Char */
code span.cn { color: #880000; } /* Constant */
code span.co { color: #60a0b0; font-style: italic; } /* Comment */
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code span.do { color: #ba2121; font-style: italic; } /* Documentation */
code span.dt { color: #902000; } /* DataType */
code span.dv { color: #40a070; } /* DecVal */
code span.er { color: #ff0000; font-weight: bold; } /* Error */
code span.ex { } /* Extension */
code span.fl { color: #40a070; } /* Float */
code span.fu { color: #06287e; } /* Function */
code span.im { color: #008000; font-weight: bold; } /* Import */
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
code span.kw { color: #007020; font-weight: bold; } /* Keyword */
code span.op { color: #666666; } /* Operator */
code span.ot { color: #007020; } /* Other */
code span.pp { color: #bc7a00; } /* Preprocessor */
code span.sc { color: #4070a0; } /* SpecialChar */
code span.ss { color: #bb6688; } /* SpecialString */
code span.st { color: #4070a0; } /* String */
code span.va { color: #19177c; } /* Variable */
code span.vs { color: #4070a0; } /* VerbatimString */
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
</style>
<!-- DevAgent PRD custom style: include for regenerating docs/PRD.html from docs/PRD.md. Command: pandoc docs/PRD.md -f gfm -t html5 -s --toc --toc-depth=2 --metadata title="DevAgent - Product Requirements Document" -H docs/prd-style.html -o docs/PRD.html (pandoc 3.10.x). -->
<style>
/* DevAgent PRD styling */
:root {
--bg: #ffffff;
--fg: #1a1a2e;
--muted: #5a6478;
--accent: #2456c7;
--border: #dde3ee;
--code-bg: #f4f6fa;
--quote-bg: #f0f4ff;
}
* { box-sizing: border-box; }
body {
margin: 0 auto;
padding: 2.5rem 1.25rem 5rem;
max-width: 56rem;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
line-height: 1.65;
color: var(--fg);
background: var(--bg);
}
header#title-block-header h1.title {
font-size: 2rem;
border-bottom: 3px solid var(--accent);
padding-bottom: 0.5rem;
}
h1, h2, h3, h4 { line-height: 1.25; margin-top: 2rem; }
h2 {
font-size: 1.4rem;
border-bottom: 1px solid var(--border);
padding-bottom: 0.3rem;
scroll-margin-top: 1rem;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
background: var(--code-bg);
border-radius: 4px;
padding: 0.15em 0.35em;
font-size: 0.9em;
font-family: "SF Mono", Menlo, Consolas, monospace;
}
pre {
background: var(--code-bg);
border: 1px solid var(--border);
border-radius: 8px;
padding: 1rem;
overflow-x: auto;
}
pre code { background: none; padding: 0; }
blockquote {
margin: 1rem 0;
padding: 0.75rem 1.25rem;
border-left: 4px solid var(--accent);
background: var(--quote-bg);
color: var(--muted);
}
table {
border-collapse: collapse;
width: 100%;
margin: 1.25rem 0;
font-size: 0.92em;
}
th, td {
border: 1px solid var(--border);
padding: 0.45rem 0.7rem;
text-align: left;
vertical-align: top;
}
th { background: var(--code-bg); }
/* pandoc TOC */
nav#TOC {
border: 1px solid var(--border);
border-radius: 8px;
padding: 1rem 1.5rem;
margin-bottom: 2rem;
background: #fafbfe;
font-size: 0.95em;
}
nav#TOC > ul { padding-left: 1.2rem; }
nav#TOC ul { list-style-type: none; }
nav#TOC li { margin: 0.25rem 0; }
nav#TOC::before {
content: "Contents";
display: block;
font-weight: 700;
margin-bottom: 0.5rem;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #12141c;
--fg: #e4e7f0;
--muted: #9aa4bb;
--accent: #7ea4f5;
--border: #2b3044;
--code-bg: #1c2030;
--quote-bg: #1a2138;
}
th { background: #1c2030; }
}
</style>
</head>
<body>
<header id="title-block-header">
<h1 class="title">DevAgent - Product Requirements Document</h1>
</header>
<nav id="TOC" role="doc-toc">
<ul>
<li><a href="#devagent--product-requirements-document"
id="toc-devagent--product-requirements-document">DevAgent — Product
Requirements Document</a>
<ul>
<li><a href="#table-of-contents" id="toc-table-of-contents">Table of
Contents</a></li>
<li><a href="#1-executive-summary" id="toc-1-executive-summary">1.
Executive Summary</a></li>
<li><a href="#2-problem-statement" id="toc-2-problem-statement">2.
Problem Statement</a></li>
<li><a href="#3-product-vision-and-positioning"
id="toc-3-product-vision-and-positioning">3. Product Vision and
Positioning</a></li>
<li><a href="#4-competitive-landscape"
id="toc-4-competitive-landscape">4. Competitive Landscape</a></li>
<li><a href="#5-target-users-and-personas"
id="toc-5-target-users-and-personas">5. Target Users and
Personas</a></li>
<li><a href="#6-scope" id="toc-6-scope">6. Scope</a></li>
<li><a href="#7-functional-requirements"
id="toc-7-functional-requirements">7. Functional Requirements</a></li>
<li><a href="#8-system-architecture" id="toc-8-system-architecture">8.
System Architecture</a></li>
<li><a href="#9-worker-adapter-layer" id="toc-9-worker-adapter-layer">9.
Worker Adapter Layer</a></li>
<li><a href="#10-delivery-pipeline" id="toc-10-delivery-pipeline">10.
Delivery Pipeline</a></li>
<li><a href="#11-validation-gates-domain-intelligence"
id="toc-11-validation-gates-domain-intelligence">11. Validation Gates
(Domain Intelligence)</a></li>
<li><a href="#12-cli-specification" id="toc-12-cli-specification">12.
CLI Specification</a></li>
<li><a href="#13-integrations" id="toc-13-integrations">13.
Integrations</a></li>
<li><a href="#14-non-functional-requirements"
id="toc-14-non-functional-requirements">14. Non-Functional
Requirements</a></li>
<li><a href="#15-metrics-and-success-criteria"
id="toc-15-metrics-and-success-criteria">15. Metrics and Success
Criteria</a></li>
<li><a href="#16-risks-and-mitigations"
id="toc-16-risks-and-mitigations">16. Risks and Mitigations</a></li>
<li><a href="#17-roadmap" id="toc-17-roadmap">17. Roadmap</a></li>
<li><a href="#18-open-questions" id="toc-18-open-questions">18. Open
Questions</a></li>
<li><a href="#19-research-appendix" id="toc-19-research-appendix">19.
Research Appendix</a></li>
<li><a
href="#20-product-direction-addendum-grok-bot-xai-integration-cross-platform-control-app"
id="toc-20-product-direction-addendum-grok-bot-xai-integration-cross-platform-control-app">20.
Product Direction Addendum: Grok Bot, xAI Integration, Cross-Platform
Control App</a></li>
<li><a href="#21-product-direction-addendum-simplicity-first-fr-simple"
id="toc-21-product-direction-addendum-simplicity-first-fr-simple">21.
Product Direction Addendum: Simplicity First (FR-SIMPLE)</a></li>
</ul></li>
</ul>
</nav>
<h1 id="devagent--product-requirements-document">DevAgent — Product
Requirements Document</h1>
<blockquote>
<p>The Autonomous Backend Delivery Agent for modern engineering
teams.</p>
<p>Status: Draft v0.1 · 2026-08-22 · Owner: linh.doan</p>
</blockquote>
<hr />
<h2 id="table-of-contents">Table of Contents</h2>
<ol type="1">
<li><a href="#1-executive-summary">Executive Summary</a></li>
<li><a href="#2-problem-statement">Problem Statement</a></li>
<li><a href="#3-product-vision-and-positioning">Product Vision and
Positioning</a></li>
<li><a href="#4-competitive-landscape">Competitive Landscape</a></li>
<li><a href="#5-target-users-and-personas">Target Users and
Personas</a></li>
<li><a href="#6-scope">Scope</a></li>
<li><a href="#7-functional-requirements">Functional
Requirements</a></li>
<li><a href="#8-system-architecture">System Architecture</a></li>
<li><a href="#9-worker-adapter-layer">Worker Adapter Layer</a></li>
<li><a href="#10-delivery-pipeline">Delivery Pipeline</a></li>
<li><a href="#11-validation-gates-domain-intelligence">Validation Gates
(Domain Intelligence)</a></li>
<li><a href="#12-cli-specification">CLI Specification</a></li>
<li><a href="#13-integrations">Integrations</a></li>
<li><a href="#14-non-functional-requirements">Non-Functional
Requirements</a></li>
<li><a href="#15-metrics-and-success-criteria">Metrics and Success
Criteria</a></li>
<li><a href="#16-risks-and-mitigations">Risks and Mitigations</a></li>
<li><a href="#17-roadmap">Roadmap</a></li>
<li><a href="#18-open-questions">Open Questions</a></li>
<li><a href="#19-research-appendix">Research Appendix</a></li>
<li><a
href="#20-product-direction-addendum-grok-bot-xai-integration-cross-platform-control-app">Product
Direction Addendum: Grok Bot, xAI Integration, Cross-Platform Control
App</a></li>
<li><a
href="#21-product-direction-addendum-simplicity-first-fr-simple">Product
Direction Addendum: Simplicity First (FR-SIMPLE)</a></li>
</ol>
<hr />
<h2 id="1-executive-summary">1. Executive Summary</h2>
<p>DevAgent is a vertical autonomous agent that converts backend tickets
into tested, reviewed Pull Requests with minimal human involvement. A
user assigns a ticket to <code>@devagent</code> in Linear or Jira;
DevAgent parses the spec, plans the work, drafts database migrations and
API code using headless coding-agent CLIs (Claude Code, OpenCode) as
execution workers, validates the result in sandboxed Docker containers,
and opens a Pull Request with auto-generated documentation for frontend
teams.</p>
<p>DevAgent is <strong>not</strong> a general-purpose coding tool. It is
a delivery pipeline product: the value is in the closed loop (ticket →
plan → code → validate → PR) and in backend-specific domain intelligence
that general coding agents lack — migration safety validation,
foreign-key integrity checks, and async/race-condition review.</p>
<h2 id="2-problem-statement">2. Problem Statement</h2>
<p>Backend ticket delivery has three chronic failure modes:</p>
<ol type="1">
<li><strong>Latency</strong>: small-to-medium backend tickets (new
endpoint, schema tweak, queue consumer) wait days in backlog even though
they are well-specified.</li>
<li><strong>Correctness risk from automation</strong>: general AI coders
break database integrity — destructive migrations, missing foreign-key
constraints, lock-timeout-inducing index builds on large tables — and
ignore async race conditions because they never execute what they write
against real data.</li>
<li><strong>Review burden</strong>: PRs from AI tools often "look right"
but are unverified, shifting cost onto human reviewers who must mentally
simulate behavior.</li>
</ol>
<p>DevAgent addresses all three by owning delivery end to end and
refusing to submit anything it has not proven green in an isolated
environment.</p>
<h2 id="3-product-vision-and-positioning">3. Product Vision and
Positioning</h2>
<h3 id="31-positioning-statement">3.1 Positioning statement</h3>
<table>
<thead>
<tr>
<th>Dimension</th>
<th>General coding tool (Cursor, Copilot IDE)</th>
<th>DevAgent</th>
</tr>
</thead>
<tbody>
<tr>
<td>User role</td>
<td>Human writes code, AI assists</td>
<td>Human assigns ticket, AI delivers PR</td>
</tr>
<tr>
<td>Input</td>
<td>Editor + human intent</td>
<td>Ticket ID from Linear/Jira/GitHub</td>
</tr>
<tr>
<td>Scope</td>
<td>Any code, any task</td>
<td>Backend only: migrations + API + tests</td>
</tr>
<tr>
<td>Output</td>
<td>Suggestions in editor</td>
<td>Green, tested Pull Request</td>
</tr>
<tr>
<td>Trust model</td>
<td>Human verifies every keystroke</td>
<td>Closed-loop validation before human review</td>
</tr>
</tbody>
</table>
<h3 id="32-key-differentiators">3.2 Key differentiators</h3>
<ol type="1">
<li><strong>Set-and-forget backend ops</strong> — DevAgent behaves as a
virtual team member, not an IDE extension.</li>
<li><strong>Specialized domain intelligence</strong> — explicit
validation of migration scripts, foreign-key safety, and
event-queue/async logic; the failure modes generic agents miss.</li>
<li><strong>Closed-loop testing</strong> — nothing is submitted until it
passes inside a sandboxed container against real migrations.</li>
<li><strong>Multi-worker fan-out</strong> — the same ticket can run
through multiple coding-agent CLIs in parallel isolated worktrees;
DevAgent cross-checks both diffs and delivers the winner.</li>
</ol>
<h3 id="33-what-devagent-is-not">3.3 What DevAgent is not</h3>
<ul>
<li>Not a model provider — it orchestrates existing agent CLIs.</li>
<li>Not an IDE plugin or pair-programmer.</li>
<li>Not autonomous infrastructure ops (no deployments to
production).</li>
</ul>
<h2 id="4-competitive-landscape">4. Competitive Landscape</h2>
<h3 id="41-overview">4.1 Overview</h3>
<table>
<thead>
<tr>
<th>Product</th>
<th>Trigger</th>
<th>Testing/validation depth</th>
<th>Pricing model</th>
</tr>
</thead>
<tbody>
<tr>
<td>Devin (Cognition)</td>
<td>Slack, Linear/Jira, GitHub, API, web</td>
<td>Repo tests in own VM; no structured verification; retry loops burn
credits</td>
<td>$0/$20/$200 per-user + pay-as-you-go ACUs (~$2.25 / 15 active
min)</td>
</tr>
<tr>
<td>GitHub Copilot coding agent</td>
<td>Issue assignment, @copilot comment</td>
<td>Reuses repo CI on ephemeral Actions runners; iterates on CI
failures; human review mandatory</td>
<td>Bundled in Copilot Pro/Business/Enterprise seats</td>
</tr>
<tr>
<td>OpenHands (All Hands AI)</td>
<td>Issue assignment, manual/API</td>
<td>Whatever tests exist in repo/Docker runtime — fully
user-supplied</td>
<td>OSS free + API costs; Cloud ~$20/mo + tokens</td>
</tr>
<tr>
<td>Factory Droid</td>
<td>CLI, Slack, PR comments, tickets, webhooks</td>
<td>Repo tests + audit/compliance controls, no domain checks</td>
<td>Pro ~$20 / Plus ~$100 / Max ~$200 per-user; quota risk below
Enterprise</td>
</tr>
<tr>
<td>Google Jules</td>
<td>Task assignment; plan-approval gate</td>
<td>Plan preview + diff review; tests only if configured in VM</td>
<td>Free 15 tasks/day; paid via Google AI Pro/Ultra tiers</td>
</tr>
<tr>
<td>OpenAI Codex cloud agent</td>
<td>ChatGPT sidebar, CLI/IDE/SDK, GitHub</td>
<td>Container test runs; no structured gates</td>
<td>Bundled in ChatGPT plans; credit-metered</td>
</tr>
<tr>
<td>Claude Code GitHub Actions</td>
<td>@claude mention, any GitHub event</td>
<td>Auto-fix on CI failures; validation = user's CI</td>
<td>Anthropic subscription/API usage</td>
</tr>
</tbody>
</table>
<h3 id="42-the-white-space-devagent-occupies">4.2 The white space
DevAgent occupies</h3>
<ol type="1">
<li><strong>Nobody validates database migrations.</strong> Every
competitor treats "tests pass" as the correctness ceiling. None offer
schema-diff analysis, migration dry-runs against a shadow database,
rollback verification, or destructive-change detection. This is the core
of DevAgent's differentiation.</li>
<li><strong>Validation is outsourced to the target repo's CI.</strong>
Copilot, Codex, Jules, Droid, and Claude Code Actions all inherit
whatever the repository already has. Under-tested backends get green-lit
unvalidated PRs.</li>
<li><strong>Backend correctness is implicit.</strong> No vendor ships
contract-level verification (API behavior vs spec, transactional
integrity, concurrency hazards) as a product feature.</li>
<li><strong>Cost opacity punishes exactly this workload.</strong> Devin
ACUs and Codex credits punish long-running backend work; DevAgent's
fixed-gate design gives predictable per-task cost.</li>
<li><strong>Ticket-driven autonomy exists but is shallow</strong> —
Devin and Droid already do ticket→PR, which validates the workflow;
their gap is verification depth, not trigger plumbing.</li>
</ol>
<p>Implication for positioning: compete on <em>trust per PR</em>
(validation evidence attached), not on raw generation capability.</p>
<p><em>(Full profiles with sources: <a
href="#192-competitive-profiles">appendix 19.2</a>.)</em></p>
<h2 id="5-target-users-and-personas">5. Target Users and Personas</h2>
<h3 id="p1--backend-engineer-mai-primary">P1 — Backend Engineer "Mai"
(primary)</h3>
<p>Mid-level backend developer on a 5–15 person team. Spends a large
share of each sprint on well-specified CRUD endpoints, schema
adjustments, and queue consumers. Wants those tickets gone without
context-switching cost; will review DevAgent PRs like any teammate's,
but expects tests and migration notes already in place.</p>
<p><strong>Success for Mai</strong>: assigns ticket before standup,
reviews a green PR after lunch.</p>
<h3 id="p2--tech-lead--em-duc-buyer">P2 — Tech Lead / EM "Duc"
(buyer)</h3>
<p>Owns delivery velocity and production stability. Cautious about
AI-generated code touching the database. Needs approval gates on
migrations, audit logs per run, and hard budget caps before rolling out
team-wide.</p>
<p><strong>Success for Duc</strong>: zero migration-caused incidents
attributable to DevAgent; measurable backlog burn-down.</p>
<h3 id="p3--frontend-engineer-khanh-beneficiary">P3 — Frontend Engineer
"Khanh" (beneficiary)</h3>
<p>Blocked on API contracts. Benefits from DevAgent's auto-generated PR
documentation: endpoint specs, request/response examples, and migration
notes attached to every PR.</p>
<h3 id="p4--platformdevops-tuan-operator">P4 — Platform/DevOps "Tuan"
(operator)</h3>
<p>Installs and operates DevAgent: manages credentials (Linear/GitHub
tokens), Docker sandbox capacity, CLI worker versions, and run budgets.
Never wants agent credentials with more scope than necessary.</p>
<h2 id="6-scope">6. Scope</h2>
<h3 id="61-in-scope-v1">6.1 In scope (v1)</h3>
<table>
<thead>
<tr>
<th>Area</th>
<th>Decision</th>
</tr>
</thead>
<tbody>
<tr>
<td>Issue tracker</td>
<td>Linear only (Jira, GitHub Issues in v2)</td>
</tr>
<tr>
<td>Target repositories</td>
<td>Backend services in one language ecosystem chosen at first
deployment (Go or TypeScript/Node)</td>
</tr>
<tr>
<td>Git host</td>
<td>GitHub via <code>gh</code> CLI (GitLab in v2)</td>
</tr>
<tr>
<td>Worker agents</td>
<td>Claude Code, OpenCode, omp CLIs — headless spawn is opt-in via
config (FR-IMPL-07); by default each tool opens like a normal
interactive session</td>
</tr>
<tr>
<td>Ticket types</td>
<td>New/modified REST endpoints, schema migrations, queue/event
consumers</td>
</tr>
<tr>
<td>Execution</td>
<td>Per-run git worktree + branch; validation inside Docker Compose</td>
</tr>
<tr>
<td>Human control</td>
<td><code>--interactive</code> approval gates; full headless
<code>--auto-pr</code> mode</td>
</tr>
</tbody>
</table>
<h3 id="62-out-of-scope-v1">6.2 Out of scope (v1)</h3>
<ul>
<li>Frontend/UI code generation</li>
<li>Deploying or promoting code to production environments</li>
<li>Non-backend languages (mobile, ML training code)</li>
<li>Real-time collaboration features, IDE integrations</li>
<li>Self-hosted model management (workers bring their own
auth/subscriptions)</li>
</ul>
<h2 id="7-functional-requirements">7. Functional Requirements</h2>
<p>Requirements use IDs <code>FR-<area>-NN</code>. Priority:
<strong>M</strong> = must-have for v1, <strong>S</strong> = should-have,
<strong>C</strong> = could-have.</p>
<h3 id="71-ticket-ingestion-area-ticket">7.1 Ticket ingestion (area:
TICKET)</h3>
<table>
<thead>
<tr>
<th>ID</th>
<th>Requirement</th>
<th>Pri</th>
</tr>
</thead>
<tbody>
<tr>
<td>FR-TICKET-01</td>
<td>Fetch a ticket by identifier from Linear via GraphQL API given a
configured API credential</td>
<td>M</td>
</tr>
<tr>
<td>FR-TICKET-02</td>
<td>Extract structured spec fields from the ticket: title, description,
acceptance criteria, labels, linked issues</td>
<td>M</td>
</tr>
<tr>
<td>FR-TICKET-03</td>
<td>Post status comments to the ticket at each pipeline stage transition
(started, implementing, validating, PR-opened, failed)</td>
<td>M</td>
</tr>
<tr>
<td>FR-TICKET-04</td>
<td>React to ticket assignment events (webhook) to trigger runs without
manual CLI invocation</td>
<td>S</td>
</tr>
<tr>
<td>FR-TICKET-05</td>
<td>Detect insufficient-specification tickets and refuse with a
clarifying question posted back to the ticket</td>
<td>M</td>
</tr>
</tbody>
</table>
<h3 id="72-planning-area-plan">7.2 Planning (area: PLAN)</h3>
<table>
<thead>
<tr>
<th>ID</th>
<th>Requirement</th>
<th>Pri</th>
</tr>
</thead>
<tbody>
<tr>
<td>FR-PLAN-01</td>
<td>Produce a written implementation plan (task list, files to touch,
migration outline) from the ticket spec before any code is written</td>
<td>M</td>
</tr>
<tr>
<td>FR-PLAN-02</td>
<td>Attach the plan to the ticket so humans can correct it before
implementation begins in interactive mode</td>
<td>M</td>
</tr>
<tr>
<td>FR-PLAN-03</td>
<td>Classify the ticket: endpoint-only / migration-required /
consumer-only; route to the appropriate validation gate set</td>
<td>M</td>
</tr>
</tbody>
</table>
<h3 id="73-implementation-area-impl">7.3 Implementation (area:
IMPL)</h3>
<table>
<thead>
<tr>
<th>ID</th>
<th>Requirement</th>
<th>Pri</th>
</tr>
</thead>
<tbody>
<tr>
<td>FR-IMPL-01</td>
<td>Execute implementation by spawning a worker agent inside an isolated
git worktree and dedicated branch
(<code>devagent/<ticket-id></code>); headless spawn is
config-controlled per FR-IMPL-07</td>
<td>M</td>
</tr>
<tr>
<td>FR-IMPL-02</td>
<td>Support two interchangeable workers: Claude Code
(<code>claude -p</code>) and OpenCode (<code>opencode run</code>);
selection via flag or config</td>
<td>M</td>
</tr>
<tr>
<td>FR-IMPL-03</td>
<td>Fan-out mode: run the same plan through both workers in parallel
worktrees and select one diff (or merged diff) after validation
scoring</td>
<td>S</td>
</tr>
<tr>
<td>FR-IMPL-04</td>
<td>Feed failing test output back to the worker and retry, up to a
configurable maximum loop count (default 3)</td>
<td>M</td>
</tr>
<tr>
<td>FR-IMPL-05</td>
<td>Enforce per-run budget: maximum wall-clock time and maximum worker
steps/tokens; abort cleanly on breach</td>
<td>M</td>
</tr>
<tr>
<td>FR-IMPL-06</td>
<td>Fall back from one worker to the other when the primary errors or
times out mid-run</td>
<td>S</td>
</tr>
<tr>
<td>FR-IMPL-07</td>
<td>Make headless worker execution opt-in: workers (omp, Claude Code,
OpenCode, and future adapters) run headlessly only when config turns it
on (<code>spawn.visibility: "headless"</code>, §20.8 FR-VIS-04); the
default opens each coding tool like a normal interactive session the
operator can watch and steer</td>
<td>M</td>
</tr>
</tbody>
</table>
<h3 id="74-validation-gates-area-valid">7.4 Validation gates (area:
VALID)</h3>
<table>
<thead>
<tr>
<th>ID</th>
<th>Requirement</th>
<th>Pri</th>
</tr>
</thead>
<tbody>
<tr>
<td>FR-VALID-01</td>
<td>Bring up the target service's Docker Compose stack (or equivalent
sandbox definition) inside the run's workspace and execute the test
suite; capture structured results</td>
<td>M</td>
</tr>
<tr>
<td>FR-VALID-02</td>
<td>Apply migrations against a throwaway database snapshot seeded with
representative data; verify up-migration success, down-migration
success, and application boot against the migrated schema</td>
<td>M</td>
</tr>
<tr>
<td>FR-VALID-03</td>
<td>Static migration analysis: detect destructive operations (DROP
COLUMN/TABLE, type narrowing), non-concurrent index creation, missing FK
indexes, and lock-risk patterns; block PR on critical findings</td>
<td>M</td>
</tr>
<tr>
<td>FR-VALID-04</td>
<td>Data-loss heuristic: compare row counts/table shapes before and
after migration on the snapshot; flag any shrinkage</td>
<td>S</td>
</tr>
<tr>
<td>FR-VALID-05</td>
<td>Async/race-condition review pass: a dedicated audit of the diff
targeting concurrency hazards (unawaited promises, shared mutable state,
queue handler idempotency); findings attached to PR as review
comments</td>
<td>S</td>
</tr>
<tr>
<td>FR-VALID-06</td>
<td>Refuse to open a PR while any critical validation gate fails; post
the failure report to the ticket instead</td>
<td>M</td>
</tr>
</tbody>
</table>
<h3 id="75-delivery-area-deliver">7.5 Delivery (area: DELIVER)</h3>
<table>
<thead>
<tr>
<th>ID</th>
<th>Requirement</th>
<th>Pri</th>
</tr>
</thead>
<tbody>
<tr>
<td>FR-DELIVER-01</td>
<td>Open a Pull Request containing: summary, test evidence (suite output
digest), migration notes, and API contract documentation generated from
the diff</td>
<td>M</td>
</tr>
<tr>
<td>FR-DELIVER-02</td>
<td>Generate frontend-facing API docs (endpoint list, request/response
schema examples) from changed route/handler code and attach to the PR
description</td>
<td>S</td>
</tr>
<tr>
<td>FR-DELIVER-03</td>
<td>Link PR back to the originating ticket and close the loop (Linear
state transition) when PR merges</td>
<td>S</td>
</tr>
<tr>
<td>FR-DELIVER-04</td>
<td>In interactive mode, pause before migration application and before
PR creation for explicit human approval</td>
<td>M</td>
</tr>
</tbody>
</table>
<h3 id="76-operations-area-ops">7.6 Operations (area: OPS)</h3>
<table>
<thead>
<tr>
<th>ID</th>
<th>Requirement</th>
<th>Pri</th>
</tr>
</thead>
<tbody>
<tr>
<td>FR-OPS-01</td>
<td>Write a structured run log per execution (stage timeline, worker
commands, outputs, decisions) queryable for debugging</td>
<td>M</td>
</tr>
<tr>
<td>FR-OPS-02</td>
<td>All credentials supplied exclusively via environment variables;
never stored in config files or logs</td>
<td>M</td>
</tr>
<tr>
<td>FR-OPS-03</td>
<td>Pin worker CLI versions in configuration; warn when installed
versions drift</td>
<td>S</td>
</tr>
<tr>
<td>FR-OPS-04</td>
<td>Dry-run mode that executes planning and prints what would happen
without spawning workers or touching remotes</td>
<td>M</td>
</tr>
</tbody>
</table>
<h3 id="77-context-area-ctx">7.7 Context (area: CTX)</h3>
<p>Optional, budget-bounded structural context assembled at the same
<code>COMPACT_CONTEXT_MARKER</code> as the lessons and childTrails
digests so G0/G5 read identical content. Two layers: (1) an always-on
<strong>local markdown baseline</strong>
(<code>.devagent/context/*.md</code>, commitable, zero dependencies — no