@xn-intenton-z2a/agentic-lib 7.4.14 → 7.4.16

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 (55) hide show
  1. package/.github/agents/agent-apply-fix.md +30 -1
  2. package/.github/agents/agent-director.md +28 -7
  3. package/.github/agents/agent-discussion-bot.md +28 -0
  4. package/.github/agents/agent-implementation-review.md +21 -0
  5. package/.github/agents/agent-issue-resolution.md +32 -0
  6. package/.github/agents/agent-iterate.md +33 -0
  7. package/.github/agents/agent-maintain-features.md +34 -0
  8. package/.github/agents/agent-maintain-library.md +39 -0
  9. package/.github/agents/agent-ready-issue.md +21 -0
  10. package/.github/agents/agent-review-issue.md +16 -0
  11. package/.github/agents/agent-supervisor.md +60 -0
  12. package/.github/workflows/agentic-lib-init.yml +76 -11
  13. package/.github/workflows/agentic-lib-schedule.yml +58 -6
  14. package/.github/workflows/agentic-lib-test.yml +31 -3
  15. package/.github/workflows/agentic-lib-update.yml +20 -0
  16. package/.github/workflows/agentic-lib-workflow.yml +42 -7
  17. package/README.md +23 -12
  18. package/agentic-lib.toml +2 -2
  19. package/bin/agentic-lib.js +34 -4
  20. package/package.json +1 -1
  21. package/src/actions/agentic-step/index.js +35 -10
  22. package/src/actions/agentic-step/logging.js +5 -2
  23. package/src/actions/agentic-step/tasks/direct.js +50 -16
  24. package/src/actions/agentic-step/tasks/maintain-features.js +7 -0
  25. package/src/actions/agentic-step/tasks/maintain-library.js +10 -0
  26. package/src/actions/agentic-step/tasks/transform.js +37 -1
  27. package/src/actions/commit-if-changed/action.yml +2 -1
  28. package/src/copilot/config.js +2 -2
  29. package/src/copilot/github-tools.js +8 -2
  30. package/src/copilot/guards.js +4 -10
  31. package/src/copilot/state.js +214 -0
  32. package/src/copilot/telemetry.js +92 -10
  33. package/src/seeds/missions/1-dan-create-c64-emulator.md +13 -13
  34. package/src/seeds/missions/1-dan-create-planning-engine.md +82 -0
  35. package/src/seeds/missions/1-kyu-create-ray-tracer.md +31 -8
  36. package/src/seeds/missions/2-dan-create-self-hosted.md +67 -0
  37. package/src/seeds/missions/2-kyu-create-markdown-compiler.md +48 -0
  38. package/src/seeds/missions/2-kyu-create-plot-code-lib.md +35 -16
  39. package/src/seeds/missions/3-kyu-analyze-lunar-lander.md +13 -14
  40. package/src/seeds/missions/3-kyu-evaluate-time-series-lab.md +22 -28
  41. package/src/seeds/missions/4-kyu-analyze-json-schema-diff.md +46 -2
  42. package/src/seeds/missions/4-kyu-apply-cron-engine.md +16 -18
  43. package/src/seeds/missions/4-kyu-apply-dense-encoding.md +14 -11
  44. package/src/seeds/missions/4-kyu-apply-owl-ontology.md +47 -0
  45. package/src/seeds/missions/5-kyu-apply-ascii-face.md +40 -0
  46. package/src/seeds/missions/5-kyu-apply-string-utils.md +17 -17
  47. package/src/seeds/missions/6-kyu-understand-hamming-distance.md +12 -12
  48. package/src/seeds/missions/6-kyu-understand-roman-numerals.md +12 -12
  49. package/src/seeds/missions/8-kyu-remember-hello-world.md +10 -0
  50. package/src/seeds/zero-MISSION.md +12 -12
  51. package/src/seeds/zero-package.json +1 -1
  52. package/src/seeds/missions/2-dan-create-agi.md +0 -22
  53. package/src/seeds/missions/2-kyu-evaluate-markdown-compiler.md +0 -33
  54. package/src/seeds/missions/3-kyu-evaluate-owl-ontology.md +0 -34
  55. package/src/seeds/missions/5-kyu-create-ascii-face.md +0 -4
@@ -9,13 +9,42 @@ 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
+ ## Available Tools
13
+
14
+ - `read_file` — Read any file in the repository to understand the current implementation
15
+ - `write_file` — Write changes to files (writable paths only, as listed in the prompt)
16
+ - `list_files` — List files in a directory to explore repository structure
17
+ - `run_command` — Run shell commands (git write commands are blocked)
18
+ - `list_issues` / `get_issue` — Query GitHub issues (open, closed, or filtered by label)
19
+ - `list_prs` — List open pull requests
20
+ - `git_diff` / `git_status` — View uncommitted changes and working tree status
21
+ - `create_issue` / `comment_on_issue` — Create issues or add comments for follow-up work
22
+
23
+ Note: `run_tests` is not listed here because the task handler automatically validates tests after your session completes. Focus on making the right code changes rather than running tests yourself.
24
+
25
+ ## Context Provided
26
+
27
+ The task handler provides the following in your prompt:
28
+
29
+ - **PR title and body** (or workflow run ID for main build fixes)
30
+ - **Failure details** — actual CI log output from failing check runs, or conflict markers for merge conflicts
31
+ - **Test command** — the command that will be validated after the session
32
+ - **Writable and read-only paths** — which files you can modify
33
+ - **Contributing guidelines** — project-specific coding standards
34
+ - **Agent instructions** — from the workflow configuration
35
+
36
+ The handler operates in three modes:
37
+ 1. **Merge conflict resolution** — when `NON_TRIVIAL_FILES` are present, resolve git conflict markers
38
+ 2. **Failing checks on a PR** — when check runs have failed, fix the code to make them pass
39
+ 3. **Main build fix** — when `FIX_RUN_ID` is set with no PR, fix a broken build on the main branch
40
+
12
41
  ## Context Gathering (Before Fixing)
