@xn-intenton-z2a/agentic-lib 7.1.19 → 7.1.21
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/README.md +4 -3
- package/bin/agentic-lib.js +64 -22
- package/package.json +1 -1
- package/src/actions/agentic-step/config-loader.js +1 -1
- package/src/agents/agentic-lib.yml +1 -1
- package/src/seeds/init.yml +45 -6
- package/src/seeds/zero-MISSION.md +1 -1
- package/src/seeds/zero-README.md +2 -3
- package/src/seeds/zero-agentic-lib.toml +2 -2
- package/src/seeds/zero-package.json +2 -2
- package/src/workflows/agent-discussions-bot.yml +24 -0
- package/src/workflows/agent-flow-fix-code.yml +23 -1
- package/src/workflows/agent-flow-maintain.yml +15 -1
- package/src/workflows/agent-flow-review.yml +14 -0
- package/src/workflows/agent-flow-transform.yml +1 -1
package/README.md
CHANGED
|
@@ -82,7 +82,8 @@ your-repo/
|
|
|
82
82
|
├── package.json # [USER] Your package config (seeded on --purge)
|
|
83
83
|
├── README.md # [USER] Your readme (seeded on --purge)
|
|
84
84
|
├── intentïon.md # [GENERATED] Activity log (cleared on --purge)
|
|
85
|
-
|
|
85
|
+
├── features/ # [GENERATED] Feature definitions (cleared on --purge)
|
|
86
|
+
└── library/ # [GENERATED] Library documents
|
|
86
87
|
```
|
|
87
88
|
|
|
88
89
|
**Legend:**
|
|
@@ -123,7 +124,7 @@ tier = "schedule-1" # schedule-1 through schedule-4
|
|
|
123
124
|
mission = "MISSION.md"
|
|
124
125
|
source = "src/lib/"
|
|
125
126
|
tests = "tests/unit/"
|
|
126
|
-
features = "
|
|
127
|
+
features = "features/"
|
|
127
128
|
docs = "docs/"
|
|
128
129
|
readme = "README.md"
|
|
129
130
|
dependencies = "package.json"
|
|
@@ -205,7 +206,7 @@ npx @xn-intenton-z2a/agentic-lib maintain-features
|
|
|
205
206
|
# [context] Mission loaded, features: 0, library: 0
|
|
206
207
|
# [copilot] Creating session...
|
|
207
208
|
# [copilot] Sending prompt...
|
|
208
|
-
# [event] tool.call: write_file({"path":"
|
|
209
|
+
# [event] tool.call: write_file({"path":"features/csv-parsing.md",...})
|
|
209
210
|
# === maintain-features completed in 12.3s ===
|
|
210
211
|
|
|
211
212
|
# 5. Transform code toward the mission
|
package/bin/agentic-lib.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
// npx @xn-intenton-z2a/agentic-lib maintain-library
|
|
15
15
|
// npx @xn-intenton-z2a/agentic-lib fix-code
|
|
16
16
|
|
|
17
|
-
import { copyFileSync, existsSync, mkdirSync, rmSync, readdirSync, readFileSync, writeFileSync } from "fs";
|
|
17
|
+
import { copyFileSync, existsSync, mkdirSync, rmSync, rmdirSync, readdirSync, readFileSync, writeFileSync } from "fs";
|
|
18
18
|
import { resolve, dirname, join } from "path";
|
|
19
19
|
import { fileURLToPath } from "url";
|
|
20
20
|
import { execSync } from "child_process";
|
|
@@ -36,7 +36,9 @@ const HELP = `
|
|
|
36
36
|
@xn-intenton-z2a/agentic-lib — Agentic Coding Systems SDK
|
|
37
37
|
|
|
38
38
|
Infrastructure:
|
|
39
|
-
init
|
|
39
|
+
init Update workflows, actions, agents, seeds, scripts
|
|
40
|
+
init --reseed Also clear features + activity log (keep source code)
|
|
41
|
+
init --purge Full reset — reseed + replace source files with seeds
|
|
40
42
|
update Alias for init
|
|
41
43
|
reset Alias for init --purge
|
|
42
44
|
version Show version
|
|
@@ -48,7 +50,8 @@ Tasks (run Copilot SDK transformations):
|
|
|
48
50
|
fix-code Fix failing tests
|
|
49
51
|
|
|
50
52
|
Options:
|
|
51
|
-
--purge
|
|
53
|
+
--purge Full reset — clear features, activity log, source code
|
|
54
|
+
--reseed Clear features + activity log (keep source code)
|
|
52
55
|
--dry-run Show what would be done without making changes
|
|
53
56
|
--target <path> Target repository (default: current directory)
|
|
54
57
|
--model <name> Copilot SDK model (default: claude-sonnet-4)
|
|
@@ -88,7 +91,8 @@ if (TASK_COMMANDS.includes(command)) {
|
|
|
88
91
|
// ─── Init Commands ───────────────────────────────────────────────────
|
|
89
92
|
|
|
90
93
|
let purge = flags.includes("--purge");
|
|
91
|
-
|
|
94
|
+
let reseed = flags.includes("--reseed") || purge;
|
|
95
|
+
if (command === "reset") { purge = true; reseed = true; }
|
|
92
96
|
|
|
93
97
|
if (!ALL_COMMANDS.includes(command)) {
|
|
94
98
|
console.error(`Unknown command: ${command}`);
|
|
@@ -238,7 +242,7 @@ async function loadTaskConfig() {
|
|
|
238
242
|
missionPath: toml.paths?.mission || "MISSION.md",
|
|
239
243
|
sourcePath: toml.paths?.source || "src/lib/",
|
|
240
244
|
testsPath: toml.paths?.tests || "tests/unit/",
|
|
241
|
-
featuresPath: toml.paths?.features || "
|
|
245
|
+
featuresPath: toml.paths?.features || "features/",
|
|
242
246
|
libraryPath: toml.paths?.docs || "library/",
|
|
243
247
|
sourcesPath: toml.paths?.["library-sources"] || "SOURCES.md",
|
|
244
248
|
readmePath: toml.paths?.readme || "README.md",
|
|
@@ -616,7 +620,7 @@ function initCopyDirRecursive(srcPath, dstPath, label, excludes = []) {
|
|
|
616
620
|
const srcFull = join(srcPath, entry.name);
|
|
617
621
|
const dstFull = join(dstPath, entry.name);
|
|
618
622
|
const relLabel = `${label}/${entry.name}`;
|
|
619
|
-
if (excludes.some((ex) => entry.name === ex
|
|
623
|
+
if (excludes.some((ex) => entry.name === ex)) continue;
|
|
620
624
|
if (entry.isDirectory()) {
|
|
621
625
|
initCopyDirRecursive(srcFull, dstFull, relLabel, excludes);
|
|
622
626
|
} else {
|
|
@@ -698,12 +702,24 @@ function initScripts(agenticDir) {
|
|
|
698
702
|
"update.sh",
|
|
699
703
|
];
|
|
700
704
|
if (!existsSync(scriptsDir)) return;
|
|
705
|
+
const distributedSet = new Set(DISTRIBUTED_SCRIPTS);
|
|
701
706
|
for (const name of DISTRIBUTED_SCRIPTS) {
|
|
702
707
|
const src = resolve(scriptsDir, name);
|
|
703
708
|
if (existsSync(src)) {
|
|
704
709
|
initCopyFile(src, resolve(agenticDir, "scripts", name), `scripts/${name}`);
|
|
705
710
|
}
|
|
706
711
|
}
|
|
712
|
+
// Remove stale scripts not in the distributed set
|
|
713
|
+
const targetScriptsDir = resolve(agenticDir, "scripts");
|
|
714
|
+
if (existsSync(targetScriptsDir)) {
|
|
715
|
+
for (const f of readdirSync(targetScriptsDir)) {
|
|
716
|
+
if (!distributedSet.has(f)) {
|
|
717
|
+
if (!dryRun) rmSync(resolve(targetScriptsDir, f));
|
|
718
|
+
console.log(` REMOVE stale: scripts/${f}`);
|
|
719
|
+
initChanges++;
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
}
|
|
707
723
|
}
|
|
708
724
|
|
|
709
725
|
function initConfig(seedsDir) {
|
|
@@ -719,8 +735,45 @@ function initConfig(seedsDir) {
|
|
|
719
735
|
}
|
|
720
736
|
}
|
|
721
737
|
|
|
722
|
-
function
|
|
723
|
-
console.log("\n---
|
|
738
|
+
function initReseed() {
|
|
739
|
+
console.log("\n--- Reseed: Clear Features + Activity Log ---");
|
|
740
|
+
const intentionFile = resolve(target, "intentïon.md");
|
|
741
|
+
if (existsSync(intentionFile)) {
|
|
742
|
+
if (!dryRun) rmSync(intentionFile);
|
|
743
|
+
console.log(" REMOVE: intentïon.md");
|
|
744
|
+
initChanges++;
|
|
745
|
+
}
|
|
746
|
+
// Clear features directory (now at project root, next to library/)
|
|
747
|
+
const featuresDir = resolve(target, "features");
|
|
748
|
+
if (existsSync(featuresDir)) {
|
|
749
|
+
for (const f of readdirSync(featuresDir)) {
|
|
750
|
+
if (!dryRun) rmSync(resolve(featuresDir, f));
|
|
751
|
+
console.log(` REMOVE: features/${f}`);
|
|
752
|
+
initChanges++;
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
// Also clear old features location if it exists
|
|
756
|
+
const oldFeaturesDir = resolve(target, ".github/agentic-lib/features");
|
|
757
|
+
if (existsSync(oldFeaturesDir)) {
|
|
758
|
+
for (const f of readdirSync(oldFeaturesDir)) {
|
|
759
|
+
if (!dryRun) rmSync(resolve(oldFeaturesDir, f));
|
|
760
|
+
console.log(` REMOVE: .github/agentic-lib/features/${f} (old location)`);
|
|
761
|
+
initChanges++;
|
|
762
|
+
}
|
|
763
|
+
if (!dryRun) rmdirSync(oldFeaturesDir);
|
|
764
|
+
console.log(" REMOVE: .github/agentic-lib/features/ (old location)");
|
|
765
|
+
}
|
|
766
|
+
// Remove old getting-started-guide if it exists
|
|
767
|
+
const oldGuideDir = resolve(target, ".github/agentic-lib/getting-started-guide");
|
|
768
|
+
if (existsSync(oldGuideDir)) {
|
|
769
|
+
if (!dryRun) rmSync(oldGuideDir, { recursive: true });
|
|
770
|
+
console.log(" REMOVE: .github/agentic-lib/getting-started-guide/ (obsolete)");
|
|
771
|
+
initChanges++;
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
function initPurge(seedsDir) {
|
|
776
|
+
console.log("\n--- Purge: Reset Source Files to Seed State ---");
|
|
724
777
|
const SEED_MAP = {
|
|
725
778
|
"zero-main.js": "src/lib/main.js",
|
|
726
779
|
"zero-main.test.js": "tests/unit/main.test.js",
|
|
@@ -734,19 +787,6 @@ function initPurge(seedsDir, agenticDir) {
|
|
|
734
787
|
initCopyFile(src, resolve(target, targetRel), `SEED: ${seedFile} → ${targetRel}`);
|
|
735
788
|
}
|
|
736
789
|
}
|
|
737
|
-
const intentionFile = resolve(target, "intentïon.md");
|
|
738
|
-
if (existsSync(intentionFile)) {
|
|
739
|
-
if (!dryRun) rmSync(intentionFile);
|
|
740
|
-
console.log(" REMOVE: intentïon.md");
|
|
741
|
-
initChanges++;
|
|
742
|
-
}
|
|
743
|
-
const featuresDir = resolve(agenticDir, "features");
|
|
744
|
-
if (!existsSync(featuresDir)) return;
|
|
745
|
-
for (const f of readdirSync(featuresDir)) {
|
|
746
|
-
if (!dryRun) rmSync(resolve(featuresDir, f));
|
|
747
|
-
console.log(` REMOVE: features/${f}`);
|
|
748
|
-
initChanges++;
|
|
749
|
-
}
|
|
750
790
|
}
|
|
751
791
|
|
|
752
792
|
function runInit() {
|
|
@@ -767,6 +807,7 @@ function runInit() {
|
|
|
767
807
|
console.log("=== @xn-intenton-z2a/agentic-lib init ===");
|
|
768
808
|
console.log(`Source: ${srcDir}`);
|
|
769
809
|
console.log(`Target: ${target}`);
|
|
810
|
+
console.log(`Reseed: ${reseed}`);
|
|
770
811
|
console.log(`Purge: ${purge}`);
|
|
771
812
|
console.log(`Mode: ${dryRun ? "DRY RUN" : "LIVE"}`);
|
|
772
813
|
console.log("");
|
|
@@ -777,7 +818,8 @@ function runInit() {
|
|
|
777
818
|
initDirContents("seeds", resolve(agenticDir, "seeds"), "Seeds");
|
|
778
819
|
initScripts(agenticDir);
|
|
779
820
|
initConfig(seedsDir);
|
|
780
|
-
if (
|
|
821
|
+
if (reseed) initReseed();
|
|
822
|
+
if (purge) initPurge(seedsDir);
|
|
781
823
|
|
|
782
824
|
console.log(`\n${initChanges} change(s)${dryRun ? " (dry run)" : ""}`);
|
|
783
825
|
|
package/package.json
CHANGED
package/src/seeds/init.yml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# Copyright (C) 2025-2026 Polycode Limited
|
|
3
3
|
# .github/workflows/init.yml
|
|
4
4
|
#
|
|
5
|
-
# Daily lifecycle: update agentic-lib, run init
|
|
5
|
+
# Daily lifecycle: update agentic-lib, run init, test, PR, automerge.
|
|
6
6
|
# Keeps the repository current with the latest SDK infrastructure.
|
|
7
7
|
|
|
8
8
|
name: init
|
|
@@ -12,12 +12,46 @@ on:
|
|
|
12
12
|
schedule:
|
|
13
13
|
- cron: "0 5 * * *"
|
|
14
14
|
workflow_dispatch:
|
|
15
|
+
inputs:
|
|
16
|
+
mode:
|
|
17
|
+
description: "Init mode"
|
|
18
|
+
type: choice
|
|
19
|
+
required: false
|
|
20
|
+
default: "update"
|
|
21
|
+
options:
|
|
22
|
+
- update
|
|
23
|
+
- reseed
|
|
24
|
+
- purge
|
|
25
|
+
dry-run:
|
|
26
|
+
description: "Preview changes without writing files"
|
|
27
|
+
type: boolean
|
|
28
|
+
required: false
|
|
29
|
+
default: false
|
|
15
30
|
|
|
16
31
|
permissions: write-all
|
|
17
32
|
|
|
18
33
|
jobs:
|
|
34
|
+
params:
|
|
35
|
+
runs-on: ubuntu-latest
|
|
36
|
+
steps:
|
|
37
|
+
- name: Normalise params
|
|
38
|
+
id: normalise
|
|
39
|
+
shell: bash
|
|
40
|
+
run: |
|
|
41
|
+
MODE='${{ inputs.mode }}'
|
|
42
|
+
echo "mode=${MODE:-update}" >> $GITHUB_OUTPUT
|
|
43
|
+
DRY_RUN='${{ inputs.dry-run }}'
|
|
44
|
+
echo "dry-run=${DRY_RUN:-false}" >> $GITHUB_OUTPUT
|
|
45
|
+
outputs:
|
|
46
|
+
mode: ${{ steps.normalise.outputs.mode }}
|
|
47
|
+
dry-run: ${{ steps.normalise.outputs.dry-run }}
|
|
48
|
+
|
|
19
49
|
init:
|
|
50
|
+
needs: params
|
|
20
51
|
runs-on: ubuntu-latest
|
|
52
|
+
env:
|
|
53
|
+
INIT_MODE: ${{ needs.params.outputs.mode }}
|
|
54
|
+
INIT_DRY_RUN: ${{ needs.params.outputs.dry-run }}
|
|
21
55
|
steps:
|
|
22
56
|
- uses: actions/checkout@v4
|
|
23
57
|
with:
|
|
@@ -36,8 +70,13 @@ jobs:
|
|
|
36
70
|
- name: Update agentic-lib to latest
|
|
37
71
|
run: npm update @xn-intenton-z2a/agentic-lib
|
|
38
72
|
|
|
39
|
-
- name: Run init
|
|
40
|
-
run:
|
|
73
|
+
- name: Run init
|
|
74
|
+
run: |
|
|
75
|
+
FLAGS="init"
|
|
76
|
+
if [ "$INIT_MODE" = "reseed" ]; then FLAGS="$FLAGS --reseed"; fi
|
|
77
|
+
if [ "$INIT_MODE" = "purge" ]; then FLAGS="$FLAGS --purge"; fi
|
|
78
|
+
if [ "$INIT_DRY_RUN" = "true" ]; then FLAGS="$FLAGS --dry-run"; fi
|
|
79
|
+
npx @xn-intenton-z2a/agentic-lib $FLAGS
|
|
41
80
|
|
|
42
81
|
- run: npm install
|
|
43
82
|
|
|
@@ -53,7 +92,7 @@ jobs:
|
|
|
53
92
|
git add -A
|
|
54
93
|
git diff --cached --quiet && echo "No changes" && exit 0
|
|
55
94
|
VERSION=$(npx @xn-intenton-z2a/agentic-lib version 2>/dev/null || echo "latest")
|
|
56
|
-
git commit -m "init
|
|
95
|
+
git commit -m "init ${INIT_MODE} (agentic-lib@${VERSION})"
|
|
57
96
|
git push origin "$BRANCH"
|
|
58
97
|
|
|
59
98
|
- name: Create PR
|
|
@@ -62,8 +101,8 @@ jobs:
|
|
|
62
101
|
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
|
|
63
102
|
run: |
|
|
64
103
|
gh pr create \
|
|
65
|
-
--title "init
|
|
66
|
-
--body "Nightly init
|
|
104
|
+
--title "init ${INIT_MODE} ($(date -u +%Y-%m-%d))" \
|
|
105
|
+
--body "Nightly init ${INIT_MODE}. Auto-labelled for automerge." \
|
|
67
106
|
--label automerge \
|
|
68
107
|
--base main \
|
|
69
108
|
--head "$BRANCH"
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
# Mission
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Describe your project's mission here. The agentic workflows will evolve `src/lib/main.js` to fulfil this mission.
|
package/src/seeds/zero-README.md
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
# repo
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Describe your project here.
|
|
4
4
|
|
|
5
5
|
## Getting Started
|
|
6
6
|
|
|
7
7
|
1. Write your mission in `MISSION.md`
|
|
8
8
|
2. Enable GitHub Actions
|
|
9
|
-
3. The
|
|
9
|
+
3. The workflows will evolve `src/lib/main.js` toward your mission
|
|
10
10
|
|
|
11
11
|
## Links
|
|
12
12
|
|
|
13
|
-
- [intentïon agentic-lib](https://github.com/xn-intenton-z2a/agentic-lib)
|
|
14
13
|
- [MISSION.md](MISSION.md)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# SPDX-License-Identifier: MIT
|
|
2
2
|
# Copyright (C) 2025-2026 Polycode Limited
|
|
3
|
-
# agentic-lib.toml — Configuration for
|
|
3
|
+
# agentic-lib.toml — Configuration for agentic-lib workflows
|
|
4
4
|
#
|
|
5
5
|
# This file controls how agentic workflows operate on your repository.
|
|
6
6
|
# Place it at the root of your project.
|
|
@@ -12,7 +12,7 @@ tier = "schedule-1" # schedule-1 through schedule-4
|
|
|
12
12
|
mission = "MISSION.md"
|
|
13
13
|
source = "src/lib/"
|
|
14
14
|
tests = "tests/unit/"
|
|
15
|
-
features = "
|
|
15
|
+
features = "features/"
|
|
16
16
|
docs = "docs/"
|
|
17
17
|
readme = "README.md"
|
|
18
18
|
dependencies = "package.json"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
2
|
+
"name": "repo",
|
|
3
3
|
"version": "0.1.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"author": "",
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@xn-intenton-z2a/agentic-lib": "^7.1.
|
|
17
|
+
"@xn-intenton-z2a/agentic-lib": "^7.1.21"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@vitest/coverage-v8": "^4.0.0",
|
|
@@ -23,6 +23,16 @@ on:
|
|
|
23
23
|
schedule:
|
|
24
24
|
- cron: "7 12 */28 * *" # schedule-1: every 28 days
|
|
25
25
|
workflow_dispatch:
|
|
26
|
+
inputs:
|
|
27
|
+
model:
|
|
28
|
+
description: "Copilot SDK model to use"
|
|
29
|
+
type: choice
|
|
30
|
+
required: false
|
|
31
|
+
default: "claude-sonnet-4"
|
|
32
|
+
options:
|
|
33
|
+
- claude-sonnet-4
|
|
34
|
+
- gpt-5-mini
|
|
35
|
+
- gpt-4.1
|
|
26
36
|
|
|
27
37
|
permissions:
|
|
28
38
|
contents: read
|
|
@@ -33,7 +43,20 @@ env:
|
|
|
33
43
|
configPath: ".github/agentic-lib/agents/agentic-lib.yml"
|
|
34
44
|
|
|
35
45
|
jobs:
|
|
46
|
+
params:
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
steps:
|
|
49
|
+
- name: Normalise params
|
|
50
|
+
id: normalise
|
|
51
|
+
shell: bash
|
|
52
|
+
run: |
|
|
53
|
+
MODEL='${{ inputs.model }}'
|
|
54
|
+
echo "model=${MODEL:-claude-sonnet-4}" >> $GITHUB_OUTPUT
|
|
55
|
+
outputs:
|
|
56
|
+
model: ${{ steps.normalise.outputs.model }}
|
|
57
|
+
|
|
36
58
|
respond:
|
|
59
|
+
needs: params
|
|
37
60
|
runs-on: ubuntu-latest
|
|
38
61
|
steps:
|
|
39
62
|
- uses: actions/checkout@v4
|
|
@@ -70,3 +93,4 @@ jobs:
|
|
|
70
93
|
config: ${{ env.configPath }}
|
|
71
94
|
instructions: ".github/agentic-lib/agents/agent-discussion-bot.md"
|
|
72
95
|
discussion-url: ${{ steps.discussion-url.outputs.url }}
|
|
96
|
+
model: ${{ needs.params.outputs.model }}
|
|
@@ -21,6 +21,15 @@ on:
|
|
|
21
21
|
description: "PR number to fix"
|
|
22
22
|
required: true
|
|
23
23
|
type: string
|
|
24
|
+
model:
|
|
25
|
+
description: "Copilot SDK model to use"
|
|
26
|
+
type: choice
|
|
27
|
+
required: false
|
|
28
|
+
default: "claude-sonnet-4"
|
|
29
|
+
options:
|
|
30
|
+
- claude-sonnet-4
|
|
31
|
+
- gpt-5-mini
|
|
32
|
+
- gpt-4.1
|
|
24
33
|
|
|
25
34
|
permissions:
|
|
26
35
|
contents: write
|
|
@@ -31,6 +40,18 @@ env:
|
|
|
31
40
|
configPath: ".github/agentic-lib/agents/agentic-lib.yml"
|
|
32
41
|
|
|
33
42
|
jobs:
|
|
43
|
+
params:
|
|
44
|
+
runs-on: ubuntu-latest
|
|
45
|
+
steps:
|
|
46
|
+
- name: Normalise params
|
|
47
|
+
id: normalise
|
|
48
|
+
shell: bash
|
|
49
|
+
run: |
|
|
50
|
+
MODEL='${{ inputs.model }}'
|
|
51
|
+
echo "model=${MODEL:-claude-sonnet-4}" >> $GITHUB_OUTPUT
|
|
52
|
+
outputs:
|
|
53
|
+
model: ${{ steps.normalise.outputs.model }}
|
|
54
|
+
|
|
34
55
|
find-failing-pr:
|
|
35
56
|
if: >
|
|
36
57
|
github.event_name == 'workflow_dispatch' ||
|
|
@@ -61,7 +82,7 @@ jobs:
|
|
|
61
82
|
core.setOutput('prNumber', prNumber);
|
|
62
83
|
|
|
63
84
|
fix:
|
|
64
|
-
needs: find-failing-pr
|
|
85
|
+
needs: [params, find-failing-pr]
|
|
65
86
|
if: needs.find-failing-pr.outputs.prNumber != ''
|
|
66
87
|
runs-on: ubuntu-latest
|
|
67
88
|
steps:
|
|
@@ -94,6 +115,7 @@ jobs:
|
|
|
94
115
|
instructions: ".github/agentic-lib/agents/agent-apply-fix.md"
|
|
95
116
|
pr-number: ${{ needs.find-failing-pr.outputs.prNumber }}
|
|
96
117
|
test-command: "npm test"
|
|
118
|
+
model: ${{ needs.params.outputs.model }}
|
|
97
119
|
|
|
98
120
|
- name: Commit and push fixes
|
|
99
121
|
uses: ./.github/agentic-lib/actions/commit-if-changed
|
|
@@ -23,6 +23,15 @@ on:
|
|
|
23
23
|
- all
|
|
24
24
|
- features
|
|
25
25
|
- library
|
|
26
|
+
model:
|
|
27
|
+
description: "Copilot SDK model to use"
|
|
28
|
+
type: choice
|
|
29
|
+
required: false
|
|
30
|
+
default: "claude-sonnet-4"
|
|
31
|
+
options:
|
|
32
|
+
- claude-sonnet-4
|
|
33
|
+
- gpt-5-mini
|
|
34
|
+
- gpt-4.1
|
|
26
35
|
|
|
27
36
|
permissions:
|
|
28
37
|
contents: write
|
|
@@ -41,8 +50,11 @@ jobs:
|
|
|
41
50
|
run: |
|
|
42
51
|
STEP='${{ inputs.step }}'
|
|
43
52
|
echo "step=${STEP:-all}" >> $GITHUB_OUTPUT
|
|
53
|
+
MODEL='${{ inputs.model }}'
|
|
54
|
+
echo "model=${MODEL:-claude-sonnet-4}" >> $GITHUB_OUTPUT
|
|
44
55
|
outputs:
|
|
45
56
|
step: ${{ steps.normalise.outputs.step }}
|
|
57
|
+
model: ${{ steps.normalise.outputs.model }}
|
|
46
58
|
|
|
47
59
|
maintain:
|
|
48
60
|
needs: params
|
|
@@ -64,7 +76,7 @@ jobs:
|
|
|
64
76
|
id: config
|
|
65
77
|
run: |
|
|
66
78
|
CONFIG="${{ env.configPath }}"
|
|
67
|
-
FEATURES=$(yq -r '.paths.featuresPath.path // "
|
|
79
|
+
FEATURES=$(yq -r '.paths.featuresPath.path // "features/"' "$CONFIG")
|
|
68
80
|
LIBRARY=$(yq -r '.paths.libraryDocumentsPath.path // "library/"' "$CONFIG")
|
|
69
81
|
SOURCES=$(yq -r '.paths.librarySourcesFilepath.path // "SOURCES.md"' "$CONFIG")
|
|
70
82
|
echo "featuresWritablePaths=${FEATURES}" >> $GITHUB_OUTPUT
|
|
@@ -81,6 +93,7 @@ jobs:
|
|
|
81
93
|
config: ${{ env.configPath }}
|
|
82
94
|
instructions: ".github/agentic-lib/agents/agent-maintain-features.md"
|
|
83
95
|
writable-paths: ${{ steps.config.outputs.featuresWritablePaths }}
|
|
96
|
+
model: ${{ needs.params.outputs.model }}
|
|
84
97
|
|
|
85
98
|
- name: Maintain library
|
|
86
99
|
if: needs.params.outputs.step == 'all' || needs.params.outputs.step == 'library'
|
|
@@ -93,6 +106,7 @@ jobs:
|
|
|
93
106
|
config: ${{ env.configPath }}
|
|
94
107
|
instructions: ".github/agentic-lib/agents/agent-maintain-library.md"
|
|
95
108
|
writable-paths: ${{ steps.config.outputs.libraryWritablePaths }}
|
|
109
|
+
model: ${{ needs.params.outputs.model }}
|
|
96
110
|
|
|
97
111
|
- name: Commit and push changes
|
|
98
112
|
uses: ./.github/agentic-lib/actions/commit-if-changed
|
|
@@ -22,6 +22,15 @@ on:
|
|
|
22
22
|
- all
|
|
23
23
|
- review
|
|
24
24
|
- enhance
|
|
25
|
+
model:
|
|
26
|
+
description: "Copilot SDK model to use"
|
|
27
|
+
type: choice
|
|
28
|
+
required: false
|
|
29
|
+
default: "claude-sonnet-4"
|
|
30
|
+
options:
|
|
31
|
+
- claude-sonnet-4
|
|
32
|
+
- gpt-5-mini
|
|
33
|
+
- gpt-4.1
|
|
25
34
|
|
|
26
35
|
permissions:
|
|
27
36
|
contents: read
|
|
@@ -40,8 +49,11 @@ jobs:
|
|
|
40
49
|
run: |
|
|
41
50
|
STEP='${{ inputs.step }}'
|
|
42
51
|
echo "step=${STEP:-all}" >> $GITHUB_OUTPUT
|
|
52
|
+
MODEL='${{ inputs.model }}'
|
|
53
|
+
echo "model=${MODEL:-claude-sonnet-4}" >> $GITHUB_OUTPUT
|
|
43
54
|
outputs:
|
|
44
55
|
step: ${{ steps.normalise.outputs.step }}
|
|
56
|
+
model: ${{ steps.normalise.outputs.model }}
|
|
45
57
|
|
|
46
58
|
review-issues:
|
|
47
59
|
needs: params
|
|
@@ -67,6 +79,7 @@ jobs:
|
|
|
67
79
|
task: "review-issue"
|
|
68
80
|
config: ${{ env.configPath }}
|
|
69
81
|
instructions: ".github/agentic-lib/agents/agent-review-issue.md"
|
|
82
|
+
model: ${{ needs.params.outputs.model }}
|
|
70
83
|
|
|
71
84
|
enhance-issues:
|
|
72
85
|
needs: params
|
|
@@ -111,3 +124,4 @@ jobs:
|
|
|
111
124
|
config: ${{ env.configPath }}
|
|
112
125
|
instructions: ".github/agentic-lib/agents/agent-ready-issue.md"
|
|
113
126
|
issue-number: ${{ steps.find-issue.outputs.issueNumber }}
|
|
127
|
+
model: ${{ needs.params.outputs.model }}
|
|
@@ -67,7 +67,7 @@ jobs:
|
|
|
67
67
|
CONFIG="${{ env.configPath }}"
|
|
68
68
|
SOURCE=$(yq -r '.paths.targetSourcePath.path // "src/lib/"' "$CONFIG")
|
|
69
69
|
TESTS=$(yq -r '.paths.targetTestsPath.path // "tests/unit/"' "$CONFIG")
|
|
70
|
-
FEATURES=$(yq -r '.paths.featuresPath.path // "
|
|
70
|
+
FEATURES=$(yq -r '.paths.featuresPath.path // "features/"' "$CONFIG")
|
|
71
71
|
DOCS=$(yq -r '.paths.documentationPath.path // "docs/"' "$CONFIG")
|
|
72
72
|
LIBRARY=$(yq -r '.paths.libraryDocumentsPath.path // "library/"' "$CONFIG")
|
|
73
73
|
SOURCES=$(yq -r '.paths.librarySourcesFilepath.path // "SOURCES.md"' "$CONFIG")
|