@xn-intenton-z2a/agentic-lib 7.4.8 → 7.4.10

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.
Files changed (45) hide show
  1. package/{src → .github}/agents/agent-apply-fix.md +10 -0
  2. package/{src → .github}/agents/agent-director.md +10 -0
  3. package/{src → .github}/agents/agent-discovery.md +8 -0
  4. package/{src → .github}/agents/agent-discussion-bot.md +9 -0
  5. package/{src → .github}/agents/agent-issue-resolution.md +12 -0
  6. package/{src → .github}/agents/agent-iterate.md +8 -0
  7. package/{src → .github}/agents/agent-maintain-features.md +8 -0
  8. package/{src → .github}/agents/agent-maintain-library.md +7 -0
  9. package/{src → .github}/agents/agent-review-issue.md +8 -0
  10. package/{src → .github}/agents/agent-supervisor.md +9 -0
  11. package/.github/workflows/agentic-lib-test.yml +4 -2
  12. package/.github/workflows/agentic-lib-workflow.yml +72 -28
  13. package/README.md +5 -7
  14. package/agentic-lib.toml +16 -38
  15. package/bin/agentic-lib.js +49 -60
  16. package/package.json +3 -4
  17. package/src/actions/agentic-step/action.yml +1 -1
  18. package/src/actions/agentic-step/copilot.js +0 -5
  19. package/src/actions/agentic-step/index.js +8 -1
  20. package/src/actions/agentic-step/logging.js +14 -2
  21. package/src/actions/agentic-step/tasks/direct.js +86 -65
  22. package/src/actions/agentic-step/tasks/discussions.js +198 -264
  23. package/src/actions/agentic-step/tasks/enhance-issue.js +84 -33
  24. package/src/actions/agentic-step/tasks/fix-code.js +111 -57
  25. package/src/actions/agentic-step/tasks/maintain-features.js +69 -52
  26. package/src/actions/agentic-step/tasks/maintain-library.js +57 -19
  27. package/src/actions/agentic-step/tasks/resolve-issue.js +43 -18
  28. package/src/actions/agentic-step/tasks/review-issue.js +117 -117
  29. package/src/actions/agentic-step/tasks/supervise.js +140 -151
  30. package/src/actions/agentic-step/tasks/transform.js +106 -258
  31. package/src/copilot/agents.js +2 -2
  32. package/src/copilot/config.js +2 -18
  33. package/src/copilot/{hybrid-session.js → copilot-session.js} +39 -7
  34. package/src/copilot/github-tools.js +514 -0
  35. package/src/copilot/guards.js +1 -1
  36. package/src/copilot/session.js +0 -141
  37. package/src/copilot/tools.js +4 -0
  38. package/src/iterate.js +1 -1
  39. package/src/scripts/push-to-logs.sh +1 -1
  40. package/src/seeds/zero-SCREENSHOT_INDEX.png +0 -0
  41. package/src/seeds/zero-package.json +1 -1
  42. package/src/agents/agentic-lib.yml +0 -66
  43. package/src/copilot/context.js +0 -457
  44. package/src/mcp/server.js +0 -830
  45. /package/{src → .github}/agents/agent-ready-issue.md +0 -0
@@ -9,6 +9,16 @@ relevance to the mission you may re-implement it or remove it.
9
9
 
10
10
  Apply the contributing guidelines to your response.
11
11
 
12
+ ## Context Gathering (Before Fixing)
13
+
14
+ Before applying a fix, gather context to avoid repeating past failures:
15
+
16
+ 1. **Read intentïon.md** (attached) — look for recurring failure patterns. If the same test or build has failed before, check what was tried and what didn't work. Don't repeat a fix that was already reverted.
17
+ 2. **Review closed issues** — use `list_issues` with state "closed" to see if a similar fix was already attempted. Learn from what succeeded and what didn't.
18
+ 3. **Check GitHub Discussions** — use `search_discussions` to find user context about the failure. Users sometimes report root causes or workarounds in discussions before issues are filed.
19
+
20
+ This prevents wasting budget on approaches that have already been tried and failed.
21
+
12
22
  You may complete the implementation of a feature and/or bring the code output in line with the README
13
23
  or other documentation. Do as much as you can all at once so that the build runs (even with nothing
14
24
  to build) and the tests pass and the main at least doesn't output an error.
@@ -41,6 +41,16 @@ When the mission is neither complete nor failed, produce a detailed gap analysis
41
41
  - Which metrics are NOT MET and what needs to happen to satisfy them
42
42
  - Prioritised list of what should be done next
43
43
 