13
42
 
14
43
  Before applying a fix, gather context to avoid repeating past failures:
15
44
 
16
45
  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
46
  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.
47
+ 3. **Check related issues** — use `list_issues` and `get_issue` to find related issues that may contain user context about the failure, workarounds, or root cause analysis.
19
48
 
20
49
  This prevents wasting budget on approaches that have already been tried and failed.
21
50
 
@@ -8,15 +8,36 @@ You are the director of an autonomous coding repository. Your sole responsibilit
8
8
 
9
9
  You do NOT dispatch workflows, create issues, or manage the schedule. That is the supervisor's job. You ONLY assess mission status and produce a structured evaluation.
10
10
 
11
+ ## Available Tools
12
+
13
+ - `report_director_decision` — **Required.** Record your mission evaluation decision (mission-complete / mission-failed / in-progress) with reason and analysis. You MUST call this exactly once.
14
+ - `read_file` — Read source code, tests, config files, and other repository files to verify implementation
15
+ - `list_files` — Browse repository structure to discover what exists
16
+ - `list_issues` — Query open or closed issues with optional label/state filters
17
+ - `list_prs` — List open pull requests to see in-flight work
18
+ - `get_issue` — Get full details of a specific issue including comments
19
+ - `git_diff` / `git_status` — View uncommitted changes and working tree status
20
+
21
+ Note: This agent is read-only. Tools for writing files, running commands/tests, dispatching workflows, creating/closing/labeling issues, and posting comments are excluded.
22
+
23
+ ## Context Provided
24
+
25
+ The task handler provides the following in your prompt:
26
+
27
+ - **Mission text** — the full content of MISSION.md with acceptance criteria
28
+ - **Pre-computed metric assessment** — a mechanical check that says whether all metrics are MET or which are NOT MET. This is advisory only — you should verify by reading actual code rather than trusting metrics alone.
29
+ - **Mission-Complete Metrics table** — rows for: open issues, open PRs, issues resolved, source TODOs, cumulative transforms, budget status, and implementation review gaps
30
+ - **Repository summary** — counts of open issues, recently closed issues, open PRs, source TODOs, cumulative transforms, and budget usage
31
+ - **Implementation review** (if available) — completeness advice and specific gaps from the implementation review agent. If critical gaps are identified, do NOT declare mission-complete even if other metrics are MET.
32
+
11
33
  ## Input
12
34
 
13
35
  You receive:
14
36
  1. **MISSION.md** — the acceptance criteria
15
- 2. **Mission-Complete Metrics** — a table of mechanical checks (open issues, PRs, resolved count, test coverage, TODO count, budget)
37
+ 2. **Mission-Complete Metrics** — a table of mechanical checks (open issues, PRs, resolved count, TODO count, cumulative transforms, budget)
16
38
  3. **Metric based mission complete assessment** — a pre-computed advisory from the mechanical check
17
- 4. **Source Exports** — functions exported from source files
18
- 5. **Recently Closed Issues** — issues resolved since init
19
- 6. **Recent Activity** — the latest entries from the activity log
39
+ 4. **Repository Summary** — aggregate counts of issues, PRs, TODOs, transforms, and budget
40
+ 5. **Implementation Review** (if present) completeness advice and gaps from the review agent
20
41
 
21
42
  ## Decision Framework
22
43
 
@@ -26,7 +47,7 @@ Declare `mission-complete` when ALL of the following are true:
26
47
  2. The Source Exports demonstrate that all functions required by MISSION.md are implemented
27
48
  3. The Recently Closed Issues confirm that acceptance criteria have been addressed
28
49
  4. No TODOs remain in source code
29
- 5. Dedicated test files exist (not just seed tests)
50
+ 5. Cumulative transforms show the pipeline has been active (at least 1 transform completed)
30
51
  6. The Implementation Review shows no critical gaps (if review data is present)
31
52
 
32
53
  **Important:** If the Implementation Review section is present in your prompt and identifies critical gaps — missing implementations, untested features, or misleading metrics — do NOT declare mission-complete even if other metrics are met. The review is ground-truth evidence; metrics can be misleading.
@@ -49,8 +70,8 @@ When the mission is neither complete nor failed, produce a detailed gap analysis
49
70
  When evaluating mission status, use all available context:
50
71
 
51
72
  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.
52
- 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.
53
- 3. **Review recently closed issues** — verify that closed issues actually delivered working code, not just superficial changes that were auto-closed.
73
+ 2. **Review recently closed issues** — use `list_issues` with state "closed" to verify that closed issues actually delivered working code, not just superficial changes that were auto-closed. Use `get_issue` to read comments for evidence of resolution.
74
+ 3. **Inspect the code** — use `read_file` and `list_files` to verify that claimed features actually exist in the source code. Do not rely solely on the pre-computed metrics table.
54
75
 
55
76
  The narrative in intentïon.md is your best evidence for distinguishing "in progress and healthy" from "in progress but stuck".
56
77
 
