@xn-intenton-z2a/agentic-lib 7.1.61 → 7.1.63
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/.github/workflows/agentic-lib-bot.yml +27 -3
- package/.github/workflows/agentic-lib-init.yml +4 -4
- package/.github/workflows/agentic-lib-schedule.yml +3 -3
- package/.github/workflows/agentic-lib-test.yml +12 -4
- package/.github/workflows/agentic-lib-workflow.yml +71 -23
- package/README.md +51 -8
- package/agentic-lib.toml +89 -17
- package/bin/agentic-lib.js +114 -7
- package/package.json +2 -1
- package/src/actions/agentic-step/action.yml +2 -2
- package/src/actions/agentic-step/config-loader.js +108 -55
- package/src/actions/agentic-step/copilot.js +175 -10
- package/src/actions/agentic-step/index.js +37 -2
- package/src/actions/agentic-step/logging.js +75 -0
- package/src/actions/agentic-step/tasks/discussions.js +17 -1
- package/src/actions/agentic-step/tasks/maintain-features.js +21 -1
- package/src/actions/agentic-step/tasks/maintain-library.js +7 -0
- package/src/actions/agentic-step/tasks/review-issue.js +6 -1
- package/src/actions/agentic-step/tasks/supervise.js +30 -4
- package/src/actions/agentic-step/tasks/transform.js +42 -6
- package/src/agents/agent-discussion-bot.md +13 -0
- package/src/agents/agent-issue-resolution.md +14 -0
- package/src/agents/agent-supervisor.md +3 -1
- package/src/agents/agentic-lib.yml +1 -3
- package/src/iterate.js +285 -0
- package/src/mcp/server.js +24 -127
- package/src/seeds/missions/c64-emulator.md +110 -0
- package/src/seeds/zero-README.md +2 -2
- package/src/seeds/zero-index.html +24 -0
- package/src/seeds/zero-package.json +5 -3
- package/src/seeds/zero-web.test.js +17 -0
|
@@ -90,11 +90,11 @@ jobs:
|
|
|
90
90
|
action: ${{ steps.respond.outputs.action }}
|
|
91
91
|
action-arg: ${{ steps.respond.outputs.action-arg }}
|
|
92
92
|
steps:
|
|
93
|
-
- uses: actions/checkout@
|
|
93
|
+
- uses: actions/checkout@v6
|
|
94
94
|
with:
|
|
95
95
|
fetch-depth: 0
|
|
96
96
|
|
|
97
|
-
- uses: actions/setup-node@
|
|
97
|
+
- uses: actions/setup-node@v6
|
|
98
98
|
with:
|
|
99
99
|
node-version: "24"
|
|
100
100
|
|
|
@@ -106,9 +106,32 @@ jobs:
|
|
|
106
106
|
working-directory: .github/agentic-lib/actions/agentic-step
|
|
107
107
|
run: npm ci
|
|
108
108
|
|
|
109
|
+
- name: Read test command from config
|
|
110
|
+
id: config
|
|
111
|
+
shell: bash
|
|
112
|
+
run: |
|
|
113
|
+
if [ -f agentic-lib.toml ]; then
|
|
114
|
+
TEST_CMD=$(grep '^\s*test\s*=' agentic-lib.toml | head -1 | sed 's/.*=\s*"\([^"]*\)".*/\1/')
|
|
115
|
+
fi
|
|
116
|
+
echo "test-command=${TEST_CMD:-npm ci && npm test}" >> $GITHUB_OUTPUT
|
|
117
|
+
|
|
118
|
+
- name: Run tests before responding
|
|
119
|
+
id: tests
|
|
120
|
+
shell: bash
|
|
121
|
+
run: |
|
|
122
|
+
set +e
|
|
123
|
+
${{ steps.config.outputs.test-command }}
|
|
124
|
+
EXIT_CODE=$?
|
|
125
|
+
set -e
|
|
126
|
+
if [ $EXIT_CODE -eq 0 ]; then
|
|
127
|
+
echo "result=pass" >> $GITHUB_OUTPUT
|
|
128
|
+
else
|
|
129
|
+
echo "result=fail" >> $GITHUB_OUTPUT
|
|
130
|
+
fi
|
|
131
|
+
|
|
109
132
|
- name: Get discussion URL
|
|
110
133
|
id: discussion-url
|
|
111
|
-
uses: actions/github-script@
|
|
134
|
+
uses: actions/github-script@v8
|
|
112
135
|
with:
|
|
113
136
|
script: |
|
|
114
137
|
let url = '${{ inputs.discussion-url }}' || '';
|
|
@@ -134,6 +157,7 @@ jobs:
|
|
|
134
157
|
env:
|
|
135
158
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
136
159
|
COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
|
|
160
|
+
TEST_RESULT: ${{ steps.tests.outputs.result }}
|
|
137
161
|
with:
|
|
138
162
|
task: "discussions"
|
|
139
163
|
config: ${{ env.configPath }}
|
|
@@ -141,15 +141,15 @@ jobs:
|
|
|
141
141
|
INIT_MISSION_SEED: ${{ needs.params.outputs.mission-seed }}
|
|
142
142
|
INIT_MISSION_TEXT: ${{ needs.params.outputs.mission-text }}
|
|
143
143
|
steps:
|
|
144
|
-
- uses: actions/checkout@
|
|
144
|
+
- uses: actions/checkout@v6
|
|
145
145
|
if: needs.params.outputs.dry-run == 'true'
|
|
146
|
-
- uses: actions/checkout@
|
|
146
|
+
- uses: actions/checkout@v6
|
|
147
147
|
if: needs.params.outputs.dry-run != 'true'
|
|
148
148
|
with:
|
|
149
149
|
ref: main
|
|
150
150
|
token: ${{ secrets.WORKFLOW_TOKEN }}
|
|
151
151
|
|
|
152
|
-
- uses: actions/setup-node@
|
|
152
|
+
- uses: actions/setup-node@v6
|
|
153
153
|
with:
|
|
154
154
|
node-version: "24"
|
|
155
155
|
|
|
@@ -204,7 +204,7 @@ jobs:
|
|
|
204
204
|
|
|
205
205
|
- name: Update schedule (if requested)
|
|
206
206
|
if: github.repository != 'xn-intenton-z2a/agentic-lib' && needs.params.outputs.schedule != '' && needs.params.outputs.dry-run != 'true'
|
|
207
|
-
uses: actions/github-script@
|
|
207
|
+
uses: actions/github-script@v8
|
|
208
208
|
with:
|
|
209
209
|
script: |
|
|
210
210
|
const fs = require('fs');
|
|
@@ -61,16 +61,16 @@ jobs:
|
|
|
61
61
|
update-schedule:
|
|
62
62
|
runs-on: ubuntu-latest
|
|
63
63
|
steps:
|
|
64
|
-
- uses: actions/checkout@
|
|
64
|
+
- uses: actions/checkout@v6
|
|
65
65
|
if: inputs.dry-run == 'true' || inputs.dry-run == true
|
|
66
|
-
- uses: actions/checkout@
|
|
66
|
+
- uses: actions/checkout@v6
|
|
67
67
|
if: inputs.dry-run != 'true' && inputs.dry-run != true
|
|
68
68
|
with:
|
|
69
69
|
ref: main
|
|
70
70
|
token: ${{ secrets.WORKFLOW_TOKEN }}
|
|
71
71
|
|
|
72
72
|
- name: Update workflow schedule and model
|
|
73
|
-
uses: actions/github-script@
|
|
73
|
+
uses: actions/github-script@v8
|
|
74
74
|
with:
|
|
75
75
|
script: |
|
|
76
76
|
const fs = require('fs');
|
|
@@ -23,17 +23,25 @@ jobs:
|
|
|
23
23
|
test:
|
|
24
24
|
runs-on: ubuntu-latest
|
|
25
25
|
steps:
|
|
26
|
-
- uses: actions/checkout@
|
|
26
|
+
- uses: actions/checkout@v6
|
|
27
27
|
|
|
28
|
-
- uses: actions/setup-node@
|
|
28
|
+
- uses: actions/setup-node@v6
|
|
29
29
|
with:
|
|
30
30
|
node-version: 24
|
|
31
31
|
cache: "npm"
|
|
32
32
|
|
|
33
|
-
-
|
|
33
|
+
- name: Read test command from config
|
|
34
|
+
id: config
|
|
35
|
+
shell: bash
|
|
36
|
+
run: |
|
|
37
|
+
if [ -f agentic-lib.toml ]; then
|
|
38
|
+
TEST_CMD=$(grep '^\s*test\s*=' agentic-lib.toml | head -1 | sed 's/.*=\s*"\([^"]*\)".*/\1/')
|
|
39
|
+
fi
|
|
40
|
+
echo "test-command=${TEST_CMD:-npm ci && npm test}" >> $GITHUB_OUTPUT
|
|
34
41
|
|
|
35
42
|
- name: Install sub-project dependencies (agentic-lib dev only)
|
|
36
43
|
if: hashFiles('src/actions/agentic-step/package.json') != ''
|
|
37
44
|
run: cd src/actions/agentic-step && npm ci
|
|
38
45
|
|
|
39
|
-
-
|
|
46
|
+
- name: Run tests
|
|
47
|
+
run: ${{ steps.config.outputs.test-command }}
|
|
@@ -154,7 +154,7 @@ jobs:
|
|
|
154
154
|
steps:
|
|
155
155
|
- name: PR cleanup
|
|
156
156
|
if: github.repository != 'xn-intenton-z2a/agentic-lib' && needs.params.outputs.dry-run != 'true'
|
|
157
|
-
uses: actions/github-script@
|
|
157
|
+
uses: actions/github-script@v8
|
|
158
158
|
with:
|
|
159
159
|
script: |
|
|
160
160
|
const owner = context.repo.owner;
|
|
@@ -224,10 +224,10 @@ jobs:
|
|
|
224
224
|
needs.params.outputs.mode == 'full' || needs.params.outputs.mode == 'dev-only' || needs.params.outputs.mode == 'review-only'
|
|
225
225
|
runs-on: ubuntu-latest
|
|
226
226
|
steps:
|
|
227
|
-
- uses: actions/checkout@
|
|
227
|
+
- uses: actions/checkout@v6
|
|
228
228
|
- name: Gather telemetry
|
|
229
229
|
id: gather
|
|
230
|
-
uses: actions/github-script@
|
|
230
|
+
uses: actions/github-script@v8
|
|
231
231
|
with:
|
|
232
232
|
script: |
|
|
233
233
|
const fs = require('fs');
|
|
@@ -302,9 +302,9 @@ jobs:
|
|
|
302
302
|
needs.params.result == 'success'
|
|
303
303
|
runs-on: ubuntu-latest
|
|
304
304
|
steps:
|
|
305
|
-
- uses: actions/checkout@
|
|
305
|
+
- uses: actions/checkout@v6
|
|
306
306
|
|
|
307
|
-
- uses: actions/setup-node@
|
|
307
|
+
- uses: actions/setup-node@v6
|
|
308
308
|
with:
|
|
309
309
|
node-version: "24"
|
|
310
310
|
|
|
@@ -337,11 +337,22 @@ jobs:
|
|
|
337
337
|
needs.params.result == 'success'
|
|
338
338
|
runs-on: ubuntu-latest
|
|
339
339
|
steps:
|
|
340
|
-
- uses: actions/checkout@
|
|
340
|
+
- uses: actions/checkout@v6
|
|
341
341
|
with:
|
|
342
342
|
fetch-depth: 0
|
|
343
343
|
|
|
344
|
-
-
|
|
344
|
+
- name: Check mission-complete signal
|
|
345
|
+
id: mission-check
|
|
346
|
+
run: |
|
|
347
|
+
if [ -f MISSION_COMPLETE.md ]; then
|
|
348
|
+
echo "mission-complete=true" >> $GITHUB_OUTPUT
|
|
349
|
+
echo "Mission is complete — skipping budget-consuming tasks"
|
|
350
|
+
cat MISSION_COMPLETE.md
|
|
351
|
+
else
|
|
352
|
+
echo "mission-complete=false" >> $GITHUB_OUTPUT
|
|
353
|
+
fi
|
|
354
|
+
|
|
355
|
+
- uses: actions/setup-node@v6
|
|
345
356
|
with:
|
|
346
357
|
node-version: "24"
|
|
347
358
|
|
|
@@ -364,6 +375,7 @@ jobs:
|
|
|
364
375
|
echo "libraryWritablePaths=${LIBRARY};${SOURCES}" >> $GITHUB_OUTPUT
|
|
365
376
|
|
|
366
377
|
- name: Maintain features
|
|
378
|
+
if: steps.mission-check.outputs.mission-complete != 'true'
|
|
367
379
|
uses: ./.github/agentic-lib/actions/agentic-step
|
|
368
380
|
env:
|
|
369
381
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -376,6 +388,7 @@ jobs:
|
|
|
376
388
|
model: ${{ needs.params.outputs.model }}
|
|
377
389
|
|
|
378
390
|
- name: Maintain library
|
|
391
|
+
if: steps.mission-check.outputs.mission-complete != 'true'
|
|
379
392
|
uses: ./.github/agentic-lib/actions/agentic-step
|
|
380
393
|
env:
|
|
381
394
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -403,11 +416,11 @@ jobs:
|
|
|
403
416
|
needs.params.result == 'success'
|
|
404
417
|
runs-on: ubuntu-latest
|
|
405
418
|
steps:
|
|
406
|
-
- uses: actions/checkout@
|
|
419
|
+
- uses: actions/checkout@v6
|
|
407
420
|
with:
|
|
408
421
|
fetch-depth: 0
|
|
409
422
|
|
|
410
|
-
- uses: actions/setup-node@
|
|
423
|
+
- uses: actions/setup-node@v6
|
|
411
424
|
with:
|
|
412
425
|
node-version: "24"
|
|
413
426
|
|
|
@@ -422,8 +435,19 @@ jobs:
|
|
|
422
435
|
working-directory: .github/agentic-lib/actions/agentic-step
|
|
423
436
|
run: npm ci
|
|
424
437
|
|
|
438
|
+
- name: Check mission-complete signal
|
|
439
|
+
id: fix-mission-check
|
|
440
|
+
run: |
|
|
441
|
+
if [ -f MISSION_COMPLETE.md ]; then
|
|
442
|
+
echo "mission-complete=true" >> $GITHUB_OUTPUT
|
|
443
|
+
echo "Mission is complete — skipping fix-stuck"
|
|
444
|
+
else
|
|
445
|
+
echo "mission-complete=false" >> $GITHUB_OUTPUT
|
|
446
|
+
fi
|
|
447
|
+
|
|
425
448
|
- name: Find and fix stuck PRs
|
|
426
|
-
|
|
449
|
+
if: steps.fix-mission-check.outputs.mission-complete != 'true'
|
|
450
|
+
uses: actions/github-script@v8
|
|
427
451
|
env:
|
|
428
452
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
429
453
|
with:
|
|
@@ -483,14 +507,14 @@ jobs:
|
|
|
483
507
|
}
|
|
484
508
|
|
|
485
509
|
- name: Checkout PR branch
|
|
486
|
-
if: env.FIX_PR_NUMBER != ''
|
|
510
|
+
if: env.FIX_PR_NUMBER != '' && steps.fix-mission-check.outputs.mission-complete != 'true'
|
|
487
511
|
run: |
|
|
488
512
|
gh pr checkout ${{ env.FIX_PR_NUMBER }}
|
|
489
513
|
env:
|
|
490
514
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
491
515
|
|
|
492
516
|
- name: "Tier 1: Auto-resolve trivial merge conflicts"
|
|
493
|
-
if: env.FIX_PR_NUMBER != '' && env.FIX_REASON == 'merge conflicts'
|
|
517
|
+
if: env.FIX_PR_NUMBER != '' && env.FIX_REASON == 'merge conflicts' && steps.fix-mission-check.outputs.mission-complete != 'true'
|
|
494
518
|
id: trivial-resolve
|
|
495
519
|
run: |
|
|
496
520
|
git fetch origin main
|
|
@@ -522,6 +546,7 @@ jobs:
|
|
|
522
546
|
- name: "Tier 2: LLM fix (conflicts or failing checks)"
|
|
523
547
|
if: |
|
|
524
548
|
env.FIX_PR_NUMBER != '' &&
|
|
549
|
+
steps.fix-mission-check.outputs.mission-complete != 'true' &&
|
|
525
550
|
(env.FIX_REASON != 'merge conflicts' ||
|
|
526
551
|
steps.trivial-resolve.outputs.resolved == 'none')
|
|
527
552
|
uses: ./.github/agentic-lib/actions/agentic-step
|
|
@@ -534,11 +559,11 @@ jobs:
|
|
|
534
559
|
config: ${{ needs.params.outputs.config-path }}
|
|
535
560
|
instructions: ".github/agentic-lib/agents/agent-apply-fix.md"
|
|
536
561
|
pr-number: ${{ env.FIX_PR_NUMBER }}
|
|
537
|
-
test-command
|
|
562
|
+
# test-command read from [execution].test in agentic-lib.toml
|
|
538
563
|
model: ${{ needs.params.outputs.model }}
|
|
539
564
|
|
|
540
565
|
- name: Commit and push fixes
|
|
541
|
-
if: github.repository != 'xn-intenton-z2a/agentic-lib' && env.FIX_PR_NUMBER != ''
|
|
566
|
+
if: github.repository != 'xn-intenton-z2a/agentic-lib' && env.FIX_PR_NUMBER != '' && steps.fix-mission-check.outputs.mission-complete != 'true'
|
|
542
567
|
uses: ./.github/agentic-lib/actions/commit-if-changed
|
|
543
568
|
with:
|
|
544
569
|
commit-message: "agentic-step: fix failing tests / resolve conflicts"
|
|
@@ -552,9 +577,9 @@ jobs:
|
|
|
552
577
|
needs.params.result == 'success'
|
|
553
578
|
runs-on: ubuntu-latest
|
|
554
579
|
steps:
|
|
555
|
-
- uses: actions/checkout@
|
|
580
|
+
- uses: actions/checkout@v6
|
|
556
581
|
|
|
557
|
-
- uses: actions/setup-node@
|
|
582
|
+
- uses: actions/setup-node@v6
|
|
558
583
|
with:
|
|
559
584
|
node-version: "24"
|
|
560
585
|
|
|
@@ -597,12 +622,12 @@ jobs:
|
|
|
597
622
|
needs.params.result == 'success'
|
|
598
623
|
runs-on: ubuntu-latest
|
|
599
624
|
steps:
|
|
600
|
-
- uses: actions/checkout@
|
|
625
|
+
- uses: actions/checkout@v6
|
|
601
626
|
with:
|
|
602
627
|
fetch-depth: 0
|
|
603
628
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
604
629
|
|
|
605
|
-
- uses: actions/setup-node@
|
|
630
|
+
- uses: actions/setup-node@v6
|
|
606
631
|
with:
|
|
607
632
|
node-version: "24"
|
|
608
633
|
|
|
@@ -629,11 +654,24 @@ jobs:
|
|
|
629
654
|
SOURCES=$(yq -r '.paths.librarySourcesFilepath.path // "SOURCES.md"' "$CONFIG")
|
|
630
655
|
README=$(yq -r '.paths.readmeFilepath.path // "README.md"' "$CONFIG")
|
|
631
656
|
DEPS=$(yq -r '.paths.dependenciesFilepath.path // "package.json"' "$CONFIG")
|
|
632
|
-
|
|
657
|
+
WEB=$(yq -r '.paths.web // "src/web/"' "$CONFIG" 2>/dev/null || echo "src/web/")
|
|
658
|
+
echo "writablePaths=${SOURCE};${TESTS};${FEATURES};${DOCS};${LIBRARY};${SOURCES};${README};${DEPS};${WEB}" >> $GITHUB_OUTPUT
|
|
659
|
+
|
|
660
|
+
- name: Check mission-complete signal
|
|
661
|
+
id: dev-mission-check
|
|
662
|
+
run: |
|
|
663
|
+
if [ -f MISSION_COMPLETE.md ]; then
|
|
664
|
+
echo "mission-complete=true" >> $GITHUB_OUTPUT
|
|
665
|
+
echo "Mission is complete — skipping dev transformation"
|
|
666
|
+
cat MISSION_COMPLETE.md
|
|
667
|
+
else
|
|
668
|
+
echo "mission-complete=false" >> $GITHUB_OUTPUT
|
|
669
|
+
fi
|
|
633
670
|
|
|
634
671
|
- name: Find target issue
|
|
672
|
+
if: steps.dev-mission-check.outputs.mission-complete != 'true'
|
|
635
673
|
id: issue
|
|
636
|
-
uses: actions/github-script@
|
|
674
|
+
uses: actions/github-script@v8
|
|
637
675
|
with:
|
|
638
676
|
script: |
|
|
639
677
|
const specificIssue = '${{ needs.params.outputs.issue-number }}';
|
|
@@ -673,11 +711,16 @@ jobs:
|
|
|
673
711
|
task: "transform"
|
|
674
712
|
config: ${{ needs.params.outputs.config-path }}
|
|
675
713
|
instructions: ".github/agentic-lib/agents/agent-issue-resolution.md"
|
|
676
|
-
test-command
|
|
714
|
+
# test-command read from [execution].test in agentic-lib.toml
|
|
677
715
|
model: ${{ needs.params.outputs.model }}
|
|
678
716
|
issue-number: ${{ steps.issue.outputs.issue-number }}
|
|
679
717
|
writable-paths: ${{ steps.config.outputs.writablePaths }}
|
|
680
718
|
|
|
719
|
+
- name: Build website
|
|
720
|
+
if: steps.issue.outputs.issue-number != ''
|
|
721
|
+
run: |
|
|
722
|
+
npm run build:web 2>/dev/null || echo "No build:web script"
|
|
723
|
+
|
|
681
724
|
- name: Commit and push
|
|
682
725
|
if: github.repository != 'xn-intenton-z2a/agentic-lib' && steps.issue.outputs.issue-number != '' && needs.params.outputs.dry-run != 'true'
|
|
683
726
|
uses: ./.github/agentic-lib/actions/commit-if-changed
|
|
@@ -687,7 +730,7 @@ jobs:
|
|
|
687
730
|
|
|
688
731
|
- name: Create PR and attempt merge
|
|
689
732
|
if: github.repository != 'xn-intenton-z2a/agentic-lib' && steps.issue.outputs.issue-number != '' && needs.params.outputs.dry-run != 'true'
|
|
690
|
-
uses: actions/github-script@
|
|
733
|
+
uses: actions/github-script@v8
|
|
691
734
|
with:
|
|
692
735
|
script: |
|
|
693
736
|
const owner = context.repo.owner;
|
|
@@ -779,16 +822,21 @@ jobs:
|
|
|
779
822
|
if: always() && needs.params.result == 'success'
|
|
780
823
|
runs-on: ubuntu-latest
|
|
781
824
|
steps:
|
|
782
|
-
- uses: actions/checkout@
|
|
825
|
+
- uses: actions/checkout@v6
|
|
783
826
|
with:
|
|
784
827
|
fetch-depth: 0
|
|
785
828
|
|
|
786
829
|
- name: Summary
|
|
787
830
|
run: |
|
|
831
|
+
REPO="${{ github.repository }}"
|
|
832
|
+
OWNER="${REPO%%/*}"
|
|
833
|
+
REPO_NAME="${REPO##*/}"
|
|
834
|
+
SITE_URL="https://${OWNER}.github.io/${REPO_NAME}/"
|
|
788
835
|
echo "## agentic-lib-workflow run summary" >> $GITHUB_STEP_SUMMARY
|
|
789
836
|
echo "- Mode: ${{ needs.params.outputs.mode }}" >> $GITHUB_STEP_SUMMARY
|
|
790
837
|
echo "- Model: ${{ needs.params.outputs.model }}" >> $GITHUB_STEP_SUMMARY
|
|
791
838
|
echo "- Dry-run: ${{ needs.params.outputs.dry-run }}" >> $GITHUB_STEP_SUMMARY
|
|
839
|
+
echo "- Website: [${SITE_URL}](${SITE_URL})" >> $GITHUB_STEP_SUMMARY
|
|
792
840
|
|
|
793
841
|
# ─── Schedule change (if requested) ────────────────────────────────
|
|
794
842
|
update-schedule:
|
package/README.md
CHANGED
|
@@ -172,22 +172,37 @@ contributing = "CONTRIBUTING.md"
|
|
|
172
172
|
library-sources = "SOURCES.md"
|
|
173
173
|
|
|
174
174
|
[execution]
|
|
175
|
-
|
|
176
|
-
test = "npm test"
|
|
177
|
-
start = "npm run start"
|
|
175
|
+
test = "npm ci && npm test"
|
|
178
176
|
|
|
179
177
|
[limits]
|
|
180
|
-
feature-issues = 2
|
|
181
|
-
maintenance-issues = 1
|
|
182
|
-
attempts-per-branch = 3
|
|
183
|
-
attempts-per-issue = 2
|
|
178
|
+
max-feature-issues = 2
|
|
179
|
+
max-maintenance-issues = 1
|
|
180
|
+
max-attempts-per-branch = 3
|
|
181
|
+
max-attempts-per-issue = 2
|
|
184
182
|
features-limit = 4
|
|
185
183
|
library-limit = 32
|
|
186
184
|
|
|
185
|
+
[tuning]
|
|
186
|
+
profile = "recommended" # min | recommended | max
|
|
187
|
+
# model = "gpt-5-mini" # override model per-profile
|
|
188
|
+
# transformation-budget = 8 # max code-changing cycles per run
|
|
189
|
+
|
|
187
190
|
[bot]
|
|
188
191
|
log-file = "intentïon.md"
|
|
189
192
|
```
|
|
190
193
|
|
|
194
|
+
### Tuning Profiles
|
|
195
|
+
|
|
196
|
+
The `profile` setting controls all tuning defaults. Three profiles are built in:
|
|
197
|
+
|
|
198
|
+
| Profile | Budget | Source scan | Issues | Best for |
|
|
199
|
+
|---------|--------|-------------|--------|----------|
|
|
200
|
+
| `min` | 4 cycles | 3 files, 1000 chars | 5, 14d stale | CI testing, quick validation |
|
|
201
|
+
| `recommended` | 8 cycles | 10 files, 5000 chars | 20, 30d stale | Balanced cost/quality |
|
|
202
|
+
| `max` | 32 cycles | 50 files, 20000 chars | 100, 90d stale | Complex missions |
|
|
203
|
+
|
|
204
|
+
Override individual knobs in `[tuning]` to deviate from a profile. Limits (`[limits]`) also scale with the profile.
|
|
205
|
+
|
|
191
206
|
The YAML config at `.github/agentic-lib/agents/agentic-lib.yml` is also supported as a fallback.
|
|
192
207
|
|
|
193
208
|
## The `agentic-step` Action
|
|
@@ -217,6 +232,7 @@ npx @xn-intenton-z2a/agentic-lib transform # advance code toward the
|
|
|
217
232
|
npx @xn-intenton-z2a/agentic-lib maintain-features # generate feature files from mission
|
|
218
233
|
npx @xn-intenton-z2a/agentic-lib maintain-library # update library docs from SOURCES.md
|
|
219
234
|
npx @xn-intenton-z2a/agentic-lib fix-code # fix failing tests
|
|
235
|
+
npx @xn-intenton-z2a/agentic-lib iterate # run N cycles with budget tracking
|
|
220
236
|
```
|
|
221
237
|
|
|
222
238
|
All task commands accept these flags:
|
|
@@ -226,6 +242,9 @@ All task commands accept these flags:
|
|
|
226
242
|
| `--dry-run` | off | Show the prompt without calling the Copilot SDK |
|
|
227
243
|
| `--target <path>` | current directory | Target repository to transform |
|
|
228
244
|
| `--model <name>` | `claude-sonnet-4` | Copilot SDK model |
|
|
245
|
+
| `--cycles <N>` | from budget | Max iteration cycles (iterate only) |
|
|
246
|
+
| `--steps <list>` | all three | Comma-separated steps per cycle (iterate only) |
|
|
247
|
+
| `--mission <name>` | hamming-distance | Init with --purge before iterating (iterate only) |
|
|
229
248
|
|
|
230
249
|
### Example: Full Walkthrough
|
|
231
250
|
|
|
@@ -278,6 +297,28 @@ Use `--dry-run` to see what prompt would be sent without calling the SDK:
|
|
|
278
297
|
npx @xn-intenton-z2a/agentic-lib transform --dry-run
|
|
279
298
|
```
|
|
280
299
|
|
|
300
|
+
### Iterator
|
|
301
|
+
|
|
302
|
+
The `iterate` command runs multiple cycles of maintain → transform → fix with automatic stop conditions and budget tracking:
|
|
303
|
+
|
|
304
|
+
```bash
|
|
305
|
+
# Init a mission and iterate with default budget
|
|
306
|
+
npx @xn-intenton-z2a/agentic-lib iterate --mission fizz-buzz --model gpt-5-mini
|
|
307
|
+
|
|
308
|
+
# Run 4 cycles on an existing workspace
|
|
309
|
+
npx @xn-intenton-z2a/agentic-lib iterate --cycles 4
|
|
310
|
+
|
|
311
|
+
# Transform-only cycles (skip maintain)
|
|
312
|
+
npx @xn-intenton-z2a/agentic-lib iterate --steps transform,fix-code --cycles 3
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
**Stop conditions:**
|
|
316
|
+
- Tests pass for 2 consecutive cycles
|
|
317
|
+
- No files change for 2 consecutive cycles
|
|
318
|
+
- Transformation budget exhausted (configurable via `transformation-budget` in `agentic-lib.toml`)
|
|
319
|
+
|
|
320
|
+
Each cycle logs `**agentic-lib transformation cost:** 1` to `intentïon.md` when source files change. The iterator reads these to track cumulative cost against the budget.
|
|
321
|
+
|
|
281
322
|
### Environment
|
|
282
323
|
|
|
283
324
|
| Variable | Required | Purpose |
|
|
@@ -301,6 +342,8 @@ Built-in safety mechanisms:
|
|
|
301
342
|
|
|
302
343
|
- **WIP limits** -- maximum concurrent issues to prevent runaway generation
|
|
303
344
|
- **Attempt limits** -- maximum retries per branch and per issue
|
|
345
|
+
- **Transformation budget** -- caps code-changing cycles per run (profile-scaled)
|
|
346
|
+
- **Mission-complete signal** -- `MISSION_COMPLETE.md` gates budget-consuming jobs without LLM calls
|
|
304
347
|
- **Path enforcement** -- writable and read-only path separation
|
|
305
348
|
- **TDD mode** -- optionally require tests before implementation
|
|
306
349
|
- **Mission protection** -- MISSION.md is read-only to the agent
|
|
@@ -331,7 +374,7 @@ src/
|
|
|
331
374
|
|
|
332
375
|
### Testing
|
|
333
376
|
|
|
334
|
-
|
|
377
|
+
393 unit tests across 26 test files, plus system tests:
|
|
335
378
|
|
|
336
379
|
```bash
|
|
337
380
|
npm test # Run all tests (vitest)
|
package/agentic-lib.toml
CHANGED
|
@@ -14,6 +14,7 @@ source = "test/src/lib/" #@dist "src/lib/"
|
|
|
14
14
|
tests = "test/tests/unit/" #@dist "tests/unit/"
|
|
15
15
|
features = "test/features/" #@dist "features/"
|
|
16
16
|
library = "test/library/" #@dist "library/"
|
|
17
|
+
web = "test/src/web/" #@dist "src/web/"
|
|
17
18
|
docs = "test/docs/" #@dist "docs/"
|
|
18
19
|
examples = "test/examples/" #@dist "examples/"
|
|
19
20
|
readme = "test/README.md" #@dist "README.md"
|
|
@@ -22,21 +23,20 @@ contributing = "test/CONTRIBUTING.md" #@dist "CONTRIBUTING.md"
|
|
|
22
23
|
library-sources = "test/SOURCES.md" #@dist "SOURCES.md"
|
|
23
24
|
|
|
24
25
|
[execution]
|
|
25
|
-
|
|
26
|
-
test = "npm test"
|
|
27
|
-
start = "npm run start"
|
|
26
|
+
test = "npm ci && npm test"
|
|
28
27
|
|
|
29
28
|
[limits]
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
attempts-per-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
# Override profile defaults here. Omit to use the active profile's values.
|
|
30
|
+
# max-feature-issues = 2
|
|
31
|
+
# max-maintenance-issues = 1
|
|
32
|
+
# max-attempts-per-branch = 3
|
|
33
|
+
# max-attempts-per-issue = 2
|
|
34
|
+
# features-limit = 2
|
|
35
|
+
# library-limit = 32
|
|
36
36
|
|
|
37
37
|
[tuning]
|
|
38
|
-
# Profile sets defaults for all tuning knobs: min | recommended | max
|
|
39
|
-
#
|
|
38
|
+
# Profile sets defaults for all tuning and limit knobs: min | recommended | max
|
|
39
|
+
# Profile definitions live in [profiles.*] sections below.
|
|
40
40
|
profile = "min" #@dist "recommended"
|
|
41
41
|
#
|
|
42
42
|
# Model selection — each has different strengths:
|
|
@@ -50,12 +50,84 @@ model = "gpt-5-mini"
|
|
|
50
50
|
# Override individual knobs below. Omit or comment out to use profile defaults.
|
|
51
51
|
# reasoning-effort = "low" # low | medium | high | none (none = disable entirely)
|
|
52
52
|
infinite-sessions = false # set to true for long sessions with compaction
|
|
53
|
-
#
|
|
54
|
-
#
|
|
55
|
-
# source-
|
|
56
|
-
#
|
|
57
|
-
#
|
|
58
|
-
#
|
|
53
|
+
# transformation-budget = 4 # max code-changing cycles per run (0 = unlimited)
|
|
54
|
+
# max-feature-files = 3
|
|
55
|
+
# max-source-files = 3
|
|
56
|
+
# max-source-chars = 1000
|
|
57
|
+
# max-test-chars = 500
|
|
58
|
+
# max-issues = 5
|
|
59
|
+
# issue-body-limit = 200
|
|
60
|
+
# stale-days = 14
|
|
61
|
+
# max-summary-chars = 500
|
|
62
|
+
# max-discussion-comments = 5
|
|
63
|
+
|
|
64
|
+
# ─── Profile Definitions ────────────────────────────────────────────
|
|
65
|
+
# Each profile defines tuning and limits defaults. The active profile
|
|
66
|
+
# is set by [tuning].profile above. Override individual values in
|
|
67
|
+
# [tuning] or [limits] to deviate from the active profile.
|
|
68
|
+
|
|
69
|
+
[profiles.min]
|
|
70
|
+
# Fast & cheap — CI testing, quick validation, budget-conscious iteration.
|
|
71
|
+
reasoning-effort = "low" # low | medium | high | none
|
|
72
|
+
infinite-sessions = false # enable session compaction for long runs
|
|
73
|
+
transformation-budget = 4 # max code-changing cycles per run
|
|
74
|
+
max-feature-files = 3 # max feature files included in prompts
|
|
75
|
+
max-source-files = 3 # max source files included in prompts
|
|
76
|
+
max-source-chars = 1000 # max chars of each source file's content included in prompts
|
|
77
|
+
max-test-chars = 500 # max chars of each test file's content included in prompts
|
|
78
|
+
max-issues = 5 # max open issues included in prompts
|
|
79
|
+
issue-body-limit = 200 # max chars of each issue's body text included in prompts
|
|
80
|
+
stale-days = 14 # days since last activity before an issue is considered stale and excluded
|
|
81
|
+
max-summary-chars = 500 # max chars of each document's summary included in prompts
|
|
82
|
+
max-discussion-comments = 5 # max recent discussion comments (newest first) included in prompts
|
|
83
|
+
max-feature-issues = 1 # max concurrent feature development issues
|
|
84
|
+
max-maintenance-issues = 1 # max concurrent maintenance issues
|
|
85
|
+
max-attempts-per-branch = 2 # max transform attempts before abandoning a branch
|
|
86
|
+
max-attempts-per-issue = 1 # max transform attempts before abandoning an issue
|
|
87
|
+
features-limit = 2 # max feature files in features/ directory
|
|
88
|
+
library-limit = 8 # max library entries in library/ directory
|
|
89
|
+
|
|
90
|
+
[profiles.recommended]
|
|
91
|
+
# Balanced — good results without excessive cost. Default for consumer repos.
|
|
92
|
+
reasoning-effort = "medium" # low | medium | high | none
|
|
93
|
+
infinite-sessions = true # enable session compaction for long runs
|
|
94
|
+
transformation-budget = 8 # max code-changing cycles per run
|
|
95
|
+
max-feature-files = 10 # max feature files included in prompts
|
|
96
|
+
max-source-files = 10 # max source files included in prompts
|
|
97
|
+
max-source-chars = 5000 # max chars of each source file's content included in prompts
|
|
98
|
+
max-test-chars = 3000 # max chars of each test file's content included in prompts
|
|
99
|
+
max-issues = 20 # max open issues included in prompts
|
|
100
|
+
issue-body-limit = 500 # max chars of each issue's body text included in prompts
|
|
101
|
+
stale-days = 30 # days since last activity before an issue is considered stale and excluded
|
|
102
|
+
max-summary-chars = 2000 # max chars of each document's summary included in prompts
|
|
103
|
+
max-discussion-comments = 10 # max recent discussion comments (newest first) included in prompts
|
|
104
|
+
max-feature-issues = 2 # max concurrent feature development issues
|
|
105
|
+
max-maintenance-issues = 1 # max concurrent maintenance issues
|
|
106
|
+
max-attempts-per-branch = 3 # max transform attempts before abandoning a branch
|
|
107
|
+
max-attempts-per-issue = 2 # max transform attempts before abandoning an issue
|
|
108
|
+
features-limit = 4 # max feature files in features/ directory
|
|
109
|
+
library-limit = 32 # max library entries in library/ directory
|
|
110
|
+
|
|
111
|
+
[profiles.max]
|
|
112
|
+
# Thorough — maximum context, highest quality. For complex missions.
|
|
113
|
+
reasoning-effort = "high" # low | medium | high | none
|
|
114
|
+
infinite-sessions = true # enable session compaction for long runs
|
|
115
|
+
transformation-budget = 32 # max code-changing cycles per run
|
|
116
|
+
max-feature-files = 50 # max feature files included in prompts
|
|
117
|
+
max-source-files = 50 # max source files included in prompts
|
|
118
|
+
max-source-chars = 20000 # max chars of each source file's content included in prompts
|
|
119
|
+
max-test-chars = 15000 # max chars of each test file's content included in prompts
|
|
120
|
+
max-issues = 100 # max open issues included in prompts
|
|
121
|
+
issue-body-limit = 2000 # max chars of each issue's body text included in prompts
|
|
122
|
+
stale-days = 90 # days since last activity before an issue is considered stale and excluded
|
|
123
|
+
max-summary-chars = 10000 # max chars of each document's summary included in prompts
|
|
124
|
+
max-discussion-comments = 25 # max recent discussion comments (newest first) included in prompts
|
|
125
|
+
max-feature-issues = 4 # max concurrent feature development issues
|
|
126
|
+
max-maintenance-issues = 2 # max concurrent maintenance issues
|
|
127
|
+
max-attempts-per-branch = 5 # max transform attempts before abandoning a branch
|
|
128
|
+
max-attempts-per-issue = 4 # max transform attempts before abandoning an issue
|
|
129
|
+
features-limit = 8 # max feature files in features/ directory
|
|
130
|
+
library-limit = 64 # max library entries in library/ directory
|
|
59
131
|
|
|
60
132
|
[bot]
|
|
61
133
|
log-file = "test/intentïon.md" #@dist "intentïon.md"
|