@amsterdamdatalabs/adl-agent-control-linux-x64 0.1.35 → 0.1.37
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/package.json +1 -1
- package/packages/agent-hooks/deploy-profile.json +1 -1
- package/packages/agent-hooks/src/pre-tool-use/handler.ts +2 -2
- package/packages/agent-hooks/src/rules/impl/adl-build-run-role.ts +116 -0
- package/packages/agent-hooks/src/rules/impl/adl-git-user-override-block.ts +159 -0
- package/packages/agent-hooks/src/rules/impl/adl-mcp-cli.ts +12 -6
- package/packages/agent-hooks/src/rules/impl/adl-pr-complete-pending.ts +9 -9
- package/packages/agent-hooks/src/rules/impl/adl-pr-role.ts +6 -5
- package/packages/agent-hooks/src/rules/impl/agent-tamper-protection.ts +15 -14
- package/packages/agent-hooks/src/rules/impl/git-core.ts +4 -8
- package/packages/agent-hooks/src/rules/impl/mcp-tool.ts +1 -1
- package/packages/agent-hooks/src/rules/registry.ts +11 -2
- package/packages/agent-hooks/src/rules/shell/protected-carriers.ts +8 -4
- package/packages/agent-skills/assets/code-review/SKILL.md +84 -66
- package/packages/agent-skills/assets/diagnosing-bugs/SKILL.md +23 -2
- package/packages/agent-skills/assets/diagnosing-bugs/references/FEEDBACK-LOOP-TACTICS.md +1 -1
- package/packages/agent-skills/assets/explore-codebase/SKILL.md +3 -2
- package/packages/agent-skills/assets/finalize-feature/SKILL.md +63 -0
- package/packages/agent-skills/assets/fix-ci/SKILL.md +58 -0
- package/packages/agent-skills/assets/handoff/SKILL.md +1 -1
- package/packages/agent-skills/assets/implement-feature/SKILL.md +153 -0
- package/packages/agent-skills/assets/implement-feature/references/briefs.md +94 -0
- package/packages/agent-skills/assets/implement-item/SKILL.md +71 -0
- package/packages/agent-skills/assets/mechanics/SKILL.md +38 -0
- package/packages/agent-skills/assets/plan-feature/SKILL.md +141 -0
- package/packages/agent-skills/assets/prepare-promotion/SKILL.md +91 -0
- package/packages/agent-skills/assets/ralplan/SKILL.md +149 -0
- package/packages/agent-skills/assets/refactor-safely/SKILL.md +4 -3
- package/packages/agent-skills/assets/report-bug/SKILL.md +72 -0
- package/packages/agent-skills/assets/review-change/SKILL.md +82 -0
- package/packages/agent-skills/assets/review-plan/SKILL.md +124 -0
- package/packages/agent-skills/assets/triage-workitems/SKILL.md +99 -0
- package/packages/agent-skills/assets/ultragoal/SKILL.md +77 -0
- package/packages/agent-skills/assets/validate-design/SKILL.md +70 -0
- package/packages/agent-skills/assets/verify-item/SKILL.md +71 -0
- package/packages/agent-skills/assets/workitems-process/SKILL.md +147 -0
- package/packages/agent-skills/assets/workitems-process/references/ado-and-git.md +194 -0
- package/packages/agent-skills/assets/workitems-process/references/evidence.md +74 -0
- package/packages/agent-skills/assets/workitems-process/references/workitem-states.md +92 -0
- package/packages/agent-skills/assets/write-feature/SKILL.md +95 -0
- package/packages/agent-skills/dist/deploy.d.ts +7 -0
- package/packages/agent-skills/dist/deploy.d.ts.map +1 -1
- package/packages/agent-skills/dist/deploy.js +52 -5
- package/packages/agent-skills/dist/deploy.js.map +1 -1
- package/packages/agent-skills/src/deploy.ts +48 -4
- package/packages/azdo/scripts/probe-ado-rules.ts +1 -1
- package/packages/azdo/src/activity-log.ts +118 -0
- package/packages/azdo/src/azdo-attachments.ts +108 -0
- package/packages/azdo/src/azdo-pl.ts +100 -3
- package/packages/azdo/src/azdo-pr.ts +194 -11
- package/packages/azdo/src/azdo-wit.ts +329 -18
- package/packages/azdo/src/cli.ts +42 -2
- package/packages/azdo/src/lib/client.ts +7 -1
- package/packages/azdo/src/lib/validate-pr-metadata.ts +14 -5
- package/packages/azdo/src/mcp-server.ts +53 -5
- package/packages/azdo/src/tool-dispatch.ts +53 -4
- package/packages/azdo/src/workflow-ladder.csv +125 -107
- package/packages/azdo/src/workflow-rules.ts +254 -97
- package/packages/repo-controls/README.md +12 -4
- package/packages/repo-controls/assets/scaffold/docs/AGENTS.md +5 -5
- package/packages/repo-controls/assets/scaffold/plans/AGENTS.md +42 -13
- package/packages/repo-controls/assets/scaffold/root/CONTRIBUTING.md +5 -5
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/closed_set/test_check.py +0 -11
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/filename/test_check.py +4 -6
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/ledger/test_check.py +15 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/docs-okf-profiles.yaml +1 -17
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/docs/okf_profile/test_check.py +3 -22
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/open_work_cap/check.py +39 -182
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/open_work_cap/fixtures/open-work-cap-clean/plans/features/az601-clean/intent.md +17 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/open_work_cap/test_check.py +90 -321
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/plan_metadata.py +31 -5
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/plans_layout/check.py +282 -54
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/plans_layout/fixtures/plans-layout-clean/plans/features/az347-test-coverage/design.md +35 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/plans_layout/fixtures/plans-layout-clean/plans/features/az347-test-coverage/file-map-reference.md +19 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/plans_layout/fixtures/plans-layout-clean/plans/features/az347-test-coverage/intent.md +25 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/plans_layout/fixtures/plans-layout-clean/plans/features/az347-test-coverage/items/az351-restore-entrypoint.md +25 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/plans_layout/fixtures/plans-layout-clean/plans/features/az347-test-coverage/requirements.md +44 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/plans_layout/fixtures/plans-layout-violation/plans/features/az347-test-coverage/requirements.md +44 -0
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/checks/layout/plans_layout/test_check.py +646 -53
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/cli.py +3 -3
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/docs_shape.py +1 -12
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/gate-registry.alt.yaml +1 -1
- package/packages/repo-controls/package/adl-compliance/src/adl_compliance/policy/gate-registry.yaml +1 -1
|
@@ -1,100 +1,118 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: code-review
|
|
3
|
-
description:
|
|
4
|
-
disable-model-invocation: false
|
|
3
|
+
description: Run a comprehensive code review
|
|
5
4
|
---
|
|
6
5
|
|
|
7
|
-
# Code Review
|
|
8
|
-
Two-axis review of the diff between `HEAD` and a fixed point the user supplies:
|
|
6
|
+
# Code Review Task Card
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
Use this explicit opt-in for a merge-readiness review. Shared operating invariants
|
|
9
|
+
live in `templates/AGENTS.md`; this card only defines review-specific behavior.
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
## When to use
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
- The user asks for a code review or quality/security assessment.
|
|
14
|
+
- A change is ready for review before merge, or a major feature needs an independent review.
|
|
15
|
+
- Do not activate this card for implementation, broad planning, or automatic cleanup.
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
- The user asks to "review since X" (a commit, branch, tag, or merge-base).
|
|
17
|
+
## Inputs
|
|
19
18
|
|
|
20
|
-
|
|
19
|
+
- Scope: the requested files, commit, PR, or whole diff.
|
|
20
|
+
- Requirements/specification, acceptance criteria, and relevant test/CI evidence.
|
|
21
|
+
- Existing review artifacts and known risks, if any.
|
|
22
|
+
- If the user says `continue`, advance the current verified review step rather than restarting discovery.
|
|
21
23
|
|
|
22
|
-
|
|
24
|
+
Start by recording the scope:
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
```sh
|
|
27
|
+
git status --short
|
|
28
|
+
git diff --stat
|
|
29
|
+
git diff -- <scope>
|
|
30
|
+
```
|
|
25
31
|
|
|
26
|
-
##
|
|
32
|
+
## Execution
|
|
27
33
|
|
|
28
|
-
|
|
34
|
+
1. Identify changed files and review boundaries; do not silently widen the scope.
|
|
35
|
+
2. Launch the `code-reviewer` and `architect` agents in parallel. Both lanes run in parallel on a clean context with explicit scope and artifacts. If either lane cannot be launched or does not return evidence, report `independent review unavailable`; do **not** substitute the current/authoring lane, and do **not** approve or mark the review merge-ready.
|
|
36
|
+
3. Respect the user's current model and reasoning/effort selection. Do not pass `model` or `reasoning_effort` overrides in review-lane calls.
|
|
29
37
|
|
|
30
|
-
|
|
38
|
+
```text
|
|
39
|
+
task(
|
|
40
|
+
agent_type="code-reviewer",
|
|
41
|
+
prompt="CODE REVIEW TASK
|
|
31
42
|
|
|
32
|
-
|
|
43
|
+
Review the supplied scope for spec compliance, security, quality, performance, and maintainability.
|
|
44
|
+
Return files reviewed, severity-rated findings with file:line evidence and concrete fixes,
|
|
45
|
+
and a recommendation: APPROVE / REQUEST CHANGES / COMMENT. Do not review architecture.
|
|
46
|
+
Scope: [scope and artifacts]"
|
|
47
|
+
)
|
|
33
48
|
|
|
34
|
-
|
|
49
|
+
task(
|
|
50
|
+
agent_type="architect",
|
|
51
|
+
prompt="ARCHITECTURE / DEVIL'S-ADVOCATE REVIEW TASK
|
|
35
52
|
|
|
36
|
-
|
|
53
|
+
Review the same scope for boundaries, interfaces, hidden coupling, long-term tradeoffs,
|
|
54
|
+
and the strongest counterargument against approval. Return file:line evidence,
|
|
55
|
+
recommendations, and Architectural Status: CLEAR / WATCH / BLOCK.
|
|
56
|
+
Scope: [scope and artifacts]"
|
|
57
|
+
)
|
|
58
|
+
```
|
|
37
59
|
|
|
38
|
-
|
|
60
|
+
## Review taxonomy
|
|
39
61
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
62
|
+
- `code-reviewer` checks **Security**, **Code Quality**, **Performance**, **Best Practices**, and **Maintainability**.
|
|
63
|
+
- Rate each finding: **CRITICAL** (security or data-loss blocker), **HIGH** (bug/major smell), **MEDIUM** (important improvement), or **LOW** (style/suggestion).
|
|
64
|
+
- `architect` checks explicit boundaries/interfaces, hidden coupling, long-horizon tradeoffs, and devil's-advocate concerns. Status is **CLEAR**, **WATCH** (non-blocking concern), or **BLOCK** (merge blocker).
|
|
65
|
+
- Every finding names `file:line`, issue, risk, and a concrete fix; distinguish facts from suggestions.
|
|
44
66
|
|
|
45
|
-
|
|
67
|
+
## State/HUD Phase Contract
|
|
46
68
|
|
|
47
|
-
|
|
69
|
+
- Standalone `$code-review` relies on hook-owned `skill-active-state.json` (`skill:"code-review"`, `phase:"planning"`); do not create `code-review-state.json`.
|
|
70
|
+
- Inside Autopilot, keep `mode:"autopilot"` active with `current_phase:"code-review"` / skill-active `phase:"code-review"`; do not activate a peer workflow.
|
|
71
|
+
- On clean review, persist the artifact under Autopilot `handoff_artifacts.code_review` before moving to `ultraqa`. On non-clean review, persist findings and use `rework` or `ralplan` as appropriate.
|
|
48
72
|
|
|
49
|
-
|
|
73
|
+
```sh
|
|
74
|
+
adw state write --input '{"mode":"autopilot","active":true,"current_phase":"code-review"}' --json
|
|
75
|
+
```
|
|
50
76
|
|
|
51
|
-
|
|
52
|
-
- **Always a judgement call.** Each smell is a labelled heuristic ("possible Feature Envy"), never a hard violation — and, like any standard here, skip anything tooling already enforces.
|
|
77
|
+
## Final Synthesis and gate
|
|
53
78
|
|
|
54
|
-
|
|
79
|
+
### Architectural Status Contract
|
|
55
80
|
|
|
56
|
-
-
|
|
57
|
-
- **Duplicated Code** — the same logic shape appears in more than one hunk or file in the change. → extract the shared shape, call it from both.
|
|
58
|
-
- **Feature Envy** — a method that reaches into another object's data more than its own. → move the method onto the data it envies.
|
|
59
|
-
- **Data Clumps** — the same few fields or params keep travelling together (a type wanting to be born). → bundle them into one type, pass that.
|
|
60
|
-
- **Primitive Obsession** — a primitive or string standing in for a domain concept that deserves its own type. → give the concept its own small type.
|
|
61
|
-
- **Repeated Switches** — the same `switch`/`if`-cascade on the same type recurs across the change. → replace with polymorphism, or one map both sites share.
|
|
62
|
-
- **Shotgun Surgery** — one logical change forces scattered edits across many files in the diff. → gather what changes together into one module.
|
|
63
|
-
- **Divergent Change** — one file or module is edited for several unrelated reasons. → split so each module changes for one reason.
|
|
64
|
-
- **Speculative Generality** — abstraction, parameters, or hooks added for needs the spec doesn't have. → delete it; inline back until a real need shows.
|
|
65
|
-
- **Message Chains** — long `a.b().c().d()` navigation the caller shouldn't depend on. → hide the walk behind one method on the first object.
|
|
66
|
-
- **Middle Man** — a class or function that mostly just delegates onward. → cut it, call the real target direct.
|
|
67
|
-
- **Refused Bequest** — a subclass or implementer that ignores or overrides most of what it inherits. → drop the inheritance, use composition.
|
|
81
|
+
Combine the `code-reviewer` recommendation and architect status. Approval requires explicit evidence from both independent lanes; missing or failed delegation is a blocking unavailable-review state, not an approval fallback. The final report must make architect blockers impossible to miss.
|
|
68
82
|
|
|
69
|
-
|
|
83
|
+
- If architect status is **BLOCK**, final recommendation is **REQUEST CHANGES**.
|
|
84
|
+
- Else if `code-reviewer` recommendation is **REQUEST CHANGES**, final recommendation is **REQUEST CHANGES**.
|
|
85
|
+
- Else if architect status is **WATCH**, final recommendation is **COMMENT**.
|
|
86
|
+
- Else final recommendation follows the `code-reviewer` lane.
|
|
70
87
|
|
|
71
|
-
|
|
88
|
+
Approval criteria: **APPROVE** only when `code-reviewer` returns APPROVE, architect status is `CLEAR`, and both independent lanes returned evidence. **REQUEST CHANGES** for a blocker, unresolved high/critical finding, or unavailable lane. **COMMENT** may record non-blocking findings.
|
|
72
89
|
|
|
73
|
-
|
|
90
|
+
Do not self-review as a fallback. If the `code-reviewer` or `architect` path is missing, unavailable, skipped, or fails, block approval until independent lane evidence exists. Plain `code-review` itself remains read-only and does **not** promise auto-fix.
|
|
74
91
|
|
|
75
|
-
|
|
76
|
-
- The list of standards-source files you found in step 3, **plus the smell baseline from step 3** pasted in full — the sub-agent has no other access to it.
|
|
77
|
-
- The brief: "Report — per file/hunk where relevant — (a) every place the diff violates a documented standard: cite the standard (file + the rule); and (b) any baseline smell you spot: name it and quote the hunk. Distinguish hard violations from judgement calls — documented-standard breaches can be hard, but baseline smells are always judgement calls, and a documented repo standard overrides the baseline. Skip anything tooling enforces. Under 400 words."
|
|
92
|
+
## Evidence/output contract
|
|
78
93
|
|
|
79
|
-
|
|
94
|
+
Return a concise report containing:
|
|
80
95
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
96
|
+
```text
|
|
97
|
+
CODE REVIEW REPORT
|
|
98
|
+
Files Reviewed: <count>
|
|
99
|
+
Total Issues: 0
|
|
100
|
+
Architectural Status: CLEAR | WATCH | BLOCK
|
|
101
|
+
CRITICAL (0) | HIGH (0) | MEDIUM (0) | LOW (0)
|
|
102
|
+
Findings: file:line -> issue, risk, concrete fix (or none)
|
|
103
|
+
ARCHITECTURE WATCHLIST: concern, status, recommendation (or none)
|
|
104
|
+
- code-reviewer recommendation: COMMENT
|
|
105
|
+
- architect status: WATCH
|
|
106
|
+
- final recommendation: COMMENT
|
|
107
|
+
RECOMMENDATION: COMMENT
|
|
108
|
+
```
|
|
84
109
|
|
|
85
|
-
|
|
110
|
+
Replace the illustrative counts and verdict with observed values. Include scope,
|
|
111
|
+
lane evidence/artifact references, unresolved risks, and validation gaps.
|
|
86
112
|
|
|
87
|
-
|
|
113
|
+
## Exit condition
|
|
88
114
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
## Why two axes
|
|
94
|
-
|
|
95
|
-
A change can pass one axis and fail the other:
|
|
96
|
-
|
|
97
|
-
- Code that follows every standard but implements the wrong thing → **Standards pass, Spec fail.**
|
|
98
|
-
- Code that does exactly what the issue asked but breaks the project's conventions → **Spec pass, Standards fail.**
|
|
99
|
-
|
|
100
|
-
Reporting them separately stops one axis from masking the other.
|
|
115
|
+
Stop when the scoped diff has two independent lane results and a deterministic final
|
|
116
|
+
recommendation. Report `APPROVE` only under the approval criteria; otherwise leave a
|
|
117
|
+
bounded `REQUEST CHANGES`, `COMMENT`, or unavailable-review result. Never claim
|
|
118
|
+
merge-ready without the required evidence.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: diagnosing-bugs
|
|
3
|
-
description: Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this",
|
|
3
|
+
description: Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", reports something broken/throwing/failing/slow, or asks to trace a crash or root cause through the call chain.
|
|
4
|
+
keywords: trace crash root cause call chain execution flow callers callees failing throwing regression diagnose debug
|
|
4
5
|
disable-model-invocation: false
|
|
5
6
|
---
|
|
6
7
|
|
|
@@ -53,6 +54,24 @@ Once it's red, shrink the repro to the **smallest scenario that still goes red**
|
|
|
53
54
|
|
|
54
55
|
Done when **every remaining element is load-bearing** — removing any one of them makes the loop go green. Do not proceed until you have reproduced **and** minimised.
|
|
55
56
|
|
|
57
|
+
## Trace with the knowledge graph
|
|
58
|
+
|
|
59
|
+
When the symptom names a code area, or a recent change is the suspect, trace
|
|
60
|
+
the call structure with the knowledge graph instead of reading file by file —
|
|
61
|
+
this is how Phase 3 hypotheses get built fast:
|
|
62
|
+
|
|
63
|
+
1. Run `crg search "<query>"` to find code related to the issue.
|
|
64
|
+
2. Run `crg query callers_of <target>` and `crg query callees_of <target>` to trace call chains.
|
|
65
|
+
3. Run `crg flow --name <n>` to see full execution paths through suspected areas.
|
|
66
|
+
4. Run `crg detect-changes --base <ref>` to check if recent changes caused the issue.
|
|
67
|
+
5. Run `crg impact --files <f…>` on suspected files to see what else is affected.
|
|
68
|
+
|
|
69
|
+
- Check both callers and callees to understand the full context.
|
|
70
|
+
- Look at affected flows to find the entry point that triggers the bug.
|
|
71
|
+
- Recent changes are the most common source of new issues.
|
|
72
|
+
- Trace efficiently: capped output (`--limit`, `--brief`), a handful of commands,
|
|
73
|
+
then verify the suspected cause against real source before proposing a fix.
|
|
74
|
+
|
|
56
75
|
## Phase 3 — Hypothesise
|
|
57
76
|
|
|
58
77
|
Generate **3–5 ranked hypotheses** before testing any of them. Single-hypothesis generation anchors on the first plausible idea.
|
|
@@ -99,10 +118,12 @@ Required before declaring done:
|
|
|
99
118
|
|
|
100
119
|
**Then ask: what would have prevented this bug?** If the answer involves architectural change (no good test seam, tangled callers, hidden coupling) hand off to the `/improve-codebase-architecture` skill with the specifics. Make the recommendation **after** the fix is in, not before — you have more information now than when you started.
|
|
101
120
|
|
|
102
|
-
## HITL loop script
|
|
121
|
+
## HITL loop script — live sessions only
|
|
103
122
|
|
|
104
123
|
`scripts/hitl-loop.template.sh` is the human-in-the-loop reproduction loop (usage notes moved out of the script so the deployed copy has no multi-line comment run).
|
|
105
124
|
|
|
125
|
+
**Live sessions only** — a session where the human is present (`write-feature`-style live work, or this skill invoked interactively). Never inside a dispatched run: No block forbids waiting on a person, and run evidence must be machine-checkable. In a dispatched run a human-only repro is automated instead (Playwright drives the clicks — tactic 4) or, if that genuinely fails, the lead posts the attempt as a finding and parks the item with proof. In a live session the captured `KEY=VALUE` pairs are the human's testimony, and the regression test built from them still lands before the fix.
|
|
126
|
+
|
|
106
127
|
- Copy the file, edit the steps in it, and run it. The agent runs the script; the user follows prompts in their terminal.
|
|
107
128
|
- Usage: `bash hitl-loop.template.sh`
|
|
108
129
|
- Two helpers: `step "<instruction>"` shows the instruction and waits for Enter; `capture VAR "<question>"` shows the question and reads the response into `VAR`.
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
7. **Property / fuzz loop.** If the bug is "sometimes wrong output", run 1000 random inputs and look for the failure mode.
|
|
12
12
|
8. **Bisection harness.** If the bug appeared between two known states (commit, dataset, version), automate "boot at state X, check, repeat" so you can `git bisect run` it.
|
|
13
13
|
9. **Differential loop.** Run the same input through old-version vs new-version (or two configs) and diff outputs.
|
|
14
|
-
10. **HITL bash script.**
|
|
14
|
+
10. **HITL bash script.** If a human must click, drive _them_ with `scripts/hitl-loop.template.sh` so the loop is still structured. **Live sessions only** — never inside a dispatched run (No block: never wait on a person; run evidence must be machine-checkable). In a run, automate the human instead (Playwright, tactic 4); if that genuinely fails, the lead parks the item with proof. Captured output feeds back to you.
|
|
15
15
|
|
|
16
16
|
Build the right feedback loop, and the bug is 90% fixed.
|
|
17
17
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: explore-codebase
|
|
3
3
|
description: Navigate and understand codebase structure using the knowledge graph
|
|
4
|
+
keywords: navigate orient structure understand unfamiliar get oriented modules
|
|
4
5
|
disable-model-invocation: false
|
|
5
6
|
---
|
|
6
7
|
|
|
@@ -16,8 +17,8 @@ relationships before making a change, or locating where a concept lives.
|
|
|
16
17
|
## Do Not Use When
|
|
17
18
|
|
|
18
19
|
You already know where the problem is and need to trace a bug — use
|
|
19
|
-
`
|
|
20
|
-
`refactor-safely`. You are reviewing a pending diff — use `review
|
|
20
|
+
`diagnosing-bugs`. You are about to refactor a known target — use
|
|
21
|
+
`refactor-safely`. You are reviewing a pending diff — use `code-review`.
|
|
21
22
|
|
|
22
23
|
## Steps
|
|
23
24
|
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: finalize-feature
|
|
3
|
+
description: Assemble the content for the one Feature implementation PR without pushing - the five-section PR body and the implementation report for all items - and check that the design's docs impact is in the diff. Returns text to the lead. Use when the implementation lead spawns writer after the Feature-final check passed at the final head.
|
|
4
|
+
metadata:
|
|
5
|
+
step: "finalize"
|
|
6
|
+
role: "writer"
|
|
7
|
+
states: "Updating Docs"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Finalize Feature (sub-agent skill)
|
|
11
|
+
|
|
12
|
+
Load `workitems-process` first. You are a leaf sub-agent of `lead` (`implement-feature`). Evidence assembly only. Docs were written in `implement-item` and reviewed with the code; you make **no pushes, commits, file edits or board writes**, because any push voids the Feature-final evidence. The lead raises the PR; `pr_create_or_update` links the items, moves them and attaches the report **[pending P1/P2/P4]**. You supply content only.
|
|
13
|
+
|
|
14
|
+
## When to use
|
|
15
|
+
|
|
16
|
+
- The lead holds a Feature-final verify `PASS` and both review lanes passing at the final head `H`, and items are code-complete (Updating Docs or about to be).
|
|
17
|
+
- Also on a CI round: the lead asks you to append that round to the report.
|
|
18
|
+
- Not for writing docs, fixing code or resolving conflicts.
|
|
19
|
+
|
|
20
|
+
## Inputs (from the brief)
|
|
21
|
+
|
|
22
|
+
- Final head `H`, `base_sha`, all per-item sub-agent reports (implement, verify, review) and their finding resolutions, the Feature-final reports, design-update commits, CI rounds so far.
|
|
23
|
+
- Plan folder: `requirements.md`, `design.md` (`## Docs impact`), item files.
|
|
24
|
+
|
|
25
|
+
## Preconditions
|
|
26
|
+
|
|
27
|
+
1. `git rev-parse HEAD` equals `H` and the worktree is clean; else return it to the lead as a finding and stop ([No block](../workitems-process/SKILL.md#no-block)).
|
|
28
|
+
2. The Feature-final verify is `PASS` and code is `APPROVE` and architecture `CLEAR`/`WATCH`, all at `H`; else return it to the lead as a finding and stop ([No block](../workitems-process/SKILL.md#no-block)).
|
|
29
|
+
|
|
30
|
+
## Procedure
|
|
31
|
+
|
|
32
|
+
1. **Docs check.** For each entry in `design.md` `## Docs impact` (per-Bug run: the docs the fix touches), find the matching path in `git diff --name-only origin/integration...H` and read the hunk, not just the filename. "No docs impact" counts as covered. Any missing entry: verdict `REWORK`, finding `docs-missing` (`where`: doc path or section; `fix`: what to write). Stop.
|
|
33
|
+
2. **PR body.** The five non-empty sections in [ado-and-git.md](../workitems-process/references/ado-and-git.md#7-git), filled as below. Every claim links to evidence (a report, a commit, a run); no unverified statements.
|
|
34
|
+
- `## Summary`: what the Feature delivers, by item (id, title).
|
|
35
|
+
- `## Why`: from `intent.md` and `requirements.md`, in the plan's words, not new claims.
|
|
36
|
+
- `## Changes`: per item, the files and behaviour changed; design updates made during the run; docs touched.
|
|
37
|
+
- `## Test plan`: per `AC-n`, the test and its result; Feature-final verify run at `H`; CI status as known.
|
|
38
|
+
- `## Security impact considered`: what the code reviewer examined and found; "none" only with the reviewer's report as the source.
|
|
39
|
+
The title is `<type>(<scope>): <lowercase subject>`.
|
|
40
|
+
3. **Implementation report** (becomes `impl-report-pr<id>.md`). Per item: changes, tests (`AC-n` → test, red then green), review findings (id, severity, resolution or accepted WATCH), rounds used. Then: design updates, Feature-final heads and results, CI rounds. Facts only, from the reports.
|
|
41
|
+
4. **Return** `lane: finalize`, `head_sha` = `H`, `verdict`, and in the reply the PR body, the report text and the docs-impact table (entry → doc path), each in its own fenced block. Write them nowhere.
|
|
42
|
+
|
|
43
|
+
## Verdicts
|
|
44
|
+
|
|
45
|
+
| Verdict | When | Lead does |
|
|
46
|
+
|---|---|---|
|
|
47
|
+
| `DONE` | Docs covered; body and report complete | Pushes and raises the PR |
|
|
48
|
+
| `REWORK` + `docs-missing` | Docs impact not in the diff | Executor writes it; Feature-final repeats |
|
|
49
|
+
|
|
50
|
+
## Stop rules
|
|
51
|
+
|
|
52
|
+
- One pass, against the `head_sha` recorded at start. If HEAD moves while you work, finish against that `head_sha` and say so; never restart. The lead re-runs you at the new head ([Evidence and reports](../workitems-process/SKILL.md#evidence-and-reports), the head rule).
|
|
53
|
+
|
|
54
|
+
## Never
|
|
55
|
+
|
|
56
|
+
- Never push, commit, rebase or edit files. Never write the body or report to disk.
|
|
57
|
+
- Never call `pr_create_or_update` or any board tool; never link items, set auto-complete, vote or merge.
|
|
58
|
+
- Never include a claim without a source, or a PR link that does not resolve.
|
|
59
|
+
- Never write the docs yourself.
|
|
60
|
+
|
|
61
|
+
## Parked
|
|
62
|
+
|
|
63
|
+
`prepare-promotion` (integration to main, G2) is parked: no target fires it. It stays with `writer`, for later.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fix-ci
|
|
3
|
+
description: Make the smallest fix for a red CI run on the run's implementation PR (a Feature's, or a Fixes Bug's) - read the failing job, reproduce it locally, fix at the cause, commit on the run's branch, no skips and no masking. Use when the implementation lead spawns executor for the CI stage after the PR checks went red.
|
|
4
|
+
metadata:
|
|
5
|
+
step: "fix-ci"
|
|
6
|
+
role: "executor"
|
|
7
|
+
states: "CI stage"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Fix CI (sub-agent skill)
|
|
11
|
+
|
|
12
|
+
Load `workitems-process` first. You are a leaf sub-agent of `lead` (`implement-feature`), the fix lane of the CI stage (ADR-019). CI is the last gate before the implementation PR (the Feature's, or the Fixes Bug's) merges to `integration`. A hard cut: the fix is the smallest change that makes the real check pass.
|
|
13
|
+
|
|
14
|
+
## When to use
|
|
15
|
+
|
|
16
|
+
- The PR's required check failed at head `H`. The lead names the PR id, the failed build and job ids, and the related item.
|
|
17
|
+
- A merge-conflict round is not yours; the lead sends an executor with `implement-item`.
|
|
18
|
+
|
|
19
|
+
## Inputs (from the brief)
|
|
20
|
+
|
|
21
|
+
- PR id, build id, failed job(s), head SHA, related item id (the item whose commits touch the failing paths; else the lowest-id item; in a per-Bug run, the Bug), plan folder (in a per-Bug run, the Bug's item file).
|
|
22
|
+
|
|
23
|
+
## Preconditions
|
|
24
|
+
|
|
25
|
+
1. Worktree toplevel and HEAD equal the brief's; tree is clean; branch is the run's branch (the Feature branch, or `fix/az<bug id>-<slug>` in a per-Bug run).
|
|
26
|
+
2. The failing job log is readable (`build_list_or_get --build-id <id>`, with `--tail`). Unreadable: return it to the lead as a finding and stop ([No block](../workitems-process/SKILL.md#no-block)).
|
|
27
|
+
|
|
28
|
+
## Procedure
|
|
29
|
+
|
|
30
|
+
1. **Read the log.** Find the first failing step, its command and its error. Quote the failing line.
|
|
31
|
+
2. **Classify.**
|
|
32
|
+
- Code or test failure: continue.
|
|
33
|
+
- Infrastructure failure (agent lost, cancelled, network, queue timeout) with log proof and no code cause: return `INFRA` with the proof. The lead may re-queue the PR's own validation (pending H1). Do not change code.
|
|
34
|
+
3. **Reproduce locally** with the same command. A failure you cannot reproduce is reported with both outputs, not "fixed" by guessing.
|
|
35
|
+
4. **Fix at the cause.** Test first when the failure exposes a missing test. Smallest change; no unrelated cleanup; no new abstraction.
|
|
36
|
+
5. **Checks.** Run the failing command and the repo's lint, typecheck, build and the relevant tests locally. Green.
|
|
37
|
+
6. **Commit** on the run's branch: `fix(ci): <lowercase subject>`, `AB#<item id>` in the body (the Bug's id in a per-Bug run), naming the build and job. Do not push.
|
|
38
|
+
7. **Return the report**: `lane: fix-ci`, `head_sha` = your commit, `verdict`, `findings` (the cause: `where`, `what`, `fix`), `artifacts` = failing log line, local red and green runs, commit SHA.
|
|
39
|
+
|
|
40
|
+
## Verdicts
|
|
41
|
+
|
|
42
|
+
| Verdict | When |
|
|
43
|
+
|---|---|
|
|
44
|
+
| `FIXED` | Reproduced, fixed at the cause, local checks green, committed |
|
|
45
|
+
| `INFRA` | Not a code failure; log proof included; nothing changed |
|
|
46
|
+
|
|
47
|
+
The lead then has `verifier` and `code-reviewer` re-check the delta at the new head. A fix is not done until they pass.
|
|
48
|
+
|
|
49
|
+
## Stop rules
|
|
50
|
+
|
|
51
|
+
- The same check fails after three distinct fixes: return it to the lead as a finding and stop ([No block](../workitems-process/SKILL.md#no-block)).
|
|
52
|
+
|
|
53
|
+
## Never
|
|
54
|
+
|
|
55
|
+
- Never skip, disable, quarantine or loosen a test or check. Never `|| true`. Never `--no-verify`. Never delete a failing test.
|
|
56
|
+
- Never re-run until green and call it fixed; a flaky result is reported with both runs.
|
|
57
|
+
- Never push, force-push, re-queue a build, move an item or touch the PR.
|
|
58
|
+
- Never edit `requirements.md` or `design.md`.
|
|
@@ -21,7 +21,7 @@ Write a handoff document summarising the current conversation so a fresh agent c
|
|
|
21
21
|
|
|
22
22
|
Include a "suggested skills" section in the document, which suggests skills that the agent should invoke.
|
|
23
23
|
|
|
24
|
-
Do not duplicate content already captured in other artifacts (
|
|
24
|
+
Do not duplicate content already captured in other artifacts (docs, plans, ADRs, commits, diffs). Reference them by path or URL instead.
|
|
25
25
|
|
|
26
26
|
Redact any sensitive information, such as API keys, passwords, or personally identifiable information.
|
|
27
27
|
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: implement-feature
|
|
3
|
+
description: "Run the implementation target for one Feature as its lead - move Approved items to Design Validation, have design.md checked against the repo, run the non-linear item loop: In Implementation, In Testing, In Review, Updating Docs, through sub-agents, run the Feature-final check, raise the one implementation PR to integration, and carry it through CI to the merge. Use when the adl dispatcher starts an implementation session, lead lead for a Feature whose in-scope items are all Approved or later."
|
|
4
|
+
metadata:
|
|
5
|
+
step: "implementation"
|
|
6
|
+
role: "lead"
|
|
7
|
+
states: "Approved, Design Validation, In Implementation, In Testing, In Review, Updating Docs"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Implement Feature (run skill of the lead)
|
|
11
|
+
|
|
12
|
+
Load `workitems-process` first. This card is the lead's whole procedure. Sub-agents run their own skills; the briefs you give them are in `references/briefs.md`. Tags: **[pending Fx/Px/Hx]** = an adl-agent-control change that is not built. Never act as if a pending change is live.
|
|
13
|
+
|
|
14
|
+
## When to use
|
|
15
|
+
|
|
16
|
+
- The dispatcher started you for one Feature: every in-scope item (not Parked/Removed) is at Approved or later, at least one is not Done, every predecessor Feature is at Awaiting Release or Done.
|
|
17
|
+
- **Per-Bug run.** The dispatcher may instead start you for one Fixes Bug at Approved through Updating Docs, until its PR merges, keyed by the Bug **[pending L5, X2]**, on branch `fix/az<bug id>-<slug>`. A Bug has no plan folder, no Plan Hash and no Design Validation: skip only Preconditions 4-5 and procedure step 1. Preconditions 1-3 apply in their per-Bug form (below). The Bug's ladder and moves are in [Bug states](../workitems-process/references/workitem-states.md#5-bug-states). A Bug at In Reproduction or later is a resumed run: continue from its state (Resume, below). On a fresh run (Bug at Approved) your first board write is Approved → **In Reproduction**. Then spawn `executor` (`implement-item`, reproduce mode, `reproduce` brief in `references/briefs.md`): its first commit is the Bug's item file, written from the G1-approved Bug Description, with its LEDGER row; its next commit is the regression test, proved red on the base and committed marked as an expected failure so the commit stays green, and that brief writes nothing else. Post the executor's unmarked red run on the base as a comment on the Bug, as evidence. Then move In Reproduction → **In Fixing**; the `fix` brief (bug mode) writes the minimal fix until green, in the loop, and its fix commit removes the expected-failure mark. Every commit stays independently green, with no exception. Run the loop and the one PR as usual. You write no file yourself. Won't reproduce: post what you tried as a comment on the Bug and move it to Parked for Removal (G3 is the human's). You resolve everything else in the run ([No block](../workitems-process/SKILL.md#no-block)).
|
|
18
|
+
- One run = one worktree, one branch, one lead session (you), **one implementation PR** to `integration`.
|
|
19
|
+
- Resume is not a separate mode: if the trigger still holds on a later tick you are started again in the **same worktree on the same branch**. Read the board and the branch, continue (Resume, below).
|
|
20
|
+
|
|
21
|
+
## Inputs
|
|
22
|
+
|
|
23
|
+
| Field | Meaning |
|
|
24
|
+
|---|---|
|
|
25
|
+
| `feature_id` | The Feature (the run key) |
|
|
26
|
+
| `worktree` | Dispatcher-created checkout on branch `feat/az<id>-<slug>` (or the fitting `<type>/`); per-Bug run: `fix/az<bug id>-<slug>`. Agents never create worktrees |
|
|
27
|
+
| Plan folder | `plans/features/az<id>-<slug>/`: `intent.md`, `requirements.md` (EARS criteria `AC-n`, `## Items`), `design.md`, `file-map-reference.md`, `items/az<id>-<slug>.md` |
|
|
28
|
+
| Feature fields | `BaselineSha`, `PlanHash`, `PlanRevision` **[pending T3: named arguments; reference names not yet confirmed through the API]** |
|
|
29
|
+
|
|
30
|
+
Identity `agent-tarun`.
|
|
31
|
+
|
|
32
|
+
## Preconditions
|
|
33
|
+
|
|
34
|
+
1. `git rev-parse --show-toplevel` equals `worktree`; the branch is the Feature's `<type>/az<id>-<slug>` (per-Bug run: `fix/az<bug id>-<slug>`); `git status --porcelain` is empty, or the dirt is your own previous attempt.
|
|
35
|
+
2. `adl id whoami` reports `agent-tarun`.
|
|
36
|
+
3. Read the Feature's children (`workitem_list_or_get`). Every in-scope item is at Approved or later; if not, the trigger does not hold: report the item and its state on the Feature and end the run. Per-Bug run: read only the Bug; it must be at Approved through Updating Docs with its PR not merged (other Bugs in the Fixes Feature do not matter); if not, report its state on the Bug and end the run.
|
|
37
|
+
4. The plan folder is on the branch (planning PR merged into `integration`): the four plan documents and every `items/az<id>-*.md` exist. If the planning PR is not merged yet, end the run and report it; the next tick re-evaluates.
|
|
38
|
+
5. `sha256` of `requirements.md` equals `PlanHash` (the hash covers `requirements.md` only). On a mismatch, post both hashes as a Feature comment and do not start Design Validation: the approved plan is not the one on the branch. **[pending F7: the tool will refuse the Design Validation move on a mismatch; the field reference name is not yet confirmed through the API.]**
|
|
39
|
+
|
|
40
|
+
## Procedure
|
|
41
|
+
|
|
42
|
+
### 1. Design Validation
|
|
43
|
+
|
|
44
|
+
1. The run starts by merging `origin/integration` into its branch: `git fetch origin`, then `git merge origin/integration` (a fast-forward on a fresh start; never rebase, never force). The worktree `HEAD` then contains the current `integration`, and Design Validation diffs `<BaselineSha>..HEAD`.
|
|
45
|
+
2. Move every Approved item → **Design Validation** (adjacent forward move; the fence allows it). This is your first board write.
|
|
46
|
+
3. Spawn `architect` with the `validate-design` brief. It checks `design.md` and its `file-map-reference.md` by diffing `<BaselineSha>..HEAD`, records `head_sha`, and rules `FRESH`, or `DRIFT` (with the exact delta). `requirements.md` is **not** re-validated: it was validated in planning and approved at G1.
|
|
47
|
+
4. `FRESH`: continue. `DRIFT`: **drift never leaves the run**. Spawn `planner` (skill `plan-feature`, Mode B: design update) with the delta. It updates `design.md`, `file-map-reference.md` (the `## Map` rows the drift moves, and the `## Baseline` section) and the Feature's Baseline Sha to the new `integration` base, adds the LEDGER row `az<id>-design-update`, and commits on the Feature branch; Plan Hash is unchanged. You write no file: record the update in the implementation report and the PR. Then re-validate once. Items never go to New or In Planning.
|
|
48
|
+
5. A delta that would change an approved `AC-n`: `requirements.md` stays frozen. Deliver every other AC, comment the reason on that PBI and move it to Parked for Removal (G3); the next Feature plans the outcome if it is still wanted ([No block](../workitems-process/SKILL.md#no-block)).
|
|
49
|
+
6. Design-update cap: 2 rounds. Past it, post the reason as a Feature comment and change approach ([No block](../workitems-process/SKILL.md#no-block)).
|
|
50
|
+
|
|
51
|
+
### 2. The item loop (non-linear)
|
|
52
|
+
|
|
53
|
+
The four states **In Implementation, In Testing, In Review, Updating Docs** are a **non-linear loop**: free moves among them in either direction, per item. **You move the items**; sub-agents move nothing. **[pending F1: until it ships the fence refuses some loop moves (e.g. In Testing → In Implementation). Post the refusal text as an item comment and take the path the refusal names. Never work around it.]**
|
|
54
|
+
|
|
55
|
+
- **Order is yours.** Pick the item order from `design.md` (shared files, risk first). Default staffing is conservative: one executor at a time on the shared branch. Fan out only items with disjoint file scopes in `file-map-reference.md`, as native sub-agents of this session, never the adl-workflow `team` worker pool. You may also spawn read-only explore sub-agents on the fast tier.
|
|
56
|
+
- The usual order is In Testing before In Review (green code before a reviewer's time). A default, not a rule.
|
|
57
|
+
- **Every commit is on the run's one branch** (the Feature branch, or `fix/az<bug id>-<slug>` in a per-Bug run). No per-item branch, worktree or PR. Commits carry `AB#<item id>`.
|
|
58
|
+
|
|
59
|
+
Per item, in the order you chose:
|
|
60
|
+
|
|
61
|
+
| Step | You do | Sub-agent (skill) | Item state |
|
|
62
|
+
|---|---|---|---|
|
|
63
|
+
| Build | Give the item, its `AC-n` list and its design section | `executor` (`implement-item`) | → In Implementation |
|
|
64
|
+
| Test | Give the item, `AC-n`, the head SHA | `verifier` (`verify-item`) | → In Testing |
|
|
65
|
+
| Review | Run both lanes at the head SHA, in parallel, preferably a different model family from the executor (not required) | `code-reviewer` + `architect` (`review-change`) | → In Review |
|
|
66
|
+
| Docs | A docs gap (finding `docs-missing`, or an item with docs still open) goes to an executor, docs only | `executor` (`implement-item`) | → Updating Docs |
|
|
67
|
+
|
|
68
|
+
- **TDD:** each EARS criterion becomes a failing test first, then minimal code. The executor's report names the red run and the green run per `AC-n`. A report without the red run is not accepted.
|
|
69
|
+
- **A finding goes back, inside the run:** post it as an item comment (`id`, `severity`, `where`, `what`, `fix`), move the item → In Implementation (a Bug: → In Fixing), send the executor **only the listed findings**. Cap: **3 rounds per item**; past it, post the reason as an item comment and change approach ([No block](../workitems-process/SKILL.md#no-block)).
|
|
70
|
+
- **Mid-loop drift** (executor returns `DRIFT`): the item moves In Implementation → **Design Validation** **[pending F1]** ([States at a glance](../workitems-process/SKILL.md#states-at-a-glance)), run step 1.3 to 1.6 for that item, then back to In Implementation.
|
|
71
|
+
- **In Review** = reviewer sub-agents in fresh contexts. No PR reviewer, no votes, no PR threads before the merge ([Human gates](../workitems-process/SKILL.md#human-gates)). Findings go to **item comments and the implementation report**. `REQUEST_CHANGES` or `BLOCK` sends the item back. `WATCH` and medium/low are recorded, not blocking.
|
|
72
|
+
- Sub-agents return a report (format in `references/briefs.md`). **You** post it on the item as a comment and keep it for the implementation report.
|
|
73
|
+
- Push the branch (plain `git push`, never force) after each item's executor reports `DONE` so that heads are durable for resume. Verifiers, reviewers, the validate lane and the writer record `head_sha` at their start and finish against it; compare each report's `head_sha` with the branch head, and re-run the lane at the new head when the head moved ([Evidence and reports](../workitems-process/SKILL.md#evidence-and-reports), the head rule).
|
|
74
|
+
- A later commit voids earlier test and review evidence for what it touches. The Feature-final check is the evidence the merge relies on.
|
|
75
|
+
|
|
76
|
+
### 3. Feature-final check
|
|
77
|
+
|
|
78
|
+
When every item has been through Build, Test and Review and the tree is clean and pushed:
|
|
79
|
+
|
|
80
|
+
1. Record the final head `H`.
|
|
81
|
+
2. Spawn `verifier` in **Feature-final mode** (every `AC-n` of `requirements.md`, the full suite; in a per-Bug run, the Bug item file's `## Expected behaviour` (EARS) plus `## Behaviour that must not change`, base = the `integration` SHA the `fix/` branch was created from) and both review lanes (code, architecture) over `origin/integration...H`.
|
|
82
|
+
3. All pass at `H` → continue. Any finding → fix loop as above (the same 3-round cap, counted per finding), then repeat this step at the new head. Evidence binds to the head it ran at.
|
|
83
|
+
|
|
84
|
+
### 4. Finalize and raise the PR
|
|
85
|
+
|
|
86
|
+
1. Spawn `writer` (`finalize-feature`): docs-impact check against `design.md`, then the **PR body** (five sections) and the **implementation report** content. It returns text; it pushes and writes nothing. Finding `docs-missing` → an executor writes it, then repeat 3.
|
|
87
|
+
2. PR body: the five sections in [ado-and-git.md](../workitems-process/references/ado-and-git.md#7-git). Title in commit grammar. Branch `feat/az<id>-<slug>`, or `fix/az<bug id>-<slug>` in a per-Bug run (the `-plan` suffix marks a planning PR and is never used here).
|
|
88
|
+
3. `git push` the branch. `pr_create_or_update` (action create, target `integration`) with the body and the report content. **The tool does the wiring [pending P1/P2/P4]** ([PR wiring](../workitems-process/references/ado-and-git.md#6-pr-wiring)); you pass nothing for it. Until built, report which parts you could not observe.
|
|
89
|
+
4. Read the PR and the items back: items at Updating Docs, PR linked. A mismatch is reported in the Feature comment, never patched by hand-linking or hand-moving to Done.
|
|
90
|
+
|
|
91
|
+
### 5. CI stage (the last gate)
|
|
92
|
+
|
|
93
|
+
CI is the gate before the merge (ADR-019). Poll `pr_list_or_get` and `build_list_or_get` for the head, every 60 s, printing status each poll.
|
|
94
|
+
|
|
95
|
+
| Result | You do |
|
|
96
|
+
|---|---|
|
|
97
|
+
| Green, PR completes | Read the items back; they should be **Done** with the PR link (V2 not yet verified on a real PR). Never set Done yourself. End `MERGED` |
|
|
98
|
+
| Red | Spawn `executor` (`fix-ci`): smallest fix, no skip, no `\|\| true`, no loosened test. Push. Then `verifier` and `code-reviewer` re-check the **delta** at the new head. Append the round to the implementation report (`pr_create_or_update` update). Cap **3** rounds; past it, post the reason as a Feature comment and change approach. Expired check: scoped `build_run` (pending H1). Integration moved: merge `origin/integration` |
|
|
99
|
+
| Cancelled or infrastructure failure with log proof | Re-queue only your own PR's validation on the PR's source branch with `build_run` **[pending H1; refusal = report it, stop]**. A failing test or check is never re-queued to get a lucky green |
|
|
100
|
+
| Merge conflict | Executor merges `origin/integration` into the branch (`git merge`, never a force-push), re-runs checks, then the delta is re-verified and re-reviewed as for red |
|
|
101
|
+
|
|
102
|
+
## Board moves (yours)
|
|
103
|
+
|
|
104
|
+
| Move | When | Status |
|
|
105
|
+
|---|---|---|
|
|
106
|
+
| Approved → In Reproduction | Per-Bug run: first act | **pending F9** |
|
|
107
|
+
| In Reproduction → In Fixing | Per-Bug run: the reproduce brief returned `DONE` (the regression test proved red on the base, that run output posted as a Bug comment, and the test committed marked as an expected failure, so the commit is green) | **pending F9** |
|
|
108
|
+
| Bug: In Fixing ↔ In Testing ↔ In Review ↔ Updating Docs | Free moves | **pending F9** |
|
|
109
|
+
| Bug: In Reproduction → Parked for Removal | Won't reproduce, with a comment of what was tried | **pending F9** |
|
|
110
|
+
| Approved → Design Validation | First act, all PBIs (not Bugs) | live |
|
|
111
|
+
| Design Validation → In Implementation | Item's Build starts | live |
|
|
112
|
+
| In Implementation ↔ In Testing ↔ In Review ↔ Updating Docs | Free moves, per item, your call | **pending F1** |
|
|
113
|
+
| In Implementation → Design Validation | Mid-loop drift | **pending F1** |
|
|
114
|
+
| Any → Parked for Removal | Work provably obsolete, or a PBI whose AC drift needs a changed approved AC, with proof | live |
|
|
115
|
+
|
|
116
|
+
Never move an item to Approved, Done or Removed. Never move a Feature. `pr_create_or_update` moves items to Updating Docs when it raises the PR **[pending P2]**; ADO completion moves them to Done on the merge **[verify V2]**.
|
|
117
|
+
|
|
118
|
+
## Resume
|
|
119
|
+
|
|
120
|
+
The trigger holds until the merge, so you may be restarted in the same worktree on the same branch (session died, run ended with the PR open, merge conflict). Do not restart finished work.
|
|
121
|
+
|
|
122
|
+
1. Read every child's board state and its comments (the earlier sub-agent reports are there) **[pending T1: no comment-read tool yet; without it, work from board states, `git log` and the PR, and re-run any evidence whose head is stale]**.
|
|
123
|
+
2. `git log origin/integration..HEAD` with `AB#` ids shows which items have commits. `pr_list_or_get` shows whether the PR exists.
|
|
124
|
+
3. PR open: go to step 5. No PR: for each item resume from its board state (In Testing means run Test at the current head; In Review means run Review; and so on). Evidence at an older head is stale: re-run. Per-Bug run: a Bug at In Reproduction gets the `reproduce` brief again (it keeps the commits already made); a Bug at In Fixing or later resumes from its state in the loop.
|
|
125
|
+
4. Reuse the branch and the PR. Never recreate either.
|
|
126
|
+
|
|
127
|
+
## Verdicts
|
|
128
|
+
|
|
129
|
+
| Verdict | When |
|
|
130
|
+
|---|---|
|
|
131
|
+
| `MERGED` | PR completed into `integration` |
|
|
132
|
+
| `PR_OPEN` | PR raised and CI not finished when the session must end; the next tick resumes at step 5 |
|
|
133
|
+
|
|
134
|
+
## Stop rules
|
|
135
|
+
|
|
136
|
+
- One Feature, one PR. Do not start another Feature.
|
|
137
|
+
- Never spin: the same command failing twice for the same reason means stop retrying it and take a different path.
|
|
138
|
+
- Never wait on a person inside the session; only the planned gates G1, G2 and G3 wait on a person.
|
|
139
|
+
- Keep producing output while you wait (a 60 s poll prints status); 20 min of silence gets the session restarted.
|
|
140
|
+
- Sub-agents are leaves. You may spawn them; they spawn nothing.
|
|
141
|
+
|
|
142
|
+
## Terminal handoff
|
|
143
|
+
|
|
144
|
+
Post the run-level report as the run's last comment: on the Feature, or on the Bug in a per-Bug run, never on a PBI. Its first line is the `adl-evidence v1` machine line ([Evidence and reports](../workitems-process/SKILL.md#evidence-and-reports)); then per item the final state, the commits, the sub-agent verdicts and head SHAs; design updates; CI rounds; PR link; verdict. Then one line: `implementation <verdict> feature <id> @ <sha>`, or `implementation <verdict> bug <id> @ <sha>` in a per-Bug run. Never end with an offer or a question.
|
|
145
|
+
|
|
146
|
+
## Never
|
|
147
|
+
|
|
148
|
+
- Never write code, tests, docs or specs yourself. Never review. Your files are the run branch's push and scratch only; the design-update LEDGER row is the planner sub-agent's.
|
|
149
|
+
- Never force-push. Never `--no-verify`. Never create a worktree or another branch.
|
|
150
|
+
- Never skip, loosen or delete a test; never accept a sub-agent report without its evidence.
|
|
151
|
+
- Never hand-link items to the PR, hand-move items to Done, set a vote or a PR reviewer.
|
|
152
|
+
- Never send an item to New or In Planning for drift.
|
|
153
|
+
- Never edit `requirements.md` or `intent.md`.
|