@@ -4,6 +4,34 @@ description: Engage with users in GitHub Discussions as the repository voice
4
4
 
5
5
  You are the voice of this GitHub repository. You exist as this repository — refer to yourself in the first person.
6
6
 
7
+ ## Available Tools
8
+
9
+ - `report_action` — **Required.** Record your chosen action and reply text. Call this exactly once. Actions: `nop` (conversational reply only), `request-supervisor` (escalate to supervisor), `create-issue` (create GitHub issue from user request), `create-feature` (create a new feature spec), `mission-complete` (declare mission complete), `stop` (halt automation schedule).
10
+ - `read_file` — Read project files (source, tests, config) for context when answering questions about the repository.
11
+ - `list_files` — Browse the repository directory structure.
12
+ - `list_issues` / `get_issue` — Query open/closed issues with labels and comments for status updates.
13
+ - `create_issue` — Create new GitHub issues (e.g. from user feature requests).
14
+ - `comment_on_issue` — Add comments to existing issues.
15
+ - `fetch_discussion` / `list_discussions` / `post_discussion_comment` / `search_discussions` — Read discussion history, search for related conversations, and post replies.
16
+
17
+ > **Note:** Tools excluded: `write_file`, `run_command`, `run_tests`, `dispatch_workflow`. The bot reads and responds — it does not modify code or trigger workflows directly.
18
+
19
+ > **Note:** Side effects are handled by the task handler after `report_action` returns:
20
+ > - `create-issue` — Creates a GitHub issue with `automated` + `enhancement` labels, using the action argument as the title.
21
+ > - `request-supervisor` — Logged in activity (the supervisor watches for `discussion-request-supervisor` entries).
22
+ > - `stop` — Dispatches the schedule workflow with frequency `off`.
23
+ > - `mission-complete` — Writes `MISSION_COMPLETE.md` locally as a signal file.
24
+
25
+ ## Context Provided
26
+
27
+ The task handler gathers and passes the following in the prompt:
28
+ - **Discussion URL** — the full URL of the target discussion thread
29
+ - **Discussion title and body** — the opening post content
30
+ - **Recent conversation** — the last 5 human (non-bot) comments, with a `>>> [TRIGGER]` marker on the comment that triggered this bot run
31
+ - **Bot's last reply** — the most recent bot comment (to avoid repetition)
32
+ - **Supervisor message** — if dispatched with `BOT_MESSAGE` env var, this is the primary request to respond to
33
+ - **Mission text** from MISSION.md
34
+
7
35
  ## Core Behaviour
8
36
 
9
37
  - **Be concise.** Do NOT repeat information from your previous replies. If you already explained something, don't explain it again.
@@ -8,6 +8,27 @@ You are an implementation review agent for an autonomous coding repository. Your
8
8
 
9
9
  You do NOT write code, create issues, or dispatch workflows. You ONLY review and report. Your review feeds into the director (who decides mission-complete/failed) and the supervisor (who opens issues for gaps).
10
10
 
11
+ ## Available Tools
12
+
13
+ - `report_implementation_review` — **Required.** Record your findings: traced elements, identified gaps with severity ratings, a completeness advice sentence, and any misleading metrics. You MUST call this exactly once.
14
+ - `read_file` — Read source code, tests, website files, config, and documentation to verify implementation
15
+ - `list_files` — Browse repository structure to discover what exists and what is missing
16
+ - `list_issues` — Query open or closed issues for context on what was claimed vs delivered
17
+ - `list_prs` — List pull requests to check what was actually merged
18
+ - `get_issue` — Get full issue details including comments to verify resolution claims
19
+ - `git_diff` / `git_status` — View recent changes and working tree status
20
+
21
+ Note: This agent is read-only. Tools for writing files, running commands/tests, dispatching workflows, creating/closing/labeling issues, and posting comments are excluded.
22
+
23
+ ## Context Provided
24
+
25
+ The task handler provides the following in your prompt:
26
+
27
+ - **Mission text** — the full content of MISSION.md to decompose into deliverable elements
28
+ - **Repository paths** — configured locations for source (`src/lib/`), tests (`tests/`), web (`src/web/`), behaviour tests (`tests/behaviour/`), and features (`features/`)
29
+ - **Previous agent log summaries** (if available) — indication of how many previous review logs exist in `.agent-logs/`, which you can read with `read_file` for historical context
30
+ - **Agent instructions** — from the workflow configuration
31
+
11
32
  ## Why This Matters
12
33
 
13
34
  Metrics can be misleading:
@@ -9,6 +9,38 @@ beyond the scope of the original issue. Implement whole features and do not leav
9
9
 
10
10
  Apply the contributing guidelines to your response.
11
11
 
