Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
My confidence level of correctness now: 85%

# Correctness (100%)
- The router keeps one detailed routing source (`references/routing.md`), loads one selected mode, and retains the ordered mode action files. The round-1 conflict was repaired: explicit resolved conflicts select `review`; blocking conflicts stop.
- The shortest and longest documented paths fall from 424 to 364 and 796 to 750 lines. `evidence.md` states the inclusion rule and a reproducible counting command.

# Deal breakers
-

# Suggestions (enhancements only)
- Run one invocation per mode in a skill host before release. The Markdown contract and static tests cover written routing decisions; they cannot demonstrate the host's runtime selection or outputs.
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Router reading cost

Count physical lines, including blank lines. The measured path reads `SKILL.md`, `references/routing.md`, the selected mode sequence and all action files in that sequence. After the change it also reads `actions/route.md`. Setup templates and conditional references are excluded from both sides. The baseline is the merge base of the feature branch and `origin/next`, so the command remains valid after commits. Fetch `origin/next` before running it.

| Mode | Before | After | Change |
| --- | ---: | ---: | ---: |
| Setup | 796 | 750 | -46 |
| Run | 508 | 452 | -56 |
| Review | 424 | 364 | -60 |

Shortest: review, 424 β†’ 364 lines. Longest: setup, 796 β†’ 750 lines.

Reproduce from the repository root:

```python
from pathlib import Path
import subprocess
base = 'plugins/aidd-orchestrator/skills/00-async-dev/'
subprocess.run(['git', 'fetch', 'origin', 'next'], check=True)
baseline = subprocess.check_output(['git', 'merge-base', 'origin/next', 'HEAD'], text=True).strip()
old = lambda path: len(subprocess.check_output(['git', 'show', f'{baseline}:{base}{path}']).splitlines())
new = lambda path: len((Path(base) / path).read_bytes().splitlines())
for mode in ('setup', 'run', 'review'):
actions = [str(path.relative_to(Path(base))) for path in sorted((Path(base) / 'actions' / mode).glob('*.md'))]
before = old('SKILL.md') + old('references/routing.md') + sum(old(path) for path in actions)
after = sum(new(path) for path in ['SKILL.md', 'actions/route.md', 'references/routing.md', f'actions/{mode}.md', *actions])
print(mode, before, after, after - before)
```

# Routing parity scenarios

Compared the pre-change `SKILL.md` and `references/routing.md` at the merge base with the new `actions/route.md` and `references/routing.md`. These are **documented decision outcomes**, not executions by a skill host. The scenarios cover the named signals and the exceptions to ordinary precedence.

| Signal | Concrete input | Baseline decision | New decision |
| --- | --- | --- | --- |
| Explicit argument | Arguments exactly `RUN` | run | run |
| Explicit action | Prompt `action=review on PR #17` | review | review |
| CI label | `GITHUB_EVENT_NAME=issues`, label `to-implement` | run | run |
| CI label | `GITHUB_EVENT_NAME=issues`, label `to-review` | review | review |
| CI comment alias | `issue_comment`, `@claude /aidd-dev:02-implement` | run | run |
| CI comment alias | `issue_comment`, `@claude /aidd-dev:05-review` | review | review |
| CI dispatch | `workflow_dispatch`, input `action=setup` | setup | setup |
| Repository state | Workflow and config both absent | setup | setup |
| Repository state | Workflow present, config absent | setup | setup |
| Repository state | Open PR closes referenced issue | review | review |
| Repository state | Fresh issue, no linked PR, implementation intent | run | run |
| Natural language | `bootstrap async dev` | setup | setup |
| Natural language | `pick up the queue` | run | run |
| Natural language | `apply feedback` | review | review |
| Tie break | `action=review` and label `to-implement` | review | review |
| Blocking conflict | User requests run, config absent | stop, request setup | stop, request setup |
| Resolved conflict | Webhook `to-implement`, open closing PR | review, comment | review, comment |
| Resolved conflict | Both `to-implement` and `to-review` labels | review, comment | review, comment |
| Unresolved | No matching arguments, trigger, state, or intent | ask which mode | ask which mode |

The original root described a standalone mode token inside arguments as an override, while the original routing reference required arguments to equal a mode or the prompt to contain `action=<mode>`. The new reference follows the explicit argument contract used by CI: exact mode arguments or a standalone `action=<mode>` token. Plain mode words in a longer prompt remain natural-language signals. Runtime LLM selection and mode execution remain unverified; the static tests below guard the written contract and action boundaries.
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
status: done
---

# Instruction: Separate routing and mode sequences

## Architecture projection

> Tree of the final files. βœ… create Β· ✏️ modify Β· ❌ delete