44
+ ## Context Gathering
45
+
46
+ When evaluating mission status, use all available context:
47
+
48
+ 1. **Read intentïon.md** (attached) — examine the narrative for iteration trends. Look for evidence of steady progress (features landing, tests passing) vs stagnation (same failures repeating, budget consumed with no code changes). This informs whether the mission is genuinely progressing or stuck.
49
+ 2. **Check GitHub Discussions** — use `search_discussions` to find user feedback on the current state. Users may have declared satisfaction or raised concerns that affect the mission assessment.
50
+ 3. **Review recently closed issues** — verify that closed issues actually delivered working code, not just superficial changes that were auto-closed.
51
+
52
+ The narrative in intentïon.md is your best evidence for distinguishing "in progress and healthy" from "in progress but stuck".
53
+
44
54
  ## Output Format
45
55
 
46
56
  Respond with EXACTLY this structure:
@@ -46,6 +46,14 @@ Write a MISSION.md file with the following structure:
46
46
  [Specific, testable criteria that define "done" — these become the test assertions]
47
47
  ```
48
48
 
49
+ ## Context Gathering
50
+
51
+ Before writing the mission, gather additional context if tools are available:
52
+
53
+ 1. **Check GitHub Discussions** — use `search_discussions` or `list_discussions` to find user goals, feature requests, and feedback about the project. These provide valuable context about what the community values.
54
+ 2. **Read intentïon.md** (if attached) — examine the narrative for project history: what missions have been attempted before, what succeeded, and what failed. This helps you propose a mission that builds on past success rather than repeating past failures.
55
+ 3. **Review existing issues** — use `list_issues` to see what work is already planned or in progress. The mission should complement, not duplicate, existing plans.
56
+
49
57
  ## Important Rules
50
58
 
51
59
  - **Be specific** — don't write vague goals like "improve code quality". Write "add input validation to the `parse()` function for empty strings and null values"
@@ -77,3 +77,12 @@ The repository publishes a website via GitHub Pages that uses the JS library. Th
77
77
  ## Repository Context
78
78
 
79
79
  Use the contextual information provided (files, commit history, feature list, recent activity) to give informed, specific answers rather than generic ones. Reference actual state when answering questions about progress.
80
+
81
+ ## Narrative Awareness (intentïon.md)
82
+
83
+ When intentïon.md is available (attached), use it to enrich your responses:
84
+
85
+ 1. **Reference recent progress** — cite specific iterations and outcomes from the narrative when discussing what the repository has been doing. This makes your responses feel informed and alive rather than generic.
86
+ 2. **Acknowledge setbacks** — if the narrative shows repeated failures or reverted approaches, be honest about them when asked. Suggest what might work differently.
87
+ 3. **Connect user requests to history** — when a user asks for something, check if similar work was attempted in the narrative. You can say "I tried something similar in iteration N — here's what happened" to build continuity.
88
+ 4. **Use trends for suggestions** — if the narrative shows the mission is nearly complete, suggest the user try a new mission. If it shows the pipeline is struggling, suggest the user adjust the mission scope or provide more specific acceptance criteria.
@@ -66,6 +66,18 @@ When writing both tests and implementation:
66
66
 
67
67
  Follow the linting guidelines and the formatting guidelines from the included config.
68
68
 
69
+ ## Context Gathering (Before You Start)
70
+
71
+ Before writing any code, gather context to avoid repeating past mistakes and to align with user expectations:
72
+
73
+ 1. **Read intentïon.md** (attached) — scan for patterns in past iterations. Look for recurring test failures, reverted approaches, and traps previous transforms fell into. If a particular approach failed before, try a different strategy.
74
+ 2. **Search GitHub Discussions** — use `list_discussions` or `search_discussions` to find user feedback, feature requests, and clarifications about the mission. Users often provide critical context in discussions that isn't in the issue body.
75
+ 3. **Review closed issues** — use `list_issues` with state "closed" to see what was already attempted and resolved. Avoid re-implementing rejected approaches or duplicating work that's already landed.
76
+ 4. **Check open PRs** — use `list_prs` to see if related work is already in flight. Coordinate rather than conflict.
77
+ 5. **Examine CONTRIBUTING.md and MISSION.md** — these are the source of truth. When in doubt, the mission's acceptance criteria override any other guidance.
78
+
79
+ This context-gathering step is an investment that prevents wasted budget on approaches that have already been tried and failed.
80
+
69
81
  ## Evidence Gathering
70
82
 
71
83
  When implementing features, also produce evidence artifacts under `docs/`:
@@ -26,6 +26,14 @@ Implement the MISSION described in the user prompt. This means:
26
26
  5. Run `run_tests` to verify everything passes
27
27
  6. If tests fail, read the error output carefully, fix the code, and repeat
28
28
 
29
+ ## Context Gathering (Before You Start)
30
+
31
+ Before writing code, gather context to work efficiently:
32
+
33
+ 1. **Read intentïon.md** (if attached) — scan for patterns in past iterations. If a particular approach failed before (test failures, reverted code), try a different strategy. The narrative records what was tried and what happened.
34
+ 2. **Check existing tests** — understand what's already tested before writing new tests. Don't duplicate existing coverage.
35
+ 3. **Read MISSION.md carefully** — the acceptance criteria are your primary target. Every line of code you write should serve at least one acceptance criterion.
36
+
29
37
  ## Important Rules
30
38
 
31
39
  - Keep existing exports and functionality — add to them, don't replace
@@ -30,6 +30,14 @@ A feature can be added based on a behaviour already present in the repository de
30
30
  Features must be achievable in a single software repository not part of a corporate initiative.
31
31
  The feature spec should be a multiline markdown with a few level 1 headings.
32
32
  The feature must be compatible with the mission statement in MISSION.md and ideally realise part of the value in the mission.
33
+
34
+ ## Context Gathering
35
+
36
+ Before generating or updating features, gather context:
37
+
38
+ 1. **Check GitHub Discussions** — use `search_discussions` to find user feature requests and feedback. Users often suggest features or express priorities in discussions that should inform which features to create or prioritise.
39
+ 2. **Read intentïon.md** (attached) — examine the narrative for which features have been successfully implemented and which have caused problems. Propose features that build on successful patterns rather than repeating problematic ones.
40
+ 3. **Review open issues** — use `list_issues` to see what work is already planned. Avoid creating features that duplicate existing issue scope.
33
41
  The feature must be something that can be realised in a single source file (as below), ideally just as a library, CLI tool or possibly an HTTP API in combination with infrastructure as code deployment.
34
42
  The repository also has a website in `src/web/` that uses the JS library. When proposing features, consider:
35
43
  - The library API (`src/lib/main.js`) and its exports
@@ -32,3 +32,10 @@ For the normalised extract, extract the technical information from the crawled d
32
32
  directly usable format.
33
33
  Do not describe what information exists, include the actual information itself. The content must be specific and technical.
34
34
  Each item in the table of contents must have the technical details that thoroughly explain the implementation.
35
+
36
+ ## Context Gathering
37
+
38
+ Before extracting library documents, gather context:
39
+
40
+ 1. **Check GitHub Discussions** — use `search_discussions` to find technical context and user questions about the project's dependencies and tools. These discussions often contain implementation details that complement crawled content.
41
+ 2. **Read intentïon.md** (attached) — look for technical challenges encountered during iterations. These highlight which library details are most needed by the transformation agents and should be prioritised in documentation.
@@ -20,6 +20,14 @@ An issue is NOT resolved unless ALL of the following are true:
20
20
  If any of these are missing, the issue is NOT resolved — keep it open or create a follow-up issue for the gap.
21
21
  Do not close an issue just because implementation code exists without matching tests and website updates.
22
22
 
23
+ ## Context Gathering
24
+
25
+ Before declaring an issue resolved, gather additional context:
26
+
27
+ 1. **Read intentïon.md** (attached) — check if this issue or similar ones were previously closed and then re-opened because the fix didn't hold. If so, apply extra scrutiny to the current resolution.
28
+ 2. **Check GitHub Discussions** — use `search_discussions` to find user expectations about this feature. Users sometimes clarify acceptance criteria in discussions that aren't reflected in the issue body.
29
+ 3. **Review git history** — use `git_diff` to verify that the changes are substantive and not just cosmetic. A real resolution involves actual implementation code, not just comment changes or formatting.
30
+
23
31
  If the mission could have been fully accomplished in this transform but the solution only partially addresses it,
24
32
  note this gap and suggest a follow-up issue for the remaining work.
25
33
 
@@ -85,6 +85,15 @@ Check the Recent Activity log and Recently Closed Issues for patterns:
85
85
  **Dedup deadlock recovery:**
86
86
  - If your issue creation is blocked by the dedup guard (similar to a recently closed issue), do NOT retry the same issue title. Instead, create an issue with a different scope — e.g. "fix: resolve failing tests on main" or "fix: align code and test expectations" — with both the `instability` and `ready` labels. This sidesteps the dedup guard and directs the dev job to the actual problem. The `instability` label gives the issue mechanical priority over other `ready` issues.
87
87
 
88
+ ## Trend Analysis (intentïon.md)
89
+
90
+ When intentïon.md is available (attached), examine it for strategic insights:
91
+
92
+ 1. **Iteration trends** — look for patterns in recent transforms: are they productive (code landed, tests passing) or spinning (same issues re-opened, budget consumed with no progress)? Adjust your dispatch strategy accordingly.
93
+ 2. **Recurring failures** — if the same test or feature keeps failing across iterations, don't just re-dispatch transform. Create a targeted issue that explicitly addresses the root cause, or dispatch fix-code instead.
94
+ 3. **Budget trajectory** — correlate the narrative with the budget shown in context. If budget is being consumed rapidly with little progress, switch to conservative actions (review, maintain) rather than speculative transforms.
95
+ 4. **Mission progress** — use the narrative to assess how close the mission is to completion. If most acceptance criteria are met, focus on closing gaps rather than broad transforms.
96
+
88
97
  ## Discussions Awareness
89
98
 
90
99
  Check the Recent Activity log for discussion bot referrals (lines containing `discussion-request-supervisor`). These indicate a user asked the bot something that requires supervisor action. **Prioritise responding to these referrals.**
@@ -130,12 +130,14 @@ jobs:
130
130
  path: SCREENSHOT_INDEX.png
131
131
  if-no-files-found: ignore
132
132
 
133
- - name: Push screenshot to agentic-lib-logs branch
133
+ - name: Push screenshot to log branch
134
134
  if: |
135
135
  github.ref == 'refs/heads/main' &&
136
136
  github.repository != 'xn-intenton-z2a/agentic-lib' &&
137
137
  (github.event_name == 'schedule' || inputs.push-screenshot == 'true' || inputs.push-screenshot == true)
138
- run: bash .github/agentic-lib/scripts/push-to-logs.sh SCREENSHOT_INDEX.png
138
+ env:
139
+ LOG_BRANCH: ${{ inputs.log-branch || 'agentic-lib-logs' }}
140
+ run: bash .github/agentic-lib/scripts/push-to-logs.sh "${SCREENSHOT_FILE:-SCREENSHOT_INDEX.png}"
139
141
 
140
142
  # ─── Dispatch fix workflow when unit tests fail on main ─────────────
141
143
  dispatch-fix:
@@ -148,13 +148,13 @@ jobs:
148
148
  run: |
149
149
  MODEL='${{ inputs.model }}'
150
150
  if [ -z "$MODEL" ] && [ -f "${{ env.configPath }}" ]; then
151
- TOML_MODEL=$(grep '^\s*model' "${{ env.configPath }}" | head -1 | sed 's/.*= *"\([^"]*\)".*/\1/')
151
+ TOML_MODEL=$(grep '^\s*model' "${{ env.configPath }}" | head -1 | sed 's/.*= *"\([^"]*\)".*/\1/' || true)
152
152
  MODEL="${TOML_MODEL}"
153
153
  fi
154
154
  echo "model=${MODEL:-gpt-5-mini}" >> $GITHUB_OUTPUT
155
155
  PROFILE='${{ inputs.profile }}'
156
156
  if [ -z "$PROFILE" ] && [ -f "${{ env.configPath }}" ]; then
157
- TOML_PROFILE=$(grep '^\s*profile' "${{ env.configPath }}" | head -1 | sed 's/.*= *"\([^"]*\)".*/\1/')
157
+ TOML_PROFILE=$(grep '^\s*profile' "${{ env.configPath }}" | head -1 | sed 's/.*= *"\([^"]*\)".*/\1/' || true)
158
158
  PROFILE="${TOML_PROFILE}"
159
159
  fi
160
160
  echo "profile=${PROFILE}" >> $GITHUB_OUTPUT
@@ -178,6 +178,18 @@ jobs:
178
178
  echo "dry-run=${DRY_RUN}" >> $GITHUB_OUTPUT
179
179
  CONFIG='${{ inputs.config-path }}'
180
180
  echo "config-path=${CONFIG:-${{ env.configPath }}}" >> $GITHUB_OUTPUT
181
+ # Bot config: log file, log branch, screenshot file
182
+ LOG_FILE=""
183
+ LOG_BRANCH=""
184
+ SCREENSHOT=""
185
+ if [ -f "${{ env.configPath }}" ]; then
186
+ LOG_FILE=$(grep '^\s*log-file' "${{ env.configPath }}" | head -1 | sed 's/.*= *"\([^"]*\)".*/\1/' || true)
187
+ LOG_BRANCH=$(grep '^\s*log-branch' "${{ env.configPath }}" | head -1 | sed 's/.*= *"\([^"]*\)".*/\1/' || true)
188
+ SCREENSHOT=$(grep '^\s*screenshot-file' "${{ env.configPath }}" | head -1 | sed 's/.*= *"\([^"]*\)".*/\1/' || true)
189
+ fi
190
+ echo "log-file=${LOG_FILE:-intentïon.md}" >> $GITHUB_OUTPUT
191
+ echo "log-branch=${LOG_BRANCH:-agentic-lib-logs}" >> $GITHUB_OUTPUT
192
+ echo "screenshot-file=${SCREENSHOT:-SCREENSHOT_INDEX.png}" >> $GITHUB_OUTPUT
181
193
  outputs:
182
194
  model: ${{ steps.normalise.outputs.model }}
183
195
  profile: ${{ steps.normalise.outputs.profile }}
@@ -188,6 +200,9 @@ jobs:
188
200
  pr-number: ${{ steps.normalise.outputs.pr-number }}
189
201
  dry-run: ${{ steps.normalise.outputs.dry-run }}
190
202
  config-path: ${{ steps.normalise.outputs.config-path }}
203
+ log-file: ${{ steps.normalise.outputs.log-file }}
204
+ log-branch: ${{ steps.normalise.outputs.log-branch }}
205
+ screenshot-file: ${{ steps.normalise.outputs.screenshot-file }}
191
206
 
192
207
  # ─── PR Cleanup: merge/close/delete stale PRs and branches ─────────
193
208
  pr-cleanup:
@@ -357,6 +372,9 @@ jobs:
357
372
  - name: Gather telemetry
358
373
  id: gather
359
374
  uses: actions/github-script@v8
375
+ env:
376
+ LOG_FILE: ${{ needs.params.outputs.log-file }}
377
+ LOG_BRANCH: ${{ needs.params.outputs.log-branch }}
360
378
  with:
361
379
  script: |
362
380
  const fs = require('fs');
@@ -460,23 +478,25 @@ jobs:
460
478
  const missionComplete = fs.existsSync('MISSION_COMPLETE.md');
461
479
  const missionFailed = fs.existsSync('MISSION_FAILED.md');
462
480
 
463
- // Activity log stats (fetched from agentic-lib-logs branch)
481
+ // Activity log stats (fetched from log branch)
482
+ const logFile = process.env.LOG_FILE || 'intentïon.md';
483
+ const logBranch = process.env.LOG_BRANCH || 'agentic-lib-logs';
464
484
  let activityStats = null;
465
485
  try {
466
- // Try agentic-lib-logs branch first (new location), fall back to local file (legacy)
486
+ // Try log branch first, fall back to local file (legacy)
467
487
  let log = null;
468
- for (const logFile of ['intenti\u00F6n.md', 'intention.md']) {
488
+ for (const lf of [logFile, 'intention.md']) {
469
489
  try {
470
490
  const { data } = await github.rest.repos.getContent({
471
- owner, repo, path: logFile, ref: 'agentic-lib-logs',
491
+ owner, repo, path: lf, ref: logBranch,
472
492
  });
473
493
  log = Buffer.from(data.content, 'base64').toString('utf8');
474
494
  break;
475
495
  } catch { /* try next */ }
476
496
  }
477
- // Fall back to local file (for repos not yet using agentic-lib-logs branch)
497
+ // Fall back to local file
478
498
  if (!log) {
479
- const logPath = fs.existsSync('intenti\u00F6n.md') ? 'intenti\u00F6n.md' : (fs.existsSync('intention.md') ? 'intention.md' : null);
499
+ const logPath = fs.existsSync(logFile) ? logFile : (fs.existsSync('intention.md') ? 'intention.md' : null);
480
500
  if (logPath) log = fs.readFileSync(logPath, 'utf8');
481
501
  }
482
502
  if (log) {
@@ -570,10 +590,14 @@ jobs:
570
590
  fetch-depth: 0
571
591
  ref: ${{ inputs.ref || github.sha }}
572
592
 
573
- - name: Fetch log from agentic-lib-logs branch
593
+ - name: Fetch log and screenshot from log branch
594
+ env:
595
+ LOG_FILE: ${{ needs.params.outputs.log-file }}
596
+ LOG_BRANCH: ${{ needs.params.outputs.log-branch }}
597
+ SCREENSHOT_FILE: ${{ needs.params.outputs.screenshot-file }}
574
598
  run: |
575
- for f in "intentïon.md" "intention.md"; do
576
- git show "origin/agentic-lib-logs:${f}" > "$f" 2>/dev/null || true
599
+ for f in "${LOG_FILE}" "intention.md" "${SCREENSHOT_FILE}"; do
600
+ git show "origin/${LOG_BRANCH}:${f}" > "$f" 2>/dev/null || true
577
601
  done
578
602
 
579
603
  - name: Check mission-complete signal
@@ -680,9 +704,11 @@ jobs:
680
704
  id: get-sha
681
705
  run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
682
706
 
683
- - name: Push log to agentic-lib-logs branch
707
+ - name: Push log to log branch
684
708
  if: github.repository != 'xn-intenton-z2a/agentic-lib' && needs.params.outputs.dry-run != 'true'
685
- run: bash .github/agentic-lib/scripts/push-to-logs.sh "intentïon.md" "intention.md"
709
+ env:
710
+ LOG_BRANCH: ${{ needs.params.outputs.log-branch }}
711
+ run: bash .github/agentic-lib/scripts/push-to-logs.sh "${{ needs.params.outputs.log-file }}" "intention.md"
686
712
 
687
713
  # ─── Director: LLM evaluates mission status (complete/failed/in-progress) ──
688
714
  director:
@@ -701,10 +727,14 @@ jobs:
701
727
  fetch-depth: 0
702
728
  ref: ${{ needs.maintain.outputs.commit-sha || github.sha }}
703
729
 
704
- - name: Fetch log from agentic-lib-logs branch
730
+ - name: Fetch log and screenshot from log branch
731
+ env:
732
+ LOG_FILE: ${{ needs.params.outputs.log-file }}
733
+ LOG_BRANCH: ${{ needs.params.outputs.log-branch }}
734
+ SCREENSHOT_FILE: ${{ needs.params.outputs.screenshot-file }}
705
735
  run: |
706
- for f in "intentïon.md" "intention.md"; do
707
- git show "origin/agentic-lib-logs:${f}" > "$f" 2>/dev/null || true
736
+ for f in "${LOG_FILE}" "intention.md" "${SCREENSHOT_FILE}"; do
737
+ git show "origin/${LOG_BRANCH}:${f}" > "$f" 2>/dev/null || true
708
738
  done
709
739
 
710
740
  - uses: actions/setup-node@v6
@@ -736,9 +766,11 @@ jobs:
736
766
  instructions: ".github/agents/agent-director.md"
737
767
  model: ${{ needs.params.outputs.model }}
738
768
 
739
- - name: Push log to agentic-lib-logs branch
769
+ - name: Push log to log branch
740
770
  if: github.repository != 'xn-intenton-z2a/agentic-lib' && needs.params.outputs.dry-run != 'true'
741
- run: bash .github/agentic-lib/scripts/push-to-logs.sh "intentïon.md" "intention.md"
771
+ env:
772
+ LOG_BRANCH: ${{ needs.params.outputs.log-branch }}
773
+ run: bash .github/agentic-lib/scripts/push-to-logs.sh "${{ needs.params.outputs.log-file }}" "intention.md"
742
774
 
743
775
  # ─── Supervisor: LLM decides what to do (after director evaluates) ──
744
776
  supervisor:
@@ -756,10 +788,14 @@ jobs:
756
788
  fetch-depth: 0
757
789
  ref: ${{ needs.maintain.outputs.commit-sha || github.sha }}
758
790
 
759
- - name: Fetch log from agentic-lib-logs branch
791
+ - name: Fetch log and screenshot from log branch
792
+ env:
793
+ LOG_FILE: ${{ needs.params.outputs.log-file }}
794
+ LOG_BRANCH: ${{ needs.params.outputs.log-branch }}
795
+ SCREENSHOT_FILE: ${{ needs.params.outputs.screenshot-file }}
760
796
  run: |
761
- for f in "intentïon.md" "intention.md"; do
762
- git show "origin/agentic-lib-logs:${f}" > "$f" 2>/dev/null || true
797
+ for f in "${LOG_FILE}" "intention.md" "${SCREENSHOT_FILE}"; do
798
+ git show "origin/${LOG_BRANCH}:${f}" > "$f" 2>/dev/null || true
763
799
  done
764
800
 
765
801
  - uses: actions/setup-node@v6
@@ -791,9 +827,11 @@ jobs:
791
827
  instructions: ".github/agents/agent-supervisor.md"
792
828
  model: ${{ needs.params.outputs.model }}
793
829
 
794
- - name: Push log to agentic-lib-logs branch
830
+ - name: Push log to log branch
795
831
  if: github.repository != 'xn-intenton-z2a/agentic-lib' && needs.params.outputs.dry-run != 'true'
796
- run: bash .github/agentic-lib/scripts/push-to-logs.sh "intentïon.md" "intention.md"
832
+ env:
833
+ LOG_BRANCH: ${{ needs.params.outputs.log-branch }}
834
+ run: bash .github/agentic-lib/scripts/push-to-logs.sh "${{ needs.params.outputs.log-file }}" "intention.md"
797
835
 
798
836
  # ─── Fix stuck PRs with failing checks ─────────────────────────────
799
837
  fix-stuck:
@@ -1187,10 +1225,14 @@ jobs:
1187
1225
  token: ${{ secrets.GITHUB_TOKEN }}
1188
1226
  ref: ${{ needs.maintain.outputs.commit-sha || github.sha }}
1189
1227
 
1190
- - name: Fetch log from agentic-lib-logs branch
1228
+ - name: Fetch log and screenshot from log branch
1229
+ env:
1230
+ LOG_FILE: ${{ needs.params.outputs.log-file }}
1231
+ LOG_BRANCH: ${{ needs.params.outputs.log-branch }}
1232
+ SCREENSHOT_FILE: ${{ needs.params.outputs.screenshot-file }}
1191
1233
  run: |
1192
- for f in "intentïon.md" "intention.md"; do
1193
- git show "origin/agentic-lib-logs:${f}" > "$f" 2>/dev/null || true
1234
+ for f in "${LOG_FILE}" "intention.md" "${SCREENSHOT_FILE}"; do
1235
+ git show "origin/${LOG_BRANCH}:${f}" > "$f" 2>/dev/null || true
1194
1236
  done
1195
1237
 
1196
1238
  - uses: actions/setup-node@v6
@@ -1357,9 +1399,11 @@ jobs:
1357
1399
  commit-message: "agentic-step: transform issue #${{ steps.issue.outputs.issue-number }}"
1358
1400
  push-ref: ${{ steps.branch.outputs.branchName }}
1359
1401
 
1360
- - name: Push log to agentic-lib-logs branch
1402
+ - name: Push log to log branch
1361
1403
  if: github.repository != 'xn-intenton-z2a/agentic-lib' && needs.params.outputs.dry-run != 'true'
1362
- run: bash .github/agentic-lib/scripts/push-to-logs.sh "intentïon.md" "intention.md"
1404
+ env:
1405
+ LOG_BRANCH: ${{ needs.params.outputs.log-branch }}
1406
+ run: bash .github/agentic-lib/scripts/push-to-logs.sh "${{ needs.params.outputs.log-file }}" "intention.md"
1363
1407
 
1364
1408
  - name: Create PR and attempt merge
1365
1409
  if: github.repository != 'xn-intenton-z2a/agentic-lib' && steps.issue.outputs.issue-number != '' && needs.params.outputs.dry-run != 'true' && steps.pre-commit-test.outputs.tests-passed == 'true' && steps.pre-commit-behaviour-test.outputs.tests-passed != 'false'
package/README.md CHANGED
@@ -195,16 +195,14 @@ log-file = "intentïon.md"
195
195
 
196
196
  The `profile` setting controls all tuning defaults. Three profiles are built in:
197
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 |
198
+ | Profile | Budget | Issues | Best for |
199
+ |---------|--------|--------|----------|
200
+ | `min` | 16 cycles | 5, 14d stale | CI testing, quick validation |
201
+ | `recommended` | 32 cycles | 20, 30d stale | Balanced cost/quality |
202
+ | `max` | 128 cycles | 100, 90d stale | Complex missions |
203
203
 
204
204
  Override individual knobs in `[tuning]` to deviate from a profile. Limits (`[limits]`) also scale with the profile.
205
205
 
206
- The legacy YAML config at `.github/agentic-lib/agents/agentic-lib.yml` is also supported as a fallback.
207
-
208
206
  ## The `agentic-step` Action
209
207
 
210
208
  The core of the system is a single GitHub Action that handles all autonomous tasks:
package/agentic-lib.toml CHANGED
@@ -52,14 +52,8 @@ model = "gpt-5-mini"
52
52
  # reasoning-effort = "low" # low | medium | high | none (none = disable entirely)
53
53
  infinite-sessions = false # set to true for long sessions with compaction
54
54
  # transformation-budget = 4 # max code-changing cycles per run (0 = unlimited)
55
- # max-feature-files = 3
56
- # max-source-files = 3
57
- # max-source-chars = 1000
58
- # max-test-chars = 500
59
55
  # max-issues = 5
60
- # issue-body-limit = 200
61
56
  # stale-days = 14
62
- # max-summary-chars = 500
63
57
  # max-discussion-comments = 5
64
58
 
65
59
  # ─── Profile Definitions ────────────────────────────────────────────
@@ -68,19 +62,13 @@ infinite-sessions = false # set to true for long sessions with compaction
68
62
  # [tuning] or [limits] to deviate from the active profile.
69
63
 
70
64
  [profiles.min]
71
- # ~10% of gpt-4.1 context (128K). Fast, cheap — CI testing, quick validation.
65
+ # Fast, cheap — CI testing, quick validation.
72
66
  reasoning-effort = "low" # low | medium | high | none
73
67
  infinite-sessions = false # enable session compaction for long runs
74
68
  transformation-budget = 16 # max code-changing cycles per run
75
- max-feature-files = 3 # max feature files included in prompts
76
- max-source-files = 3 # max source files included in prompts
77
- max-source-chars = 4000 # max chars of each source file's content included in prompts
78
- max-test-chars = 2000 # max chars of each test file's content included in prompts
79
- max-issues = 5 # max open issues included in prompts
80
- issue-body-limit = 1000 # max chars of each issue's body text included in prompts
81
- stale-days = 14 # days since last activity before an issue is considered stale and excluded
82
- max-summary-chars = 2000 # max chars of each document's summary included in prompts
83
- max-discussion-comments = 3 # max recent discussion comments (newest first) included in prompts
69
+ max-issues = 5 # max open issues fetched from GitHub
70
+ stale-days = 14 # days since last activity before an issue is considered stale
71
+ max-discussion-comments = 3 # max recent discussion comments fetched
84
72
  max-feature-issues = 1 # max concurrent feature development issues
85
73
  max-maintenance-issues = 1 # max concurrent maintenance issues
86
74
  max-attempts-per-branch = 2 # max transform attempts before abandoning a branch
@@ -89,19 +77,13 @@ features-limit = 2 # max feature files in features/ director
89
77
  library-limit = 8 # max library entries in library/ directory
90
78
 
91
79
  [profiles.recommended]
92
- # ~30% of claude-sonnet-4 context (216K). Balanced — good results, default for consumer repos.
80
+ # Balanced — good results, default for consumer repos.
93
81
  reasoning-effort = "medium" # low | medium | high | none
94
82
  infinite-sessions = true # enable session compaction for long runs
95
83
  transformation-budget = 32 # max code-changing cycles per run
96
- max-feature-files = 10 # max feature files included in prompts
97
- max-source-files = 10 # max source files included in prompts
98
- max-source-chars = 8000 # max chars of each source file's content included in prompts
99
- max-test-chars = 5000 # max chars of each test file's content included in prompts
100
- max-issues = 15 # max open issues included in prompts
101
- issue-body-limit = 2000 # max chars of each issue's body text included in prompts
102
- stale-days = 30 # days since last activity before an issue is considered stale and excluded
103
- max-summary-chars = 5000 # max chars of each document's summary included in prompts
104
- max-discussion-comments = 10 # max recent discussion comments (newest first) included in prompts
84
+ max-issues = 15 # max open issues fetched from GitHub
85
+ stale-days = 30 # days since last activity before an issue is considered stale
86
+ max-discussion-comments = 10 # max recent discussion comments fetched
105
87
  max-feature-issues = 2 # max concurrent feature development issues
106
88
  max-maintenance-issues = 1 # max concurrent maintenance issues
107
89
  max-attempts-per-branch = 3 # max transform attempts before abandoning a branch
@@ -110,19 +92,13 @@ features-limit = 4 # max feature files in features/ director
110
92
  library-limit = 32 # max library entries in library/ directory
111
93
 
112
94
  [profiles.max]
113
- # ~90% of gpt-5-mini context (264K). Thorough — maximum context for complex missions.
95
+ # Thorough — maximum context for complex missions.
114
96
  reasoning-effort = "high" # low | medium | high | none
115
97
  infinite-sessions = true # enable session compaction for long runs
116
98
  transformation-budget = 128 # max code-changing cycles per run
117
- max-feature-files = 20 # max feature files included in prompts
118
- max-source-files = 25 # max source files included in prompts
119
- max-source-chars = 12000 # max chars of each source file's content included in prompts
120
- max-test-chars = 8000 # max chars of each test file's content included in prompts
121
- max-issues = 30 # max open issues included in prompts
122
- issue-body-limit = 3000 # max chars of each issue's body text included in prompts
123
- stale-days = 90 # days since last activity before an issue is considered stale and excluded
124
- max-summary-chars = 8000 # max chars of each document's summary included in prompts
125
- max-discussion-comments = 20 # max recent discussion comments (newest first) included in prompts
99
+ max-issues = 30 # max open issues fetched from GitHub
100
+ stale-days = 90 # days since last activity before an issue is considered stale
101
+ max-discussion-comments = 20 # max recent discussion comments fetched
126
102
  max-feature-issues = 4 # max concurrent feature development issues
127
103
  max-maintenance-issues = 2 # max concurrent maintenance issues
128
104
  max-attempts-per-branch = 5 # max transform attempts before abandoning a branch
@@ -133,9 +109,11 @@ library-limit = 64 # max library entries in library/ directo
133
109
  [mission-complete]
134
110
  # Thresholds for deterministic mission-complete declaration.
135
111
  # All conditions must be met simultaneously.
136
- min-resolved-issues = 3 # minimum closed-as-RESOLVED issues since init
137
- min-dedicated-tests = 1 # minimum test files that import from src/lib/
112
+ min-resolved-issues = 2 # minimum closed-as-RESOLVED issues since init
113
+ min-dedicated-tests = 0 # minimum test files that import from src/lib/
138
114
  max-source-todos = 0 # max TODO comments allowed in ./src (0 = none)
139
115
 
140
116
  [bot]
141
117
  log-file = "test/intentïon.md" #@dist "intentïon.md"
118
+ log-branch = "agentic-lib-logs"
119
+ screenshot-file = "SCREENSHOT_INDEX.png"