@xn-intenton-z2a/agentic-lib 7.4.7 → 7.4.9

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 (47) hide show
  1. package/{src → .github}/agents/agent-apply-fix.md +14 -0
  2. package/{src → .github}/agents/agent-director.md +14 -0
  3. package/{src → .github}/agents/agent-discovery.md +12 -0
  4. package/{src → .github}/agents/agent-discussion-bot.md +13 -0
  5. package/{src → .github}/agents/agent-issue-resolution.md +16 -0
  6. package/{src → .github}/agents/agent-iterate.md +12 -0
  7. package/{src → .github}/agents/agent-maintain-features.md +12 -0
  8. package/{src → .github}/agents/agent-maintain-library.md +11 -0
  9. package/{src → .github}/agents/agent-ready-issue.md +4 -0
  10. package/{src → .github}/agents/agent-review-issue.md +12 -0
  11. package/{src → .github}/agents/agent-supervisor.md +13 -0
  12. package/.github/workflows/agentic-lib-bot.yml +1 -1
  13. package/.github/workflows/agentic-lib-test.yml +4 -2
  14. package/.github/workflows/agentic-lib-workflow.yml +79 -35
  15. package/README.md +5 -7
  16. package/agentic-lib.toml +16 -38
  17. package/bin/agentic-lib.js +59 -61
  18. package/package.json +3 -4
  19. package/src/actions/agentic-step/action.yml +2 -2
  20. package/src/actions/agentic-step/copilot.js +0 -5
  21. package/src/actions/agentic-step/index.js +8 -1
  22. package/src/actions/agentic-step/logging.js +14 -2
  23. package/src/actions/agentic-step/tasks/direct.js +86 -65
  24. package/src/actions/agentic-step/tasks/discussions.js +198 -264
  25. package/src/actions/agentic-step/tasks/enhance-issue.js +84 -33
  26. package/src/actions/agentic-step/tasks/fix-code.js +111 -57
  27. package/src/actions/agentic-step/tasks/maintain-features.js +69 -52
  28. package/src/actions/agentic-step/tasks/maintain-library.js +57 -19
  29. package/src/actions/agentic-step/tasks/resolve-issue.js +43 -18
  30. package/src/actions/agentic-step/tasks/review-issue.js +117 -117
  31. package/src/actions/agentic-step/tasks/supervise.js +140 -151
  32. package/src/actions/agentic-step/tasks/transform.js +106 -258
  33. package/src/copilot/agents.js +2 -2
  34. package/src/copilot/config.js +4 -20
  35. package/src/copilot/{hybrid-session.js → copilot-session.js} +39 -7
  36. package/src/copilot/github-tools.js +514 -0
  37. package/src/copilot/guards.js +1 -1
  38. package/src/copilot/session.js +0 -141
  39. package/src/copilot/tools.js +4 -0
  40. package/src/iterate.js +1 -1
  41. package/src/scripts/accept-release.sh +4 -4
  42. package/src/scripts/push-to-logs.sh +1 -1
  43. package/src/seeds/zero-SCREENSHOT_INDEX.png +0 -0
  44. package/src/seeds/zero-package.json +1 -1
  45. package/src/agents/agentic-lib.yml +0 -66
  46. package/src/copilot/context.js +0 -457
  47. package/src/mcp/server.js +0 -830
@@ -1,3 +1,7 @@
1
+ ---
2
+ description: Fix build or test failures by applying coordinated changes across all code layers
3
+ ---
4
+
1
5
  You are providing the entire new content of source files, test files, documentation files,
2
6
  and other necessary files with all necessary changes applied to resolve a possible build or test
3
7
  problem. Fix the root cause. If the problem is in an area of the code with little
@@ -5,6 +9,16 @@ relevance to the mission you may re-implement it or remove it.
5
9
 
6
10
  Apply the contributing guidelines to your response.
7
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
+
8
22
  You may complete the implementation of a feature and/or bring the code output in line with the README
