@xn-intenton-z2a/agentic-lib 7.1.20 → 7.1.22

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 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
- └── .github/agentic-lib/features/ # [GENERATED] Feature definitions (cleared on --purge)
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 = ".github/agentic-lib/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":".github/agentic-lib/features/csv-parsing.md",...})
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
@@ -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 [--purge] Set up or update agentic infrastructure
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 Also reset source files to seed state
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,11 @@ if (TASK_COMMANDS.includes(command)) {
88
91
  // ─── Init Commands ───────────────────────────────────────────────────
89
92
 
90
93
  let purge = flags.includes("--purge");
91
- if (command === "reset") purge = true;
94
+ let reseed = flags.includes("--reseed") || purge;
95
+ if (command === "reset") {
96
+ purge = true;
97
+ reseed = true;
98
+ }
92
99
 
93
100
  if (!ALL_COMMANDS.includes(command)) {
94
101
  console.error(`Unknown command: ${command}`);
@@ -238,7 +245,7 @@ async function loadTaskConfig() {
238
245
  missionPath: toml.paths?.mission || "MISSION.md",
239
246
  sourcePath: toml.paths?.source || "src/lib/",
240
247
  testsPath: toml.paths?.tests || "tests/unit/",
241
- featuresPath: toml.paths?.features || ".github/agentic-lib/features/",
248
+ featuresPath: toml.paths?.features || "features/",
242
249
  libraryPath: toml.paths?.docs || "library/",
243
250
  sourcesPath: toml.paths?.["library-sources"] || "SOURCES.md",
244
251
  readmePath: toml.paths?.readme || "README.md",
@@ -616,7 +623,7 @@ function initCopyDirRecursive(srcPath, dstPath, label, excludes = []) {
616
623
  const srcFull = join(srcPath, entry.name);
617
624
  const dstFull = join(dstPath, entry.name);
618
625
  const relLabel = `${label}/${entry.name}`;
619
- if (excludes.some((ex) => entry.name === ex || srcFull.includes(ex))) continue;
626
+ if (excludes.some((ex) => entry.name === ex)) continue;
620
627
  if (entry.isDirectory()) {
621
628
  initCopyDirRecursive(srcFull, dstFull, relLabel, excludes);
622
629
  } else {
@@ -698,12 +705,24 @@ function initScripts(agenticDir) {
698
705
  "update.sh",
699
706
  ];
700
707
  if (!existsSync(scriptsDir)) return;
708
+ const distributedSet = new Set(DISTRIBUTED_SCRIPTS);
701
709
  for (const name of DISTRIBUTED_SCRIPTS) {
702
710
  const src = resolve(scriptsDir, name);
703
711
  if (existsSync(src)) {
704
712
  initCopyFile(src, resolve(agenticDir, "scripts", name), `scripts/${name}`);
705
713
  }
706
714
  }
715
+ // Remove stale scripts not in the distributed set
716
+ const targetScriptsDir = resolve(agenticDir, "scripts");
717
+ if (existsSync(targetScriptsDir)) {
718
+ for (const f of readdirSync(targetScriptsDir)) {
719
+ if (!distributedSet.has(f)) {
720
+ if (!dryRun) rmSync(resolve(targetScriptsDir, f));
721
+ console.log(` REMOVE stale: scripts/${f}`);
722
+ initChanges++;
723
+ }
724
+ }
725
+ }
707
726
  }
708
727
 
709
728
  function initConfig(seedsDir) {
@@ -719,12 +738,59 @@ function initConfig(seedsDir) {
719
738
  }
720
739
  }
721
740
 
722
- function initPurge(seedsDir, agenticDir) {
723
- console.log("\n--- Reset Source Files to Seed State ---");
741
+ function initReseed() {
742
+ console.log("\n--- Reseed: Clear Features + Activity Log ---");
743
+ const intentionFile = resolve(target, "intentïon.md");
744
+ if (existsSync(intentionFile)) {
745
+ if (!dryRun) rmSync(intentionFile);
746
+ console.log(" REMOVE: intentïon.md");
747
+ initChanges++;
748
+ }
749
+ // Clear features directory (now at project root, next to library/)
750
+ const featuresDir = resolve(target, "features");
751
+ if (existsSync(featuresDir)) {
752
+ for (const f of readdirSync(featuresDir)) {
753
+ if (!dryRun) rmSync(resolve(featuresDir, f));
754
+ console.log(` REMOVE: features/${f}`);
755
+ initChanges++;
756
+ }
757
+ }
758
+ // Also clear old features location if it exists
759
+ const oldFeaturesDir = resolve(target, ".github/agentic-lib/features");
760
+ if (existsSync(oldFeaturesDir)) {
761
+ for (const f of readdirSync(oldFeaturesDir)) {
762
+ if (!dryRun) rmSync(resolve(oldFeaturesDir, f));
763
+ console.log(` REMOVE: .github/agentic-lib/features/${f} (old location)`);
764
+ initChanges++;
765
+ }
766
+ if (!dryRun) rmdirSync(oldFeaturesDir);
767
+ console.log(" REMOVE: .github/agentic-lib/features/ (old location)");
768
+ }
769
+ // Clear library directory (generated from SOURCES.md)
770
+ const libraryDir = resolve(target, "library");
771
+ if (existsSync(libraryDir)) {
772
+ for (const f of readdirSync(libraryDir)) {
773
+ if (!dryRun) rmSync(resolve(libraryDir, f));
774
+ console.log(` REMOVE: library/${f}`);
775
+ initChanges++;
776
+ }
777
+ }
778
+ // Remove old getting-started-guide if it exists
779
+ const oldGuideDir = resolve(target, ".github/agentic-lib/getting-started-guide");
780
+ if (existsSync(oldGuideDir)) {
781
+ if (!dryRun) rmSync(oldGuideDir, { recursive: true });
782
+ console.log(" REMOVE: .github/agentic-lib/getting-started-guide/ (obsolete)");
783
+ initChanges++;
784
+ }
785
+ }
786
+
787
+ function initPurge(seedsDir) {
788
+ console.log("\n--- Purge: Reset Source Files to Seed State ---");
724
789
  const SEED_MAP = {
725
790
  "zero-main.js": "src/lib/main.js",
726
791
  "zero-main.test.js": "tests/unit/main.test.js",
727
792
  "zero-MISSION.md": "MISSION.md",
793
+ "zero-SOURCES.md": "SOURCES.md",
728
794
  "zero-package.json": "package.json",
729
795
  "zero-README.md": "README.md",
730
796
  };
@@ -734,19 +800,6 @@ function initPurge(seedsDir, agenticDir) {
734
800
  initCopyFile(src, resolve(target, targetRel), `SEED: ${seedFile} → ${targetRel}`);
735
801
  }
736
802
  }
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
803
  }
751
804
 
752
805
  function runInit() {
@@ -767,6 +820,7 @@ function runInit() {
767
820
  console.log("=== @xn-intenton-z2a/agentic-lib init ===");
768
821
  console.log(`Source: ${srcDir}`);
769
822
  console.log(`Target: ${target}`);
823
+ console.log(`Reseed: ${reseed}`);
770
824
  console.log(`Purge: ${purge}`);
771
825
  console.log(`Mode: ${dryRun ? "DRY RUN" : "LIVE"}`);
772
826
  console.log("");
@@ -777,7 +831,8 @@ function runInit() {
777
831
  initDirContents("seeds", resolve(agenticDir, "seeds"), "Seeds");
778
832
  initScripts(agenticDir);
779
833
  initConfig(seedsDir);
780
- if (purge) initPurge(seedsDir, agenticDir);
834
+ if (reseed) initReseed();
835
+ if (purge) initPurge(seedsDir);
781
836
 
782
837
  console.log(`\n${initChanges} change(s)${dryRun ? " (dry run)" : ""}`);
783
838
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xn-intenton-z2a/agentic-lib",
3
- "version": "7.1.20",
3
+ "version": "7.1.22",
4
4
  "description": "Agentic-lib Agentic Coding Systems SDK powering automated GitHub workflows.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -42,7 +42,7 @@ const PATH_DEFAULTS = {
42
42
  mission: "MISSION.md",
43
43
  source: "src/lib/",
44
44
  tests: "tests/unit/",
45
- features: ".github/agentic-lib/features/",
45
+ features: "features/",
46
46
  docs: "docs/",
47
47
  readme: "README.md",
48
48
  dependencies: "package.json",
@@ -92,7 +92,7 @@ export async function runCopilotTask({ model, systemMessage, prompt, writablePat
92
92
  });
93
93
 
94
94
  core.info("[copilot] Sending prompt and waiting for idle...");
95
- const response = await session.sendAndWait({ prompt }, 300000);
95
+ const response = await session.sendAndWait({ prompt }, 600000);
96
96
  core.info(`[copilot] sendAndWait resolved`);
97
97
  const tokensUsed = response?.data?.usage?.totalTokens || 0;
98
98
  const content = response?.data?.content || "";
@@ -7,6 +7,7 @@
7
7
  // - Retrying failed branches/issues beyond configured limits
8
8
  // - Writing to paths outside the allowed set
9
9
 
10
+ import { resolve } from "path";
10
11
  import { logSafetyCheck } from "./logging.js";
11
12
 
12
13
  /**
@@ -74,10 +75,12 @@ export async function checkAttemptLimit(octokit, repo, issueNumber, branchPrefix
74
75
  * @returns {boolean} True if the path is allowed
75
76
  */
76
77
  export function isPathWritable(targetPath, writablePaths) {
78
+ const resolvedTarget = resolve(targetPath);
77
79
  const writable = writablePaths.some((allowed) => {
78
- if (targetPath === allowed) return true;
79
- if (allowed.endsWith("/") && targetPath.startsWith(allowed)) return true;
80
- if (targetPath.startsWith(allowed + "/")) return true;
80
+ const resolvedAllowed = resolve(allowed);
81
+ if (resolvedTarget === resolvedAllowed) return true;
82
+ if (allowed.endsWith("/") && resolvedTarget.startsWith(resolvedAllowed)) return true;
83
+ if (resolvedTarget.startsWith(resolvedAllowed + "/")) return true;
81
84
  return false;
82
85
  });
83
86
  logSafetyCheck("path-writable", writable, { targetPath });
@@ -58,7 +58,7 @@ export function createAgentTools(writablePaths) {
58
58
  handler: ({ path, content }) => {
59
59
  const resolved = resolve(path);
60
60
  core.info(`[tool] write_file: ${resolved}`);
61
- if (!isPathWritable(resolved, writablePaths) && !isPathWritable(path, writablePaths)) {
61
+ if (!isPathWritable(resolved, writablePaths)) {
62
62
  return { error: `Path is not writable: ${path}. Writable paths: ${writablePaths.join(", ")}` };
63
63
  }
64
64
  try {
@@ -15,7 +15,7 @@ paths:
15
15
  permissions: []
16
16
  limit: 0
17
17
  featuresPath:
18
- path: ".github/agentic-lib/features/"
18
+ path: "features/"
19
19
  permissions: ["write"]
20
20
  limit: 2
21
21
 
@@ -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 --purge, test, PR, automerge.
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 --purge
40
- run: npx @xn-intenton-z2a/agentic-lib init --purge
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 --purge (agentic-lib@${VERSION})"
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 --purge ($(date -u +%Y-%m-%d))" \
66
- --body "Nightly init --purge. Auto-labelled for automerge." \
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
- Build a JavaScript library that is immediately useful to something or someone and it immediately available to run e.g. `npx @xn-intenton-z2a/<this package name>`.
3
+ Describe your project's mission here. The agentic workflows will evolve `src/lib/main.js` to fulfil this mission.
@@ -1,12 +1,12 @@
1
1
  # repo
2
2
 
3
- A JavaScript library that is immediately useful to something or someone and it immediately available to run e.g. `npx @xn-intenton-z2a/<this package name>`.
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 workflows in this repository will evolve `src/lib/main.js` toward your mission
9
+ 3. The workflows will evolve `src/lib/main.js` toward your mission
10
10
 
11
11
  ## Links
12
12
 
@@ -0,0 +1,6 @@
1
+ # Sources
2
+
3
+ Reference material and documentation sources for this project.
4
+
5
+ Add URLs, papers, API docs, or other reference material here.
6
+ The maintain-library workflow will process these into `library/` documents.
@@ -1,6 +1,6 @@
1
1
  # SPDX-License-Identifier: MIT
2
2
  # Copyright (C) 2025-2026 Polycode Limited
3
- # agentic-lib.toml — Configuration for @xn-intenton-z2a/agentic-lib
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 = ".github/agentic-lib/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": "@xn-intenton-z2a/repo",
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.20"
17
+ "@xn-intenton-z2a/agentic-lib": "^7.1.22"
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 // ".github/agentic-lib/features/"' "$CONFIG")
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 // ".github/agentic-lib/features/"' "$CONFIG")
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")