@sushanglewis/lincoln 1.6.3 → 1.7.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.
- package/framework/.claude/agents/pm.md +2 -2
- package/framework/.claude/agents/security-reviewer.md +57 -0
- package/framework/.claude/harnesses/codex.yaml +31 -2
- package/framework/.claude/harnesses/command-map.yaml +4 -0
- package/framework/.claude/harnesses/opencode.yaml +33 -3
- package/framework/.claude/hooks/hooks.yaml +37 -0
- package/framework/.claude/hooks/on-session-start.sh +20 -5
- package/framework/.claude/hooks/on-stop.sh +22 -0
- package/framework/.claude/hooks/pre-tool-use.sh +22 -0
- package/framework/.claude/mcp/mcp.yaml +34 -0
- package/framework/.claude/policies/friction.yaml +18 -0
- package/framework/.claude/policies/security.yaml +46 -0
- package/framework/.claude/schemas/design-review-feedback.json +32 -0
- package/framework/.claude/schemas/stage-definition.schema.json +22 -0
- package/framework/.claude/skills/clarify-requirements/SKILL.md +1 -0
- package/framework/.claude/skills/clarify-requirements/prompts/main.md +44 -10
- package/framework/.claude/stages/clarify.yaml +3 -1
- package/framework/.claude/stages/phase-1-p0-design.yaml +44 -0
- package/framework/.claude/stages/phase-1-p0-implement.yaml +47 -0
- package/framework/.claude/stages/phase-2-p1-design.yaml +53 -0
- package/framework/.claude/stages/phase-2-p1-implement.yaml +45 -0
- package/framework/.claude/workflows/framework-self-improvement.yaml +100 -0
- package/framework/.claude/workflows/interview-to-knowledge.yaml +1 -0
- package/framework/.claude-plugin/marketplace.json +2 -2
- package/framework/.claude-plugin/plugin.json +1 -1
- package/framework/.version-bump.json +1 -1
- package/framework/README.en.md +24 -5
- package/framework/README.md +24 -5
- package/framework/RELEASE.md +22 -0
- package/framework/SKILL.md +15 -6
- package/framework/manifest.json +93 -37
- package/framework/scripts/check-harness-drift.sh +11 -1
- package/framework/scripts/lincoln-setup.py +17 -0
- package/framework/scripts/lincoln_condenser.py +110 -0
- package/framework/scripts/lincoln_friction.py +266 -0
- package/framework/scripts/lincoln_harness_adapter.py +185 -13
- package/framework/scripts/lincoln_mr_mine.py +146 -0
- package/framework/scripts/lincoln_recall.py +142 -0
- package/framework/scripts/lincoln_trace.py +119 -3
- package/framework/scripts/security_analyzer.py +234 -0
- package/framework/scripts/stage_loader.py +124 -1
- package/framework/tools/lincoln/package-lock.json +2 -2
- package/framework/tools/lincoln/package.json +1 -1
- package/framework/tools/lincoln-installer/package.json +6 -1
- package/package.json +6 -1
package/framework/manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.
|
|
3
|
-
"generatedAt": "2026-
|
|
2
|
+
"version": "1.7.0",
|
|
3
|
+
"generatedAt": "2026-09-07T14:48:46.564Z",
|
|
4
4
|
"files": [
|
|
5
5
|
{
|
|
6
6
|
"path": ".claude-plugin/hooks.json",
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
10
|
"path": ".claude-plugin/marketplace.json",
|
|
11
|
-
"sha256": "
|
|
11
|
+
"sha256": "5dc4fba17ae11c15bcfe85a416f2f723233cb6ccb02a6a6281476eede2aace54"
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
"path": ".claude-plugin/plugin.json",
|
|
15
|
-
"sha256": "
|
|
15
|
+
"sha256": "3db704b95c999bf6fcc48498e18b336e297aa2c047d9a37bebfe54d4d515412d"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"path": ".claude/agents/architect.md",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
58
|
"path": ".claude/agents/pm.md",
|
|
59
|
-
"sha256": "
|
|
59
|
+
"sha256": "75e9481a9bb0b87fd051416f1680f748ddd62e61209c29697acb589fbbb11fa1"
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
"path": ".claude/agents/qa.md",
|
|
@@ -70,37 +70,45 @@
|
|
|
70
70
|
"path": ".claude/agents/researcher.md",
|
|
71
71
|
"sha256": "11a9f3b232c84a4d5d13b42a2ade3beaafe04b708a53836b54226b49e79a9eaa"
|
|
72
72
|
},
|
|
73
|
+
{
|
|
74
|
+
"path": ".claude/agents/security-reviewer.md",
|
|
75
|
+
"sha256": "7bd26aa4ef4ce4a49d81b339799ac9028a29bcdb661d220ac0967b38b307c7d3"
|
|
76
|
+
},
|
|
73
77
|
{
|
|
74
78
|
"path": ".claude/harnesses/claude-code.yaml",
|
|
75
79
|
"sha256": "4822f694dfe0a8e0edbb3dc552e5799f62e75ec104bc54bd7aea457445ef9516"
|
|
76
80
|
},
|
|
77
81
|
{
|
|
78
82
|
"path": ".claude/harnesses/codex.yaml",
|
|
79
|
-
"sha256": "
|
|
83
|
+
"sha256": "e62313a312ad0684235b9d392d8160784f266419a40848cbf608f8250d2ea7d3"
|
|
80
84
|
},
|
|
81
85
|
{
|
|
82
86
|
"path": ".claude/harnesses/command-map.yaml",
|
|
83
|
-
"sha256": "
|
|
87
|
+
"sha256": "f9f0ec19138399f98fb0064c0abf7490e7c0d1f1b933cef76468281c18cc4837"
|
|
84
88
|
},
|
|
85
89
|
{
|
|
86
90
|
"path": ".claude/harnesses/opencode.yaml",
|
|
87
|
-
"sha256": "
|
|
91
|
+
"sha256": "c6c87806ca5a650fbb4163823e13c7a19342275814c2d675070fb7bbc1271edf"
|
|
88
92
|
},
|
|
89
93
|
{
|
|
90
94
|
"path": ".claude/harnesses/scenarios.yaml",
|
|
91
95
|
"sha256": "5964474167e47385bab0d821c62b147e3d574ab4acd99b0d45ae1bfb2dd82abf"
|
|
92
96
|
},
|
|
97
|
+
{
|
|
98
|
+
"path": ".claude/hooks/hooks.yaml",
|
|
99
|
+
"sha256": "9905d44731e901651ea13c5a5ada9be6f9d72ddce07701d11773f13662bc68bb"
|
|
100
|
+
},
|
|
93
101
|
{
|
|
94
102
|
"path": ".claude/hooks/on-pr-event.sh",
|
|
95
103
|
"sha256": "6fa72efc0e1d15e03b446ce57afbfacdc93e69ca480ba723f14aeb449a14c6d6"
|
|
96
104
|
},
|
|
97
105
|
{
|
|
98
106
|
"path": ".claude/hooks/on-session-start.sh",
|
|
99
|
-
"sha256": "
|
|
107
|
+
"sha256": "f92b3314fb391a25a69cf077e244e1e35c7b4cd6e2abd1f0f3671de85f8ac69d"
|
|
100
108
|
},
|
|
101
109
|
{
|
|
102
110
|
"path": ".claude/hooks/on-stop.sh",
|
|
103
|
-
"sha256": "
|
|
111
|
+
"sha256": "0e22d235ec64474136106610fef631fbe316117bd5e3ee642a8cce7c1afa1224"
|
|
104
112
|
},
|
|
105
113
|
{
|
|
106
114
|
"path": ".claude/hooks/post-tool-use.sh",
|
|
@@ -108,7 +116,19 @@
|
|
|
108
116
|
},
|
|
109
117
|
{
|
|
110
118
|
"path": ".claude/hooks/pre-tool-use.sh",
|
|
111
|
-
"sha256": "
|
|
119
|
+
"sha256": "51b29d7213486e9c7c24caebed34c82bbaee60c8a47a99537bf595a98519aa64"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"path": ".claude/mcp/mcp.yaml",
|
|
123
|
+
"sha256": "cabc65ab04e63bbff50d1afaa78f659f9208f40e4b8406ad4e648e87593d7f66"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"path": ".claude/policies/friction.yaml",
|
|
127
|
+
"sha256": "146af77dbfcdbe4c56aef082f770c8169d91b7574f78189326d965457403d6e8"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"path": ".claude/policies/security.yaml",
|
|
131
|
+
"sha256": "bd71fd2dd313e033d9248a0697f2b70cc5c6787b39cddb331c39c17f7fdc31cf"
|
|
112
132
|
},
|
|
113
133
|
{
|
|
114
134
|
"path": ".claude/schemas/agent-definition.schema.json",
|
|
@@ -118,13 +138,17 @@
|
|
|
118
138
|
"path": ".claude/schemas/benchmark-report.schema.json",
|
|
119
139
|
"sha256": "20f841c9df884d75ad98342091cecc21c6f595f1f888c1ecf6e81f6c928ff8a0"
|
|
120
140
|
},
|
|
141
|
+
{
|
|
142
|
+
"path": ".claude/schemas/design-review-feedback.json",
|
|
143
|
+
"sha256": "9cc405a54567e75ad7044ba92e26a83dda7b8e50248a6d519f6341115f55fe85"
|
|
144
|
+
},
|
|
121
145
|
{
|
|
122
146
|
"path": ".claude/schemas/pm-to-ux-handoff.schema.yaml",
|
|
123
147
|
"sha256": "e721e86b5112ed5674267ba6a1fa2734c5bd5512a625dc7c7e7a5b9a545ec02e"
|
|
124
148
|
},
|
|
125
149
|
{
|
|
126
150
|
"path": ".claude/schemas/stage-definition.schema.json",
|
|
127
|
-
"sha256": "
|
|
151
|
+
"sha256": "5746190d5de63f7481bc161d4c6a301a43b776886b99ffb0c099609bb5422a05"
|
|
128
152
|
},
|
|
129
153
|
{
|
|
130
154
|
"path": ".claude/schemas/workflow-stage.schema.json",
|
|
@@ -148,11 +172,11 @@
|
|
|
148
172
|
},
|
|
149
173
|
{
|
|
150
174
|
"path": ".claude/skills/clarify-requirements/SKILL.md",
|
|
151
|
-
"sha256": "
|
|
175
|
+
"sha256": "19810b312a6d4c4f6823936be1c66490b951fd4490a70aa4ac0962985f949bf1"
|
|
152
176
|
},
|
|
153
177
|
{
|
|
154
178
|
"path": ".claude/skills/clarify-requirements/prompts/main.md",
|
|
155
|
-
"sha256": "
|
|
179
|
+
"sha256": "57415b733f66c14529ff07754195bf0e28a7054b1f5917b69ef32bd63c3e9474"
|
|
156
180
|
},
|
|
157
181
|
{
|
|
158
182
|
"path": ".claude/skills/dependencies.yaml",
|
|
@@ -376,7 +400,7 @@
|
|
|
376
400
|
},
|
|
377
401
|
{
|
|
378
402
|
"path": ".claude/stages/clarify.yaml",
|
|
379
|
-
"sha256": "
|
|
403
|
+
"sha256": "14d3ddb85431fb1800fff8794a6c6aeec378cc8e88bf458f7b593409b8380b1c"
|
|
380
404
|
},
|
|
381
405
|
{
|
|
382
406
|
"path": ".claude/stages/explore-opensource.yaml",
|
|
@@ -430,6 +454,22 @@
|
|
|
430
454
|
"path": ".claude/stages/lc-storytelling.yaml",
|
|
431
455
|
"sha256": "3e7dd171db1074b322fb002e0882dd86f448450adb02f3ae6b084d531f9f9cc7"
|
|
432
456
|
},
|
|
457
|
+
{
|
|
458
|
+
"path": ".claude/stages/phase-1-p0-design.yaml",
|
|
459
|
+
"sha256": "bbb434e64906b50a72560ecfa2b5a59b1432a02d7a024ebdf08095de89a55b32"
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
"path": ".claude/stages/phase-1-p0-implement.yaml",
|
|
463
|
+
"sha256": "07dd7b0c5a222b2ec45dfefc77d82703af8b135d89d68e6e13ad22356a4e7e63"
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
"path": ".claude/stages/phase-2-p1-design.yaml",
|
|
467
|
+
"sha256": "f96912b27df806f9c211665fce4615b5c3b57076b3c21a95d9cac90326f0e6de"
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
"path": ".claude/stages/phase-2-p1-implement.yaml",
|
|
471
|
+
"sha256": "a92d46dbeea087997f25b7dbe758072d09d3dd3892f1173acafb3231f774379b"
|
|
472
|
+
},
|
|
433
473
|
{
|
|
434
474
|
"path": ".claude/stages/product-design-docs.yaml",
|
|
435
475
|
"sha256": "10d59c8d14e1f930c550ee7caa57eb636cfd162c040d406f980f173c17738e31"
|
|
@@ -478,9 +518,13 @@
|
|
|
478
518
|
"path": ".claude/workflows/existing-project-iteration.yaml",
|
|
479
519
|
"sha256": "027a27a493e1458549aaa66e2d8a139a86fe87d378f51b260f76a0ff7d159fea"
|
|
480
520
|
},
|
|
521
|
+
{
|
|
522
|
+
"path": ".claude/workflows/framework-self-improvement.yaml",
|
|
523
|
+
"sha256": "665fae12ff61e3283cc18bb08a565ffa90f11daeb3810f7fed2ebf024ef36063"
|
|
524
|
+
},
|
|
481
525
|
{
|
|
482
526
|
"path": ".claude/workflows/interview-to-knowledge.yaml",
|
|
483
|
-
"sha256": "
|
|
527
|
+
"sha256": "d0aeb1f6f6ef09d86bbcd16d3e2945edfcaa590824bb3118bb999196ad37ef0e"
|
|
484
528
|
},
|
|
485
529
|
{
|
|
486
530
|
"path": ".claude/workflows/oss-first-design.yaml",
|
|
@@ -492,7 +536,7 @@
|
|
|
492
536
|
},
|
|
493
537
|
{
|
|
494
538
|
"path": ".version-bump.json",
|
|
495
|
-
"sha256": "
|
|
539
|
+
"sha256": "a338d715d3c7d9cdee6740069fecc67bbda35f867b306dfe40b957eb99e8f100"
|
|
496
540
|
},
|
|
497
541
|
{
|
|
498
542
|
"path": "CLAUDE.md",
|
|
@@ -508,19 +552,19 @@
|
|
|
508
552
|
},
|
|
509
553
|
{
|
|
510
554
|
"path": "README.en.md",
|
|
511
|
-
"sha256": "
|
|
555
|
+
"sha256": "5edfd7c89ebbf3a79bb5dffb142fd678f84fc3a534359c1ca0d48e68cab9a2bb"
|
|
512
556
|
},
|
|
513
557
|
{
|
|
514
558
|
"path": "README.md",
|
|
515
|
-
"sha256": "
|
|
559
|
+
"sha256": "6271d86b4126d76177aefec1a8bb257d23f493505e7bffa04ca76266f2a92fe1"
|
|
516
560
|
},
|
|
517
561
|
{
|
|
518
562
|
"path": "RELEASE.md",
|
|
519
|
-
"sha256": "
|
|
563
|
+
"sha256": "ca6640f4611391065b799f253dfddad939ff734689270e54f2e86d7b7fd2e0b7"
|
|
520
564
|
},
|
|
521
565
|
{
|
|
522
566
|
"path": "SKILL.md",
|
|
523
|
-
"sha256": "
|
|
567
|
+
"sha256": "d005dc4a955fa334d5993403460cf00bf561a24be5c450fd0611f3301a8fdfc6"
|
|
524
568
|
},
|
|
525
569
|
{
|
|
526
570
|
"path": "USAGE.md",
|
|
@@ -548,7 +592,7 @@
|
|
|
548
592
|
},
|
|
549
593
|
{
|
|
550
594
|
"path": "scripts/check-harness-drift.sh",
|
|
551
|
-
"sha256": "
|
|
595
|
+
"sha256": "81f85c506e72a7a7b56e31c01cb15c0cdbffec1c0ccd3222b9bdad1d9385ba36"
|
|
552
596
|
},
|
|
553
597
|
{
|
|
554
598
|
"path": "scripts/check-main-merge-hygiene.py",
|
|
@@ -584,7 +628,7 @@
|
|
|
584
628
|
},
|
|
585
629
|
{
|
|
586
630
|
"path": "scripts/lincoln-setup.py",
|
|
587
|
-
"sha256": "
|
|
631
|
+
"sha256": "eb9705f2b2c6936e71d916b59d6bcd06fda638e94cb3f2a5718b7edbb2554ba4"
|
|
588
632
|
},
|
|
589
633
|
{
|
|
590
634
|
"path": "scripts/lincoln-status.py",
|
|
@@ -610,6 +654,10 @@
|
|
|
610
654
|
"path": "scripts/lincoln_command_map.py",
|
|
611
655
|
"sha256": "c15cdeb303cd1aaa00527296bf7bab5e7b1b786ca4d292ee3b018e475a5a16a4"
|
|
612
656
|
},
|
|
657
|
+
{
|
|
658
|
+
"path": "scripts/lincoln_condenser.py",
|
|
659
|
+
"sha256": "024a269863e6368de3879b31298421af22f5768d8be0e70f4c597b43382e1e28"
|
|
660
|
+
},
|
|
613
661
|
{
|
|
614
662
|
"path": "scripts/lincoln_dependency_manager.py",
|
|
615
663
|
"sha256": "0b3ec944a2eb6c5f6e9c9dc975d4a6c297696f66b3291b3c73598611e50fc83e"
|
|
@@ -618,9 +666,13 @@
|
|
|
618
666
|
"path": "scripts/lincoln_documents.py",
|
|
619
667
|
"sha256": "0b0db078625daeff96423bca98b981464f5ecf68bf2ecce2370b1e8133daf968"
|
|
620
668
|
},
|
|
669
|
+
{
|
|
670
|
+
"path": "scripts/lincoln_friction.py",
|
|
671
|
+
"sha256": "9ee0ec5218358f61dcd0bf9e0b7eb9525070d99c2fc5a979764927d6aea381d5"
|
|
672
|
+
},
|
|
621
673
|
{
|
|
622
674
|
"path": "scripts/lincoln_harness_adapter.py",
|
|
623
|
-
"sha256": "
|
|
675
|
+
"sha256": "a3a1453264f3fa4cc2aa97441ea29e1f411dcb10034715e534d40caaef0e7db7"
|
|
624
676
|
},
|
|
625
677
|
{
|
|
626
678
|
"path": "scripts/lincoln_id.py",
|
|
@@ -630,6 +682,10 @@
|
|
|
630
682
|
"path": "scripts/lincoln_index.py",
|
|
631
683
|
"sha256": "5119c6f5211f5facfb9f66f61b07728a2b30c3b7596f2db3e5de8a97fb5ec84d"
|
|
632
684
|
},
|
|
685
|
+
{
|
|
686
|
+
"path": "scripts/lincoln_mr_mine.py",
|
|
687
|
+
"sha256": "240d36d736e2391f88be571a9fad44c43c19038c66f946959b7d2a8a185c6b5a"
|
|
688
|
+
},
|
|
633
689
|
{
|
|
634
690
|
"path": "scripts/lincoln_paths.py",
|
|
635
691
|
"sha256": "fe410358bd897be9a8f3c843f52c8f397736a0a7c681f887481ea9eeee8cc99c"
|
|
@@ -638,6 +694,10 @@
|
|
|
638
694
|
"path": "scripts/lincoln_prd.py",
|
|
639
695
|
"sha256": "6b9f1fe120ac1d4b07c4f3aeea18ac49c1f46a56da6b6541ca82ce8a15f80b47"
|
|
640
696
|
},
|
|
697
|
+
{
|
|
698
|
+
"path": "scripts/lincoln_recall.py",
|
|
699
|
+
"sha256": "af8c81522d5352923ae88bc710cddb15a63742d9a654fdc958d9c14e60fe4532"
|
|
700
|
+
},
|
|
641
701
|
{
|
|
642
702
|
"path": "scripts/lincoln_render.py",
|
|
643
703
|
"sha256": "0750b3cdcd77a0679e4dda626eebc0ab2bea90072d844e7979ac1c1365fa0800"
|
|
@@ -660,7 +720,7 @@
|
|
|
660
720
|
},
|
|
661
721
|
{
|
|
662
722
|
"path": "scripts/lincoln_trace.py",
|
|
663
|
-
"sha256": "
|
|
723
|
+
"sha256": "2bd5a87c4c5895b00e578fa15c8e408e285c0cd2024c7c718bd637952dd54b42"
|
|
664
724
|
},
|
|
665
725
|
{
|
|
666
726
|
"path": "scripts/lincoln_workflow.py",
|
|
@@ -678,9 +738,13 @@
|
|
|
678
738
|
"path": "scripts/run-infrastructure-tests.py",
|
|
679
739
|
"sha256": "d2140224c7b07ae06d329f3e857733297a590878f67e4fe7f6b9d2d3db6e9375"
|
|
680
740
|
},
|
|
741
|
+
{
|
|
742
|
+
"path": "scripts/security_analyzer.py",
|
|
743
|
+
"sha256": "b09e1ee3c543063cdbf1876ffca43c91d9c45a3a485550c919d87f2596ea47fa"
|
|
744
|
+
},
|
|
681
745
|
{
|
|
682
746
|
"path": "scripts/stage_loader.py",
|
|
683
|
-
"sha256": "
|
|
747
|
+
"sha256": "d089f2238b3a2c23d950f4c255e60070ef6c3c0eca6ed46de7f94fd19fa130c5"
|
|
684
748
|
},
|
|
685
749
|
{
|
|
686
750
|
"path": "scripts/static-check.sh",
|
|
@@ -720,7 +784,7 @@
|
|
|
720
784
|
},
|
|
721
785
|
{
|
|
722
786
|
"path": "tools/lincoln-installer/package.json",
|
|
723
|
-
"sha256": "
|
|
787
|
+
"sha256": "a9cec32af90103609521e37484a847d14ebd2b2d096062349a398b4b9a84bc11"
|
|
724
788
|
},
|
|
725
789
|
{
|
|
726
790
|
"path": "tools/lincoln-installer/src/cli.tsx",
|
|
@@ -1002,21 +1066,13 @@
|
|
|
1002
1066
|
"path": "tools/lincoln/README.md",
|
|
1003
1067
|
"sha256": "08e007598a46902ad4205f580b9af7a47973bab5d2bc543d0d39fe84d94baf04"
|
|
1004
1068
|
},
|
|
1005
|
-
{
|
|
1006
|
-
"path": "tools/lincoln/dist/main.js",
|
|
1007
|
-
"sha256": "27be36130341edba0c37782ab41d31331b5d9894454d2c7f45efe23d37e01fb5"
|
|
1008
|
-
},
|
|
1009
|
-
{
|
|
1010
|
-
"path": "tools/lincoln/dist/main.js.map",
|
|
1011
|
-
"sha256": "db7ba1724affeb15db717442d92e1e0ee5525a2423f57d7b69840ce6aaad78cd"
|
|
1012
|
-
},
|
|
1013
1069
|
{
|
|
1014
1070
|
"path": "tools/lincoln/package-lock.json",
|
|
1015
|
-
"sha256": "
|
|
1071
|
+
"sha256": "39391a584993f28f83082ed36f141bd2f4b4807f54d6872421b21c6017917fc4"
|
|
1016
1072
|
},
|
|
1017
1073
|
{
|
|
1018
1074
|
"path": "tools/lincoln/package.json",
|
|
1019
|
-
"sha256": "
|
|
1075
|
+
"sha256": "a881553482f59d9c2767828cca1b2ad2b81c4efd987a3c86b14664ee4cf5b442"
|
|
1020
1076
|
},
|
|
1021
1077
|
{
|
|
1022
1078
|
"path": "tools/lincoln/src/cli.tsx",
|
|
@@ -20,7 +20,7 @@ TMP="$(mktemp -d)"
|
|
|
20
20
|
trap 'rm -rf "$TMP"' EXIT
|
|
21
21
|
mkdir -p "$TMP/project" "$TMP/home"
|
|
22
22
|
|
|
23
|
-
for HARNESS in codex opencode; do
|
|
23
|
+
for HARNESS in claude-code codex opencode; do
|
|
24
24
|
echo "==> Harness smoke generation: $HARNESS"
|
|
25
25
|
if ! "$PYTHON" scripts/lincoln_harness_adapter.py \
|
|
26
26
|
--harness "$HARNESS" --root "$ROOT" \
|
|
@@ -31,7 +31,17 @@ for HARNESS in codex opencode; do
|
|
|
31
31
|
fi
|
|
32
32
|
|
|
33
33
|
# Drift comparison only when artifacts were generated into the project.
|
|
34
|
+
# Claude Code uses .claude/ directly; its --check validates source files.
|
|
34
35
|
case "$HARNESS" in
|
|
36
|
+
claude-code)
|
|
37
|
+
echo "==> Source consistency check: $HARNESS"
|
|
38
|
+
if ! "$PYTHON" scripts/lincoln_harness_adapter.py \
|
|
39
|
+
--harness "$HARNESS" --root "$ROOT" \
|
|
40
|
+
--project-dir "$ROOT" --home-dir "$HOME" --check; then
|
|
41
|
+
FAIL=1
|
|
42
|
+
fi
|
|
43
|
+
continue
|
|
44
|
+
;;
|
|
35
45
|
opencode) MARKER="$ROOT/.opencode" ;;
|
|
36
46
|
codex)
|
|
37
47
|
if [ -e "$ROOT/.codex-plugin" ]; then
|
|
@@ -583,6 +583,20 @@ def _add_common_args(p: argparse.ArgumentParser) -> None:
|
|
|
583
583
|
)
|
|
584
584
|
|
|
585
585
|
|
|
586
|
+
|
|
587
|
+
def _load_dotenv(root: Path) -> None:
|
|
588
|
+
"""Load environment variables from project root .env if python-dotenv is available."""
|
|
589
|
+
env_file = root / ".env"
|
|
590
|
+
if not env_file.exists():
|
|
591
|
+
return
|
|
592
|
+
try:
|
|
593
|
+
from dotenv import load_dotenv
|
|
594
|
+
|
|
595
|
+
load_dotenv(dotenv_path=env_file, override=False, verbose=False)
|
|
596
|
+
except ImportError:
|
|
597
|
+
# python-dotenv is optional; callers can export vars manually.
|
|
598
|
+
pass
|
|
599
|
+
|
|
586
600
|
def main(args: list[str] | None = None) -> int:
|
|
587
601
|
parser = argparse.ArgumentParser(
|
|
588
602
|
prog="lc-setup",
|
|
@@ -632,6 +646,9 @@ def main(args: list[str] | None = None) -> int:
|
|
|
632
646
|
|
|
633
647
|
parsed = parser.parse_args(args)
|
|
634
648
|
|
|
649
|
+
# Make .env variables available to install commands and harness adapters.
|
|
650
|
+
_load_dotenv(Path(parsed.root).resolve())
|
|
651
|
+
|
|
635
652
|
handlers = {
|
|
636
653
|
"check": run_check,
|
|
637
654
|
"install-skills": run_install_skills,
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Lincoln trace condenser.
|
|
3
|
+
|
|
4
|
+
Summarizes a window of trace events when the count exceeds a threshold. The
|
|
5
|
+
summary is appended as a `condensation` event to the trace and returned to the
|
|
6
|
+
caller (stage_loader handoff-report) for inclusion in handoff frontmatter.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
import argparse
|
|
12
|
+
import json
|
|
13
|
+
import sys
|
|
14
|
+
from collections import Counter
|
|
15
|
+
from pathlib import Path
|
|
16
|
+
from typing import Any
|
|
17
|
+
|
|
18
|
+
_PROJECT_ROOT = Path(__file__).resolve().parents[1]
|
|
19
|
+
if str(_PROJECT_ROOT) not in sys.path:
|
|
20
|
+
sys.path.insert(0, str(_PROJECT_ROOT))
|
|
21
|
+
|
|
22
|
+
from scripts import lincoln_trace
|
|
23
|
+
|
|
24
|
+
DEFAULT_THRESHOLD = 200
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def load_events(trace_file: Path, max_events: int = 10000) -> list[dict[str, Any]]:
|
|
28
|
+
if not trace_file.exists():
|
|
29
|
+
return []
|
|
30
|
+
try:
|
|
31
|
+
with open(trace_file, "r", encoding="utf-8") as fh:
|
|
32
|
+
lines = fh.readlines()
|
|
33
|
+
return [json.loads(line) for line in lines[-max_events:] if line.strip()]
|
|
34
|
+
except Exception:
|
|
35
|
+
return []
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def summarize(events: list[dict[str, Any]]) -> dict[str, Any]:
|
|
39
|
+
categories = Counter(e.get("category", "other") for e in events)
|
|
40
|
+
tools = Counter(e.get("tool", "") for e in events if e.get("category") == "tool")
|
|
41
|
+
stages = Counter(e.get("stage", "unknown") for e in events)
|
|
42
|
+
failed = sum(1 for e in events if e.get("exit_code", 0) != 0)
|
|
43
|
+
blocked = sum(
|
|
44
|
+
1 for e in events if e.get("args_summary", {}).get("blocked") is True
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
return {
|
|
48
|
+
"event_count": len(events),
|
|
49
|
+
"categories": dict(categories.most_common(10)),
|
|
50
|
+
"top_tools": dict(tools.most_common(10)),
|
|
51
|
+
"stages": dict(stages.most_common(10)),
|
|
52
|
+
"failed_count": failed,
|
|
53
|
+
"blocked_count": blocked,
|
|
54
|
+
"first_timestamp": events[0].get("timestamp") if events else None,
|
|
55
|
+
"last_timestamp": events[-1].get("timestamp") if events else None,
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def condense(
|
|
60
|
+
trace_file: Path,
|
|
61
|
+
threshold: int = DEFAULT_THRESHOLD,
|
|
62
|
+
dry_run: bool = False,
|
|
63
|
+
) -> dict[str, Any] | None:
|
|
64
|
+
"""Condense trace events if threshold is exceeded.
|
|
65
|
+
|
|
66
|
+
Returns the condensation summary or None when below threshold.
|
|
67
|
+
"""
|
|
68
|
+
events = load_events(trace_file)
|
|
69
|
+
if len(events) < threshold:
|
|
70
|
+
return None
|
|
71
|
+
|
|
72
|
+
summary = summarize(events)
|
|
73
|
+
if not dry_run:
|
|
74
|
+
try:
|
|
75
|
+
lincoln_trace.append_event_to_file(
|
|
76
|
+
trace_file=trace_file,
|
|
77
|
+
category="condensation",
|
|
78
|
+
payload={
|
|
79
|
+
"event_type": "condensation",
|
|
80
|
+
"event_count": summary["event_count"],
|
|
81
|
+
"threshold": threshold,
|
|
82
|
+
"summary": summary,
|
|
83
|
+
},
|
|
84
|
+
run_id=events[-1].get("run_id") if events else None,
|
|
85
|
+
stage=events[-1].get("stage") if events else None,
|
|
86
|
+
node_id=events[-1].get("node_id") if events else None,
|
|
87
|
+
)
|
|
88
|
+
except Exception:
|
|
89
|
+
# Condensation must never block handoff report generation.
|
|
90
|
+
pass
|
|
91
|
+
return summary
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
def main(argv: list[str] | None = None) -> int:
|
|
95
|
+
parser = argparse.ArgumentParser(description="Condense Lincoln trace events")
|
|
96
|
+
parser.add_argument("--trace-file", type=Path, required=True)
|
|
97
|
+
parser.add_argument("--threshold", type=int, default=DEFAULT_THRESHOLD)
|
|
98
|
+
parser.add_argument("--dry-run", action="store_true", default=False)
|
|
99
|
+
args = parser.parse_args(argv)
|
|
100
|
+
|
|
101
|
+
result = condense(args.trace_file, threshold=args.threshold, dry_run=args.dry_run)
|
|
102
|
+
if result is None:
|
|
103
|
+
print(json.dumps({"condensed": False}, ensure_ascii=False))
|
|
104
|
+
else:
|
|
105
|
+
print(json.dumps({"condensed": True, "summary": result}, ensure_ascii=False, indent=2))
|
|
106
|
+
return 0
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
if __name__ == "__main__":
|
|
110
|
+
sys.exit(main())
|