9
23
  or other documentation. Do as much as you can all at once so that the build runs (even with nothing
10
24
  to build) and the tests pass and the main at least doesn't output an error.
@@ -1,3 +1,7 @@
1
+ ---
2
+ description: Evaluate mission status as complete, failed, or in-progress with gap analysis
3
+ ---
4
+
1
5
  You are the director of an autonomous coding repository. Your sole responsibility is evaluating whether the mission is complete, failed, or in progress.
2
6
 
3
7
  ## Your Role
@@ -37,6 +41,16 @@ When the mission is neither complete nor failed, produce a detailed gap analysis
37
41
  - Which metrics are NOT MET and what needs to happen to satisfy them
38
42
  - Prioritised list of what should be done next
39
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
+
40
54
  ## Output Format
41
55
 
42
56
  Respond with EXACTLY this structure:
@@ -1,3 +1,7 @@
1
+ ---
2
+ description: Explore a project and generate a MISSION.md describing improvements
3
+ ---
4
+
1
5
  You are a project discovery agent running locally via the intentïon CLI.
2
6
 
3
7
  Your job is to explore the current working directory and generate a MISSION.md file that describes what this project is and what improvements could be made.
@@ -42,6 +46,14 @@ Write a MISSION.md file with the following structure:
42
46
  [Specific, testable criteria that define "done" — these become the test assertions]