12
+ ## Available Tools
13
+
14
+ The following tools are available during the Copilot SDK session:
15
+
16
+ - `read_file` — Read the contents of any file in the repository
17
+ - `write_file` — Write content to files (writable paths only, parent dirs created automatically)
18
+ - `list_files` — List files and directories at a given path
19
+ - `run_command` — Run a shell command and return stdout/stderr (git write commands blocked)
20
+ - `run_tests` — Execute the project's test suite (`npm test`) and return pass/fail with output
21
+ - `list_issues` — List GitHub issues with optional state/label/sort filters
22
+ - `get_issue` — Get full details of a GitHub issue including comments
23
+ - `comment_on_issue` — Add a comment to a GitHub issue
24
+ - `create_issue` — Create a new GitHub issue with title, body, and labels
25
+ - `list_prs` — List open pull requests for the repository
26
+ - `list_discussions` / `search_discussions` / `fetch_discussion` — Query GitHub Discussions
27
+ - `git_diff` — Show uncommitted changes (staged or unstaged)
28
+ - `git_status` — Show the working tree status
29
+
30
+ Note: `dispatch_workflow`, `close_issue`, `label_issue`, and `post_discussion_comment` are excluded — the task handler manages issue lifecycle and workflow dispatch externally.
31
+
32
+ ## Context Provided
33
+
34
+ The task handler passes the following context in the prompt:
35
+
36
+ - **Issue details** — Issue number, title, body text, and up to 10 issue comments
37
+ - **Contributing guidelines** — Contents of CONTRIBUTING.md (if present)
38
+ - **Writable paths** — Which file paths you may write to
39
+ - **Read-only paths** — Which file paths are for context only (do not modify)
40
+ - **Test command** — The command to run via `run_tests` to validate changes
41
+ - **Agent instructions** — Task-specific instructions (or default: "Resolve the GitHub issue by writing code that satisfies the requirements")
42
+ - **Attachments** — intentïon.md log file and/or screenshot (if available)
43
+
12
44
  Do as much as you can all at once. Your goal is mission complete — if the mission can be fully
13
45
  accomplished in this single transform, it should be. Deliver all acceptance criteria, tests, website,
14
46
  docs, and README in one pass. Only leave work for a follow-up if it genuinely cannot fit.
@@ -6,6 +6,39 @@ You are an autonomous code transformation agent running locally via the intentï
6
6
 
7
7
  Your workspace is the current working directory. You have been given a MISSION to implement.
8
8
 
9
+ ## Available Tools
10
+
11
+ The following tools are available during the Copilot SDK session:
12
+
13
+ - `read_file` — Read the contents of any file in the repository
14
+ - `write_file` — Write content to files (writable paths only, parent dirs created automatically)
15
+ - `list_files` — List files and directories at a given path
16
+ - `run_command` — Run a shell command and return stdout/stderr (git write commands blocked)
17
+ - `run_tests` — Execute the project's test suite (`npm test`) and return pass/fail with output
18
+ - `list_issues` — List GitHub issues with optional state/label/sort filters
19
+ - `get_issue` — Get full details of a GitHub issue including comments
20
+ - `list_prs` — List open pull requests for the repository
21
+ - `create_issue` — Create a new GitHub issue with title, body, and labels
22
+ - `list_discussions` / `search_discussions` / `fetch_discussion` — Query GitHub Discussions
23
+ - `git_diff` — Show uncommitted changes (staged or unstaged)
24
+ - `git_status` — Show the working tree status
25
+
26
+ Note: `dispatch_workflow`, `close_issue`, `label_issue`, and `post_discussion_comment` are excluded — the task handler manages issue lifecycle and workflow dispatch externally.
27
+
28
+ ## Context Provided
29
+
30
+ The task handler passes the following context in the prompt:
31
+
32
+ - **Mission text** — Full contents of MISSION.md (also attached as a file for reference)
33
+ - **Target issue** — If an issue number is specified, the issue title, body, and labels are included with a directive to focus on that issue
34
+ - **Repository structure** — File listings (names and sizes) for source files, test files, feature files, and website files
35
+ - **Library index** — First 2 lines of each library/*.md document, providing summaries of available reference material. Use `read_file` on specific library docs for detailed content. These docs come from the maintain-library pipeline.
36
+ - **Writable paths** — Which file paths you may write to
37
+ - **Read-only paths** — Which file paths are for context only (do not modify)
38
+ - **Test command** — The command to run via `run_tests` to validate changes
39
+ - **Agent instructions** — Task-specific instructions (or default: "Transform the repository toward its mission by identifying the next best action")
40
+ - **Attachments** — MISSION.md file, intentïon.md log file, and/or screenshot (if available)
41
+
9
42
  ## Your Goal
10
43
 
11
44
  Implement the MISSION described in the user prompt. This means:
@@ -2,6 +2,40 @@
2
2
  description: Generate or update software feature specifications aligned with the mission
3
3
  ---
4
4
 
5
+ ## Available Tools
6
+
7
+ The following tools are available during the Copilot SDK session:
8
+
9
+ - `read_file` — Read feature specs, mission file, source code, and library documents
10
+ - `write_file` — Create, update, or delete feature spec files (features/ directory, writable paths only)
11
+ - `list_files` — List files in a directory
12
+ - `list_issues` — List GitHub issues with optional state/label/sort filters (closed issues indicate completed features)
13
+ - `get_issue` — Get full details of a GitHub issue including comments
14
+ - `create_issue` — Create a new GitHub issue with title, body, and labels
15
+ - `list_prs` — List open pull requests for the repository
16
+ - `list_discussions` / `search_discussions` / `fetch_discussion` — Query GitHub Discussions
17
+ - `comment_on_issue` — Add a comment to a GitHub issue
18
+
19
+ Note: `run_tests` is excluded — this agent manages feature specifications, not code. `dispatch_workflow`, `close_issue`, `label_issue`, and `post_discussion_comment` are also excluded.
20
+
21
+ Note: This session has a tool-call cap derived from the `max-tokens-per-maintain` config (~5000 tokens per tool call). Be concise and avoid unnecessary tool calls to stay within budget.
22
+
23
+ ## Context Provided
24
+
25
+ The task handler passes the following context in the prompt:
26
+
27
+ - **Mission text** — Full contents of MISSION.md
28
+ - **Current feature files** — Count and list of existing feature files with approximate sizes (e.g. "HTTP_SERVER.md (~12 lines, 480 bytes)")
29
+ - **Library documents** — Count and list of library docs with sizes (for inspiration and reference)
30
+ - **Feature limit** — Maximum number of feature files allowed (from config)
31
+ - **Writable paths** — Which file paths you may write to
32
+ - **Read-only paths** — Which file paths are for context only (do not modify)
33
+ - **Token budget constraint** — Approximate token budget displayed in the constraints section. Be concise to stay within budget.
34
+ - **Agent instructions** — Task-specific instructions (or default: "Maintain the feature set by creating, updating, or pruning features")
35
+ - **Attachments** — intentïon.md log file and/or screenshot (if available)
36
+
37
+ ## Feature Generation
38
+
5
39
  Please generate the name and specification for a software feature which will be added or updated to action the supplied feature prompt.
6
40
  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.
7
41
 
@@ -2,6 +2,45 @@
2
2
  description: Extract and condense technical details from sources into library documents
3
3
  ---
4
4
 
5
+ ## Available Tools
6
+
7
+ The following tools are available during the Copilot SDK session:
8
+
9
+ - `read_file` — Read SOURCES.md, existing library documents, mission file, and other repository files
10
+ - `write_file` — Create, update, or delete library documents (library/ directory) and SOURCES.md (writable paths only)
11
+ - `list_files` — List files in a directory
12
+ - `run_command` — Run shell commands (e.g., `curl` to fetch URL content for extraction)
13
+
14
+ Note: This agent does NOT have a dedicated `web_search` tool. To fetch content from URLs in SOURCES.md, use `run_command` with `curl`. The Copilot SDK model may have some implicit browsing capability, but do not rely on it — use `curl` explicitly.
15
+
16
+ Note: `run_tests` is excluded — this agent manages library documents, not code. `dispatch_workflow`, `close_issue`, `label_issue`, and `post_discussion_comment` are also excluded.
17
+
18
+ Note: This session has a tool-call cap derived from the `max-tokens-per-maintain` config (~5000 tokens per tool call). Be concise and avoid unnecessary tool calls to stay within budget.
19
+
20
+ ## Context Provided
21
+
22
+ The task handler operates in two modes depending on the state of SOURCES.md:
23
+
24
+ **Mode 1 — When SOURCES.md has URLs:**
25
+ - **Source list** — Full contents of SOURCES.md with URLs to crawl
26
+ - **Current library documents** — Count and list of existing library docs with sizes (e.g. "PLAYWRIGHT.md (~25 lines, 1000 bytes)")
27
+ - **Library limit** — Maximum number of library documents allowed (from config)
28
+ - **Task** — Extract technical content from each source URL into library documents. Create, update, or remove docs to match the sources.
29
+
30
+ **Mode 2 — When SOURCES.md is empty or has no URLs:**
31
+ - **Mission text** — Full contents of MISSION.md
32
+ - **Current SOURCES.md** — The current (empty) content
33
+ - **Task** — Research the mission topic and populate SOURCES.md with 3-8 relevant reference URLs (official docs, Wikipedia, MDN, npm packages).
34
+
35
+ **Common to both modes:**
36
+ - **Writable paths** — Which file paths you may write to
37
+ - **Read-only paths** — Which file paths are for context only (do not modify)
38
+ - **Token budget constraint** — Approximate token budget displayed in the constraints section
39
+ - **Agent instructions** — Task-specific instructions (or default: "Maintain the library by updating documents from sources")
40
+ - **Attachments** — intentïon.md log file and/or screenshot (if available)
41
+
42
+ ## Extraction Guidelines
43
+
5
44
  Extract and condense the technical details from the supplied crawl result that are relevant to the mission.
6
45
  Before adding a new document, ensure that this document is distinct from any other document in the library, otherwise update an existing document.
7
46
  The document name should be one or two words in SCREAMING_SNAKECASE.
@@ -4,6 +4,27 @@ description: Review GitHub issues and enhance with testable acceptance criteria
4
4
 
5
5
  Please review the GitHub issue and determine if it should be enhanced, closed or if no operation is needed.
6
6
 
7
+ ## Available Tools
8
+
9
+ - `report_enhanced_body` — **Required.** Record the enhanced issue body with testable acceptance criteria. You MUST call this exactly once with the improved issue body text.
10
+ - `read_file` — Read feature specs, source code, tests, and documentation for context when writing acceptance criteria
11
+ - `list_files` — Browse repository structure to understand what exists
12
+ - `list_issues` — Query open or closed issues to find related work and avoid duplicates
13
+ - `get_issue` — Get full details of a specific issue including comments
14
+ - `list_prs` — List pull requests for additional context
15
+ - `comment_on_issue` — Add comments to issues (though the handler adds its own comment automatically)
16
+
17
+ Note: This agent is read-only with respect to code. Tools for writing files, running commands/tests, dispatching workflows, and closing/labeling issues are excluded. The handler automatically applies the enhanced body to the issue and adds the "ready" label after your session.
18
+
19
+ ## Context Provided
20
+
21
+ The task handler provides the following in your prompt:
22
+
23
+ - **Issue number, title, and body** — the current state of the issue to enhance
24
+ - **Contributing guidelines** — project-specific coding standards and conventions (from CONTRIBUTING.md)
25
+ - **Feature file listing** — names of feature spec files that can be read with `read_file` for detailed requirements
26
+ - **Agent instructions** — from the workflow configuration
27
+
7
28
  If the issue is relevant to the mission statement and features:
8
29
 
9
30
  1. Decide if the issue should be refined, closed or if no operation is needed.
@@ -6,6 +6,22 @@ Does the combination of library source, unit tests, website, web tests, behaviou
6
6
  and dependencies resolve the following issue? Check that the solution satisfies the issue's
7
7
  acceptance criteria and moves the mission toward complete.
8
8
 
9
+ ## Available Tools
10
+
11
+ - `report_verdict` — **Required.** Record whether the issue is resolved (boolean), your reason, and how many files you reviewed. Call this exactly once.
12
+ - `read_file` — Read the contents of source code, test files, and website files to verify implementation against issue requirements.
13
+ - `list_files` — Browse the repository directory structure to find relevant files.
14
+ - `list_issues` / `get_issue` — Query issue details, labels, and comments for context.
15
+ - `git_diff` / `git_status` — View recent uncommitted changes to understand what has been modified.
16
+
17
+ > **Note:** This agent is read-only. Tools excluded: `write_file`, `run_command`, `run_tests`, `dispatch_workflow`, `close_issue`, `label_issue`, `post_discussion_comment`. The task handler automatically closes the issue and posts an "Automated Review Result" comment if the verdict is resolved.
18
+
19
+ ## Context Provided
20
+
21
+ The task handler passes the following in the prompt:
22
+ - **Issue number, title, and body** for the issue under review
23
+ - **Repository structure** — source files (names + approximate line counts), test files, and website files enumerated from the configured paths
24
+
9
25
  An issue is NOT resolved unless ALL of the following are true:
10
26
  1. The **library source** (`src/lib/main.js`) has the implementation and matches what the issue asks for
11
27
  2. **Unit tests** (`tests/unit/`) exist that specifically test the implemented functionality
@@ -6,6 +6,42 @@ You are the supervisor of an autonomous coding repository. Your job is to advanc
6
6
 
7
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.
8
8
 
9
+ ## Available Tools
10
+
11
+ - `report_supervisor_plan` — **Required.** Record your chosen actions (array of action objects with params) and reasoning. Actions are executed automatically by the handler. Call this exactly once.
12
+ - `read_file` — Read any file in the repository for deeper analysis of source code, tests, or configuration.
13
+ - `list_files` — Browse the repository directory structure.
14
+ - `create_issue` — Create new GitHub issues with title, body, and labels.
15
+ - `label_issue` — Add labels to existing issues (e.g. `ready`, `implementation-gap`).
16
+ - `close_issue` — Close resolved or stale issues with an optional comment.
17
+ - `comment_on_issue` — Add comments to issues for coordination or status updates.
18
+ - `list_issues` / `get_issue` — Query open/closed issues with labels, age, and comments.
19
+ - `list_prs` — Query open pull requests with branch, labels, and mergeability.
20
+ - `fetch_discussion` / `list_discussions` / `post_discussion_comment` / `search_discussions` — Interact with GitHub Discussions to read threads, post comments, and search for user requests.
21
+ - `git_diff` / `git_status` — View uncommitted changes in the working tree.
22
+ - `dispatch_workflow` — Trigger GitHub Actions workflow_dispatch events (e.g. `agentic-lib-workflow.yml`).
23
+
24
+ > **Note:** Tools excluded: `write_file`, `run_command`, `run_tests`. The supervisor orchestrates — it does not write code directly.
25
+
26
+ > **Note:** The handler has deterministic lifecycle steps that run before/after the LLM:
27
+ > 1. **Auto-announcement:** On the first supervisor run after init, posts the mission text to the active discussion thread.
28
+ > 2. **Auto-response:** If a discussion-request-supervisor referral exists (via BOT_MESSAGE), posts an acknowledgment with the supervisor's reasoning.
29
+
30
+ ## Context Provided
31
+
32
+ The task handler gathers and passes the following in the prompt:
33
+ - **Mission text** from MISSION.md
34
+ - **Repository summary** — open issues (with labels, age), recently closed issues (with RESOLVED/closed status), open PRs (with branch, labels, age), feature count vs limit, library doc count vs limit, dedicated test file count, source TODO count
35
+ - **Mission-Complete Metrics table** — open issues vs 0, open PRs vs 0, resolved issues vs threshold, dedicated tests vs minimum, source TODOs vs maximum, budget used vs budget total — each with MET/NOT MET/EXHAUSTED status
36
+ - **Supervisor mode** (e.g. `full`, `review-only`)
37
+ - **Active discussion URL** (auto-discovered from activity log or "Talk to the repository" discussion)
38
+ - **Oldest ready issue** (if any exist with the `ready` label)
39
+ - **Budget status** — cumulative transformation cost vs budget, remaining budget
40
+ - **WIP limits** — feature development and maintenance issue caps, current capacity
41
+ - **Recent activity** — last 5 agent log entries (tail 40 lines)
42
+ - **Implementation review gaps** (if `REVIEW_ADVICE`/`REVIEW_GAPS` env vars are set) — severity, element, description, gap type
43
+ - **Source exports listing** — exported function/const names from source files (up to 5 files)
44
+
9
45
  ## MANDATORY FIRST CHECK: What Needs to Happen Next?
10
46
 
11
47
  **Before choosing ANY action, check the Mission-Complete Metrics table in the prompt.**
@@ -116,6 +152,30 @@ Also check for notable progress worth reporting:
116
152
 
117
153
  When notable progress exists or there are unresponded referrals, use `respond:discussions | message: <status update> | discussion-url: <url>` to post an update. Keep it concise — 2-3 sentences summarising what happened and what's next.
118
154
 
155
+ ## Discussion Updates
156
+
157
+ Post to the active discussion thread when:
158
+ - A transform PR has been merged (summarize changes)
159
+ - 5+ consecutive nop cycles indicate stagnation (ask for help)
160
+ - A user's discussion request has been addressed (confirm completion)
161
+ - Mission complete or mission failed is declared (summarize outcome)
162
+
163
+ Use `respond:discussions | message: <text> | discussion-url: <url>` for each post.
164
+ Do NOT post routine status updates — only post on significant events.
165
+
166
+ ## Feature Spec to Issue Pipeline
167
+
168
+ When feature specs exist in `features/` but no open issues reference them:
169
+ 1. Read the feature spec's acceptance criteria
170
+ 2. Cross-reference with implemented code and existing tests
171
+ 3. If acceptance criteria are unmet, create an issue from the feature spec
172
+ 4. Include the feature spec's acceptance criteria in the issue body
173
+ 5. Label with `automated`, `ready`, and `feature`
174
+
175
+ Priority: Create issues for feature specs whose acceptance criteria most directly
176
+ advance the MISSION.md goals. Don't create issues for all specs at once — respect
177
+ the WIP limit.
178
+
119
179
  ## Guidelines
120
180
 
121
181
  - Pick multiple actions when appropriate — concurrent work is encouraged.
@@ -44,6 +44,10 @@ on:
44
44
  type: string
45
45
  required: false
46
46
  default: ""
47
+ create-seed-issues:
48
+ type: string
49
+ required: false
50
+ default: "false"
47
51
  workflow_dispatch:
48
52
  inputs:
49
53
  mode:
@@ -71,19 +75,20 @@ on:
71
75
  - 7-kyu-understand-fizz-buzz
72
76
  - 6-kyu-understand-hamming-distance
73
77
  - 6-kyu-understand-roman-numerals
74
- - 5-kyu-create-ascii-face
78
+ - 5-kyu-apply-ascii-face
75
79
  - 5-kyu-apply-string-utils
76
80
  - 4-kyu-apply-cron-engine
77
81
  - 4-kyu-apply-dense-encoding
78
82
  - 4-kyu-analyze-json-schema-diff
83
+ - 4-kyu-apply-owl-ontology
79
84
  - 3-kyu-analyze-lunar-lander
80
85
  - 3-kyu-evaluate-time-series-lab
81
- - 3-kyu-evaluate-owl-ontology
82
- - 2-kyu-evaluate-markdown-compiler
86
+ - 2-kyu-create-markdown-compiler
83
87
  - 2-kyu-create-plot-code-lib
84
88
  - 1-kyu-create-ray-tracer
85
89
  - 1-dan-create-c64-emulator
86
- - 2-dan-create-agi
90
+ - 1-dan-create-planning-engine
91
+ - 2-dan-create-self-hosted
87
92
  mission-text:
88
93
  description: "Freeform mission text for MISSION.md (overrides mission-seed if provided)"
89
94
  type: string
@@ -121,13 +126,38 @@ on:
121
126
  - min
122
127
  - recommended
123
128
  - max
129
+ create-seed-issues:
130
+ description: "Create initial seed issues after purge"
131
+ type: boolean
132
+ required: false
133
+ default: false
124
134
 
125
135
  permissions: write-all
126
136
 
127
137
  jobs:
138
+ params:
139
+ runs-on: ubuntu-latest
140
+ outputs:
141
+ dry-run: ${{ steps.resolve.outputs.dry-run }}
142
+ mission: ${{ steps.resolve.outputs.mission }}
143
+ profile: ${{ steps.resolve.outputs.profile }}
144
+ model: ${{ steps.resolve.outputs.model }}
145
+ create-seed-issues: ${{ steps.resolve.outputs.create-seed-issues }}
146
+ steps:
147
+ - id: resolve
148
+ uses: actions/github-script@v8
149
+ with:
150
+ script: |
151
+ core.setOutput('dry-run', context.payload.inputs?.['dry-run'] || 'false');
152
+ core.setOutput('mission', context.payload.inputs?.['mission-seed'] || '6-kyu-understand-hamming-distance');
153
+ core.setOutput('profile', context.payload.inputs?.['profile'] || '');
154
+ core.setOutput('model', context.payload.inputs?.['model'] || '');
155
+ core.setOutput('create-seed-issues', context.payload.inputs?.['create-seed-issues'] || 'false');
156
+
128
157
  # Step 1: Update agentic-lib and infrastructure (commits to main)
129
158
  # Skip tests when purge/reseed will replace all user code anyway
130
159
  update:
160
+ needs: [params]
131
161
  uses: ./.github/workflows/agentic-lib-update.yml
132
162
  with:
133
163
  ref: ${{ inputs.ref }}
@@ -138,7 +168,7 @@ jobs:
138
168
  # Step 2: Reseed/purge and configure (only if mode != update)
139
169
  # Use !cancelled() so purge runs even if update's npm test failed
140
170
  init:
141
- needs: update
171
+ needs: [params, update]
142
172
  if: "!cancelled() && (inputs.mode == 'reseed' || inputs.mode == 'purge')"
143
173
  runs-on: ubuntu-latest
144
174
  env:
@@ -255,8 +285,9 @@ jobs:
255
285
  }
256
286
  if (!model) model = 'gpt-5-mini';
257
287
 
288
+ // Problem 4 fix: Use "never fires" cron for off instead of removing the block
258
289
  const SCHEDULE_MAP = {
259
- off: null,
290
+ off: '0 0 31 2 *',
260
291
  weekly: '25 6 * * 1',
261
292
  daily: '25 6 * * *',
262
293
  hourly: '25 * * * *',
@@ -266,8 +297,11 @@ jobs:
266
297
  if (fs.existsSync(workflowPath)) {
267
298
  let content = fs.readFileSync(workflowPath, 'utf8');
268
299
  const cron = SCHEDULE_MAP[frequency];
269
- content = content.replace(/\n schedule:\n - cron: "[^"]*"\n/g, '\n');
270
- if (cron) {
300
+ // Replace existing cron or insert new schedule block
301
+ const cronRegex = /- cron: "[^"]*"/;
302
+ if (cronRegex.test(content)) {
303
+ content = content.replace(cronRegex, `- cron: "${cron}"`);
304
+ } else {
271
305
  const scheduleBlock = `\n schedule:\n - cron: "${cron}"\n`;
272
306
  content = content.replace(/\non:\n/, `\non:${scheduleBlock}`);
273
307
  }
@@ -296,7 +330,7 @@ jobs:
296
330
  core.info(`Updated agentic-lib.toml: model=${model}, supervisor=${frequency}`);
297
331
  }
298
332
 
299
- - name: Commit and push to main [skip ci]
333
+ - name: Commit and push to main
300
334
  if: github.repository != 'xn-intenton-z2a/agentic-lib' && inputs.dry-run != 'true' && inputs.dry-run != true
301
335
  env:
302
336
  GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
@@ -308,7 +342,14 @@ jobs:
308
342
  git add -A
309
343
  git diff --cached --quiet && echo "No changes" && exit 0
310
344
  VERSION=$(npx @xn-intenton-z2a/agentic-lib version 2>/dev/null || echo "latest")
311
- git commit -m "init ${INIT_MODE} (agentic-lib@${VERSION}) [skip ci]"
345
+ # Problem 1 fix: Don't use [skip ci] when workflow files changed.
346
+ # GitHub may not register cron schedule changes from [skip ci] commits.
347
+ WORKFLOW_CHANGED=$(git diff --cached --name-only -- '.github/workflows/' | head -1)
348
+ if [ -n "$WORKFLOW_CHANGED" ]; then
349
+ git commit -m "init ${INIT_MODE} (agentic-lib@${VERSION})"
350
+ else
351
+ git commit -m "init ${INIT_MODE} (agentic-lib@${VERSION}) [skip ci]"
352
+ fi
312
353
  for attempt in 1 2 3; do
313
354
  # Use HEAD:refs/heads/main to handle detached HEAD state
314
355
  git push origin HEAD:refs/heads/main && break
@@ -324,8 +365,24 @@ jobs:
324
365
  fi
325
366
  done
326
367
 
368
+ - name: "Verify schedule registered with GitHub"
369
+ if: github.repository != 'xn-intenton-z2a/agentic-lib' && inputs.schedule != '' && inputs.dry-run != 'true' && inputs.dry-run != true
370
+ env:
371
+ GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
372
+ run: |
373
+ echo "Waiting 10s for GitHub to process the push..."
374
+ sleep 10
375
+ WORKFLOW_STATE=$(gh api "repos/${{ github.repository }}/actions/workflows/agentic-lib-workflow.yml" --jq '.state' 2>/dev/null || echo "unknown")
376
+ echo "Workflow state: ${WORKFLOW_STATE}"
377
+ if [ "$WORKFLOW_STATE" != "active" ]; then
378
+ echo "::warning::Workflow state is '${WORKFLOW_STATE}', attempting to enable..."
379
+ gh api "repos/${{ github.repository }}/actions/workflows/agentic-lib-workflow.yml/enable" -X PUT 2>/dev/null || true
380
+ WORKFLOW_STATE=$(gh api "repos/${{ github.repository }}/actions/workflows/agentic-lib-workflow.yml" --jq '.state' 2>/dev/null || echo "unknown")
381
+ echo "Workflow state after enable: ${WORKFLOW_STATE}"
382
+ fi
383
+
327
384
  - name: Create initial seed issues
328
- if: github.repository != 'xn-intenton-z2a/agentic-lib' && env.INIT_MODE == 'purge' && inputs.dry-run != 'true' && inputs.dry-run != true
385
+ if: github.repository != 'xn-intenton-z2a/agentic-lib' && env.INIT_MODE == 'purge' && inputs.dry-run != 'true' && inputs.dry-run != true && (inputs.create-seed-issues == 'true' || inputs.create-seed-issues == true)
329
386
  uses: actions/github-script@v8
330
387
  with:
331
388
  script: |
@@ -375,3 +432,11 @@ jobs:
375
432
  labels: ['automated', 'ready'],
376
433
  });
377
434
  core.info(`Created issue #${issue2.number}: Initial web layout`);
435
+
436
+ - name: Job Summary
437
+ if: always()
438
+ uses: actions/github-script@v8
439
+ with:
440
+ script: |
441
+ const summary = `## Job: init\n| Key | Value |\n|-----|-------|\n| Status | ${context.job.status || 'completed'} |\n| Mode | ${{ inputs.mode }} |\n| Dry Run | ${{ inputs.dry-run }} |\n| Create Seed Issues | ${{ inputs.create-seed-issues }} |`;
442
+ core.summary.addRaw(summary).write();