```txt
plugins/aidd-orchestrator/skills/00-async-dev/
β”œβ”€β”€ ✏️ SKILL.md # flow, action table, transversal rules only
β”œβ”€β”€ ✏️ references/routing.md # sole signal precedence, aliases, conflict handling
└── actions/
β”œβ”€β”€ βœ… route.md # resolve mode using routing reference
β”œβ”€β”€ βœ… setup.md # load ordered setup actions after selection
β”œβ”€β”€ βœ… run.md # load ordered run actions after selection
└── βœ… review.md # load ordered review actions after selection
```

## User Journey

```mermaid
flowchart TD
A[Invoke 00-async-dev] --> B[Route using routing reference]
B --> C{Selected mode}
C -->|setup| D[Load setup sequence]
C -->|run| E[Load run sequence]
C -->|review| F[Load review sequence]
```

## Test Scope

```mermaid
---
title: Test scope
---
journey
section Setup
Provide existing routing signals => mode can be resolved: 5: cli
section Happy path
Invoke each mode => only its existing sequence loads in order: 5: cli
section Edge case - conflicting signals
Provide contradictory intent and state => apply existing routing conflict rule: 1: cli
```

## Tasks to do

### `1)` Consolidate routing

> Keep selection precedence and aliases in one reference.

1. Reconcile current differences between `SKILL.md` and `references/routing.md`, retaining intended explicit `action=<mode>` and arguments behavior.
2. Put all detailed selection and conflict rules in `references/routing.md`; have `route.md` load and apply it.

### `2)` Establish lazy mode boundaries

> Keep root routing compact and mode actions ordered.

1. Replace root detail with Mermaid flow, four-row action table, and transversal rules.
2. Move each current setup, run, and review sequence to its respective internal action; preserve action order, conditional skips, loops, and dynamic SDLC discovery.

## Test acceptance criteria

| Task | Acceptance criteria |
| --- | --- |
| 1 | Existing trigger aliases and signal conflicts select the same mode. |
| 2 | Root has only flow, action table, and transversal rules; a selected mode loads only its sequence; runtime SDLC discovery remains in the run action. |
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
status: done
---

# Instruction: Prove compatibility and reading cost

## Architecture projection

> Tree of the final files. βœ… create Β· ✏️ modify Β· ❌ delete

```txt
scripts/__tests__/
└── βœ… async-dev-router.test.js # routing and lazy-load regressions
aidd_docs/tasks/2026_10/2026_10_20_delivery-loop-router/
└── βœ… evidence.md # shortest and longest path line counts
```

## User Journey

```mermaid
flowchart TD
A[Provide routing scenario] --> B[Select mode]
B --> C[Read selected sequence]
C --> D[Compare behavior and read-line counts]
```

## Test Scope

```mermaid
---
title: Test scope
---
journey
section Setup
Capture baseline router and path files => before counts available: 5: cli
section Happy path
Exercise setup run and review signals => same modes and ordered actions: 5: cli
Measure shortest and longest selected paths => before and after counts recorded: 5: cli
section Edge case - provider discovery
Enter run path => SDLC provider discovered from runtime description: 1: cli
```

## Tasks to do

### `1)` Guard observable routing

> Verify mode selection, action order, and exclusions without changing automation policy.

1. Test explicit arguments, CI labels and comment aliases, repo state, natural language, tie breaks, conflicts, and unresolved signals.
2. Assert only the selected mode sequence loads; retain dynamic provider discovery in the existing run actions.

### `2)` Record reading cost

> Supply reproducible before and after line totals for the PR.

1. Count lines read on shortest and longest paths with a documented inclusion rule and the pre-change revision.
2. Record commands and counts in `evidence.md`; carry totals to PR description.
3. Run architecture checks and relevant repository test gate.

## Test acceptance criteria

| Task | Acceptance criteria |
| --- | --- |
| 1 | Setup, run, and review route and execute their existing ordered action sequences for the same inputs; aliases and conflicts retain behavior. |
| 2 | Before and after shortest and longest path line counts are reproducible and available for the PR; repository checks pass. |
26 changes: 26 additions & 0 deletions aidd_docs/tasks/2026_10/2026_10_20_delivery-loop-router/plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
objective: "The async-dev skill routes through one contract-compliant entry point and loads only the selected mode while preserving behavior."
status: implemented
---

# Plan: Delivery loop router

## Overview