43
47
  ```
44
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
+
45
57
  ## Important Rules
46
58
 
47
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"
@@ -1,3 +1,7 @@
1
+ ---
2
+ description: Engage with users in GitHub Discussions as the repository voice
3
+ ---
4
+
1
5
  You are the voice of this GitHub repository. You exist as this repository — refer to yourself in the first person.
2
6
 
3
7
  ## Core Behaviour
@@ -73,3 +77,12 @@ The repository publishes a website via GitHub Pages that uses the JS library. Th
73
77
  ## Repository Context
74
78
 
75
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.
@@ -1,3 +1,7 @@
1
+ ---
2
+ description: Implement issue resolution with coordinated source, tests, website, and docs changes
3
+ ---
4
+
1
5
  You are providing the entire new content of source files, test files, documentation files, and other necessary
2
6
  files with all necessary changes applied to deliver the resolution to an issue.
3
7
  Implement as much as you can and refer to the project's features and mission statement when expanding the code
@@ -62,6 +66,18 @@ When writing both tests and implementation:
62
66
 
63
67
  Follow the linting guidelines and the formatting guidelines from the included config.
64
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
+
65
81
  ## Evidence Gathering
66
82
 
67
83
  When implementing features, also produce evidence artifacts under `docs/`:
@@ -1,3 +1,7 @@
1
+ ---
2
+ description: Autonomous code transformation agent for implementing missions locally
3
+ ---
4
+
1
5
  You are an autonomous code transformation agent running locally via the intentïon CLI.
2
6
 
3
7
  Your workspace is the current working directory. You have been given a MISSION to implement.
@@ -22,6 +26,14 @@ Implement the MISSION described in the user prompt. This means:
22
26
  5. Run `run_tests` to verify everything passes
23
27
  6. If tests fail, read the error output carefully, fix the code, and repeat
24
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
+
25
37
  ## Important Rules
26
38
 
27
39
  - Keep existing exports and functionality — add to them, don't replace
@@ -1,3 +1,7 @@
1
+ ---
2
+ description: Generate or update software feature specifications aligned with the mission
3
+ ---
4
+
1
5
  Please generate the name and specification for a software feature which will be added or updated to action the supplied feature prompt.
2
6
  Features must advance the mission stated in MISSION.md. Aim for achievable outcomes within a single repository, not a grandiose vision or bloated feature set.
3
7
 
@@ -26,6 +30,14 @@ A feature can be added based on a behaviour already present in the repository de
26
30
  Features must be achievable in a single software repository not part of a corporate initiative.
27
31
  The feature spec should be a multiline markdown with a few level 1 headings.
28
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.
29
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.
30
42
  The repository also has a website in `src/web/` that uses the JS library. When proposing features, consider:
31
43
  - The library API (`src/lib/main.js`) and its exports
@@ -1,3 +1,7 @@
1
+ ---
2
+ description: Extract and condense technical details from sources into library documents
3
+ ---
4
+
1
5
  Extract and condense the technical details from the supplied crawl result that are relevant to the mission.
2
6
  Before adding a new document, ensure that this document is distinct from any other document in the library, otherwise update an existing document.
3
7
  The document name should be one or two words in SCREAMING_SNAKECASE.
@@ -28,3 +32,10 @@ For the normalised extract, extract the technical information from the crawled d
28
32
  directly usable format.
29
33
  Do not describe what information exists, include the actual information itself. The content must be specific and technical.
30
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.
@@ -1,3 +1,7 @@
1
+ ---
2
+ description: Review GitHub issues and enhance with testable acceptance criteria
3
+ ---
4
+
1
5
  Please review the GitHub issue and determine if it should be enhanced, closed or if no operation is needed.
2
6
 
3
7
  If the issue is relevant to the mission statement and features:
@@ -1,3 +1,7 @@
1
+ ---
2
+ description: Review whether code changes resolve an issue across all layers
3
+ ---
4
+
1
5
  Does the combination of library source, unit tests, website, web tests, behaviour tests, README,
2
6
  and dependencies resolve the following issue? Check that the solution satisfies the issue's
3
7
  acceptance criteria and moves the mission toward complete.
@@ -16,6 +20,14 @@ An issue is NOT resolved unless ALL of the following are true:
16
20
  If any of these are missing, the issue is NOT resolved — keep it open or create a follow-up issue for the gap.
17
21
  Do not close an issue just because implementation code exists without matching tests and website updates.
18
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
+
19
31
  If the mission could have been fully accomplished in this transform but the solution only partially addresses it,
20
32
  note this gap and suggest a follow-up issue for the remaining work.
21
33
 
@@ -1,3 +1,7 @@
1
+ ---
2
+ description: Orchestrate autonomous workflows by choosing strategic actions to advance the mission
3
+ ---
4
+
1
5
  You are the supervisor of an autonomous coding repository. Your job is to advance the mission by strategically choosing which workflows to dispatch and which GitHub actions to take.
2
6
 
3
7
  **Important:** You do NOT evaluate mission-complete or mission-failed. That is the director's exclusive responsibility. Focus on advancing the mission through strategic action.
@@ -81,6 +85,15 @@ Check the Recent Activity log and Recently Closed Issues for patterns:
81
85
  **Dedup deadlock recovery:**
82
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.
83
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
+
84
97
  ## Discussions Awareness
85
98
 
86
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.**
@@ -201,7 +201,7 @@ jobs:
201
201
  with:
202
202
  task: "discussions"
203
203
  config: ${{ env.configPath }}
204
- instructions: ".github/agentic-lib/agents/agent-discussion-bot.md"
204
+ instructions: ".github/agents/agent-discussion-bot.md"
205
205
  discussion-url: ${{ steps.discussion-url.outputs.url }}
206
206
  comment-node-id: ${{ steps.discussion-url.outputs.comment-node-id }}
207
207
  comment-created-at: ${{ steps.discussion-url.outputs.comment-created-at }}
@@ -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:
@@ -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/')
187
+ LOG_BRANCH=$(grep '^\s*log-branch' "${{ env.configPath }}" | head -1 | sed 's/.*= *"\([^"]*\)".*/\1/')
188
+ SCREENSHOT=$(grep '^\s*screenshot-file' "${{ env.configPath }}" | head -1 | sed 's/.*= *"\([^"]*\)".*/\1/')
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
@@ -644,7 +668,7 @@ jobs:
644
668
  with:
645
669
  task: "maintain-features"
646
670
  config: ${{ needs.params.outputs.config-path }}
647
- instructions: ".github/agentic-lib/agents/agent-maintain-features.md"
671
+ instructions: ".github/agents/agent-maintain-features.md"
648
672
  writable-paths: ${{ steps.config.outputs.featuresWritablePaths }}
649
673
  model: ${{ needs.params.outputs.model }}
650
674
 
@@ -658,7 +682,7 @@ jobs:
658
682
  with:
659
683
  task: "maintain-library"
660
684
  config: ${{ needs.params.outputs.config-path }}
661
- instructions: ".github/agentic-lib/agents/agent-maintain-library.md"
685
+ instructions: ".github/agents/agent-maintain-library.md"
662
686
  writable-paths: ${{ steps.config.outputs.libraryWritablePaths }}
663
687
  model: ${{ needs.params.outputs.model }}
664
688
 
@@ -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
@@ -733,12 +763,14 @@ jobs:
733
763
  with:
734
764
  task: "direct"
735
765
  config: ${{ needs.params.outputs.config-path }}
736
- instructions: ".github/agentic-lib/agents/agent-director.md"
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
@@ -788,12 +824,14 @@ jobs:
788
824
  with:
789
825
  task: "supervise"
790
826
  config: ${{ needs.params.outputs.config-path }}
791
- instructions: ".github/agentic-lib/agents/agent-supervisor.md"
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:
@@ -1060,7 +1098,7 @@ jobs:
1060
1098
  with:
1061
1099
  task: "fix-code"
1062
1100
  config: ${{ needs.params.outputs.config-path }}
1063
- instructions: ".github/agentic-lib/agents/agent-apply-fix.md"
1101
+ instructions: ".github/agents/agent-apply-fix.md"
1064
1102
  pr-number: ${{ env.FIX_PR_NUMBER }}
1065
1103
  # test-command read from [execution].test in agentic-lib.toml
1066
1104
  model: ${{ needs.params.outputs.model }}
@@ -1077,7 +1115,7 @@ jobs:
1077
1115
  with:
1078
1116
  task: "fix-code"
1079
1117
  config: ${{ needs.params.outputs.config-path }}
1080
- instructions: ".github/agentic-lib/agents/agent-apply-fix.md"
1118
+ instructions: ".github/agents/agent-apply-fix.md"
1081
1119
  model: ${{ needs.params.outputs.model }}
1082
1120
 
1083
1121
  - name: Build website and run behaviour tests (fix)
@@ -1158,7 +1196,7 @@ jobs:
1158
1196
  with:
1159
1197
  task: "review-issue"
1160
1198
  config: ${{ needs.params.outputs.config-path }}
1161
- instructions: ".github/agentic-lib/agents/agent-review-issue.md"
1199
+ instructions: ".github/agents/agent-review-issue.md"
1162
1200
  model: ${{ needs.params.outputs.model }}
1163
1201
 
1164
1202
  - name: Enhance issues
@@ -1169,7 +1207,7 @@ jobs:
1169
1207
  with:
1170
1208
  task: "enhance-issue"
1171
1209
  config: ${{ needs.params.outputs.config-path }}
1172
- instructions: ".github/agentic-lib/agents/agent-ready-issue.md"
1210
+ instructions: ".github/agents/agent-ready-issue.md"
1173
1211
  model: ${{ needs.params.outputs.model }}
1174
1212
 
1175
1213
  # ─── Dev: sequential issue resolution ──────────────────────────────
@@ -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
@@ -1295,7 +1337,7 @@ jobs:
1295
1337
  with:
1296
1338
  task: "transform"
1297
1339
  config: ${{ needs.params.outputs.config-path }}
1298
- instructions: ".github/agentic-lib/agents/agent-issue-resolution.md"
1340
+ instructions: ".github/agents/agent-issue-resolution.md"
1299
1341
  # test-command read from [execution].test in agentic-lib.toml
1300
1342
  model: ${{ needs.params.outputs.model }}
1301
1343
  issue-number: ${{ steps.issue.outputs.issue-number }}
@@ -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 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: