@amsterdamdatalabs/adl-agent-control-linux-x64 0.1.37 → 0.1.46
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/bin/adl +2 -2
- package/bin/reconcile +3 -11
- package/bin/setup +15 -15
- package/package.json +1 -1
- package/packages/agent-hooks/package.json +1 -1
- package/packages/agent-hooks/src/main.ts +23 -2
- package/packages/agent-hooks/src/rules/impl/adl-mcp-cli.ts +12 -8
- package/packages/agent-hooks/src/rules/impl/adl-run-required.ts +11 -5
- package/packages/agent-hooks/src/rules/impl/adl-workitem-role.ts +18 -5
- package/packages/agent-hooks/src/rules/impl/agent-tamper-protection.ts +30 -26
- package/packages/agent-hooks/src/rules/impl/git-target.ts +5 -0
- package/packages/agent-hooks/src/rules/impl/mcp-tool.ts +3 -1
- package/packages/agent-hooks/src/rules/impl/tool-frontend.ts +230 -11
- package/packages/agent-hooks/src/rules/shell/git-identity.ts +1 -1
- package/packages/agent-hooks/src/rules/shell/invocation.ts +14 -2
- package/packages/agent-hooks/src/rules/shell/protected-carriers.ts +10 -11
- package/packages/agent-settings/assets/TARUN-GLOBAL-AGENTS-INSTRUCTIONS.md +2 -2
- package/packages/agent-settings/package.json +1 -1
- package/packages/agent-settings/src/deploy/agents-deploy.ts +19 -1
- package/packages/agent-settings/src/deploy/index.ts +1 -0
- package/packages/agent-skills/assets/agent-search-tool-audit/SKILL.md +4 -6
- package/packages/agent-skills/assets/finalize-feature/SKILL.md +3 -3
- package/packages/agent-skills/assets/implement-feature/SKILL.md +17 -20
- package/packages/agent-skills/assets/implement-feature/references/briefs.md +3 -3
- package/packages/agent-skills/assets/implement-item/SKILL.md +3 -3
- package/packages/agent-skills/assets/mechanics/SKILL.md +1 -1
- package/packages/agent-skills/assets/plan-feature/SKILL.md +10 -10
- package/packages/agent-skills/assets/prepare-promotion/SKILL.md +3 -4
- package/packages/agent-skills/assets/report-bug/SKILL.md +2 -2
- package/packages/agent-skills/assets/review-change/SKILL.md +3 -3
- package/packages/agent-skills/assets/review-plan/SKILL.md +4 -4
- package/packages/agent-skills/assets/triage-workitems/SKILL.md +4 -4
- package/packages/agent-skills/assets/validate-design/SKILL.md +6 -12
- package/packages/agent-skills/assets/verify-item/SKILL.md +5 -5
- package/packages/agent-skills/assets/wayfinder/SKILL.md +1 -1
- package/packages/agent-skills/assets/workitems-process/SKILL.md +19 -21
- package/packages/agent-skills/assets/workitems-process/references/ado-and-git.md +36 -3
- package/packages/agent-skills/assets/workitems-process/references/evidence.md +4 -4
- package/packages/agent-skills/assets/write-feature/SKILL.md +4 -5
- package/packages/agent-skills/dist/deploy.d.ts +45 -0
- package/packages/agent-skills/dist/deploy.d.ts.map +1 -1
- package/packages/agent-skills/dist/deploy.js +167 -3
- package/packages/agent-skills/dist/deploy.js.map +1 -1
- package/packages/agent-skills/dist/index.d.ts +1 -1
- package/packages/agent-skills/dist/index.d.ts.map +1 -1
- package/packages/agent-skills/dist/index.js +1 -1
- package/packages/agent-skills/dist/index.js.map +1 -1
- package/packages/agent-skills/package.json +1 -1
- package/packages/agent-skills/src/deploy.ts +241 -3
- package/packages/agent-skills/src/index.ts +10 -1
- package/packages/azdo/README.md +13 -4
- package/packages/azdo/bunfig.toml +6 -0
- package/packages/azdo/package.json +1 -1
- package/packages/azdo/src/azdo-attachments.ts +2 -1
- package/packages/azdo/src/azdo-pr.ts +182 -6
- package/packages/azdo/src/azdo-wit.ts +290 -41
- package/packages/azdo/src/cli.ts +79 -12
- package/packages/azdo/src/lib/client.ts +88 -16
- package/packages/azdo/src/mcp-server.ts +75 -10
- package/packages/azdo/src/tool-dispatch.ts +61 -26
- package/packages/fleet/src/install-adl-package.ts +4 -3
- package/packages/repo-controls/assets/promote.ts +1 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-profile-untyped/docs/research/no-type.md +1 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-profile-untyped/docs/research/typed-experiment.md +1 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-profile-untyped/docs/research/typed-research.md +1 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/extra-key.md +1 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/extra-keys.md +1 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/missing-created.md +1 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/missing-description.md +1 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/missing-last-update.md +1 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/missing-status.md +1 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/missing-title.md +1 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/optional-keys.md +1 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/fixtures/okf-research/docs/research/research-ok.md +1 -1
- package/packages/repo-controls/package.json +1 -1
- package/packages/repo-controls/src/config.ts +21 -2
- package/packages/repo-controls/src/doctor.ts +9 -14
- package/packages/repo-controls/src/findings-ratchet.ts +12 -0
- package/packages/repo-controls/src/hook.ts +61 -4
|
@@ -6,7 +6,7 @@ Used by the lead (`implement-feature`). The sub-agent loads `workitems-process`
|
|
|
6
6
|
|
|
7
7
|
```text
|
|
8
8
|
You are a leaf sub-agent of the implementation lead for <Feature or Bug> <id>. Spawn nothing.
|
|
9
|
-
Worktree: <worktree> (the run's branch <branch>: the Feature branch, or
|
|
9
|
+
Worktree: <worktree> (the run's branch <branch>: the Feature branch, or the per-Bug branch in a per-Bug run). Head: <sha>.
|
|
10
10
|
You start with no memory of earlier sub-agents. Read the plan folder, not their transcripts.
|
|
11
11
|
You move no work item state and post nothing on the board. Return one report (format below).
|
|
12
12
|
Skill: <skill name>. Follow it exactly. If this brief and the skill disagree, the skill wins; say so in a finding.
|
|
@@ -36,7 +36,7 @@ The lead posts the report as an item comment (Feature comment for `-final`/`fina
|
|
|
36
36
|
|
|
37
37
|
## validate (architect, skill validate-design)
|
|
38
38
|
|
|
39
|
-
- Inputs: plan folder, `BaselineSha`, `against` (`HEAD` of the worktree, which contains the current `integration`: the run starts by merging
|
|
39
|
+
- Inputs: plan folder, `BaselineSha`, `against` (`HEAD` of the worktree, which contains the current `integration`: the run starts by merging the integration base into its branch), optional `scope` (one item, for mid-loop drift) and the executor's `DRIFT` finding when there is one.
|
|
40
40
|
- Check **`design.md` and its `file-map-reference.md`** by diffing `<BaselineSha>..HEAD`; record `head_sha`. Do not re-validate `requirements.md`.
|
|
41
41
|
- Read-only. Edit nothing, including `design.md`.
|
|
42
42
|
- Verdicts: `FRESH` · `DRIFT` (exact delta in `findings`: `where` = design section + path, `fix` = replacement text).
|
|
@@ -58,7 +58,7 @@ The lead posts the report as an item comment (Feature comment for `-final`/`fina
|
|
|
58
58
|
|
|
59
59
|
## reproduce, per-Bug run (executor, skill implement-item, reproduce mode)
|
|
60
60
|
|
|
61
|
-
- Inputs: Bug id, its G1-approved Description,
|
|
61
|
+
- Inputs: Bug id, its G1-approved Description, the per-Bug branch, the base (the integration SHA the branch was created from). The Bug is at In Reproduction.
|
|
62
62
|
- First commit: the Bug's item file `plans/features/az<fixes id>-fixes-to-closed-features/items/az<bug id>-<slug>.md`, with the five bugfix sections of the approved Description plus `## Predecessors` mirroring the board link ([Item files](../../workitems-process/references/ado-and-git.md#5-item-files)), plus its LEDGER row `az<bug id>-bug`. Next: the regression test. **The reproduce commit stays green.** The executor runs the regression test unmarked on the base and proves it red; that run output goes into a comment on the Bug as evidence (the executor returns it, the lead posts it). It commits the test marked as an expected failure (the framework's xfail or `test.fails` form), so lint, typecheck, build and the suite pass (`fix(<scope>): add failing regression test for az<bug id> (expected failure)`). Nothing else: no fix in this brief.
|
|
63
63
|
- Verdicts: `DONE` (the item file and the regression test committed, the unmarked test red on the base with that run output, the test committed marked as an expected failure, every commit green, no fix) · `PARK` (won't reproduce, with what was tried).
|
|
64
64
|
|
|
@@ -33,15 +33,15 @@ Not for planning, verifying, reviewing, or CI logs (CI is `fix-ci`).
|
|
|
33
33
|
|
|
34
34
|
## Preconditions
|
|
35
35
|
|
|
36
|
-
1. Worktree toplevel equals the brief's worktree; the branch is the run's branch;
|
|
36
|
+
1. Worktree toplevel equals the brief's worktree; the branch is the run's branch; the tree is clean or only your own previous attempt.
|
|
37
37
|
2. Every `AC-n` is one unambiguous EARS sentence you can turn into a test. If not, return the one concrete question to the lead and stop. Never pick a conservative reading and carry on.
|
|
38
38
|
3. `design.md` still fits the code for your files. If a named file or symbol is gone or the approach breaks a boundary: `DRIFT`, before any edit.
|
|
39
39
|
|
|
40
40
|
## Procedure
|
|
41
41
|
|
|
42
|
-
0. **Bug item file (reproduce mode).** Write `plans/features/az<fixes id>-fixes-to-closed-features/items/az<bug id>-<slug>.md` from the G1-approved Bug Description, with the Bug item-file sections: the Description's five bugfix sections plus `## Predecessors` mirroring the board link, always present and reading `none` for the first Bug ([Item files](../workitems-process/references/ado-and-git.md#5-item-files)), and its `plans/LEDGER.md` row `az<bug id>-bug`. Commit it first (`docs(plans): add item file for az<bug id> <slug
|
|
42
|
+
0. **Bug item file (reproduce mode).** Write `plans/features/az<fixes id>-fixes-to-closed-features/items/az<bug id>-<slug>.md` from the G1-approved Bug Description, with the Bug item-file sections: the Description's five bugfix sections plus `## Predecessors` mirroring the board link, always present and reading `none` for the first Bug ([Item files](../workitems-process/references/ado-and-git.md#5-item-files)), and its `plans/LEDGER.md` row `az<bug id>-bug`. Commit it first (`docs(plans): add item file for az<bug id> <slug>`). Change nothing the Description does not say; a gap is a question to the lead.
|
|
43
43
|
1. **Mode.** Rework: list the exact finding ids you will fix; nothing else is in scope.
|
|
44
|
-
2. **Tests first.** For each `AC-n` write or extend the test the design names, with the `AC-n` in the test name or a comment. Run it. It must be **red for the right reason** (assertion on the missing behaviour, not an import or syntax error). Reproduce mode: the regression test reproduces the reported defect; the Bug's item file is the plan (no `AC-n` from `requirements.md`; the file's EARS criteria stand in). **The reproduce commit stays green.** The executor runs the regression test unmarked on the base (the
|
|
44
|
+
2. **Tests first.** For each `AC-n` write or extend the test the design names, with the `AC-n` in the test name or a comment. Run it. It must be **red for the right reason** (assertion on the missing behaviour, not an import or syntax error). Reproduce mode: the regression test reproduces the reported defect; the Bug's item file is the plan (no `AC-n` from `requirements.md`; the file's EARS criteria stand in). **The reproduce commit stays green.** The executor runs the regression test unmarked on the base (the integration SHA the per-Bug branch was created from) and proves it red; that run output goes into a comment on the Bug as evidence (the executor returns it, the lead posts it). It commits the test marked as an expected failure (the framework's xfail or `test.fails` form), so lint, typecheck, build and the suite pass (`fix(<scope>): add failing regression test for az<bug id> (expected failure)`). The fix commit removes the expected-failure mark, so the same test now passes normally. Every commit stays independently green, with no exception. Then skip to step 8: reproduce mode writes no fix, no docs and no other code.
|
|
45
45
|
3. **Minimal code** until those tests pass (bug mode: until the committed regression test, with its expected-failure mark removed in the fix commit, and the item file's EARS criteria pass normally). No speculative options, no unrelated refactors, no new abstraction unless the code needs it.
|
|
46
46
|
4. **Docs in the same change.** Write every doc `design.md` `## Docs impact` lists for this item (per-Bug run: every doc the fix makes wrong).
|
|
47
47
|
5. **Slop pass** on changed files only: dead code, debug leftovers, needless wrappers, duplication, swallowed errors, masking fallbacks, stray TODOs. Delete rather than wrap. Then re-run step 6.
|
|
@@ -23,7 +23,7 @@ How adl behaves on every machine and in every repository it controls.
|
|
|
23
23
|
## Git and Azure DevOps operations
|
|
24
24
|
|
|
25
25
|
- Use ordinary `git` for every Git operation. The managed `/usr/local/bin/git` front controller hands local and non-Azure DevOps work to the system Git, and routes HTTPS Azure DevOps network commands through `adl-agent-id exec --agent "$ADL_AGENT_ID_AGENT"`. `git-ado` handles the credential boundary; there is no second account or secret location.
|
|
26
|
-
- PRs, work items and builds go through the `adl` MCP server (`adl mcp serve`): `pr_list_or_get`, `pr_create_or_update`, `pr_review`, `build_list_or_get`, `build_run`, `workitem_list_or_get`, `
|
|
26
|
+
- PRs, work items and builds go through the `adl` MCP server (`adl mcp serve`): `pr_list_or_get`, `pr_create_or_update`, `pr_review`, `build_list_or_get`, `build_run`, `workitem_list_or_get`, `workitem_create_or_update_feature`, `workitem_create_or_update_pbi`, `workitem_create_or_update_bug`. If the server is not working, fall back to `adl mcp cli <command>`.
|
|
27
27
|
|
|
28
28
|
## Repository controls
|
|
29
29
|
|
|
@@ -26,12 +26,12 @@ Load `workitems-process` first. This card adds only what the planning run does.
|
|
|
26
26
|
| `worktree` | `docs/az<feature>-<slug>-plan`, made by adl-dispatcher |
|
|
27
27
|
| `resume_notes` | The previous session's tail, if any |
|
|
28
28
|
|
|
29
|
-
Branch:
|
|
29
|
+
Branch: the planning branch, created by adl-dispatcher. A re-entry reuses the same branch.
|
|
30
30
|
|
|
31
31
|
## Preconditions
|
|
32
32
|
|
|
33
33
|
1. `workitems-process` universal preconditions (worktree, board state, identity). The state check is on the Feature: New or In Progress.
|
|
34
|
-
2. `plans/features/az<feature>-<slug>/intent.md` exists on
|
|
34
|
+
2. `plans/features/az<feature>-<slug>/intent.md` exists on the integration base and its `work_item` id equals the folder id. If not, the trigger does not hold: report the mismatch on the Feature and end the run; the next tick re-evaluates.
|
|
35
35
|
3. The Feature has an Epic parent and at least one predecessor Feature (the very first Feature has none), and every predecessor is at Awaiting Release or Done. If not, report what is missing on the Feature and end the run; the Epic and the links are authored by the human, never created or guessed by you.
|
|
36
36
|
4. Resume: read the board and the branch first. Reuse allocated ids; never allocate twice.
|
|
37
37
|
|
|
@@ -41,10 +41,10 @@ Branch: `docs/az<feature>-<slug>-plan`, created by adl-dispatcher. A re-entry re
|
|
|
41
41
|
|
|
42
42
|
### 1. Orient and pin the baseline
|
|
43
43
|
|
|
44
|
-
1. Read `intent.md`, the predecessor Features' plan folders on
|
|
44
|
+
1. Read `intent.md`, the predecessor Features' plan folders on the integration base, the existing plan folder if any, and every G1 finding or reviewer finding left on the Feature and its items (comment read tool pending T1).
|
|
45
45
|
2. Understand the code: `crg architecture`, `crg query callers_of|tests_for <symbol>`, `crg impact`. You may spawn read-only explore sub-agents on the fast tier; they write nothing.
|
|
46
|
-
3. Re-entry on an existing plan branch:
|
|
47
|
-
4. **Baseline Sha** = the exact
|
|
46
|
+
3. Re-entry on an existing plan branch: bring it current with the integration base. Never recreate, rebase or force-push it.
|
|
47
|
+
4. **Baseline Sha** = the exact integration SHA you read. It goes in `file-map-reference.md` `## Baseline` and in the Feature's Baseline Sha field.
|
|
48
48
|
5. **Revision N.** The revision increments once per G1 submission: N = current `Plan Revision` + 1 when this run follows a G1 decision (rework or requeue) or is the first run (N = 1). A resumed or re-dispatched run with no G1 decision since the last revision keeps N. The review rounds inside one planning run share N. Read the board fields; named arguments are pending T3, so until then they pass through `--fields` as `Custom.PlanRevision`, `Custom.PlanHash`, `Custom.BaselineSha` (reference names not yet confirmed through the API).
|
|
49
49
|
|
|
50
50
|
### 2. Draft
|
|
@@ -59,7 +59,7 @@ Branch: `docs/az<feature>-<slug>-plan`, created by adl-dispatcher. A re-entry re
|
|
|
59
59
|
- A touchpoint in `## Size estimate` is a `file-map-reference.md` row of Kind `change` or `new`.
|
|
60
60
|
3. **`file-map-reference.md`**: every path the plan touches: read / change / new, why, items. `## Baseline` = Baseline Sha.
|
|
61
61
|
4. **`## Revision log`** row for revision N, written once per revision (Trigger: first plan, `G1 rework` or `G1 requeue`; Changes: what changed since N-1, including every added or dropped item and changed AC). Review rounds of N update that row's Changes cell, never add a row.
|
|
62
|
-
5. **Items.** First match every existing child PBI of the Feature to the planned items (by id, then by title or slug). Never allocate a second item for work already on the board. Then allocate each planned item with no board item **before** its file: `
|
|
62
|
+
5. **Items.** First match every existing child PBI of the Feature to the planned items (by id, then by title or slug). Never allocate a second item for work already on the board. Then allocate each planned item with no board item **before** its file: `workitem_create_or_update_pbi --title ... --parent-id <feature> --description "## What it delivers\n…\n\n## Verification\n…" --effort <days>`. Mandatory at create: `title`, `parentId` (Feature), `description` (must carry `## What it delivers` + `## Verification` headings), `effort` (number, days, ≥0; float accepted). Then move every in-scope PBI (existing and new) New -> In Planning. Only then, in the write-files step, write the ids into `## Items` and write `items/az<id>-<slug>.md` with the item-file sections in [ado-and-git.md](../workitems-process/references/ado-and-git.md#5-item-files). Items that already exist are updated, not duplicated. If allocation fails partway, move the PBIs you did allocate New -> In Planning and stop; nothing is committed before the move. The lead re-allocates the rest on the next tick, in the same worktree and branch.
|
|
63
63
|
- **Item-split rules.** One PBI = one observable outcome from `intent.md` that fits one PR and can be specified, tested and reviewed on its own. Never split by layer (no "backend item" plus "frontend item" for one outcome). Slug is kebab (`^[a-z0-9]+(-[a-z0-9]+)*$`, <= 40 chars); title is written as an outcome. Prefer fewer, larger-than-trivial items over fragments. Cover every goal in `intent.md`; respect every non-goal. Items carry no predecessors; the lead orders items inside the loop.
|
|
64
64
|
6. **Describe the loop as non-linear.** Where a plan mentions In Implementation, In Testing, In Review and Updating Docs, it says they are free moves ([States at a glance](../workitems-process/SKILL.md#states-at-a-glance)).
|
|
65
65
|
|
|
@@ -83,14 +83,14 @@ Branch: `docs/az<feature>-<slug>-plan`, created by adl-dispatcher. A re-entry re
|
|
|
83
83
|
|
|
84
84
|
1. Check the `## Revision log` row for N names every change of the rounds.
|
|
85
85
|
2. **Plan Hash = sha256 of `requirements.md` only**: `shasum -a 256 plans/features/az<feature>-<slug>/requirements.md` at the commit you push. The hash lives on the board, never inside a file.
|
|
86
|
-
3. Write the Feature fields: `Plan Revision` = N, `Plan Hash`, `Baseline Sha` (`
|
|
86
|
+
3. Write the Feature fields: `Plan Revision` = N, `Plan Hash`, `Baseline Sha` (`workitem_create_or_update_feature --id <feature> --state 'In Progress' --plan-revision N --plan-hash S --baseline-sha S --acceptance-criteria "..." --comment "..."`; the move to `In Progress` triggers the state-conditional gate, so `acceptanceCriteria`, the three plan fields, and a non-empty `comment` are all mandatory). A refused write: post the exact refusal text as a Feature comment and take the path the refusal names; never work around it.
|
|
87
87
|
4. Prepare the plan snapshot `plan-r<N>-<sha7>.md` (`<sha7>` = first 7 chars of Plan Hash) in `.scratchpad/`: `requirements.md`, `design.md`, `file-map-reference.md`, then every item file, in one file ([Evidence and reports](../workitems-process/SKILL.md#evidence-and-reports)). How the content reaches the tool is pending P4: the tool attaches it and refuses to raise the PR without it.
|
|
88
88
|
5. Append one row per `plans/` commit to `plans/LEDGER.md`.
|
|
89
89
|
6. Every in-scope PBI is at In Planning before the planning PR is raised: after allocating any new PBIs you moved every in-scope PBI (existing and new) New -> In Planning, then wrote the files (§2 step 5). Do nothing else to item states.
|
|
90
90
|
|
|
91
91
|
### 6. Raise the planning PR
|
|
92
92
|
|
|
93
|
-
- `pr_create_or_update`: title `docs(plans): plan az<feature> <slug>`,
|
|
93
|
+
- `pr_create_or_update`: title `docs(plans): plan az<feature> <slug>`, on the planning branch, targeting integration, with the five PR body sections (Summary, Why, Changes, Test plan, Security impact considered); `## Test plan` and `## Security impact considered` say "none (docs-only)".
|
|
94
94
|
- **The tool does the board wiring; you pass nothing and move nothing** ([PR wiring](../workitems-process/references/ado-and-git.md#6-pr-wiring)).
|
|
95
95
|
- No reviewer, no vote. Never force-push.
|
|
96
96
|
- Read back every item: state Awaiting Approval. If the tool did not move them (it cannot until P2 ships), report the gap and end the run. Do not move them by hand and do not work around it.
|
|
@@ -115,14 +115,14 @@ A Fixes Bug has its own ladder and no plan folder ([Bug states](../workitems-pro
|
|
|
115
115
|
## Mode B: design update (sub-agent)
|
|
116
116
|
|
|
117
117
|
- Brief from the implementation lead: the Feature, the branch head, the drift (`design.md` vs the repo).
|
|
118
|
-
- Your write scope is exactly four things: `design.md` (`file:line` refs, `## Solution`, `## Verification` rows, `## Docs impact`, `## Size estimate`); `file-map-reference.md` (its `## Map` where the map changed, and its `## Baseline` section, set to the new
|
|
118
|
+
- Your write scope is exactly four things: `design.md` (`file:line` refs, `## Solution`, `## Verification` rows, `## Docs impact`, `## Size estimate`); `file-map-reference.md` (its `## Map` where the map changed, and its `## Baseline` section, set to the new integration base); the Feature's `Baseline Sha` field, set to the same base; and the `plans/LEDGER.md` row `az<id>-design-update`. Plan Revision and Plan Hash are unchanged: the hash covers `requirements.md` only, which you never touch, nor item files.
|
|
119
119
|
- Commit on the lead's Feature branch as one docs commit carrying the LEDGER row. The lead writes no file; it records the update in the implementation report and the PR.
|
|
120
120
|
- Drift that would need an approved `AC-n` changed: do not edit; return it to the lead as a finding. The lead's path is in [No block](../workitems-process/SKILL.md#no-block).
|
|
121
121
|
- Return a summary to the lead (files changed, new baseline, what moved). You are a leaf: spawn nothing.
|
|
122
122
|
|
|
123
123
|
## Commits
|
|
124
124
|
|
|
125
|
-
`<type>(<scope>): <lowercase subject>`, type `docs` for plan files. Each commit green. One topic per commit.
|
|
125
|
+
`<type>(<scope>): <lowercase subject>`, type `docs` for plan files. Each commit green. One topic per commit. Planning commits carry no `AB#` (the tool links the items).
|
|
126
126
|
|
|
127
127
|
## Stop rules
|
|
128
128
|
|
|
@@ -31,11 +31,11 @@ pipeline opens the promotion PR; you only write its description. G2 is human. Lo
|
|
|
31
31
|
|
|
32
32
|
1. Exactly one open PR with source `integration` and target `main` (`pr_list_or_get`). Never open one yourself. None or several: report what you found and stop.
|
|
33
33
|
2. `main` equals `base_sha`; else write the summary against the current `main` and record it as `base_sha`. If the PR head differs from `head_sha`, write the summary against the current head and record it as `head_sha`.
|
|
34
|
-
3. `worktree` is `none` (skip the check), or
|
|
34
|
+
3. `worktree` is `none` (skip the check), or the worktree toplevel equals it.
|
|
35
35
|
|
|
36
36
|
## Procedure
|
|
37
37
|
|
|
38
|
-
1. **Range.** Commits in `<base_sha>..<head_sha>` (PR commits, or
|
|
38
|
+
1. **Range.** Commits in `<base_sha>..<head_sha>` (PR commits, or the commit log in a read-only
|
|
39
39
|
checkout). Collect work items: PR-linked items plus every `AB#<id>` in commit messages.
|
|
40
40
|
2. **Included items.** For each id (`workitem_list_or_get`): type, title, state, link, the merged Feature
|
|
41
41
|
PR link. Any item not Done → list it under risks with its state (it rode in on a shared commit).
|
|
@@ -55,8 +55,7 @@ pipeline opens the promotion PR; you only write its description. G2 is human. Lo
|
|
|
55
55
|
table: id, type, title, state, PR; then the notable risks and the rollback note), `## Test plan`
|
|
56
56
|
(the integration validation runs), `## Security impact considered` (security notes from the
|
|
57
57
|
included items' code reviews, or "none" with those reports as the source), and a footer line
|
|
58
|
-
`release-summary @ <head_sha>`. These are the five PR body sections
|
|
59
|
-
[ado-and-git.md](../workitems-process/references/ado-and-git.md#7-git). Keep any text a human added above the summary.
|
|
58
|
+
`release-summary @ <head_sha>`. These are the five PR body sections. Keep any text a human added above the summary.
|
|
60
59
|
7. Read the PR back and confirm the description saved with the footer SHA.
|
|
61
60
|
8. Post the report (see below).
|
|
62
61
|
|
|
@@ -22,7 +22,7 @@ Load `workitems-process` first. Any agent may use this card; it is the only inta
|
|
|
22
22
|
## Procedure
|
|
23
23
|
|
|
24
24
|
1. **Verify.** Reproduce it (command + actual output, or the failing pipeline run and its log) or prove it in source (`file:line`). Cannot -> do not file; report "unverified" to your caller.
|
|
25
|
-
2. **Find the responsible Feature.** The Feature whose scope should have got this right (work item links,
|
|
25
|
+
2. **Find the responsible Feature.** The Feature whose scope should have got this right (work item links, the commit log and annotation, `requirements.md`; for a red pipeline, the merged Feature, or for a per-Bug PR the merged Bug's Responsible Feature). Unclear -> report it to your caller as a finding; never guess.
|
|
26
26
|
3. **Duplicate check.** Re-runs never add duplicate comments.
|
|
27
27
|
- **Red pipeline:** a red pipeline is filed only when the LATEST completed run of the `integration` or `main` pipeline is red AND its build id is named in no Bug's `## Failing builds` (any state). Search every Bug, in any state, for this build id first: named -> stop, with nothing to do. Then search open Bugs (New through Updating Docs) for the same failure (same failing test or job). Found -> append the build id to that Bug's `## Failing builds` in its board Description (that section only; the approved sections stay unchanged), post no comment, and stop. Otherwise file a new Bug (step 5) with the same Responsible Feature; if an earlier Bug (Done or Parked for Removal) names the same failure, that Bug is its predecessor. Older runs are never filed. A run already named never files again. Once named, a red `main` run waiting for promotion and the last red `integration` run before the fix's next run both stay quiet.
|
|
28
28
|
- **Finding:** search open PBIs/Bugs covering the same behaviour. Found -> add a comment citing your repro, unless a comment there already cites the same repro, and stop.
|
|
@@ -35,7 +35,7 @@ Load `workitems-process` first. Any agent may use this card; it is the only inta
|
|
|
35
35
|
|
|
36
36
|
5. **Create the Bug (closed case, or a red pipeline).**
|
|
37
37
|
1. Find the Fixes Feature: the Feature titled exactly `Fixes to closed Features` under the same Epic as the responsible Feature. Missing or several -> report it to your caller as a finding; never create one.
|
|
38
|
-
2. Allocate on the board: `
|
|
38
|
+
2. Allocate on the board: `workitem_create_or_update_bug --title ... --parent-id <Fixes Feature> --description "..." --effort <days>`. State stays New. Mandatory at create: `title`, `parentId` (a Feature — typically the Fixes Feature), `description` (must carry the five bugfix headings `## Current behaviour` / `## Expected behaviour` / `## Behaviour that must not change` / `## Responsible Feature` / `## Verification`), and `effort` (number, days, ≥0; float accepted). Plan fields are forbidden (T3 — hard). `comment` is mandatory on every update (on create `comment` is optional). Predecessor: at most one, only when the Fixes Feature already holds another Bug (L4); none for the first Bug. Related: required when the parent is the Fixes Feature (the related link points to the Responsible Feature) (L4). The Description must carry the bugfix shape:
|
|
39
39
|
|
|
40
40
|
| Section | Holds |
|
|
41
41
|
|---|---|
|
|
@@ -18,7 +18,7 @@ There is **no PR reviewer, no vote and no PR thread** before the merge ([Human g
|
|
|
18
18
|
| Mode | Scope |
|
|
19
19
|
|---|---|
|
|
20
20
|
| **item** | The commits carrying `AB#<item id>`, read in the context of the branch |
|
|
21
|
-
| **final** (Feature-final) |
|
|
21
|
+
| **final** (Feature-final) | The full diff against the integration base, every item |
|
|
22
22
|
| **delta** | After a CI fix: the fix commits only, plus what they touch |
|
|
23
23
|
|
|
24
24
|
- `lane: code` → role `code-reviewer`. `lane: architecture` → role `architect`.
|
|
@@ -31,12 +31,12 @@ There is **no PR reviewer, no vote and no PR thread** before the merge ([Human g
|
|
|
31
31
|
## Preconditions
|
|
32
32
|
|
|
33
33
|
1. `lane` is `code` or `architecture`; else return it to the lead as a finding and stop ([No block](../workitems-process/SKILL.md#no-block)).
|
|
34
|
-
2.
|
|
34
|
+
2. The worktree toplevel equals the worktree; record the branch head as `head_sha` and review that SHA (diff `<base_sha>..<head_sha>`, read `<head_sha>:<path>`). A HEAD that differs from the named head SHA, or moves during the review, never stops or restarts it: say so in the report; the lead re-runs you at the new head ([Evidence and reports](../workitems-process/SKILL.md#evidence-and-reports), the head rule).
|
|
35
35
|
3. A verify `PASS` at this head exists in the brief; else return it to the lead as a finding and stop ([No block](../workitems-process/SKILL.md#no-block)).
|
|
36
36
|
|
|
37
37
|
## Procedure
|
|
38
38
|
|
|
39
|
-
1. **Scope.**
|
|
39
|
+
1. **Scope.** Diff the file set against `<base_sha>..<head>` (item mode: the item's commits); read every changed file in full, plus callers and tests of changed symbols. Do not widen into unrelated code.
|
|
40
40
|
2. **Criteria map.** For each `AC-n` in scope, find the code and the test that covers it. An unmapped `AC-n` is a finding.
|
|
41
41
|
3. **Review your lane** (below). Every finding gets `id`, `severity`, `where` (path:line), `what` (issue and risk), `fix` (concrete). Separate fact from suggestion.
|
|
42
42
|
4. **Verdict** by the lane rule. No partial or conditional approvals.
|
|
@@ -25,18 +25,18 @@ Load `workitems-process` first. One skill, two lanes; the brief's `lane` picks o
|
|
|
25
25
|
| `plan_commit` | The commit holding revision N of the plan folder |
|
|
26
26
|
| `revision` | N |
|
|
27
27
|
| `plan_hash` | sha256 of `requirements.md` at `plan_commit` |
|
|
28
|
-
| `base_sha` | The
|
|
28
|
+
| `base_sha` | The integration SHA the plan is written against |
|
|
29
29
|
| `lane` | `architect` or `critic` |
|
|
30
30
|
| `architect_review` | Critic only: the Architect's full review for N |
|
|
31
31
|
| `round` | review round within revision N, 1..3 |
|
|
32
32
|
| `prior_findings` | Earlier findings (earlier rounds of N, G1 findings) and how each was answered |
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
Independence is a fresh context, not another identity. The reviewer model family preferably differs from the executor's when the surface allows (config; not required).
|
|
35
35
|
|
|
36
36
|
## Preconditions
|
|
37
37
|
|
|
38
38
|
1. `workitems-process` universal preconditions that apply (identity; the worktree check is on the read-only checkout).
|
|
39
|
-
2.
|
|
39
|
+
2. The sha256 of `requirements.md` at `plan_commit` equals `plan_hash`, and its Revision log last row is N. Else return it to the lead as a finding and stop ([No block](../workitems-process/SKILL.md#no-block)).
|
|
40
40
|
3. All of `intent.md`, `requirements.md`, `design.md`, `file-map-reference.md` and `items/*.md` are readable at `plan_commit`. Else return it to the lead as a finding and stop ([No block](../workitems-process/SKILL.md#no-block)).
|
|
41
41
|
4. Critic only: `architect_review` is in the brief and is for revision N. Else return it to the lead as a finding and stop ([No block](../workitems-process/SKILL.md#no-block)). The Critic never reviews first.
|
|
42
42
|
|
|
@@ -44,7 +44,7 @@ Identity: `agent-tarun`. Independence is a fresh context, not another identity.
|
|
|
44
44
|
|
|
45
45
|
Common to both lanes:
|
|
46
46
|
1. Read `intent.md` first (the human's words), then `requirements.md`, `design.md`, `file-map-reference.md` and every item file, the Revision log, and `prior_findings`.
|
|
47
|
-
2. Read the baseline code `design.md` `## Solution` names:
|
|
47
|
+
2. Read the baseline code `design.md` `## Solution` names: read `<base_sha>:<path>`. Each ref exists at `base_sha` or is marked `(new)`. Use `crg impact` / `crg query callers_of <target>` for blast radius, else `rg`.
|
|
48
48
|
3. Prior findings: every finding id an earlier round or G1 raised is `addressed` or `declined` with a reason (the planner's round comment for review findings, the Revision log for G1 findings). A silently dropped finding is a finding.
|
|
49
49
|
4. Fidelity to the intent: nothing in `requirements.md` contradicts or exceeds `intent.md`'s Constraints and Non-goals.
|
|
50
50
|
|
|
@@ -27,7 +27,7 @@ Run record (`prompts/workitem-triage.md`): `key` = repo, `feature_id` null, `wor
|
|
|
27
27
|
## Preconditions
|
|
28
28
|
|
|
29
29
|
1. `workitems-process` universal preconditions (the key is the repo; no item state check).
|
|
30
|
-
2.
|
|
30
|
+
2. The integration base is current. Evidence is read from the integration base, not from a branch you happen to be on.
|
|
31
31
|
3. Board reads work (`workitem_list_or_get`, then `adl mcp cli` as fallback). Cannot read the board on either route: report both errors and end the run; the next tick re-dispatches.
|
|
32
32
|
|
|
33
33
|
## Procedure
|
|
@@ -35,8 +35,8 @@ Run record (`prompts/workitem-triage.md`): `key` = repo, `feature_id` null, `wor
|
|
|
35
35
|
1. **List.** Every open PBI and Bug, every Feature not Done/Removed, and the latest `integration` and `main` pipeline runs (`build_list_or_get`).
|
|
36
36
|
2. **Read evidence per item** (spawn read-only explore sub-agents on the fast tier for breadth):
|
|
37
37
|
- item file and acceptance criteria (`requirements.md`, `design.md` of its Feature; for a Bug, its Description);
|
|
38
|
-
- code on
|
|
39
|
-
- branch
|
|
38
|
+
- code on the integration base: what exists, what tests cover;
|
|
39
|
+
- the Feature implementation branch, the per-Bug branch, or the planning branch, plus the PR, merge commit and CI state;
|
|
40
40
|
- the item's comments (comment read: pending T1 in adl-agent-control);
|
|
41
41
|
- its Feature, parent Epic and the Feature's predecessors.
|
|
42
42
|
3. **Judge the true state.** Partly done is a valid answer (some criteria met on `integration`, others not). No blanket "unknown -> New".
|
|
@@ -82,7 +82,7 @@ Run record (`prompts/workitem-triage.md`): `key` = repo, `feature_id` null, `wor
|
|
|
82
82
|
|
|
83
83
|
- Verdict `TRIAGED`: every swept item has a recorded proposal: applied, proposed or unchanged. Done proof: every swept item reads back on a legal state, and each latest completed `integration` and `main` run is green or its build id is named by a Bug. Verdict sets: [Evidence and reports](../workitems-process/SKILL.md#evidence-and-reports).
|
|
84
84
|
- One comment per touched item, carrying that item's proposal, reasoning and evidence.
|
|
85
|
-
- The run report, as the last action, goes to the activity log with `adl activity add` (
|
|
85
|
+
- The run report, as the last action, goes to the activity log with `adl activity add` ([Evidence and reports](../workitems-process/SKILL.md#evidence-and-reports)). Content: `base_sha` = integration base SHA, counts (applied / proposed / unchanged), the id lists, split-off ids, rolled-up Feature ids, Bugs filed for red pipelines, unplanned Features (informational).
|
|
86
86
|
|
|
87
87
|
## Stop rules
|
|
88
88
|
|
|
@@ -20,24 +20,18 @@ Load `workitems-process` first. You are a leaf sub-agent of `lead` (`implement-f
|
|
|
20
20
|
|
|
21
21
|
## Inputs (from the brief)
|
|
22
22
|
|
|
23
|
-
- Plan folder `plans/features/az<id>-<slug>/`: `design.md`, `file-map-reference.md`; `BaselineSha` (the
|
|
23
|
+
- Plan folder `plans/features/az<id>-<slug>/`: `design.md`, `file-map-reference.md`; `BaselineSha` (the integration SHA the plan was written against); `against` = worktree `HEAD`; optional `scope` and seed finding. The run starts by merging the integration base into its branch, so the worktree `HEAD` contains the current integration: you diff `<BaselineSha>..HEAD` and record `head_sha`.
|
|
24
24
|
|
|
25
25
|
## Preconditions
|
|
26
26
|
|
|
27
|
-
1. Worktree toplevel equals the brief's worktree;
|
|
28
|
-
2.
|
|
29
|
-
3.
|
|
27
|
+
1. Worktree toplevel equals the brief's worktree; the branch head is printed and recorded as `head_sha`.
|
|
28
|
+
2. `<BaselineSha>` is an ancestor of `HEAD`. If not, return it to the lead as a finding and stop ([No block](../workitems-process/SKILL.md#no-block)).
|
|
29
|
+
3. The tree is clean (you read a committed state).
|
|
30
30
|
|
|
31
31
|
## Procedure
|
|
32
32
|
|
|
33
33
|
1. **Collect the surface.** From `design.md` (`## Solution`, `## Decisions`, `## Verification`, `## Risks`, `## Docs impact`) and `file-map-reference.md`, list every file path, directory and symbol named (`FILES`, `DIRS`, `SYMBOLS`). Add the seed finding's `where` paths.
|
|
34
|
-
2. **Measure change since baseline.**
|
|
35
|
-
```
|
|
36
|
-
git diff --stat <BaselineSha>..HEAD -- <FILES>
|
|
37
|
-
git diff --name-status -M <BaselineSha>..HEAD -- <FILES> <DIRS>
|
|
38
|
-
git log --oneline <BaselineSha>..HEAD -- <FILES> <DIRS>
|
|
39
|
-
```
|
|
40
|
-
For each symbol: `git grep -n '<symbol>' HEAD -- <path>` and at `<BaselineSha>`; compare signatures.
|
|
34
|
+
2. **Measure change since baseline.** Diff the file set against `<BaselineSha>..HEAD`; the per-path rename and status view; the commit log over the surface. For each symbol, find it at `HEAD` and at `<BaselineSha>`; compare signatures.
|
|
41
35
|
3. **Judge each design claim** (`file:line` refs, signatures, "X calls Y", chosen option, the AC → test map): still true at HEAD, or moved, renamed, removed, already done by someone else?
|
|
42
36
|
4. **Classify.**
|
|
43
37
|
|
|
@@ -60,7 +54,7 @@ Load `workitems-process` first. You are a leaf sub-agent of `lead` (`implement-f
|
|
|
60
54
|
## Stop rules
|
|
61
55
|
|
|
62
56
|
- One ruling per call, at the `head_sha` you recorded at start ([Evidence and reports](../workitems-process/SKILL.md#evidence-and-reports), the head rule). If HEAD moves while you work, finish against the one you recorded (diff `<BaselineSha>..<head_sha>`, not `..HEAD`) and say so; never stop or restart. The lead compares your `head_sha` with the branch head and re-runs you at the new head when it moved.
|
|
63
|
-
- Same
|
|
57
|
+
- Same tool failure twice: return it to the lead as a finding and stop ([No block](../workitems-process/SKILL.md#no-block)).
|
|
64
58
|
|
|
65
59
|
## Never
|
|
66
60
|
|
|
@@ -23,20 +23,20 @@ Not for fixing code or reviewing style.
|
|
|
23
23
|
|
|
24
24
|
## Inputs (from the brief)
|
|
25
25
|
|
|
26
|
-
- Mode, item id (item/delta), the `AC-n` list with the item's `## Verification` lines, the head SHA, `base_sha` (for Bug proof: the
|
|
26
|
+
- Mode, item id (item/delta), the `AC-n` list with the item's `## Verification` lines, the head SHA, `base_sha` (for Bug proof: the integration SHA the per-Bug branch was created from).
|
|
27
27
|
- There is no PR yet in item and final modes: required checks are the repo's own commands, run locally. In delta mode the PR exists; read its failing check's job for what to re-run.
|
|
28
28
|
|
|
29
29
|
## Preconditions
|
|
30
30
|
|
|
31
|
-
1.
|
|
32
|
-
2.
|
|
31
|
+
1. The worktree toplevel equals the brief's worktree; else return it to the lead as a finding and stop ([No block](../workitems-process/SKILL.md#no-block)). Record the branch head as `head_sha` and finish against it ([Evidence and reports](../workitems-process/SKILL.md#evidence-and-reports), the head rule): if HEAD differs from the named head SHA, or moves during the run, run in an export of `head_sha` under `.scratchpad/`, say so in the report, and never stop or restart; the lead re-runs you at the new head.
|
|
32
|
+
2. The tree is clean before you start.
|
|
33
33
|
3. You are a fresh context. You never read the executor's transcript, only its committed work and the plan.
|
|
34
34
|
|
|
35
35
|
## Procedure
|
|
36
36
|
|
|
37
37
|
1. **Build the matrix** before running anything: scenario id, `AC-n` or risk it covers, setup, command, expected signal, actual result, cleanup. Every `AC-n` in scope gets at least one row.
|
|
38
38
|
2. **Acceptance checks.** For each `AC-n` run the mapped test or command. Capture command, exit code and the line that proves the signal. An `AC-n` with no runnable check is a FAIL finding (`fix`: add the test), not a pass by reading. Final mode also runs the full suite, lint, typecheck and build.
|
|
39
|
-
3. **Bug regression proof** (Bug items). You must not change HEAD in the shared worktree. Export the base
|
|
39
|
+
3. **Bug regression proof** (Bug items). You must not change HEAD in the shared worktree. Export the base into `.scratchpad/base/`; copy the regression test from head into it; run it and confirm it **fails for the reported defect**. Then run it at head and confirm it passes normally: at head it carries no expected-failure mark (the fix commit removes the mark the reproduce commit added); a mark left at head is a FAIL finding. If the exported copy cannot run the test, the proof is not PASS: FAIL with a finding naming what the copy lacks.
|
|
40
40
|
4. **Adversarial scenarios** relevant to the change only:
|
|
41
41
|
- malformed input: missing fields, invalid flags, oversized or unusual-Unicode strings, path-like values;
|
|
42
42
|
- failure paths: dependency down, permission denied, non-zero child exit, timeouts;
|
|
@@ -45,7 +45,7 @@ Not for fixing code or reviewing style.
|
|
|
45
45
|
- dirty state: pre-existing untracked files or stale state.
|
|
46
46
|
Bound every command with a timeout. A flaky result is reported with rerun counts and both run outputs, never a lucky green.
|
|
47
47
|
5. **Harness hygiene.** Temporary tests, fixtures and scripts live only in `.scratchpad/` (gitignored), are never committed, and are deleted before you stop. A harness bug is fixed and rerun before calling it a product defect.
|
|
48
|
-
6. **Clean up.** Remove temp files and processes;
|
|
48
|
+
6. **Clean up.** Remove temp files and processes; the tree is clean and HEAD unchanged. Record before and after.
|
|
49
49
|
7. **Verdict.** `PASS` only when every `AC-n` in scope passed, the bug proof (if any) holds, and no high/critical adversarial finding exists. Otherwise `FAIL`.
|
|
50
50
|
8. **Return the report**: `lane: verify` (or `verify-final`), `target`, `head_sha`, `verdict`, `findings` (each `id`, `severity`, `where` file:line or check, `what`, `fix`), `artifacts` = matrix summary (scenario → `AC-n` → result), commands with exit codes, bug proof runs, cleanup status.
|
|
51
51
|
|
|
@@ -15,7 +15,7 @@ The destination varies per effort, and naming it is the first act of charting
|
|
|
15
15
|
|
|
16
16
|
## Do Not Use When
|
|
17
17
|
|
|
18
|
-
- The work is already small enough for one session, or is execution-shaped (slicing an already-decided plan into build tickets) rather than decision-shaped — use `
|
|
18
|
+
- The work is already small enough for one session, or is execution-shaped (slicing an already-decided plan into build tickets) rather than decision-shaped — use `workitems-process` instead.
|
|
19
19
|
|
|
20
20
|
## Plan, don't do
|
|
21
21
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: workitems-process
|
|
3
|
-
description: Shared reference every adl run loads first - the three dispatcher targets and their triggers, the run record, roles and write scopes, work item states, the human gates, the no-block rule, run evidence, adl MCP/CLI commands,
|
|
3
|
+
description: Shared reference every adl run loads first - the three dispatcher targets and their triggers, the run record, roles and write scopes, work item states, the human gates, the no-block rule, run evidence, adl MCP/CLI commands, plan and item files. Load it at the start of every session, before the target skill, and whenever a run must decide a transition or write a report.
|
|
4
4
|
metadata:
|
|
5
5
|
step: "shared"
|
|
6
6
|
role: "all"
|
|
@@ -12,13 +12,13 @@ metadata:
|
|
|
12
12
|
This skill is the package's single owner of the process rules. Every other skill, agent and prompt in the package links to a section here and does not restate it.
|
|
13
13
|
Tags: **[live]** = enforced today. **[pending X]** = change row `X` that is not built yet: rows F, L, P, T, H, R, S, A, V are adl-agent-control changes; rows X are adl-dispatcher changes. Never act as if a pending change is live.
|
|
14
14
|
|
|
15
|
-
Sections: [Targets and triggers](#targets-and-triggers) · [The run record](#the-run-record) · [Roles](#roles) · [States at a glance](#states-at-a-glance) · [Human gates](#human-gates) · [No block](#no-block) · [Evidence and reports](#evidence-and-reports) · [ADO
|
|
16
|
-
References: [`references/workitem-states.md`](references/workitem-states.md) (states, moves, links), [`references/evidence.md`](references/evidence.md) (reports, verdicts), [`references/ado-and-git.md`](references/ado-and-git.md) (tools,
|
|
15
|
+
Sections: [Targets and triggers](#targets-and-triggers) · [The run record](#the-run-record) · [Roles](#roles) · [States at a glance](#states-at-a-glance) · [Human gates](#human-gates) · [No block](#no-block) · [Evidence and reports](#evidence-and-reports) · [ADO and files](#ado-and-files) · [Universal preconditions](#universal-preconditions-every-run) · [Universal stop rules](#universal-stop-rules) · [Terminal handoff](#terminal-handoff).
|
|
16
|
+
References: [`references/workitem-states.md`](references/workitem-states.md) (states, moves, links), [`references/evidence.md`](references/evidence.md) (reports, verdicts), [`references/ado-and-git.md`](references/ado-and-git.md) (tools, plan and item files, PR wiring).
|
|
17
17
|
|
|
18
18
|
## When to use
|
|
19
19
|
|
|
20
20
|
- At the start of every dispatched session, before the target skill's procedure.
|
|
21
|
-
- Whenever you must choose a transition, write a report, call ADO, or name a file
|
|
21
|
+
- Whenever you must choose a transition, write a report, call ADO, or name a file.
|
|
22
22
|
|
|
23
23
|
## Targets and triggers
|
|
24
24
|
|
|
@@ -31,10 +31,10 @@ References: [`references/workitem-states.md`](references/workitem-states.md) (st
|
|
|
31
31
|
- A Feature takes two runs: one planning run, then one implementation run. A Fixes Bug takes one run: the per-Bug implementation run. One run = one worktree, one terminal, one lead session that orchestrates its sub-agents.
|
|
32
32
|
- **Ready:** a Feature is ready when every predecessor Feature is at Awaiting Release or Done.
|
|
33
33
|
- **`workitem-triage` fires on any of:** an open PBI or Bug off the ladder (`Committed` included); an item whose state may not match its evidence; a Feature roll-up is due; a Feature with no parent Epic, or (all but the first) no predecessor Feature; a red pipeline **[pending X4]**. A red pipeline is filed only when the LATEST completed run of the `integration` or `main` pipeline is red AND its build id is named in no Bug's `## Failing builds` (any state). Then: if an open Bug (New through Updating Docs) names the same failure, append the build id to it, with no comment. Otherwise file a new Bug through `report-bug`; if an earlier Bug (Done or Parked for Removal) names the same failure, that Bug is its predecessor. Older runs are never filed. A run already named never files again. Once named, a red `main` run waiting for promotion and the last red `integration` run before the fix's next run both stay quiet. Done proof: each latest completed run is green or its build id is named by a Bug.
|
|
34
|
-
- **`planning` fires on either:** a Feature at New whose `intent.md` is on
|
|
34
|
+
- **`planning` fires on either:** a Feature at New whose `intent.md` is on the integration base and which is ready; or a Feature at In Progress with any child at New or In Planning (the G1 rework or requeue re-fire) **[pending X1]**. Nothing queues it. It never fires on a Bug, and never on a `Fixes to closed Features` Feature: its Bugs at New are not planned (G1 approves each Bug's Description, then X2).
|
|
35
35
|
- **`implementation` fires per Feature on all of:** every in-scope item (not Parked for Removal or Removed) is at Approved or later; at least one in-scope item is not Done; the Feature is ready; the Feature's planning PR is merged into `integration` **[pending X5]**. A `Fixes to closed Features` Feature never fires it under the Feature key; each of its Bugs fires alone, keyed by the Bug, at Approved through Updating Docs, until its PR merges (the X12 done proof) **[pending X2]**. A Bug at Approved starts a fresh run; a Bug at In Reproduction through Updating Docs is a died or `PR_OPEN` run, resumed from the Bug's state.
|
|
36
36
|
- CI is not a target; it is the last stage of implementation (ADR-019).
|
|
37
|
-
- **The dispatcher is a trigger:** code, no LLM. It reads the board, PRs, pipelines and branches, picks targets in rank order,
|
|
37
|
+
- **The dispatcher is a trigger:** code, no LLM. It reads the board, PRs, pipelines and branches, picks targets in rank order, and starts one session. It writes nothing to ADO. Every board write is made by the session it starts or by adl-agent-control.
|
|
38
38
|
- **No attempt cap.** While a key's trigger holds, the same key is re-dispatched into the same worktree and branch, and the lead resolves the cause. A session silent for 20 min is interrupted; the trigger still holds, so the key is re-dispatched.
|
|
39
39
|
- Live-session skills are never dispatched: `write-feature` (creates a Feature with its `intent.md`), `report-bug` (the only intake for findings, usable by any agent).
|
|
40
40
|
|
|
@@ -51,11 +51,11 @@ Rendered by `prompts/_envelope.md`. Fields: `target`, `agent`, `skill`, `key`, `
|
|
|
51
51
|
|
|
52
52
|
| Agent | Kind | Write scope |
|
|
53
53
|
|---|---|---|
|
|
54
|
-
| `triager` | lead, `workitem-triage` | the board only: states, splits, merges, comments and predecessor links. Never writes files
|
|
54
|
+
| `triager` | lead, `workitem-triage` | the board only: states, splits, merges, comments and predecessor links. Never writes files |
|
|
55
55
|
| `planner` | lead, `planning`; sub-agent in `implementation` (design update) | the Feature's plan folder, the Feature plan fields, item fields; as a sub-agent only `design.md`, `file-map-reference.md` (its `## Baseline` section and the map rows), the Feature's Baseline Sha and the LEDGER row `az<id>-design-update` |
|
|
56
|
-
| `lead` | lead, `implementation` | board moves
|
|
56
|
+
| `lead` | lead, `implementation` | board moves. Writes no files, never reviews |
|
|
57
57
|
| `architect`, `critic`, `code-reviewer` | leaf | none; returns a report |
|
|
58
|
-
| `executor` | leaf | commits
|
|
58
|
+
| `executor` | leaf | commits in its assigned files only (in a per-Bug run: the Bug's item file and the regression test, marked as an expected failure, first) |
|
|
59
59
|
| `verifier` | leaf | scratch test harness only, never committed |
|
|
60
60
|
| `writer` | leaf | none; returns the PR body and implementation report text |
|
|
61
61
|
| explore sub-agent | leaf, read-only, fast tier | none |
|
|
@@ -82,11 +82,11 @@ Feature: `New → In Progress → Awaiting Release → Done`, plus `Removed`; li
|
|
|
82
82
|
| Gate | Decision | Who |
|
|
83
83
|
|---|---|---|
|
|
84
84
|
| **G1** | PBIs: Awaiting Approval → Approved (rework → In Planning, requeue → New), on the exact plan revision. Bugs: New → Approved, on the Bug's Description. After the planning cap the best version goes to G1 with its open findings | Tarun, on the board |
|
|
85
|
-
| **G2** | the
|
|
85
|
+
| **G2** | the promotion PR (not an item state) | Tarun |
|
|
86
86
|
| **G3** | Parked for Removal → Removed (revive → New) | Tarun |
|
|
87
87
|
|
|
88
88
|
Agents NEVER: move an item to Approved, Done or Removed; set Awaiting Approval by hand (`pr_create_or_update` does, pending P2); revive a parked item; approve or merge the promotion PR; auto-approve on human silence.
|
|
89
|
-
**No reviewer and no vote on any PR before the merge
|
|
89
|
+
**No reviewer and no vote on any PR before the merge.** CI plus auto-complete merges the PR. Review is the loop's In Review state inside the run; findings go to item comments and the implementation report.
|
|
90
90
|
|
|
91
91
|
## No block
|
|
92
92
|
|
|
@@ -99,7 +99,7 @@ Agents NEVER: move an item to Approved, Done or Removed; set Awaiting Approval b
|
|
|
99
99
|
| Design drift | A planner sub-agent updates `design.md`, `file-map-reference.md` (its `## Baseline` section and the map rows) and the Feature's Baseline Sha (the new `integration` base), and adds the LEDGER row `az<id>-design-update`; Plan Hash is unchanged, since it covers `requirements.md` only. Validation runs again; nothing moves to New or In Planning |
|
|
100
100
|
| Code drift in the loop | In Implementation → Design Validation, re-validate, continue (pending F1) |
|
|
101
101
|
| Drift that would need an approved `AC-n` changed | `requirements.md` stays frozen. The lead delivers every other `AC-n`, comments the reason on that PBI and moves it to Parked for Removal (G3). If the outcome is still wanted, the next Feature plans it |
|
|
102
|
-
| CI red | `fix-ci`, smallest fix; expired or cancelled check → scoped `build_run` (pending H1)
|
|
102
|
+
| CI red | `fix-ci`, smallest fix; expired or cancelled check → scoped `build_run` (pending H1) |
|
|
103
103
|
| Finding in review or verify | Back into the loop, only the listed findings |
|
|
104
104
|
| Bug in a closed Feature | `report-bug` |
|
|
105
105
|
| Tool refusal (fence or hook) | Post the refusal text as an item comment; take the path the refusal names |
|
|
@@ -112,27 +112,25 @@ Agents NEVER: move an item to Approved, Done or Removed; set Awaiting Approval b
|
|
|
112
112
|
|
|
113
113
|
- Every run ends with a report as its last action; format, verdicts and per-target content: [`references/evidence.md`](references/evidence.md).
|
|
114
114
|
- Sub-agents return a report to the lead; the lead posts it. Sub-agents post nothing and move nothing.
|
|
115
|
-
- **One head rule for every lane.** A lane that judges the branch (validate, verify, verify-final, review-code, review-architecture, finalize) records `head_sha`
|
|
115
|
+
- **One head rule for every lane.** A lane that judges the branch (validate, verify, verify-final, review-code, review-architecture, finalize) records `head_sha` at its start and finishes against it: it reads, diffs and tests that SHA, never a later worktree state, and reports it as `head_sha`. A head that moves during the lane, or differs at start from the head the brief named, never stops or restarts the lane; the lane says so in its report. The lead compares the reported `head_sha` with the branch head and re-runs the lane at the new head when the head moved.
|
|
116
116
|
- Every negative result names `where` and `fix`. A negative verdict without findings is invalid.
|
|
117
117
|
- A run that ends without its done proof leaves the trigger holding; the next tick re-dispatches the key.
|
|
118
118
|
|
|
119
|
-
## ADO
|
|
119
|
+
## ADO and files
|
|
120
120
|
|
|
121
121
|
Detail: [`references/ado-and-git.md`](references/ado-and-git.md).
|
|
122
122
|
|
|
123
|
-
- ADO goes through the `adl` MCP server: `workitem_list_or_get`, `
|
|
124
|
-
-
|
|
123
|
+
- ADO goes through the `adl` MCP server: `workitem_list_or_get`, `workitem_create_or_update_feature`, `workitem_create_or_update_pbi`, `workitem_create_or_update_bug`, `pr_list_or_get`, `pr_create_or_update`, `pr_review` (no role uses it before the merge), `build_list_or_get`, `build_run` (scoped to the lead's own PR, pending H1). If the server fails, use `adl mcp cli <command>`.
|
|
124
|
+
- Per-type mandatory fields (the agent gate enforces these per type): **Feature** — title + parentId (Epic) + description (must carry the four intent.md headings `## Why` / `## Outcome` / `## Constraints` / `## Non-goals`) + `priority` (literal set `{1, 2, 3, 4}`: 1=Very High, 2=High, 3=Medium, 4=Low); when moving off `New` (e.g. to `In Progress`), additionally `acceptanceCriteria` + `planRevision` + `planHash` + `baselineSha`; `comment` mandatory on every update. **PBI** — title + parentId (Feature) + description (must carry `## What it delivers` + `## Verification`) + `effort` (number, days, ≥0); `comment` mandatory on update. **Bug** — title + parentId (Feature) + description (must carry the five bugfix headings `## Current behaviour` / `## Expected behaviour` / `## Behaviour that must not change` / `## Responsible Feature` / `## Verification`) + `effort` (number, days, ≥0); `comment` mandatory on update. Per-type detail: [`references/ado-and-git.md` §1a](references/ado-and-git.md).
|
|
125
125
|
- Plans: `plans/features/az<feature id>-<slug>/{intent.md,requirements.md,design.md,file-map-reference.md,items/az<id>-<slug>.md}`. The id is allocated on the board **before** its file exists.
|
|
126
126
|
- Findings enter through `report-bug` only.
|
|
127
|
-
-
|
|
128
|
-
- Activity log: `adl activity add "<note>"` at start and finish (pending A1).
|
|
127
|
+
- Activity log: `adl activity add "<note>"` at start and finish.
|
|
129
128
|
|
|
130
129
|
## Universal preconditions (every run)
|
|
131
130
|
|
|
132
|
-
1.
|
|
131
|
+
1. The worktree matches the run record. Mismatch: the run does not start; report expected and actual, and the next tick re-evaluates.
|
|
133
132
|
2. Read the board for the key (`workitem_list_or_get --raw`). It must satisfy the target's trigger. If not, the run does not start; report the state seen. A resumed run (a died or `PR_OPEN` run, re-dispatched into the same worktree and branch) satisfies it while its done proof is unmet: a Feature's items at Approved or later with one not Done, or a Fixes Bug at Approved through Updating Docs until its PR merges. Resume from the board states, never by moving an item back.
|
|
134
133
|
3. Read the key's latest comments for the earlier run's report **[comments readable: pending T1]**; do not repeat an earlier run unchanged.
|
|
135
|
-
4. `adl id whoami` reports `agent-tarun`. Mismatch: the run does not start; report the identity seen.
|
|
136
134
|
|
|
137
135
|
## Universal stop rules
|
|
138
136
|
|
|
@@ -140,7 +138,7 @@ Detail: [`references/ado-and-git.md`](references/ado-and-git.md).
|
|
|
140
138
|
- Never spin: if the same command fails twice for the same reason, stop retrying it and take a different path ([No block](#no-block)).
|
|
141
139
|
- Never wait on a person inside a session.
|
|
142
140
|
- Never go silent: 20 min with no streamed output → the session is interrupted and the key re-dispatched, with your session tail as `resume_notes`. Keep producing output; a polling loop prints status.
|
|
143
|
-
- Never create a worktree; only adl-dispatcher does
|
|
141
|
+
- Never create a worktree; only adl-dispatcher does. Agents never create a branch, with one exception: in Tarun's live `write-feature` session the agent creates the intent branch from the integration base. Every other branch, and every worktree, is adl-dispatcher's to create; no agent ever recreates one.
|
|
144
142
|
|
|
145
143
|
## Terminal handoff
|
|
146
144
|
|
|
@@ -10,7 +10,9 @@ Use the `adl` MCP server tool. If the server is unavailable or errors for a reas
|
|
|
10
10
|
| MCP tool | CLI fallback | Use for |
|
|
11
11
|
|---|---|---|
|
|
12
12
|
| `workitem_list_or_get` | `adl mcp cli workitem-list-or-get [--id ID] [--ids IDS] [--type TYPE] [--state STATE] [--assigned-to IDENTITY] [--limit N] [--raw]` | Read an item (state, fields, relations, tags); list by type/state |
|
|
13
|
-
| `
|
|
13
|
+
| `workitem_create_or_update_feature` | `adl mcp cli workitem-create-or-update-feature [--id ID] --title T --parent-id ID --priority 1\|2\|3\|4 --description D [--predecessors ID[,ID…]] [--related ID[,ID…]] [--remove-predecessor ID] [--remove-related ID] [--fields JSON] [--state STATE] [--comment TEXT] [--assigned-to I] [--acceptance-criteria TEXT] [--start-date D] [--target-date D] [--plan-revision N] [--plan-hash S] [--baseline-sha S]` | Create or update a Feature; see §1a below for the per-type mandatory fields |
|
|
14
|
+
| `workitem_create_or_update_pbi` | `adl mcp cli workitem-create-or-update-pbi [--id ID] --title T --parent-id ID --description D --effort FLOAT [--related ID[,ID…]] [--remove-related ID] [--fields JSON] [--state STATE] [--comment TEXT] [--assigned-to I] [--acceptance-criteria TEXT] [--priority 1\|2\|3\|4] [--start-date D] [--target-date D]` | Create or update a PBI; see §1a below |
|
|
15
|
+
| `workitem_create_or_update_bug` | `adl mcp cli workitem-create-or-update-bug [--id ID] --title T --parent-id ID --description D --effort FLOAT [--predecessors ID] [--related ID[,ID…]] [--remove-predecessor ID] [--remove-related ID] [--fields JSON] [--state STATE] [--comment TEXT] [--assigned-to I] [--acceptance-criteria TEXT] [--priority 1\|2\|3\|4] [--start-date D] [--target-date D]` | Create or update a Bug; see §1a below |
|
|
14
16
|
| `pr_list_or_get` | `adl mcp cli pr-list-or-get [--id ID] [--status active\|completed\|abandoned\|all] [--repository R]` | Find the PR, read head SHA, status, merge state |
|
|
15
17
|
| `pr_create_or_update` | `adl mcp cli pr-create-or-update --action create\|update [--pull-request-id ID] [--title T] [--description D] [--auto-complete\|--no-auto-complete] [--merge-strategy Squash] [--delete-source-branch] [--repository R]` | Open or update a PR; also does the PR wiring (§6) **[pending P1/P2/P4]** |
|
|
16
18
|
| `pr_review` | `adl mcp cli pr-review …` | **Not used.** No reviewer and no vote on any PR before the merge to `integration` |
|
|
@@ -27,11 +29,42 @@ Tools not built yet (never act as if live):
|
|
|
27
29
|
| Activity log | A1 | `adl activity add "<note>"` / `adl activity list` write and read `.adl/agent-activity.sqlite` (local, gitignored) |
|
|
28
30
|
|
|
29
31
|
Patterns:
|
|
30
|
-
- Move state: `
|
|
31
|
-
- Post a comment: `
|
|
32
|
+
- Move state: `workitem_create_or_update_<type> --id <id> --state "<State Name>"` (the right one per type: `-feature`, `-pbi`, `-bug`). Use the exact ADO state name.
|
|
33
|
+
- Post a comment: `workitem_create_or_update_<type> --id <id> --comment "<text>"`. Comments are mandatory on every update.
|
|
32
34
|
- Supplying `--parent-id` on an update **moves** the item to that parent; the old parent link is removed.
|
|
33
35
|
- The installed CLI accepts only `--merge-strategy Squash`.
|
|
34
36
|
|
|
37
|
+
### 1a. Per-type mandatory fields (the canonical reference)
|
|
38
|
+
|
|
39
|
+
Use the type-named tool. The agent gate enforces the rules below — calls that violate them are refused, not silently dropped.
|
|
40
|
+
|
|
41
|
+
**Feature** — `workitem_create_or_update_feature` / `adl mcp cli workitem-create-or-update-feature`
|
|
42
|
+
- Required on create, and on any update while the Feature is at `New`: `title` (non-empty); `parentId` (must be an Epic); `description` (non-empty AND must carry the four intent.md headings `## Why`, `## Outcome`, `## Constraints`, `## Non-goals`); `priority` (literal set `{1, 2, 3, 4}`: 1=Very High, 2=High, 3=Medium, 4=Low — not any integer). `comment` non-empty on every update.
|
|
43
|
+
- Past `New`, an update carries the `comment` (and whatever it actually changes) — the create fields are not re-sent.
|
|
44
|
+
- State-conditional: when the existing state is `New` and the call moves to `In Progress`, additionally `acceptanceCriteria` (non-empty), `planRevision` (positive integer), `planHash` (non-empty string), `baselineSha` (non-empty string). Without those, the move is refused.
|
|
45
|
+
- Create state is always `New`. Cannot create at any other state.
|
|
46
|
+
- Predecessors: ≥1 unless the project has no non-Fixes Feature yet (L2 soft warning kept).
|
|
47
|
+
|
|
48
|
+
**PBI (`Product Backlog Item`)** — `workitem_create_or_update_pbi` / `adl mcp cli workitem-create-or-update-pbi`
|
|
49
|
+
- Required on create: `title` (non-empty); `parentId` (must be a Feature); `description` (non-empty AND must carry `## What it delivers` + `## Verification` headings); `effort` (number, ≥0, days; float accepted).
|
|
50
|
+
- On update: `comment` non-empty — and nothing else. The create fields are not re-sent.
|
|
51
|
+
- Predecessors are forbidden (L3 — soft, via a `warnings` field rather than a hard refusal).
|
|
52
|
+
- Plan fields (`plan-revision`, `plan-hash`, `baseline-sha`) are forbidden (T3 — hard).
|
|
53
|
+
|
|
54
|
+
**Bug** — `workitem_create_or_update_bug` / `adl mcp cli workitem-create-or-update-bug`
|
|
55
|
+
- Required on create: `title` (non-empty); `parentId` (must be a Feature, typically a Fixes Feature); `description` (non-empty AND must carry the five bugfix headings `## Current behaviour`, `## Expected behaviour`, `## Behaviour that must not change`, `## Responsible Feature`, `## Verification`); `effort` (number, ≥0, days; float accepted).
|
|
56
|
+
- On update: `comment` non-empty — and nothing else. The create fields are not re-sent.
|
|
57
|
+
- Predecessors: at most one, only when the parent is the `Fixes to closed Features` Feature (L4); for the first Bug in a Fixes Feature, none.
|
|
58
|
+
- `related` is required when the parent is the Fixes Feature (the related link points to the Responsible Feature) (L4).
|
|
59
|
+
- Plan fields are forbidden (T3 — hard).
|
|
60
|
+
|
|
61
|
+
**Cross-cutting**
|
|
62
|
+
- `priority` is the literal set `{1, 2, 3, 4}`. Named: 1=Very High, 2=High, 3=Medium, 4=Low. Stored as `Microsoft.VSTS.Common.Priority` (int). Surfaces on the read shape as `priority: number | null`.
|
|
63
|
+
- `effort` is in days, accepts floats. Stored as `Microsoft.VSTS.Scheduling.Effort` (number, ≥0). Surfaces on the read shape as `effort: number | null`.
|
|
64
|
+
- `comment` is mandatory on every update (tarun: "comments field is also mandatory"). Even no-op-shaped updates must carry a comment. On create, `comment` is optional.
|
|
65
|
+
- `AC` is required on Feature only (state-conditional, see above). PBI/Bug read also embeds it; they just don't require it at create.
|
|
66
|
+
- The tool name IS the type. Passing an id of another type (a PBI id to `workitem_create_or_update_feature`, say) is refused by name — there is no blanket write tool to fall back on.
|
|
67
|
+
|
|
35
68
|
## 2. Identity
|
|
36
69
|
|
|
37
70
|
- Every session runs as `agent-tarun`; `ADL_AGENT_ID_AGENT` is set when the session starts and selects the identity for every ADO and git network call. `agent-reviewer` exists only for the `integration → main` promotion (G2); no run uses it.
|