@xn-intenton-z2a/agentic-lib 7.1.26 → 7.1.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -23,16 +23,20 @@ Or start from the [repository0 template](https://github.com/xn-intenton-z2a/repo
23
23
  MISSION.md Your project goals in plain English
24
24
  |
25
25
  v
26
- [agentic-step] GitHub Action wrapping the Copilot SDK
26
+ [supervisor] LLM gathers repo state, picks actions
27
27
  |
28
- v
28
+ +-----+-----+-----+-----+
29
+ v v v v v
30
+ transform maintain review fix discussions
31
+ | | | | |
32
+ v v v v v
29
33
  Issue -> Code -> Test -> PR -> Merge -> Next Issue
30
34
  ^ |
31
35
  +---------------------------------------+
32
36
  Autonomous cycle
33
37
  ```
34
38
 
35
- The pipeline runs as GitHub Actions workflows on a schedule. Each step uses the `agentic-step` action to call the Copilot SDK with context from your repository (mission, contributing guidelines, existing code, test results) and produce targeted changes.
39
+ An LLM supervisor runs on a configurable schedule, gathers full repository context (open issues, PRs, workflow runs, features, activity), and strategically dispatches other workflows. Each workflow uses the `agentic-step` action to call the Copilot SDK with context from your repository and produce targeted changes. Users can interact with the system through a GitHub Discussions bot, which relays requests to the supervisor.
36
40
 
37
41
  ## Initialisation
38
42
 
@@ -69,10 +73,10 @@ your-repo/
69
73
  │ │
70
74
  │ └── agentic-lib/ # [INIT] Internal infrastructure (always overwritten)
71
75
  │ ├── actions/
72
- │ │ ├── agentic-step/ # The Copilot SDK action (8 task handlers)
76
+ │ │ ├── agentic-step/ # The Copilot SDK action (9 task handlers)
73
77
  │ │ ├── commit-if-changed/ # Composite: conditional git commit
74
78
  │ │ └── setup-npmrc/ # Composite: npm registry auth
75
- │ ├── agents/ # 7 prompt files + config YAML
79
+ │ ├── agents/ # 8 prompt files + config YAML
76
80
  │ ├── seeds/ # Seed files for reset
77
81
  │ └── scripts/ # Utility scripts
78
82
 
@@ -104,13 +108,48 @@ The `init.yml` workflow is distributed from seeds (like `test.yml`) and runs `np
104
108
 
105
109
  ### GitHub Repository Settings
106
110
 
107
- After `init`, configure these in your GitHub repository:
111
+ After `init`, configure your GitHub repository with the following tokens, permissions, and settings.
112
+
113
+ #### Required Secrets
114
+
115
+ | Secret | Type | Permissions | Purpose |
116
+ |--------|------|-------------|---------|
117
+ | `COPILOT_GITHUB_TOKEN` | Fine-grained PAT | **Copilot** (read) | Authenticates with the GitHub Copilot SDK for all agentic tasks |
118
+ | `WORKFLOW_TOKEN` | Classic PAT | **workflow** scope | Required by `init.yml` to push workflow file changes (GITHUB_TOKEN cannot modify `.github/workflows/`) |
119
+
120
+ **Creating `COPILOT_GITHUB_TOKEN`:**
121
+ 1. Go to [github.com/settings/tokens](https://github.com/settings/tokens) → Fine-grained tokens → Generate new token
122
+ 2. Set repository access to your target repo (or all repos)
123
+ 3. Under "Account permissions", enable **GitHub Copilot** → Read
124
+ 4. Copy the token and add it as a repository secret: Settings → Secrets and variables → Actions → New repository secret
125
+
126
+ **Creating `WORKFLOW_TOKEN`:**
127
+ 1. Go to [github.com/settings/tokens](https://github.com/settings/tokens) → Tokens (classic) → Generate new token
128
+ 2. Select the **workflow** scope (this includes repo access)
129
+ 3. Set expiration (max 90 days for enterprise orgs)
130
+ 4. Copy the token and add it as a repository secret
131
+
132
+ #### Repository Settings
133
+
134
+ | Setting | Where | Value | Purpose |
135
+ |---------|-------|-------|---------|
136
+ | GitHub Actions | Settings → Actions → General | Allow all actions | Workflows must be able to run |
137
+ | Workflow permissions | Settings → Actions → General | Read and write | Workflows need to create branches, PRs, and push commits |
138
+ | Allow GitHub Actions to create PRs | Settings → Actions → General | Checked | Required for automerge and init workflows |
139
+ | GitHub Discussions | Settings → General → Features | Enabled | Required for the discussions bot |
140
+ | Branch protection (optional) | Settings → Branches | Require PR reviews | Recommended: prevents direct pushes, ensures review |
141
+
142
+ #### Permissions Summary
143
+
144
+ The workflows use `permissions: write-all` in the workflow files. The key permissions used are:
108
145
 
109
- | Setting | Where | Purpose |
110
- |---------|-------|---------|
111
- | `COPILOT_GITHUB_TOKEN` | Settings > Secrets | Fine-grained PAT with "Copilot Requests" permission |
112
- | GitHub Actions | Settings > Actions | Must be enabled (default) |
113
- | Branch protection | Settings > Branches | Optional: require PR reviews before merge |
146
+ | Permission | Used by | Purpose |
147
+ |------------|---------|---------|
148
+ | `contents: write` | All agent workflows | Create branches, push commits |
149
+ | `pull-requests: write` | Transform, fix-code | Create and update PRs |
150
+ | `issues: write` | Review, enhance, supervisor | Create, label, close issues |
151
+ | `actions: write` | Supervisor | Dispatch other workflows |
152
+ | `discussions: write` | Discussions bot | Post replies to discussions |
114
153
 
115
154
  ## Configuration
116
155
 
@@ -118,16 +157,20 @@ Configuration lives in `agentic-lib.toml` at your project root:
118
157
 
119
158
  ```toml
120
159
  [schedule]
121
- tier = "schedule-1" # schedule-1 through schedule-4
160
+ tier = "schedule-1" # schedule-1 through schedule-4
161
+ supervisor = "daily" # off | weekly | daily | hourly | continuous
122
162
 
123
163
  [paths]
124
164
  mission = "MISSION.md"
125
165
  source = "src/lib/"
126
166
  tests = "tests/unit/"
127
167
  features = "features/"
168
+ library = "library/"
128
169
  docs = "docs/"
129
170
  readme = "README.md"
130
171
  dependencies = "package.json"
172
+ contributing = "CONTRIBUTING.md"
173
+ library-sources = "SOURCES.md"
131
174
 
132
175
  [execution]
133
176
  build = "npm run build"
@@ -139,6 +182,8 @@ feature-issues = 2
139
182
  maintenance-issues = 1
140
183
  attempts-per-branch = 3
141
184
  attempts-per-issue = 2
185
+ features-limit = 4
186
+ library-limit = 32
142
187
 
143
188
  [bot]
144
189
  log-file = "intentïon.md"
@@ -152,6 +197,7 @@ The core of the system is a single GitHub Action that handles all autonomous tas
152
197
 
153
198
  | Task | Purpose |
154
199
  |------|---------|
200
+ | `supervise` | Gather repo context, choose and dispatch actions strategically |
155
201
  | `transform` | Transform the codebase toward the mission |
156
202
  | `resolve-issue` | Read an issue and generate code to resolve it |
157
203
  | `fix-code` | Fix failing tests or lint errors |
@@ -161,7 +207,7 @@ The core of the system is a single GitHub Action that handles all autonomous tas
161
207
  | `review-issue` | Review and close resolved issues |
162
208
  | `discussions` | Respond to GitHub Discussions |
163
209
 
164
- Each task calls the GitHub Copilot SDK with context assembled from your repository (mission, code, tests, features) and writes changes back to the working tree.
210
+ Each task calls the GitHub Copilot SDK with context assembled from your repository (mission, code, tests, features) and writes changes back to the working tree. The supervisor can dispatch any of the other tasks via workflow dispatch.
165
211
 
166
212
  ## CLI Task Commands
167
213
 
@@ -277,16 +323,16 @@ This repository is the source for the `@xn-intenton-z2a/agentic-lib` npm package
277
323
 
278
324
  ```
279
325
  src/
280
- ├── workflows/ 7 GitHub Actions workflow templates
326
+ ├── workflows/ 8 GitHub Actions workflow templates
281
327
  ├── actions/ 3 composite/SDK actions (agentic-step, commit-if-changed, setup-npmrc)
282
- ├── agents/ 7 agent prompt files + 1 config
328
+ ├── agents/ 8 agent prompt files + 1 config
283
329
  ├── seeds/ 7 seed files (test.yml + 6 project seed files for --purge reset)
284
330
  └── scripts/ 7 utility scripts distributed to consumers
285
331
  ```
286
332
 
287
333
  ### Testing
288
334
 
289
- 236 unit tests across 21 test files, plus system tests:
335
+ 269 unit tests across 22 test files, plus system tests:
290
336
 
291
337
  ```bash
292
338
  npm test # Run all tests (vitest)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xn-intenton-z2a/agentic-lib",
3
- "version": "7.1.26",
3
+ "version": "7.1.27",
4
4
  "description": "Agentic-lib Agentic Coding Systems SDK powering automated GitHub workflows.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -27,6 +27,11 @@ on:
27
27
  type: boolean
28
28
  required: false
29
29
  default: false
30
+ mission:
31
+ description: "Mission text for MISSION.md (leave empty to use seed default)"
32
+ type: string
33
+ required: false
34
+ default: ""
30
35
 
31
36
  permissions: write-all
32
37
 
@@ -42,9 +47,12 @@ jobs:
42
47
  echo "mode=${MODE:-update}" >> $GITHUB_OUTPUT
43
48
  DRY_RUN='${{ inputs.dry-run }}'
44
49
  echo "dry-run=${DRY_RUN:-false}" >> $GITHUB_OUTPUT
50
+ MISSION='${{ inputs.mission }}'
51
+ echo "mission=${MISSION}" >> $GITHUB_OUTPUT
45
52
  outputs:
46
53
  mode: ${{ steps.normalise.outputs.mode }}
47
54
  dry-run: ${{ steps.normalise.outputs.dry-run }}
55
+ mission: ${{ steps.normalise.outputs.mission }}
48
56
 
49
57
  init:
50
58
  needs: params
@@ -52,6 +60,7 @@ jobs:
52
60
  env:
53
61
  INIT_MODE: ${{ needs.params.outputs.mode }}
54
62
  INIT_DRY_RUN: ${{ needs.params.outputs.dry-run }}
63
+ INIT_MISSION: ${{ needs.params.outputs.mission }}
55
64
  steps:
56
65
  - uses: actions/checkout@v4
57
66
  with:
@@ -78,6 +87,12 @@ jobs:
78
87
  if [ "$INIT_DRY_RUN" = "true" ]; then FLAGS="$FLAGS --dry-run"; fi
79
88
  npx @xn-intenton-z2a/agentic-lib $FLAGS
80
89
 
90
+ - name: Write mission (if provided)
91
+ if: env.INIT_MISSION != ''
92
+ run: |
93
+ printf '# Mission\n\n%s\n' "$INIT_MISSION" > MISSION.md
94
+ echo "Wrote custom mission to MISSION.md"
95
+
81
96
  - run: npm install
82
97
 
83
98
  - name: Install agentic-step deps
@@ -1,13 +1,79 @@
1
1
  # repo
2
2
 
3
- Describe your project here.
3
+ This repository is powered by [intentïon agentic-lib](https://github.com/xn-intenton-z2a/agentic-lib) — autonomous code transformation driven by GitHub Copilot. Write a mission, and the system generates issues, writes code, runs tests, and opens pull requests on a schedule.
4
4
 
5
5
  ## Getting Started
6
6
 
7
- 1. Write your mission in `MISSION.md`
8
- 2. Enable GitHub Actions
9
- 3. The workflows will evolve `src/lib/main.js` toward your mission
7
+ 1. **Write your mission** in [`MISSION.md`](MISSION.md) — describe what you want to build in plain English
8
+ 2. **Configure GitHub** — see [Setup](#setup) below
9
+ 3. **Push to main** the autonomous workflows take over from here
10
+
11
+ The system will create issues from your mission, generate code to resolve them, run tests, and open PRs. A supervisor agent orchestrates the pipeline, and you can interact through GitHub Discussions.
12
+
13
+ ## Setup
14
+
15
+ ### Required Secrets
16
+
17
+ Add these in your repository: **Settings → Secrets and variables → Actions → New repository secret**
18
+
19
+ | Secret | How to create | Purpose |
20
+ |--------|---------------|---------|
21
+ | `COPILOT_GITHUB_TOKEN` | [Fine-grained PAT](https://github.com/settings/tokens?type=beta) with **GitHub Copilot** → Read permission | Authenticates with the Copilot SDK for all agentic tasks |
22
+ | `WORKFLOW_TOKEN` | [Classic PAT](https://github.com/settings/tokens) with **workflow** scope | Allows `init.yml` to update workflow files (GITHUB_TOKEN cannot modify `.github/workflows/`) |
23
+
24
+ ### Repository Settings
25
+
26
+ | Setting | Where | Value |
27
+ |---------|-------|-------|
28
+ | GitHub Actions | Settings → Actions → General | Allow all actions |
29
+ | Workflow permissions | Settings → Actions → General | Read and write permissions |
30
+ | Allow GitHub Actions to create PRs | Settings → Actions → General | Checked |
31
+ | GitHub Discussions | Settings → General → Features | Enabled (for the discussions bot) |
32
+
33
+ ### Optional: Branch Protection
34
+
35
+ For production repositories, consider adding branch protection on `main`:
36
+ - Require pull request reviews before merging
37
+ - Require status checks to pass (select the `test` workflow)
38
+
39
+ ## How It Works
40
+
41
+ ```
42
+ MISSION.md → [supervisor] → dispatch workflows → Issue → Code → Test → PR → Merge
43
+ ↑ |
44
+ +——————————————————————————+
45
+ ```
46
+
47
+ The pipeline runs as GitHub Actions workflows. An LLM supervisor gathers repository context (issues, PRs, workflow runs, features) and strategically dispatches other workflows. Each workflow uses the Copilot SDK to make targeted changes.
48
+
49
+ ## Configuration
50
+
51
+ Edit `agentic-lib.toml` to tune the system:
52
+
53
+ ```toml
54
+ [schedule]
55
+ supervisor = "daily" # off | weekly | daily | hourly | continuous
56
+
57
+ [paths]
58
+ mission = "MISSION.md"
59
+ source = "src/lib/"
60
+ tests = "tests/unit/"
61
+
62
+ [limits]
63
+ feature-issues = 2 # max concurrent feature issues
64
+ attempts-per-issue = 2 # max retries per issue
65
+ ```
66
+
67
+ ## Updating
68
+
69
+ The `init.yml` workflow runs daily and updates the agentic infrastructure automatically. To update manually:
70
+
71
+ ```bash
72
+ npx @xn-intenton-z2a/agentic-lib@latest init
73
+ ```
10
74
 
11
75
  ## Links
12
76
 
13
- - [MISSION.md](MISSION.md)
77
+ - [MISSION.md](MISSION.md) — your project goals
78
+ - [agentic-lib documentation](https://github.com/xn-intenton-z2a/agentic-lib) — full SDK docs
79
+ - [intentïon website](https://xn--intenton-z2a.com)
@@ -14,7 +14,7 @@
14
14
  "author": "",
15
15
  "license": "MIT",
16
16
  "dependencies": {
17
- "@xn-intenton-z2a/agentic-lib": "^7.1.26"
17
+ "@xn-intenton-z2a/agentic-lib": "^7.1.27"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@vitest/coverage-v8": "^4.0.0",
@@ -11,7 +11,7 @@ concurrency: agentic-lib-main
11
11
 
12
12
  on:
13
13
  schedule:
14
- - cron: "17 6,8,10,12 * * *" # 06:17, 08:17, 10:17, 12:17 UTC
14
+ - cron: '23 */11 * * *'
15
15
  workflow_dispatch:
16
16
  inputs:
17
17
  model: