yasdef-worker 0.2.1__py3-none-any.whl
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.
- yasdef_worker/__init__.py +3 -0
- yasdef_worker/_data/commands/yasdef/audit.md +16 -0
- yasdef_worker/_data/commands/yasdef/design.md +15 -0
- yasdef_worker/_data/commands/yasdef/implementation.md +15 -0
- yasdef_worker/_data/commands/yasdef/plan.md +17 -0
- yasdef_worker/_data/commands/yasdef/user-review.md +15 -0
- yasdef_worker/_data/golden_examples/blocker_log_GOLDEN_EXAMPLE.md +26 -0
- yasdef_worker/_data/golden_examples/decisions_GOLDEN_EXAMPLE.md +30 -0
- yasdef_worker/_data/golden_examples/history_GOLDEN_EXAMPLE.md +17 -0
- yasdef_worker/_data/golden_examples/open_questions_GOLDEN_EXAMPLE.md +11 -0
- yasdef_worker/_data/golden_examples/user_review_GOLDEN_EXAMPLE.md +13 -0
- yasdef_worker/_data/runtime/blocker_log_INITIAL.md +0 -0
- yasdef_worker/_data/runtime/decisions_INITIAL.md +0 -0
- yasdef_worker/_data/runtime/history_INITIAL.md +0 -0
- yasdef_worker/_data/runtime/open_questions_INITIAL.md +0 -0
- yasdef_worker/_data/runtime/user_review_INITIAL.md +0 -0
- yasdef_worker/_data/setup/models.md +28 -0
- yasdef_worker/_data/skills/yasdef-worker-ai-audit/SKILL.md +120 -0
- yasdef_worker/_data/skills/yasdef-worker-ai-audit/assets/audit_result_GOLDEN_EXAMPLE.md +54 -0
- yasdef_worker/_data/skills/yasdef-worker-ai-audit/assets/audit_result_TEMPLATE.md +43 -0
- yasdef_worker/_data/skills/yasdef-worker-ai-audit/assets/raised_question_GOLDEN_EXAMPLE.md +31 -0
- yasdef_worker/_data/skills/yasdef-worker-ai-audit/assets/raised_question_TEMPLATE.md +33 -0
- yasdef_worker/_data/skills/yasdef-worker-ai-audit/scripts/append_follow_up_step.py +190 -0
- yasdef_worker/_data/skills/yasdef-worker-ai-audit/scripts/build_ai_audit_context.py +212 -0
- yasdef_worker/_data/skills/yasdef-worker-ai-audit/scripts/check_ai_audit_closure.py +281 -0
- yasdef_worker/_data/skills/yasdef-worker-ai-audit/scripts/check_ai_audit_entry.py +68 -0
- yasdef_worker/_data/skills/yasdef-worker-design/SKILL.md +112 -0
- yasdef_worker/_data/skills/yasdef-worker-design/assets/feature_design_GOLDEN_EXAMPLE.md +76 -0
- yasdef_worker/_data/skills/yasdef-worker-design/assets/feature_design_TEMPLATE.md +80 -0
- yasdef_worker/_data/skills/yasdef-worker-design/scripts/build_design_context.py +321 -0
- yasdef_worker/_data/skills/yasdef-worker-design/scripts/check_design_readiness.py +111 -0
- yasdef_worker/_data/skills/yasdef-worker-design/scripts/find_blueprints.py +128 -0
- yasdef_worker/_data/skills/yasdef-worker-implementation/SKILL.md +93 -0
- yasdef_worker/_data/skills/yasdef-worker-implementation/scripts/build_implementation_context.py +217 -0
- yasdef_worker/_data/skills/yasdef-worker-implementation/scripts/check_implementation_readiness.py +200 -0
- yasdef_worker/_data/skills/yasdef-worker-plan/SKILL.md +158 -0
- yasdef_worker/_data/skills/yasdef-worker-plan/assets/step_plan_GOLDEN_EXAMPLE.md +57 -0
- yasdef_worker/_data/skills/yasdef-worker-plan/assets/step_plan_TEMPLATE.md +60 -0
- yasdef_worker/_data/skills/yasdef-worker-plan/scripts/build_plan_context.py +290 -0
- yasdef_worker/_data/skills/yasdef-worker-plan/scripts/check_planning_readiness.py +402 -0
- yasdef_worker/_data/skills/yasdef-worker-plan/scripts/sync_step_lars.py +76 -0
- yasdef_worker/_data/skills/yasdef-worker-user-review/SKILL.md +72 -0
- yasdef_worker/_data/skills/yasdef-worker-user-review/assets/review_brief_GOLDEN_EXAMPLE.md +5 -0
- yasdef_worker/_data/skills/yasdef-worker-user-review/assets/review_brief_TEMPLATE.md +5 -0
- yasdef_worker/_data/skills/yasdef-worker-user-review/assets/user_review_GOLDEN_EXAMPLE.md +13 -0
- yasdef_worker/_data/skills/yasdef-worker-user-review/assets/user_review_TEMPLATE.md +30 -0
- yasdef_worker/_data/skills/yasdef-worker-user-review/scripts/build_user_review_context.py +246 -0
- yasdef_worker/_data/templates/blocker_log_TEMPLATE.md +16 -0
- yasdef_worker/_data/templates/decisions_TEMPLATE.md +19 -0
- yasdef_worker/_data/templates/history_TEMPLATE.md +19 -0
- yasdef_worker/_data/templates/open_questions_TEMPLATE.md +14 -0
- yasdef_worker/_data/templates/user_review_TEMPLATE.md +30 -0
- yasdef_worker/app/__init__.py +1 -0
- yasdef_worker/app/branch_manager.py +84 -0
- yasdef_worker/app/coordinator.py +107 -0
- yasdef_worker/app/feature_context.py +390 -0
- yasdef_worker/app/history_writer.py +112 -0
- yasdef_worker/app/init_asdlc_worker.py +389 -0
- yasdef_worker/app/mainline_branch_policy.py +80 -0
- yasdef_worker/app/metrics_collector.py +38 -0
- yasdef_worker/app/phases/__init__.py +35 -0
- yasdef_worker/app/phases/ai_audit.py +89 -0
- yasdef_worker/app/phases/base.py +168 -0
- yasdef_worker/app/phases/design.py +47 -0
- yasdef_worker/app/phases/implementation.py +71 -0
- yasdef_worker/app/phases/planning.py +65 -0
- yasdef_worker/app/phases/post_review.py +79 -0
- yasdef_worker/app/phases/user_review.py +82 -0
- yasdef_worker/app/pipeline.py +81 -0
- yasdef_worker/app/post_review.py +303 -0
- yasdef_worker/app/register_worker.py +154 -0
- yasdef_worker/app/resume.py +310 -0
- yasdef_worker/cli/__init__.py +5 -0
- yasdef_worker/cli/_shared.py +60 -0
- yasdef_worker/cli/init.py +36 -0
- yasdef_worker/cli/main.py +43 -0
- yasdef_worker/cli/post_review.py +77 -0
- yasdef_worker/cli/register.py +33 -0
- yasdef_worker/cli/run.py +47 -0
- yasdef_worker/cli/uninstall.py +43 -0
- yasdef_worker/domain/__init__.py +2 -0
- yasdef_worker/domain/branches.py +71 -0
- yasdef_worker/domain/history/__init__.py +7 -0
- yasdef_worker/domain/history/records.py +47 -0
- yasdef_worker/domain/history/token_usage.py +72 -0
- yasdef_worker/domain/models_config.py +72 -0
- yasdef_worker/domain/phase_types.py +24 -0
- yasdef_worker/domain/phases.py +28 -0
- yasdef_worker/domain/plans/__init__.py +2 -0
- yasdef_worker/domain/plans/feature_selector.py +64 -0
- yasdef_worker/domain/plans/implementation_plan.py +136 -0
- yasdef_worker/domain/plans/ledgers.py +24 -0
- yasdef_worker/domain/plans/step_design.py +31 -0
- yasdef_worker/domain/plans/step_plan.py +73 -0
- yasdef_worker/domain/plans/step_sorting.py +27 -0
- yasdef_worker/domain/runners/__init__.py +15 -0
- yasdef_worker/domain/runners/base.py +35 -0
- yasdef_worker/domain/runners/claude.py +15 -0
- yasdef_worker/domain/runners/codex.py +15 -0
- yasdef_worker/domain/runners/echo.py +19 -0
- yasdef_worker/domain/workers_registry.py +63 -0
- yasdef_worker/infra/__init__.py +1 -0
- yasdef_worker/infra/errors.py +73 -0
- yasdef_worker/infra/files.py +38 -0
- yasdef_worker/infra/git_repo.py +187 -0
- yasdef_worker/infra/layout.py +116 -0
- yasdef_worker/infra/log_capture.py +38 -0
- yasdef_worker/infra/process.py +192 -0
- yasdef_worker/infra/prompts.py +73 -0
- yasdef_worker/infra/templates.py +18 -0
- yasdef_worker/infra/user_output.py +89 -0
- yasdef_worker/infra/yaml_io.py +39 -0
- yasdef_worker/templates/__init__.py +1 -0
- yasdef_worker/templates/prompts/__init__.py +1 -0
- yasdef_worker/templates/prompts/ai_audit.md +10 -0
- yasdef_worker/templates/prompts/design.md +9 -0
- yasdef_worker/templates/prompts/implementation.md +9 -0
- yasdef_worker/templates/prompts/planning.md +11 -0
- yasdef_worker/templates/prompts/user_review.md +9 -0
- yasdef_worker-0.2.1.dist-info/METADATA +408 -0
- yasdef_worker-0.2.1.dist-info/RECORD +124 -0
- yasdef_worker-0.2.1.dist-info/WHEEL +4 -0
- yasdef_worker-0.2.1.dist-info/entry_points.txt +2 -0
- yasdef_worker-0.2.1.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run the YASDEF ASDLC worker ai_audit phase via the yasdef-worker-ai-audit skill.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Use the `yasdef-worker-ai-audit` skill to run the ASDLC worker ai_audit phase.
|
|
6
|
+
|
|
7
|
+
Inputs:
|
|
8
|
+
- Step: $1
|
|
9
|
+
- Feature id: $2
|
|
10
|
+
- Branch: $3
|
|
11
|
+
- Step plan: $4
|
|
12
|
+
- Design artifact: $5
|
|
13
|
+
- Runtime implementation plan: $6
|
|
14
|
+
- Worker id: $7
|
|
15
|
+
|
|
16
|
+
If any of the seven inputs above is missing, empty, or points to a missing required file, stop and ask the user for the missing input. Do not read `.asdlc_worker/feature_meta_sync.yaml` and do not infer any of the seven inputs from runtime context.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run the YASDEF ASDLC worker design phase via the yasdef-worker-design skill.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Use the `yasdef-worker-design` skill to run the ASDLC worker design phase.
|
|
6
|
+
|
|
7
|
+
Inputs:
|
|
8
|
+
- Step: $1
|
|
9
|
+
- Feature id: $2
|
|
10
|
+
- Branch: $3
|
|
11
|
+
- Design output: $4
|
|
12
|
+
- Runtime implementation plan: $5
|
|
13
|
+
- Runtime requirements EARS: $6
|
|
14
|
+
|
|
15
|
+
If any of the six inputs above is missing, empty, or points to a missing required file, stop and ask the user for the missing input. Do not read `.asdlc_worker/feature_meta_sync.yaml` and do not infer any of the six inputs from runtime context.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run the YASDEF ASDLC worker implementation phase via the yasdef-worker-implementation skill.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Use the `yasdef-worker-implementation` skill to run the ASDLC worker implementation phase.
|
|
6
|
+
|
|
7
|
+
Inputs:
|
|
8
|
+
- Step: $1
|
|
9
|
+
- Feature id: $2
|
|
10
|
+
- Branch: $3
|
|
11
|
+
- Step plan: $4
|
|
12
|
+
- Design artifact: $5
|
|
13
|
+
- Runtime implementation plan: $6
|
|
14
|
+
|
|
15
|
+
If any of the six inputs above is missing, empty, or points to a missing required file, stop and ask the user for the missing input. Do not read `.asdlc_worker/feature_meta_sync.yaml` and do not infer any of the six inputs from runtime context.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run the YASDEF ASDLC worker planning phase via the yasdef-worker-plan skill.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Use the `yasdef-worker-plan` skill to run one ASDLC worker planning iteration.
|
|
6
|
+
|
|
7
|
+
Inputs:
|
|
8
|
+
- Step: $1
|
|
9
|
+
- Feature id: $2
|
|
10
|
+
- Branch: $3
|
|
11
|
+
- Design artifact: $4
|
|
12
|
+
- Step plan output: $5
|
|
13
|
+
- Runtime implementation plan: $6
|
|
14
|
+
- Open questions ledger: $7
|
|
15
|
+
- Blockers ledger: $8
|
|
16
|
+
|
|
17
|
+
If any of the eight inputs above is missing, empty, or points to a missing required file, stop and ask the user for the missing input. Do not read `.asdlc_worker/feature_meta_sync.yaml` and do not infer any of the eight inputs from runtime context.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run the YASDEF ASDLC worker user review phase via the yasdef-worker-user-review skill.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Use the `yasdef-worker-user-review` skill to run the ASDLC worker user review phase.
|
|
6
|
+
|
|
7
|
+
Inputs:
|
|
8
|
+
- Step: $1
|
|
9
|
+
- Feature id: $2
|
|
10
|
+
- Branch: $3
|
|
11
|
+
- Step plan: $4
|
|
12
|
+
- Design artifact: $5
|
|
13
|
+
- Runtime implementation plan: $6
|
|
14
|
+
|
|
15
|
+
If any of the six inputs above is missing, empty, or points to a missing required file, stop and ask the user for the missing input. Do not read `.asdlc_worker/feature_meta_sync.yaml` and do not infer any of the six inputs from runtime context.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Blocker Log - Golden Example
|
|
2
|
+
|
|
3
|
+
This file demonstrates the preferred structure for entries in `.asdlc_worker/blocker_log.md`.
|
|
4
|
+
|
|
5
|
+
Rules:
|
|
6
|
+
- Only record true blockers for in-progress steps.
|
|
7
|
+
- Keep entries concise and actionable.
|
|
8
|
+
|
|
9
|
+
Template:
|
|
10
|
+
## Step <step> <step title>
|
|
11
|
+
- No blockers identified.
|
|
12
|
+
- Blocker: <short description>
|
|
13
|
+
- Impact: <why it blocks progress>
|
|
14
|
+
- Needed: <decision, info, or action required>
|
|
15
|
+
- Status: Open | Resolved
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Step 1.6b CPMM AMM trading (public buy/sell)
|
|
20
|
+
- Blocker: Fee rounding policy not defined.
|
|
21
|
+
- Impact: Trade math depends on deterministic rounding rules; cannot finalize formulas.
|
|
22
|
+
- Needed: Decision on rounding direction and acceptable precision.
|
|
23
|
+
- Status: Open
|
|
24
|
+
|
|
25
|
+
## Step 1.6c Redemption after resolution (public redeem)
|
|
26
|
+
- No blockers identified.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Decisions (ADR-lite) - Golden Example
|
|
2
|
+
|
|
3
|
+
This file demonstrates the preferred structure for entries in `.asdlc_worker/decisions.md`.
|
|
4
|
+
|
|
5
|
+
Rules:
|
|
6
|
+
- Keep the decision concise and focused on the "why".
|
|
7
|
+
- Link to requirements, plan steps, or code when applicable.
|
|
8
|
+
|
|
9
|
+
Template:
|
|
10
|
+
- **ID**: ADR-XXXX
|
|
11
|
+
- **Status**: Proposed | Accepted | Superseded
|
|
12
|
+
- **Superseded by**: ADR-XXXX (optional)
|
|
13
|
+
- **Date**: YYYY-MM-DD
|
|
14
|
+
- **Context**
|
|
15
|
+
- **Decision**
|
|
16
|
+
- **Consequences**
|
|
17
|
+
- **Related**: requirements / plan steps / code
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## ADR-9999 — Example decision title
|
|
22
|
+
- **Status**: Accepted
|
|
23
|
+
- **Date**: 2026-02-11
|
|
24
|
+
- **Context**: Briefly describe the problem and why a decision is needed.
|
|
25
|
+
- **Decision**:
|
|
26
|
+
- State the chosen approach.
|
|
27
|
+
- Include key rules or constraints.
|
|
28
|
+
- **Consequences**:
|
|
29
|
+
- Note the impact on behavior, risk, or maintenance.
|
|
30
|
+
- **Related**: `../my-asdlc-project/feature-name/requirements_ears.md` (REQ-XX), `../my-asdlc-project/feature-name/implementation_plan.md` (Step X.Y), `src/main/java/...`
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# AI Run History - Golden Example
|
|
2
|
+
|
|
3
|
+
This file demonstrates the preferred entry format for `.asdlc_worker/history.md`.
|
|
4
|
+
|
|
5
|
+
## 2026-02-11T18:05:42Z
|
|
6
|
+
- Step: 1.6e - Example step title
|
|
7
|
+
- Token usage: total=765,432 input=612,345 (+ 4,500,000 cached) output=153,087 (reasoning 91,234), including:
|
|
8
|
+
- Phase: design - total=80,000 input=62,000 (+ 800,000 cached) output=18,000 (reasoning 9,000)
|
|
9
|
+
- Phase: planning - total=123,456 input=100,000 (+ 1,000,000 cached) output=23,456 (reasoning 12,345)
|
|
10
|
+
- Phase: implementation - total=345,678 input=287,654 (+ 2,500,000 cached) output=58,024 (reasoning 34,567)
|
|
11
|
+
- Phase: user_review - total=96,298 input=80,000 (+ 600,000 cached) output=16,298 (reasoning 9,876)
|
|
12
|
+
- Phase: ai_audit - total=120,000 input=82,691 (+ 600,000 cached) output=37,309 (reasoning 25,446)
|
|
13
|
+
- Workflow phases for the step: design -> planning -> implementation -> user_review -> ai_audit -> post_review
|
|
14
|
+
- post_review note: non-model consolidation phase (no model token usage line expected).
|
|
15
|
+
- New lines of code added: 312
|
|
16
|
+
- New classes added: 4
|
|
17
|
+
- Step plan: .asdlc_worker/step_plans/step-1.6e.md
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Open Questions - Golden Example
|
|
2
|
+
|
|
3
|
+
This file demonstrates the preferred structure for entries in `.asdlc_worker/open_questions.md`.
|
|
4
|
+
|
|
5
|
+
## Step 1.11 Security
|
|
6
|
+
- Which JWT verification method should be used (HS256 shared secret vs RS256/JWKS), and what issuer/audience values should be enforced?
|
|
7
|
+
- Which JWT claims carry user identity and banned status (claim names + expected types)?
|
|
8
|
+
- What 401 response shape/title should be used for auth failures (default Quarkus vs `UNAUTHORIZED` in `ErrorCode`)?
|
|
9
|
+
|
|
10
|
+
## Step 1.6d Market-stream locking for state-gated commands (stream-lock-first)
|
|
11
|
+
- No open questions.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# User Review Insights - Golden Example
|
|
2
|
+
|
|
3
|
+
This file demonstrates the preferred structure for entries in `.asdlc_worker/user_review.md`.
|
|
4
|
+
|
|
5
|
+
## UR-9999 — Example rule title
|
|
6
|
+
- **Status**: Accepted
|
|
7
|
+
- **Date**: 2026-02-11
|
|
8
|
+
- **Context**: Step X.Y Example subsystem
|
|
9
|
+
- **Rule**: State the general rule clearly.
|
|
10
|
+
- **Implemented wrong**: Summarize the general mistake.
|
|
11
|
+
- **User proposed**: Summarize the user’s general fix.
|
|
12
|
+
- **Implementation change**: Summarize how the code was corrected.
|
|
13
|
+
- **References**: `src/main/java/com/example/Foo.java` `src/test/java/com/example/FooIT.java`
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Phase | Command | Model | Extra Arg 1 (optional) | Extra Arg 2 (optional) | ...
|
|
2
|
+
# Example: implementation | codex | gpt-5.2-codex | --config | model_reasoning_effort='high'
|
|
3
|
+
#
|
|
4
|
+
# Command column accepts:
|
|
5
|
+
# codex - invoked as: codex -m <model> <extras...> "<prompt>"
|
|
6
|
+
# claude - invoked as: claude --model <model> <extras...> "<prompt>"
|
|
7
|
+
# Both runners get an interactive TTY via run_with_output_log's
|
|
8
|
+
# `script -q` wrapper, so claude opens its UI for tool approvals.
|
|
9
|
+
# Extras pass through verbatim — operator may add e.g. `--allowed-tools`
|
|
10
|
+
# to skip approval prompts for specific tools.
|
|
11
|
+
# Example: ai_audit | claude | claude-opus-4-7 | |
|
|
12
|
+
# echo - test/local harness runner, invoked as: echo -m <model> <extras...> "<prompt>"
|
|
13
|
+
#
|
|
14
|
+
# Any other Command value is rejected by yasdef.
|
|
15
|
+
|
|
16
|
+
# design | claude | claude-sonnet-4-6 | |
|
|
17
|
+
# planning | claude | claude-opus-4-7 | |
|
|
18
|
+
# implementation | claude | claude-sonnet-4-6 | |
|
|
19
|
+
# user_review | claude | claude-sonnet-4-6 | |
|
|
20
|
+
# ai_audit | claude | claude-opus-4-7 | |
|
|
21
|
+
|
|
22
|
+
design | codex | gpt-5.4 | --config | model_reasoning_effort='high'
|
|
23
|
+
planning | codex | gpt-5.5 | --config | model_reasoning_effort='high'
|
|
24
|
+
implementation | codex | gpt-5.4 | --config | model_reasoning_effort='high'
|
|
25
|
+
user_review | codex | gpt-5.4 | --config | model_reasoning_effort='high'
|
|
26
|
+
ai_audit | codex | gpt-5.4 | --config | model_reasoning_effort='high'
|
|
27
|
+
|
|
28
|
+
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: yasdef-worker-ai-audit
|
|
3
|
+
description: Run the YASDEF ASDLC worker ai_audit phase for an assigned step. Use when yasdef or the user asks to perform post-user-review analysis-only audit, produce findings, disposition each finding to a terminal state, and finish audit handoff before post_review.
|
|
4
|
+
metadata:
|
|
5
|
+
short-description: YASDEF worker ai_audit phase
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# YASDEF Worker AI Audit
|
|
9
|
+
|
|
10
|
+
Use this skill for the ASDLC worker ai_audit phase. This phase is analysis-only: do not modify runtime code and do not run tests.
|
|
11
|
+
|
|
12
|
+
## Inputs
|
|
13
|
+
|
|
14
|
+
The yasdef prompt should provide:
|
|
15
|
+
- step id, for example `1.6`
|
|
16
|
+
- feature id
|
|
17
|
+
- branch name
|
|
18
|
+
- step plan path
|
|
19
|
+
- design artifact path
|
|
20
|
+
- runtime implementation plan path
|
|
21
|
+
- worker id
|
|
22
|
+
|
|
23
|
+
If any input is missing, inconsistent, or points to a missing required file, do not infer it from `.asdlc_worker/feature_meta_sync.yaml` or the runtime environment. Stop and ask the user for explicit instructions.
|
|
24
|
+
|
|
25
|
+
## Phase Contract
|
|
26
|
+
|
|
27
|
+
- Analysis-only: do not modify runtime code and do not run tests.
|
|
28
|
+
- Audit question: for this step, are all target bullets proven by the current patch; if not, identify the concrete gaps that remain.
|
|
29
|
+
- Two-phase model: Phase 1 discovery is a single pass; Phase 2 disposition is a mechanical loop over all findings.
|
|
30
|
+
- Terminal states per finding: `follow_up_created`, `raised_to_coordinator`, or `rejected`.
|
|
31
|
+
- Commit boundary: commit worker review-result changes only; leave ASDLC edits uncommitted for `post_review`.
|
|
32
|
+
- Completion protocol: run `check_ai_audit_closure.py` before the completion lines.
|
|
33
|
+
|
|
34
|
+
## Workflow
|
|
35
|
+
|
|
36
|
+
1. Run the entry gate as the first action:
|
|
37
|
+
```bash
|
|
38
|
+
uv run python .claude/skills/yasdef-worker-ai-audit/scripts/check_ai_audit_entry.py --step <step> --feature-id <feature-id>
|
|
39
|
+
```
|
|
40
|
+
If it exits non-zero, stop and report the failed preconditions.
|
|
41
|
+
|
|
42
|
+
2. Build context:
|
|
43
|
+
```bash
|
|
44
|
+
uv run python .claude/skills/yasdef-worker-ai-audit/scripts/build_ai_audit_context.py --step <step> --feature-id <feature-id> --design <design-file> --runtime-plan <runtime-plan> --worker-id <worker-id>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
3. Read the printed context before reviewing. The step design artifact is the single context source. Use only:
|
|
48
|
+
- `## Target Bullets (excluding planning/review)`
|
|
49
|
+
- `## Selected EARS Requirements (for planning translation)`
|
|
50
|
+
- `## Goal`
|
|
51
|
+
- `## In Scope`
|
|
52
|
+
- `## Out of Scope`
|
|
53
|
+
- `## Linked Artifacts (in scope)`
|
|
54
|
+
|
|
55
|
+
4. Phase 1 - Discovery (single pass):
|
|
56
|
+
- Review the current patch via `git status` and `git diff`.
|
|
57
|
+
- Write all findings in one pass to `step_review_results/review_result-<step>-<feature>.md`.
|
|
58
|
+
- Each finding must include severity, recommendation (`FollowupStep` or `RiseToCoordinator`), reasoning, references, and a three-state checkbox block:
|
|
59
|
+
- `follow_up_created`
|
|
60
|
+
- `raised_to_coordinator`
|
|
61
|
+
- `rejected`
|
|
62
|
+
- Initialize all three state checkboxes unchecked.
|
|
63
|
+
- Do not start disposition before all findings are written.
|
|
64
|
+
|
|
65
|
+
5. Phase 2 - Disposition (mechanical loop). For each finding in order:
|
|
66
|
+
|
|
67
|
+
5.1. Present the finding (severity, recommendation, reasoning, refs) and end the same message with exactly these three options on their own lines — do **not** print the options anywhere else in the finding presentation:
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
1. reject
|
|
71
|
+
2. create follow-up step
|
|
72
|
+
3. raise to coordinator
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Then stop and wait for the user's choice. Do not re-print the options in a follow-up prompt; one listing per finding only.
|
|
76
|
+
|
|
77
|
+
5.2. Apply the chosen disposition:
|
|
78
|
+
|
|
79
|
+
- reject: mark `[x] rejected` (optional short rationale after `:`).
|
|
80
|
+
- create follow-up step: do **not** edit `implementation_plan.md` by hand. Run the helper, which writes the canonical block (heading, `#### Assigned:` / `#### Repo:` / `#### Depends on:` headings, `- [ ] Plan and discuss the step.` first bullet, your action bullets, `- [ ] Review step implementation.` last bullet) and prints the new step id on stdout:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
uv run python .claude/skills/yasdef-worker-ai-audit/scripts/append_follow_up_step.py \
|
|
84
|
+
--runtime-plan <runtime-plan> \
|
|
85
|
+
--parent-step <current-step-id> \
|
|
86
|
+
--worker-id <worker-id> \
|
|
87
|
+
--title "<follow-up step title>" \
|
|
88
|
+
--bullet "<first action bullet>" \
|
|
89
|
+
[--bullet "<additional action bullet>" ...]
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
The helper auto-picks the next free single-letter suffix (a..z) and copies `#### Repo:` from the parent step. Pass **only the action bullets** as `--bullet` — the helper adds the bookends. Then mark `[x] follow_up_created: <new-step-id>` in the finding's state block using the id printed by the helper.
|
|
93
|
+
|
|
94
|
+
- raise to coordinator: create `projects/<project>/<feature>/raised_questions/<step>-<worker-id>-F<NN>.md` and mark `[x] raised_to_coordinator: <relative-path>`.
|
|
95
|
+
|
|
96
|
+
5.3. Continue until all findings are dispositioned.
|
|
97
|
+
|
|
98
|
+
6. Mark all current-step target bullets `[x]` in the ASDLC `implementation_plan.md` in one batch, only after every finding has reached a terminal state. Every target bullet is audit-finalized at this point — directly proven (no finding), proven (finding rejected as false positive), or routed (follow_up_created / raised_to_coordinator). Leave the edit uncommitted; post_review handles the ASDLC repo commit.
|
|
99
|
+
|
|
100
|
+
7. Run closure gate:
|
|
101
|
+
```bash
|
|
102
|
+
uv run python .claude/skills/yasdef-worker-ai-audit/scripts/check_ai_audit_closure.py --step <step> --feature-id <feature-id> --runtime-plan <runtime-plan> --worker-id <worker-id>
|
|
103
|
+
```
|
|
104
|
+
If it exits non-zero, fix every reported error category (re-run a Phase 2 disposition, create a missing artifact, re-assign a mis-assigned follow-up step, mark a missed target bullet, etc.) and re-run until it exits `0`.
|
|
105
|
+
|
|
106
|
+
8. Commit boundary:
|
|
107
|
+
- Commit only worker-repo audit artifact changes on `step-<step>-<feature-id>-review`.
|
|
108
|
+
- Do not commit ASDLC repo changes (`implementation_plan.md`, `raised_questions/*`); those are for post_review.
|
|
109
|
+
|
|
110
|
+
9. Only after the closure gate passes and worker-repo audit changes are committed, end your final response with these exact last two lines:
|
|
111
|
+
`ai_audit phase finished. Nothing else to do now; press Ctrl-C so yasdef can start the next phase.`
|
|
112
|
+
`PHASE_FINISHED_CAN_CLOSE`
|
|
113
|
+
|
|
114
|
+
## Rules
|
|
115
|
+
|
|
116
|
+
- Analysis-only: do not touch runtime code and do not run tests.
|
|
117
|
+
- Findings must come from: target-bullet proof gaps, scope drift, `AGENTS.md` invariant violations, and `//TODO` markers in changed files.
|
|
118
|
+
- Every finding must end in exactly one terminal state: `follow_up_created` or `raised_to_coordinator` or `rejected`.
|
|
119
|
+
- Follow-up steps must stay assigned to the current worker.
|
|
120
|
+
- Do not use step plan content, `requirements_ears.md`, `implementation_plan.md`, `.asdlc_worker` ledgers, or design sections outside the required context list as context. `implementation_plan.md` is a write target only (mark current-step target bullets `[x]`, append follow-up step blocks); do not read it for context.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# AI audit result - golden example
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
- Step: `1.6`
|
|
5
|
+
- Feature: `trade-concurrency-1777635876`
|
|
6
|
+
- Branch / commit: `step-1.6-trade-concurrency-1777635876-review`, `abc1234`
|
|
7
|
+
- Scope reviewed: market-close/trade concurrency behavior and step target-bullet proof
|
|
8
|
+
|
|
9
|
+
## Discovery Notes
|
|
10
|
+
- Discovery completed in one pass before disposition.
|
|
11
|
+
- Findings source constraints respected (target bullet proof, scope drift, AGENTS invariant, TODO markers).
|
|
12
|
+
|
|
13
|
+
## Findings
|
|
14
|
+
|
|
15
|
+
### F-01
|
|
16
|
+
- Severity: `Critical`
|
|
17
|
+
- Recommendation: `FollowupStep`
|
|
18
|
+
- Category: `TargetBulletNotProven`
|
|
19
|
+
- Target bullet / invariant: `Prevent post-close trade execution under concurrent close.`
|
|
20
|
+
- Reasoning: the close-state check runs before stream lock acquisition, so a concurrent close can interleave between check and append.
|
|
21
|
+
- References:
|
|
22
|
+
- `src/main/java/com/acme/trade/TradeService.java:71 (executeTrade)`
|
|
23
|
+
- `src/main/java/com/acme/trade/TradeService.java:93 (appendTradeEvent)`
|
|
24
|
+
- `src/main/java/com/acme/ledger/LedgerRepository.java:35 (appendEventWithLock)`
|
|
25
|
+
- Disposition state:
|
|
26
|
+
- [x] follow_up_created: `1.6a`
|
|
27
|
+
- [ ] raised_to_coordinator:
|
|
28
|
+
- [ ] rejected:
|
|
29
|
+
|
|
30
|
+
### F-02
|
|
31
|
+
- Severity: `Medium`
|
|
32
|
+
- Recommendation: `RiseToCoordinator`
|
|
33
|
+
- Category: `ScopeDrift`
|
|
34
|
+
- Target bullet / invariant: `Out-of-scope telemetry aggregation touched in this patch.`
|
|
35
|
+
- Reasoning: patch introduces dashboard materialization logic not listed in Goal/In Scope and contradicts Out of Scope.
|
|
36
|
+
- References:
|
|
37
|
+
- `src/main/java/com/acme/telemetry/DashboardProjection.java:18 (rebuild)`
|
|
38
|
+
- Disposition state:
|
|
39
|
+
- [ ] follow_up_created:
|
|
40
|
+
- [x] raised_to_coordinator: `projects/trading/trade-concurrency-1777635876/raised_questions/1.6-worker-42-F02.md`
|
|
41
|
+
- [ ] rejected:
|
|
42
|
+
|
|
43
|
+
### F-03
|
|
44
|
+
- Severity: `Low`
|
|
45
|
+
- Recommendation: `FollowupStep`
|
|
46
|
+
- Category: `TodoMarker`
|
|
47
|
+
- Target bullet / invariant: `//TODO marker remains in changed production path`
|
|
48
|
+
- Reasoning: TODO indicates unresolved behavior in a changed file; must be dispositioned.
|
|
49
|
+
- References:
|
|
50
|
+
- `src/main/java/com/acme/trade/TradeResource.java:44 (//TODO map domain error code)`
|
|
51
|
+
- Disposition state:
|
|
52
|
+
- [ ] follow_up_created:
|
|
53
|
+
- [ ] raised_to_coordinator:
|
|
54
|
+
- [x] rejected: false positive for this step; marker belongs to unrelated migration tracked separately
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# AI audit result template
|
|
2
|
+
|
|
3
|
+
File: `.asdlc_worker/step_review_results/review_result-<step>-<feature-id>.md`
|
|
4
|
+
|
|
5
|
+
## Summary
|
|
6
|
+
- Step: `<step>`
|
|
7
|
+
- Feature: `<feature-id>`
|
|
8
|
+
- Branch / commit: `<branch and commit>`
|
|
9
|
+
- Scope reviewed: `<short scope summary>`
|
|
10
|
+
|
|
11
|
+
## Discovery Notes
|
|
12
|
+
- Findings must be derived only from: target-bullet proof gaps, scope drift, AGENTS.md invariant violations, and `//TODO` markers in changed files.
|
|
13
|
+
- Keep this artifact analysis-only. Do not record runtime code edits here.
|
|
14
|
+
|
|
15
|
+
## Findings
|
|
16
|
+
|
|
17
|
+
<!-- Add one `### F-NN` block per finding. The count is variable: zero findings is valid (omit all blocks); otherwise produce as many `### F-01`, `### F-02`, … `### F-NN` blocks as Phase 1 discovery surfaces. Keep IDs zero-padded and sequential. -->
|
|
18
|
+
|
|
19
|
+
### F-01
|
|
20
|
+
- Severity: `Critical|High|Medium|Low`
|
|
21
|
+
- Recommendation: `FollowupStep|RiseToCoordinator`
|
|
22
|
+
- Category: `TargetBulletNotProven|ScopeDrift|AgentsInvariant|TodoMarker`
|
|
23
|
+
- Target bullet / invariant:
|
|
24
|
+
- Reasoning:
|
|
25
|
+
- References:
|
|
26
|
+
- `<path>:<line> (<symbol>)`
|
|
27
|
+
- Disposition state:
|
|
28
|
+
- [ ] follow_up_created: `<step-id, e.g. 1.6a>`
|
|
29
|
+
- [ ] raised_to_coordinator: `projects/<project>/<feature>/raised_questions/<step>-<worker-id>-F01.md`
|
|
30
|
+
- [ ] rejected: `<optional rationale>`
|
|
31
|
+
|
|
32
|
+
### F-02
|
|
33
|
+
- Severity: `Critical|High|Medium|Low`
|
|
34
|
+
- Recommendation: `FollowupStep|RiseToCoordinator`
|
|
35
|
+
- Category: `TargetBulletNotProven|ScopeDrift|AgentsInvariant|TodoMarker`
|
|
36
|
+
- Target bullet / invariant:
|
|
37
|
+
- Reasoning:
|
|
38
|
+
- References:
|
|
39
|
+
- `<path>:<line> (<symbol>)`
|
|
40
|
+
- Disposition state:
|
|
41
|
+
- [ ] follow_up_created: `<step-id>`
|
|
42
|
+
- [ ] raised_to_coordinator: `projects/<project>/<feature>/raised_questions/<step>-<worker-id>-F02.md`
|
|
43
|
+
- [ ] rejected: `<optional rationale>`
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Raised Question - Golden Example
|
|
2
|
+
|
|
3
|
+
## Header
|
|
4
|
+
- Step: `1.6`
|
|
5
|
+
- Feature id: `trade-concurrency-1777635876`
|
|
6
|
+
- Worker id: `worker-42`
|
|
7
|
+
- Finding id: `F-02`
|
|
8
|
+
- Source review artifact: `.asdlc_worker/step_review_results/review_result-1.6-trade-concurrency-1777635876.md`
|
|
9
|
+
- Date: `2026-05-30`
|
|
10
|
+
|
|
11
|
+
## Why raised to coordinator
|
|
12
|
+
- The finding requires an architectural decision across two services and has more than one viable implementation path.
|
|
13
|
+
|
|
14
|
+
## Problem statement
|
|
15
|
+
- Current patch introduces telemetry aggregation logic in the trade service boundary, but ownership between trade-service and analytics-service is undefined. Both paths are technically feasible and have different latency/consistency trade-offs.
|
|
16
|
+
|
|
17
|
+
## Evidence
|
|
18
|
+
- `src/main/java/com/acme/telemetry/DashboardProjection.java:18 (rebuild)`
|
|
19
|
+
- `src/main/java/com/acme/trade/TradeService.java:112 (emitTelemetrySnapshot)`
|
|
20
|
+
|
|
21
|
+
## Candidate options
|
|
22
|
+
- Option 1: keep aggregation in trade-service and publish normalized snapshots
|
|
23
|
+
- Trade-offs: fastest delivery; increases coupling and service responsibility.
|
|
24
|
+
- Option 2: move aggregation to analytics-service via event subscription
|
|
25
|
+
- Trade-offs: cleaner ownership; additional delivery delay and backfill work.
|
|
26
|
+
|
|
27
|
+
## Requested decision
|
|
28
|
+
- Confirm ownership boundary for telemetry aggregation and approve one option as the standard path for this feature line.
|
|
29
|
+
|
|
30
|
+
## Impact if delayed
|
|
31
|
+
- Follow-up implementation step cannot be reliably scoped; risk of rework in both services.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Raised Question Template
|
|
2
|
+
|
|
3
|
+
File: `<asdlc>/projects/<project>/<feature>/raised_questions/<step>-<worker-id>-F<NN>.md`
|
|
4
|
+
|
|
5
|
+
## Header
|
|
6
|
+
- Step: `<step>`
|
|
7
|
+
- Feature id: `<feature-id>`
|
|
8
|
+
- Worker id: `<worker-id>`
|
|
9
|
+
- Finding id: `F-<NN>`
|
|
10
|
+
- Source review artifact: `.asdlc_worker/step_review_results/review_result-<step>-<feature-id>.md`
|
|
11
|
+
- Date: `<YYYY-MM-DD>`
|
|
12
|
+
|
|
13
|
+
## Why raised to coordinator
|
|
14
|
+
- `<broader/deeper concern, multi-solution ambiguity, security implication, or cross-worker prerequisite>`
|
|
15
|
+
|
|
16
|
+
## Problem statement
|
|
17
|
+
- `<clear problem framing>`
|
|
18
|
+
|
|
19
|
+
## Evidence
|
|
20
|
+
- `<path>:<line> (<symbol>)`
|
|
21
|
+
- `<test/doc/reference>`
|
|
22
|
+
|
|
23
|
+
## Candidate options
|
|
24
|
+
- Option 1: `<description>`
|
|
25
|
+
- Trade-offs:
|
|
26
|
+
- Option 2: `<description>`
|
|
27
|
+
- Trade-offs:
|
|
28
|
+
|
|
29
|
+
## Requested decision
|
|
30
|
+
- `<what exact coordinator decision is needed>`
|
|
31
|
+
|
|
32
|
+
## Impact if delayed
|
|
33
|
+
- `<schedule/risk impact>`
|