| Field | Value |
| --- | --- |
| **Goal** | Route setup, run, and review lazily through one routing source. |
| **Source** | [GitHub issue #420](https://github.com/ai-driven-dev/framework/issues/420) |

## Phases

| # | Phase | File |
| --- | --- | --- |
| 1 | Separate routing and mode sequences | [`phase-1.md`](./phase-1.md) |
| 2 | Prove compatibility and reading cost | [`phase-2.md`](./phase-2.md) |

## Resources

| Source | Verified |
| --- | --- |
| [GitHub issue #420](https://github.com/ai-driven-dev/framework/issues/420) | Scope, exclusions, and acceptance criteria. |
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Review: Delivery loop router

- Rounds: 2
- Started: 2026-10-20

## Round 1 Β· r-420a

- Date: 2026-10-20
- By: Sebastien Giband
- Diff: `da3a99c5903f911df5e4e6201d946a28c7937efd...82ca178b1c1f3d936849a705d2709c70c525f840`
- Axes: code, functional, relevancy
- Verdict: changes-requested
- Score: 3/4 met, 1 unmet, 0 unverified at runtime, 0 out of the diff

### Criteria

- [x] Phase 1, routing has one detailed source and a route action β€” `actions/route.md:13-15` loads `references/routing.md`; the root has no signal rules.
- [x] Phase 1, root and selected mode boundaries preserve action order and dynamic discovery β€” `SKILL.md:9-33`, `actions/setup.md`, `actions/run.md`, `actions/review.md`, and unchanged `actions/run/04-check-sdlc.md`.
- [ ] Phase 2, routing parity is guarded for explicit arguments, CI labels and comment aliases, repo state, natural language, tie breaks, conflicts, and unresolved signals β€” `scripts/__tests__/async-dev-router.test.js:25-35` only checks that words occur in the reference. No input scenario selects a mode or checks an expected outcome.
- [x] Phase 2, before and after path counts and checks are recorded β€” `evidence.md:1-28` gives the inclusion rule, revision procedure, and 424 β†’ 365 shortest / 796 β†’ 751 longest totals.

### Findings

- `plugins/aidd-orchestrator/skills/00-async-dev/actions/route.md:15` : it says a conflicting request always stops before loading a mode, while `references/routing.md:89-92` explicitly routes two conflict cases to `review`; two agents can choose different outcomes for the same webhook β†’ distinguish blocking conflicts from resolved conflict overrides, and make the route action defer to the reference's resolved mode β€” 🟑 major, architecture
- `scripts/__tests__/async-dev-router.test.js:25` : the routing test proves only that strings exist, so a changed precedence or lost alias behavior would still pass; the plan requires exercised input cases β†’ test the decision outcomes for each signal class and conflict, or provide a deterministic resolver that the scenarios can invoke β€” 🟑 major, code-health

## Round 2 Β· r-7934

- Date: 2026-10-21
- By: Sebastien Giband
- Diff: `da3a99c5903f911df5e4e6201d946a28c7937efd...7934872d`
- Axes: code, functional, relevancy
- Verdict: approve
- Score: 3/4 met, 0 unmet, 1 unverified at runtime, 0 out of the diff

### Criteria

- [x] Phase 1, routing has one detailed source and a route action β€” `actions/route.md:13-15` loads `references/routing.md`; the root has no signal rules.
- [x] Phase 1, root and selected mode boundaries preserve action order and dynamic discovery β€” `SKILL.md:9-33`, the three mode files, and unchanged `actions/run/04-check-sdlc.md`. The route/reference conflict from round 1 is repaired: resolved conflicts load their selected mode.
- Unverified at runtime: Phase 2, setup, run, and review select the same mode for the same inputs β€” `async-dev-router.test.js:25-66` and `evidence.md:31-63` statically compare the documented decisions and action boundaries. The skill is Markdown, with no executable resolver or host harness, so these files cannot prove runtime selection.
- [x] Phase 2, before and after path counts and checks are recorded β€” `evidence.md:1-28` gives the inclusion rule and 424 β†’ 364 shortest / 796 β†’ 750 longest totals.
4 changes: 4 additions & 0 deletions plugins/aidd-orchestrator/CATALOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai

| Group | File | Description |
|-------|------|---|
| `actions` | [review.md](skills/00-async-dev/actions/review.md) | - |
| `actions` | [route.md](skills/00-async-dev/actions/route.md) | - |
| `actions` | [run.md](skills/00-async-dev/actions/run.md) | - |
| `actions` | [setup.md](skills/00-async-dev/actions/setup.md) | - |
| `references` | [routing.md](skills/00-async-dev/references/routing.md) | - |
| `-` | [SKILL.md](skills/00-async-dev/SKILL.md) | `Drive the async-dev pipeline from one entry point, whether setup, run, or review. Use when the user wants to install async dev, run a ready issue, or address PR review comments, or on a webhook trigger. Not for plain status checks.` |

Expand Down
Loading