sdtk-spec-kit 0.4.11 → 0.4.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +353 -353
- package/assets/atlas/build_atlas.py +880 -880
- package/assets/atlas/doc_atlas_viewer_template.html +3796 -3796
- package/assets/atlas/vendor/mermaid.min.js +2029 -2029
- package/assets/keys/spec-entitlement-public.pem +9 -9
- package/assets/manifest/toolkit-bundle.manifest.json +496 -496
- package/assets/manifest/toolkit-bundle.sha256.txt +97 -97
- package/assets/toolkit/toolkit/AGENTS.md +157 -241
- package/assets/toolkit/toolkit/README.md +51 -51
- package/assets/toolkit/toolkit/SDTK_TOOLKIT.md +206 -206
- package/assets/toolkit/toolkit/install.ps1 +362 -362
- package/assets/toolkit/toolkit/runtimes/claude/CLAUDE_TEMPLATE.md +95 -91
- package/assets/toolkit/toolkit/runtimes/codex/CODEX_TEMPLATE.md +70 -69
- package/assets/toolkit/toolkit/scripts/agents/run-claude-task.ps1 +332 -332
- package/assets/toolkit/toolkit/scripts/agents/run-codex-task.ps1 +618 -618
- package/assets/toolkit/toolkit/scripts/agents/validate-mailbox-formal-artifact.py +87 -87
- package/assets/toolkit/toolkit/scripts/generate-code-handoff.ps1 +317 -317
- package/assets/toolkit/toolkit/scripts/init-feature.ps1 +262 -262
- package/assets/toolkit/toolkit/scripts/install-claude-skills.ps1 +180 -180
- package/assets/toolkit/toolkit/scripts/install-codex-skills.ps1 +209 -209
- package/assets/toolkit/toolkit/scripts/uninstall-claude-skills.ps1 +139 -139
- package/assets/toolkit/toolkit/scripts/uninstall-codex-skills.ps1 +143 -143
- package/assets/toolkit/toolkit/sdtk-spec.config.json +28 -28
- package/assets/toolkit/toolkit/sdtk-spec.config.profiles.example.json +50 -50
- package/assets/toolkit/toolkit/session/SDTK_ACTIVE_BOOTSTRAP.md +46 -46
- package/assets/toolkit/toolkit/session/SDTK_AGENT_WORKING_RULES.md +48 -48
- package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/SKILL.md +111 -111
- package/assets/toolkit/toolkit/skills/sdtk-api-design-spec/scripts/generate_api_design_detail.py +732 -732
- package/assets/toolkit/toolkit/skills/sdtk-api-doc/SKILL.md +79 -79
- package/assets/toolkit/toolkit/skills/sdtk-arch/SKILL.md +85 -85
- package/assets/toolkit/toolkit/skills/sdtk-ba/SKILL.md +46 -46
- package/assets/toolkit/toolkit/skills/sdtk-design-layout/SKILL.md +91 -91
- package/assets/toolkit/toolkit/skills/sdtk-design-layout/scripts/render_design_layout_images.py +246 -246
- package/assets/toolkit/toolkit/skills/sdtk-dev/SKILL.md +133 -133
- package/assets/toolkit/toolkit/skills/sdtk-dev/prompts/code-quality-reviewer.md +34 -34
- package/assets/toolkit/toolkit/skills/sdtk-dev/prompts/implementer.md +60 -60
- package/assets/toolkit/toolkit/skills/sdtk-dev/prompts/spec-reviewer.md +41 -41
- package/assets/toolkit/toolkit/skills/sdtk-dev-backend/SKILL.md +80 -80
- package/assets/toolkit/toolkit/skills/sdtk-dev-frontend/SKILL.md +80 -80
- package/assets/toolkit/toolkit/skills/sdtk-mailbox-dispatch/SKILL.md +73 -73
- package/assets/toolkit/toolkit/skills/sdtk-orchestrator/SKILL.md +176 -108
- package/assets/toolkit/toolkit/skills/sdtk-pm/SKILL.md +74 -74
- package/assets/toolkit/toolkit/skills/sdtk-qa/SKILL.md +75 -75
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/SKILL.md +108 -107
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/excel-image-export.md +51 -51
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/figma-mcp.md +54 -54
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/references/numbering-rules.md +28 -28
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/scripts/renumber_flow_action_spec_global.py +136 -136
- package/assets/toolkit/toolkit/skills/sdtk-screen-design-spec/scripts/validate_flow_action_spec_numbering.py +414 -414
- package/assets/toolkit/toolkit/skills/sdtk-test-case-spec/SKILL.md +110 -110
- package/assets/toolkit/toolkit/skills/sdtk-test-case-spec/scripts/validate_test_case_spec.py +97 -97
- package/assets/toolkit/toolkit/skills/skills.catalog.yaml +330 -330
- package/assets/toolkit/toolkit/skills-claude/api-design-spec/SKILL.md +116 -116
- package/assets/toolkit/toolkit/skills-claude/api-doc/SKILL.md +87 -87
- package/assets/toolkit/toolkit/skills-claude/arch/SKILL.md +59 -59
- package/assets/toolkit/toolkit/skills-claude/ba/SKILL.md +67 -67
- package/assets/toolkit/toolkit/skills-claude/design-layout/SKILL.md +91 -91
- package/assets/toolkit/toolkit/skills-claude/dev/SKILL.md +59 -59
- package/assets/toolkit/toolkit/skills-claude/dev-backend/SKILL.md +73 -73
- package/assets/toolkit/toolkit/skills-claude/dev-frontend/SKILL.md +73 -73
- package/assets/toolkit/toolkit/skills-claude/mailbox-dispatch/SKILL.md +73 -73
- package/assets/toolkit/toolkit/skills-claude/orchestrator/SKILL.md +88 -42
- package/assets/toolkit/toolkit/skills-claude/pm/SKILL.md +88 -88
- package/assets/toolkit/toolkit/skills-claude/qa/SKILL.md +58 -58
- package/assets/toolkit/toolkit/skills-claude/screen-design-spec/SKILL.md +113 -112
- package/assets/toolkit/toolkit/skills-claude/test-case-spec/SKILL.md +115 -115
- package/assets/toolkit/toolkit/templates/QUALITY_CHECKLIST.md +124 -124
- package/assets/toolkit/toolkit/templates/README.md +68 -68
- package/assets/toolkit/toolkit/templates/SHARED_PLANNING.md +81 -81
- package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_CREATION_RULES.md +21 -21
- package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_DETAIL_TEMPLATE.md +67 -67
- package/assets/toolkit/toolkit/templates/docs/api/API_DESIGN_FLOWCHART_CREATION_RULES.md +468 -468
- package/assets/toolkit/toolkit/templates/docs/api/API_ENDPOINTS_TEMPLATE.md +229 -229
- package/assets/toolkit/toolkit/templates/docs/api/FEATURE_API_TEMPLATE.yaml +20 -20
- package/assets/toolkit/toolkit/templates/docs/api/FLOWCHART_CREATION_RULES.md +20 -20
- package/assets/toolkit/toolkit/templates/docs/api/YAML_CREATION_RULES.md +128 -128
- package/assets/toolkit/toolkit/templates/docs/api/feature_api_flow_list_TEMPLATE.txt +12 -12
- package/assets/toolkit/toolkit/templates/docs/architecture/ARCH_DESIGN_TEMPLATE.md +109 -109
- package/assets/toolkit/toolkit/templates/docs/database/DATABASE_SPEC_TEMPLATE.md +175 -175
- package/assets/toolkit/toolkit/templates/docs/design/DESIGN_LAYOUT_TEMPLATE.md +60 -60
- package/assets/toolkit/toolkit/templates/docs/dev/FEATURE_IMPL_PLAN_TEMPLATE.md +117 -117
- package/assets/toolkit/toolkit/templates/docs/dev/OPS_HANDOFF_CREATION_RULES.md +369 -369
- package/assets/toolkit/toolkit/templates/docs/discovery/REQUIREMENT_TEMPLATE.md +155 -155
- package/assets/toolkit/toolkit/templates/docs/product/BACKLOG_TEMPLATE.md +50 -50
- package/assets/toolkit/toolkit/templates/docs/product/CONDENSED_UPSTREAM_INPUT_TEMPLATE.md +276 -276
- package/assets/toolkit/toolkit/templates/docs/product/PRD_TEMPLATE.md +66 -66
- package/assets/toolkit/toolkit/templates/docs/product/PROJECT_INITIATION_TEMPLATE.md +98 -98
- package/assets/toolkit/toolkit/templates/docs/qa/CONTROLLER_ACCEPTANCE_TEMPLATE.md +90 -90
- package/assets/toolkit/toolkit/templates/docs/qa/QA_RELEASE_REPORT_TEMPLATE.md +162 -162
- package/assets/toolkit/toolkit/templates/docs/qa/TEST_CASE_CREATION_RULES.md +129 -129
- package/assets/toolkit/toolkit/templates/docs/qa/TEST_CASE_TEMPLATE.md +104 -104
- package/assets/toolkit/toolkit/templates/docs/specs/BA_SPEC_TEMPLATE.md +139 -139
- package/assets/toolkit/toolkit/templates/docs/specs/FLOW_ACTION_SPEC_CREATION_RULES.md +220 -220
- package/assets/toolkit/toolkit/templates/docs/specs/FLOW_ACTION_SPEC_TEMPLATE.md +197 -197
- package/assets/toolkit/toolkit/templates/handoffs/ARCH_TO_DEV.md +31 -31
- package/assets/toolkit/toolkit/templates/handoffs/BA_TO_ARCH.md +28 -28
- package/assets/toolkit/toolkit/templates/handoffs/DEV_STAGE1_SPEC_REVIEW.md +26 -26
- package/assets/toolkit/toolkit/templates/handoffs/DEV_STAGE2_CODE_QUALITY_REVIEW.md +20 -20
- package/assets/toolkit/toolkit/templates/handoffs/DEV_TO_QA.md +33 -33
- package/assets/toolkit/toolkit/templates/handoffs/DEV_TO_SDTK_CODE.md +60 -60
- package/assets/toolkit/toolkit/templates/handoffs/PM_TO_BA.md +30 -30
- package/assets/toolkit/toolkit/templates/handoffs/QA_RELEASE_DECISION.md +26 -26
- package/assets/toolkit/toolkit/templates/mailbox/AGENT_REPORT_TEMPLATE.md +63 -63
- package/assets/toolkit/toolkit/templates/mailbox/AGENT_TASK_TEMPLATE.md +76 -76
- package/bin/sdtk.js +15 -15
- package/package.json +48 -48
- package/src/commands/activate.js +94 -94
- package/src/commands/atlas.js +339 -339
- package/src/commands/auth.js +85 -85
- package/src/commands/entitlement.js +170 -170
- package/src/commands/generate.js +191 -170
- package/src/commands/help.js +248 -246
- package/src/commands/init.js +117 -117
- package/src/commands/project.js +51 -51
- package/src/commands/runtime.js +239 -239
- package/src/commands/update.js +11 -11
- package/src/index.js +68 -68
- package/src/lib/activation-state.js +68 -68
- package/src/lib/args.js +116 -116
- package/src/lib/atlas-config.js +200 -200
- package/src/lib/atlas-runner.js +435 -435
- package/src/lib/browser-open.js +39 -39
- package/src/lib/capabilities.js +89 -89
- package/src/lib/entitlements.js +245 -245
- package/src/lib/errors.js +41 -41
- package/src/lib/github-access.js +143 -143
- package/src/lib/legacy-auth-migration.js +56 -56
- package/src/lib/license-activation.js +386 -386
- package/src/lib/powershell.js +85 -85
- package/src/lib/premium-loader.js +124 -124
- package/src/lib/premium-packs.js +333 -333
- package/src/lib/premium-sync.js +235 -235
- package/src/lib/project-audit.js +332 -332
- package/src/lib/project-config.js +108 -108
- package/src/lib/project-ingest.js +450 -450
- package/src/lib/project-refresh.js +666 -666
- package/src/lib/project-target-guard.js +79 -79
- package/src/lib/requirement-analysis.js +14 -4
- package/src/lib/scope.js +83 -83
- package/src/lib/state.js +74 -74
- package/src/lib/suite-state.js +70 -70
- package/src/lib/toolkit-payload.js +99 -99
- package/src/lib/update.js +333 -333
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sdtk-dev-backend
|
|
3
|
-
description: Generate/modify Python Django REST Framework backend code following the toolkit conventions (models/views/services/serializers/validation/urls/enums). Use when implementing backend features in that project style.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# SDTK-SPEC Backend (Toolkit conventions)
|
|
7
|
-
|
|
8
|
-
## Critical Constraints
|
|
9
|
-
- I am a bounded DEV specialist aid inside `SDTK-SPEC`, not a separate suite-owner identity.
|
|
10
|
-
- I do not generate backend code without approved API and data-contract sources.
|
|
11
|
-
- I do not ignore established repository patterns when adding backend modules.
|
|
12
|
-
- I do not replace the default `sdtk-dev -> CODE_HANDOFF -> SDTK-CODE` path unless the user explicitly asks for a bounded specialist intervention inside current DEV scope.
|
|
13
|
-
- I do not invent models, fields, or business rules that are not present in the approved upstream artifacts.
|
|
14
|
-
|
|
15
|
-
## Outputs
|
|
16
|
-
- Backend module files under `src/backend/<module>/`:
|
|
17
|
-
- `models.py`, `views.py` or `viewsets.py`, `services.py`, `serializers.py`, `validation.py`, `enums.py`, `urls.py`
|
|
18
|
-
- Unit/integration test files for critical business rules and state transitions
|
|
19
|
-
|
|
20
|
-
## Required Inputs
|
|
21
|
-
- Approved `docs/api/[FeaturePascal]_API.yaml` (endpoint contracts)
|
|
22
|
-
- Approved `docs/api/[FEATURE_KEY]_ENDPOINTS.md` (detail + schema)
|
|
23
|
-
- `docs/specs/BA_SPEC_[FEATURE_KEY].md` or `docs/architecture/ARCH_DESIGN_[FEATURE_KEY].md` (business rules, data model)
|
|
24
|
-
- Confirmation that this slice is within approved DEV scope
|
|
25
|
-
|
|
26
|
-
## When To Stop Or Escalate
|
|
27
|
-
- Stop if approved API YAML or ENDPOINTS.md does not exist for the current slice; do not generate code against unreviewed contracts.
|
|
28
|
-
- Stop if the data model in BA/ARCH contradicts the YAML schema; surface the discrepancy as a blocker before writing any model.
|
|
29
|
-
- Escalate to `sdtk-dev` if the implementation slice scope is unclear or if new design decisions are required.
|
|
30
|
-
- Escalate to `@arch` if an existing repository pattern cannot satisfy the new module requirements without architectural change.
|
|
31
|
-
- Stop if a business rule requires a state transition or permission model not defined in the upstream sources; record as OQ-xx.
|
|
32
|
-
|
|
33
|
-
## Core Process
|
|
34
|
-
1. Confirm this backend slice is a bounded specialist intervention under current DEV scope, not a replacement for `sdtk-dev` ownership or the default downstream `SDTK-CODE` path.
|
|
35
|
-
2. Read approved API YAML and ENDPOINTS.md for the current slice.
|
|
36
|
-
3. Read BA_SPEC or ARCH_DESIGN for business rules, data model, and permission model.
|
|
37
|
-
4. Check whether this repository already has a backend reference module and follow its patterns exactly.
|
|
38
|
-
5. Follow module structure: `src/backend/<module>/{models,view,service,serializers,validation,enum,urls.py}`.
|
|
39
|
-
6. Apply conventions:
|
|
40
|
-
- Soft delete via `del_flg`
|
|
41
|
-
- Audit fields (creator/updater/del timestamps)
|
|
42
|
-
- Permission checks before operations
|
|
43
|
-
- `transaction.atomic()` for writes
|
|
44
|
-
- Logging decorator on public endpoints
|
|
45
|
-
7. Add tests for critical business rules and state transitions.
|
|
46
|
-
8. Verify the generated code satisfies the endpoint contracts defined in YAML before declaring the slice done.
|
|
47
|
-
|
|
48
|
-
## Validation / Quality Gates
|
|
49
|
-
- Every new endpoint has a matching serializer, view/viewset, and URL route.
|
|
50
|
-
- Permission checks are present for every write operation.
|
|
51
|
-
- `transaction.atomic()` wraps every multi-step write.
|
|
52
|
-
- Soft delete fields (`del_flg`) are consistent with existing model conventions.
|
|
53
|
-
- Tests cover critical business rules and state transitions for the current slice.
|
|
54
|
-
- No model field or business rule has been invented without a corresponding source in BA/ARCH or API YAML.
|
|
55
|
-
|
|
56
|
-
## Order-Critical Hard Gate
|
|
57
|
-
Do not write model definitions before reading the approved data model from BA_SPEC or ARCH_DESIGN. Models authored from memory or inferred from vague requirements produce contract drift that is expensive to fix downstream.
|
|
58
|
-
|
|
59
|
-
Do not declare a slice done without verifying the generated endpoints satisfy the contracts in the approved YAML.
|
|
60
|
-
|
|
61
|
-
## Common Mistakes
|
|
62
|
-
|
|
63
|
-
| Mistake | Why it is wrong | Do instead |
|
|
64
|
-
|---|---|---|
|
|
65
|
-
| Generate code without reading approved YAML | Produces endpoints that contradict the approved contract | Always read YAML and ENDPOINTS.md first |
|
|
66
|
-
| Invent model fields not in BA/ARCH | Creates undocumented contract drift | Only implement fields explicitly defined in the upstream sources |
|
|
67
|
-
| Skip permission checks on write endpoints | Security gap that will fail review | Always add permission guard before business logic |
|
|
68
|
-
| Omit `transaction.atomic()` on multi-step writes | Risk of partial writes and data corruption | Wrap every write sequence in an atomic block |
|
|
69
|
-
| Use a different module pattern than the existing repo reference | Inconsistency that maintainers must correct | Read the reference module and match its structure exactly |
|
|
70
|
-
| Treat this skill as a replacement for `sdtk-dev` | Collapses bounded specialist scope into general DEV ownership | Keep scope explicitly bounded to the current slice |
|
|
71
|
-
|
|
72
|
-
## Reference Loading Guidance
|
|
73
|
-
Read at slice start:
|
|
74
|
-
- `docs/api/[FeaturePascal]_API.yaml` (required)
|
|
75
|
-
- `docs/api/[FEATURE_KEY]_ENDPOINTS.md` (required)
|
|
76
|
-
- `docs/specs/BA_SPEC_[FEATURE_KEY].md` or `docs/architecture/ARCH_DESIGN_[FEATURE_KEY].md` (required)
|
|
77
|
-
|
|
78
|
-
Read on demand:
|
|
79
|
-
- Existing backend reference module in `src/backend/` (match its patterns)
|
|
80
|
-
- `sdtk-spec.config.json` for stack-specific test/lint commands
|
|
1
|
+
---
|
|
2
|
+
name: sdtk-dev-backend
|
|
3
|
+
description: Generate/modify Python Django REST Framework backend code following the toolkit conventions (models/views/services/serializers/validation/urls/enums). Use when implementing backend features in that project style.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SDTK-SPEC Backend (Toolkit conventions)
|
|
7
|
+
|
|
8
|
+
## Critical Constraints
|
|
9
|
+
- I am a bounded DEV specialist aid inside `SDTK-SPEC`, not a separate suite-owner identity.
|
|
10
|
+
- I do not generate backend code without approved API and data-contract sources.
|
|
11
|
+
- I do not ignore established repository patterns when adding backend modules.
|
|
12
|
+
- I do not replace the default `sdtk-dev -> CODE_HANDOFF -> SDTK-CODE` path unless the user explicitly asks for a bounded specialist intervention inside current DEV scope.
|
|
13
|
+
- I do not invent models, fields, or business rules that are not present in the approved upstream artifacts.
|
|
14
|
+
|
|
15
|
+
## Outputs
|
|
16
|
+
- Backend module files under `src/backend/<module>/`:
|
|
17
|
+
- `models.py`, `views.py` or `viewsets.py`, `services.py`, `serializers.py`, `validation.py`, `enums.py`, `urls.py`
|
|
18
|
+
- Unit/integration test files for critical business rules and state transitions
|
|
19
|
+
|
|
20
|
+
## Required Inputs
|
|
21
|
+
- Approved `docs/api/[FeaturePascal]_API.yaml` (endpoint contracts)
|
|
22
|
+
- Approved `docs/api/[FEATURE_KEY]_ENDPOINTS.md` (detail + schema)
|
|
23
|
+
- `docs/specs/BA_SPEC_[FEATURE_KEY].md` or `docs/architecture/ARCH_DESIGN_[FEATURE_KEY].md` (business rules, data model)
|
|
24
|
+
- Confirmation that this slice is within approved DEV scope
|
|
25
|
+
|
|
26
|
+
## When To Stop Or Escalate
|
|
27
|
+
- Stop if approved API YAML or ENDPOINTS.md does not exist for the current slice; do not generate code against unreviewed contracts.
|
|
28
|
+
- Stop if the data model in BA/ARCH contradicts the YAML schema; surface the discrepancy as a blocker before writing any model.
|
|
29
|
+
- Escalate to `sdtk-dev` if the implementation slice scope is unclear or if new design decisions are required.
|
|
30
|
+
- Escalate to `@arch` if an existing repository pattern cannot satisfy the new module requirements without architectural change.
|
|
31
|
+
- Stop if a business rule requires a state transition or permission model not defined in the upstream sources; record as OQ-xx.
|
|
32
|
+
|
|
33
|
+
## Core Process
|
|
34
|
+
1. Confirm this backend slice is a bounded specialist intervention under current DEV scope, not a replacement for `sdtk-dev` ownership or the default downstream `SDTK-CODE` path.
|
|
35
|
+
2. Read approved API YAML and ENDPOINTS.md for the current slice.
|
|
36
|
+
3. Read BA_SPEC or ARCH_DESIGN for business rules, data model, and permission model.
|
|
37
|
+
4. Check whether this repository already has a backend reference module and follow its patterns exactly.
|
|
38
|
+
5. Follow module structure: `src/backend/<module>/{models,view,service,serializers,validation,enum,urls.py}`.
|
|
39
|
+
6. Apply conventions:
|
|
40
|
+
- Soft delete via `del_flg`
|
|
41
|
+
- Audit fields (creator/updater/del timestamps)
|
|
42
|
+
- Permission checks before operations
|
|
43
|
+
- `transaction.atomic()` for writes
|
|
44
|
+
- Logging decorator on public endpoints
|
|
45
|
+
7. Add tests for critical business rules and state transitions.
|
|
46
|
+
8. Verify the generated code satisfies the endpoint contracts defined in YAML before declaring the slice done.
|
|
47
|
+
|
|
48
|
+
## Validation / Quality Gates
|
|
49
|
+
- Every new endpoint has a matching serializer, view/viewset, and URL route.
|
|
50
|
+
- Permission checks are present for every write operation.
|
|
51
|
+
- `transaction.atomic()` wraps every multi-step write.
|
|
52
|
+
- Soft delete fields (`del_flg`) are consistent with existing model conventions.
|
|
53
|
+
- Tests cover critical business rules and state transitions for the current slice.
|
|
54
|
+
- No model field or business rule has been invented without a corresponding source in BA/ARCH or API YAML.
|
|
55
|
+
|
|
56
|
+
## Order-Critical Hard Gate
|
|
57
|
+
Do not write model definitions before reading the approved data model from BA_SPEC or ARCH_DESIGN. Models authored from memory or inferred from vague requirements produce contract drift that is expensive to fix downstream.
|
|
58
|
+
|
|
59
|
+
Do not declare a slice done without verifying the generated endpoints satisfy the contracts in the approved YAML.
|
|
60
|
+
|
|
61
|
+
## Common Mistakes
|
|
62
|
+
|
|
63
|
+
| Mistake | Why it is wrong | Do instead |
|
|
64
|
+
|---|---|---|
|
|
65
|
+
| Generate code without reading approved YAML | Produces endpoints that contradict the approved contract | Always read YAML and ENDPOINTS.md first |
|
|
66
|
+
| Invent model fields not in BA/ARCH | Creates undocumented contract drift | Only implement fields explicitly defined in the upstream sources |
|
|
67
|
+
| Skip permission checks on write endpoints | Security gap that will fail review | Always add permission guard before business logic |
|
|
68
|
+
| Omit `transaction.atomic()` on multi-step writes | Risk of partial writes and data corruption | Wrap every write sequence in an atomic block |
|
|
69
|
+
| Use a different module pattern than the existing repo reference | Inconsistency that maintainers must correct | Read the reference module and match its structure exactly |
|
|
70
|
+
| Treat this skill as a replacement for `sdtk-dev` | Collapses bounded specialist scope into general DEV ownership | Keep scope explicitly bounded to the current slice |
|
|
71
|
+
|
|
72
|
+
## Reference Loading Guidance
|
|
73
|
+
Read at slice start:
|
|
74
|
+
- `docs/api/[FeaturePascal]_API.yaml` (required)
|
|
75
|
+
- `docs/api/[FEATURE_KEY]_ENDPOINTS.md` (required)
|
|
76
|
+
- `docs/specs/BA_SPEC_[FEATURE_KEY].md` or `docs/architecture/ARCH_DESIGN_[FEATURE_KEY].md` (required)
|
|
77
|
+
|
|
78
|
+
Read on demand:
|
|
79
|
+
- Existing backend reference module in `src/backend/` (match its patterns)
|
|
80
|
+
- `sdtk-spec.config.json` for stack-specific test/lint commands
|
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sdtk-dev-frontend
|
|
3
|
-
description: Generate/modify React frontend code following the toolkit conventions (list/register/edit/detail pages, components, services, React Query hooks, permission checks). Use when implementing frontend features in that project style.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# SDTK-SPEC Frontend (Toolkit conventions)
|
|
7
|
-
|
|
8
|
-
## Critical Constraints
|
|
9
|
-
- I am a bounded DEV specialist aid inside `SDTK-SPEC`, not a separate suite-owner identity.
|
|
10
|
-
- I do not implement screens without current layout and flow-action sources.
|
|
11
|
-
- I do not bypass existing frontend patterns for loading, permissions, or labels.
|
|
12
|
-
- I do not replace the default `sdtk-dev -> CODE_HANDOFF -> SDTK-CODE` path unless the user explicitly asks for a bounded specialist intervention inside current DEV scope.
|
|
13
|
-
- I do not invent screen layout, field labels, or API calls that are not present in the approved upstream artifacts.
|
|
14
|
-
|
|
15
|
-
## Outputs
|
|
16
|
-
- Frontend feature files under:
|
|
17
|
-
- `src/frontend/features/{feature}/` (pages, components)
|
|
18
|
-
- `src/frontend/services/{feature}/{feature}Service.js`
|
|
19
|
-
- `src/frontend/services/apiHook/{feature}.js`
|
|
20
|
-
|
|
21
|
-
## Required Inputs
|
|
22
|
-
- `docs/design/DESIGN_LAYOUT_[FEATURE_KEY].md` (screen layout and item tables)
|
|
23
|
-
- `docs/specs/[FEATURE_KEY]_FLOW_ACTION_SPEC.md` (UI actions and API mapping)
|
|
24
|
-
- `docs/api/[FEATURE_KEY]_ENDPOINTS.md` (API contracts for hook/service binding)
|
|
25
|
-
- Confirmation that this slice is within approved DEV scope
|
|
26
|
-
|
|
27
|
-
## When To Stop Or Escalate
|
|
28
|
-
- Stop if `DESIGN_LAYOUT_[FEATURE_KEY].md` does not exist or has no screen sections for the current slice; do not implement screens against memory or assumptions.
|
|
29
|
-
- Stop if the flow-action spec is missing or incomplete for the screens being implemented; surface as a blocker.
|
|
30
|
-
- Stop if an API endpoint required by the screen is not present in ENDPOINTS.md; do not invent API calls.
|
|
31
|
-
- Escalate to `sdtk-dev` if the implementation slice scope is unclear or if design decisions are required that go beyond the approved layout.
|
|
32
|
-
- Escalate to `@arch` or `sdtk-design-layout` if the existing layout file does not cover a screen required by the current slice.
|
|
33
|
-
|
|
34
|
-
## Core Process
|
|
35
|
-
1. Confirm this frontend slice is a bounded specialist intervention under current DEV scope, not a replacement for `sdtk-dev` ownership or the default downstream `SDTK-CODE` path.
|
|
36
|
-
2. Read `docs/design/DESIGN_LAYOUT_[FEATURE_KEY].md` for screen structure and item tables.
|
|
37
|
-
3. Read `docs/specs/[FEATURE_KEY]_FLOW_ACTION_SPEC.md` for UI actions, API mapping, and flow context.
|
|
38
|
-
4. Read `docs/api/[FEATURE_KEY]_ENDPOINTS.md` for API contracts.
|
|
39
|
-
5. Check whether this repository already has a frontend reference module and follow its patterns exactly.
|
|
40
|
-
6. Follow structure:
|
|
41
|
-
- `src/frontend/features/{feature}/...`
|
|
42
|
-
- `src/frontend/services/{feature}/{feature}Service.js`
|
|
43
|
-
- `src/frontend/services/apiHook/{feature}.js`
|
|
44
|
-
7. Implement screens based on `DESIGN_LAYOUT_[FEATURE_KEY].md`; do not add or remove fields without a corresponding layout update.
|
|
45
|
-
8. Preserve patterns: React Query hooks, loading states, permission checks, consistent labels.
|
|
46
|
-
9. Verify the implemented screens satisfy the flow-action mappings before declaring the slice done.
|
|
47
|
-
|
|
48
|
-
## Validation / Quality Gates
|
|
49
|
-
- Every screen section in the layout spec has a matching page/component implemented.
|
|
50
|
-
- React Query hooks exist for every API call made by the feature.
|
|
51
|
-
- Loading and error states are handled consistently with existing patterns.
|
|
52
|
-
- Permission checks guard all protected actions.
|
|
53
|
-
- Field labels match the layout and flow-action spec exactly; no free-form label invention.
|
|
54
|
-
- No API call exists in the implementation that is not present in ENDPOINTS.md.
|
|
55
|
-
|
|
56
|
-
## Order-Critical Hard Gate
|
|
57
|
-
Do not implement a screen before reading the corresponding section in `DESIGN_LAYOUT_[FEATURE_KEY].md`. Screens built without a layout reference produce inconsistent UX that must be corrected before QA.
|
|
58
|
-
|
|
59
|
-
Do not declare a slice done without verifying all implemented screens satisfy the API mappings in the flow-action spec.
|
|
60
|
-
|
|
61
|
-
## Common Mistakes
|
|
62
|
-
|
|
63
|
-
| Mistake | Why it is wrong | Do instead |
|
|
64
|
-
|---|---|---|
|
|
65
|
-
| Implement screens without reading DESIGN_LAYOUT | Introduces layout drift from spec | Always read the layout doc before implementing any screen |
|
|
66
|
-
| Invent API calls not in ENDPOINTS.md | Creates untracked contract dependencies | Only call APIs explicitly defined in the ENDPOINTS file |
|
|
67
|
-
| Skip permission checks on protected actions | Security gap that will fail review | Always guard protected actions with the existing permission pattern |
|
|
68
|
-
| Use a different structure than the existing frontend reference | Inconsistency maintainers must correct | Read the reference module and match its structure exactly |
|
|
69
|
-
| Treat this skill as a replacement for `sdtk-dev` | Collapses bounded specialist scope into general DEV ownership | Keep scope explicitly bounded to the current slice |
|
|
70
|
-
| Add field labels from memory | Labels drift from the spec | Copy field label text exactly from the layout or flow-action doc |
|
|
71
|
-
|
|
72
|
-
## Reference Loading Guidance
|
|
73
|
-
Read at slice start:
|
|
74
|
-
- `docs/design/DESIGN_LAYOUT_[FEATURE_KEY].md` (required)
|
|
75
|
-
- `docs/specs/[FEATURE_KEY]_FLOW_ACTION_SPEC.md` (required)
|
|
76
|
-
- `docs/api/[FEATURE_KEY]_ENDPOINTS.md` (required)
|
|
77
|
-
|
|
78
|
-
Read on demand:
|
|
79
|
-
- Existing frontend reference module in `src/frontend/` (match its patterns)
|
|
80
|
-
- `sdtk-spec.config.json` for stack-specific commands
|
|
1
|
+
---
|
|
2
|
+
name: sdtk-dev-frontend
|
|
3
|
+
description: Generate/modify React frontend code following the toolkit conventions (list/register/edit/detail pages, components, services, React Query hooks, permission checks). Use when implementing frontend features in that project style.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SDTK-SPEC Frontend (Toolkit conventions)
|
|
7
|
+
|
|
8
|
+
## Critical Constraints
|
|
9
|
+
- I am a bounded DEV specialist aid inside `SDTK-SPEC`, not a separate suite-owner identity.
|
|
10
|
+
- I do not implement screens without current layout and flow-action sources.
|
|
11
|
+
- I do not bypass existing frontend patterns for loading, permissions, or labels.
|
|
12
|
+
- I do not replace the default `sdtk-dev -> CODE_HANDOFF -> SDTK-CODE` path unless the user explicitly asks for a bounded specialist intervention inside current DEV scope.
|
|
13
|
+
- I do not invent screen layout, field labels, or API calls that are not present in the approved upstream artifacts.
|
|
14
|
+
|
|
15
|
+
## Outputs
|
|
16
|
+
- Frontend feature files under:
|
|
17
|
+
- `src/frontend/features/{feature}/` (pages, components)
|
|
18
|
+
- `src/frontend/services/{feature}/{feature}Service.js`
|
|
19
|
+
- `src/frontend/services/apiHook/{feature}.js`
|
|
20
|
+
|
|
21
|
+
## Required Inputs
|
|
22
|
+
- `docs/design/DESIGN_LAYOUT_[FEATURE_KEY].md` (screen layout and item tables)
|
|
23
|
+
- `docs/specs/[FEATURE_KEY]_FLOW_ACTION_SPEC.md` (UI actions and API mapping)
|
|
24
|
+
- `docs/api/[FEATURE_KEY]_ENDPOINTS.md` (API contracts for hook/service binding)
|
|
25
|
+
- Confirmation that this slice is within approved DEV scope
|
|
26
|
+
|
|
27
|
+
## When To Stop Or Escalate
|
|
28
|
+
- Stop if `DESIGN_LAYOUT_[FEATURE_KEY].md` does not exist or has no screen sections for the current slice; do not implement screens against memory or assumptions.
|
|
29
|
+
- Stop if the flow-action spec is missing or incomplete for the screens being implemented; surface as a blocker.
|
|
30
|
+
- Stop if an API endpoint required by the screen is not present in ENDPOINTS.md; do not invent API calls.
|
|
31
|
+
- Escalate to `sdtk-dev` if the implementation slice scope is unclear or if design decisions are required that go beyond the approved layout.
|
|
32
|
+
- Escalate to `@arch` or `sdtk-design-layout` if the existing layout file does not cover a screen required by the current slice.
|
|
33
|
+
|
|
34
|
+
## Core Process
|
|
35
|
+
1. Confirm this frontend slice is a bounded specialist intervention under current DEV scope, not a replacement for `sdtk-dev` ownership or the default downstream `SDTK-CODE` path.
|
|
36
|
+
2. Read `docs/design/DESIGN_LAYOUT_[FEATURE_KEY].md` for screen structure and item tables.
|
|
37
|
+
3. Read `docs/specs/[FEATURE_KEY]_FLOW_ACTION_SPEC.md` for UI actions, API mapping, and flow context.
|
|
38
|
+
4. Read `docs/api/[FEATURE_KEY]_ENDPOINTS.md` for API contracts.
|
|
39
|
+
5. Check whether this repository already has a frontend reference module and follow its patterns exactly.
|
|
40
|
+
6. Follow structure:
|
|
41
|
+
- `src/frontend/features/{feature}/...`
|
|
42
|
+
- `src/frontend/services/{feature}/{feature}Service.js`
|
|
43
|
+
- `src/frontend/services/apiHook/{feature}.js`
|
|
44
|
+
7. Implement screens based on `DESIGN_LAYOUT_[FEATURE_KEY].md`; do not add or remove fields without a corresponding layout update.
|
|
45
|
+
8. Preserve patterns: React Query hooks, loading states, permission checks, consistent labels.
|
|
46
|
+
9. Verify the implemented screens satisfy the flow-action mappings before declaring the slice done.
|
|
47
|
+
|
|
48
|
+
## Validation / Quality Gates
|
|
49
|
+
- Every screen section in the layout spec has a matching page/component implemented.
|
|
50
|
+
- React Query hooks exist for every API call made by the feature.
|
|
51
|
+
- Loading and error states are handled consistently with existing patterns.
|
|
52
|
+
- Permission checks guard all protected actions.
|
|
53
|
+
- Field labels match the layout and flow-action spec exactly; no free-form label invention.
|
|
54
|
+
- No API call exists in the implementation that is not present in ENDPOINTS.md.
|
|
55
|
+
|
|
56
|
+
## Order-Critical Hard Gate
|
|
57
|
+
Do not implement a screen before reading the corresponding section in `DESIGN_LAYOUT_[FEATURE_KEY].md`. Screens built without a layout reference produce inconsistent UX that must be corrected before QA.
|
|
58
|
+
|
|
59
|
+
Do not declare a slice done without verifying all implemented screens satisfy the API mappings in the flow-action spec.
|
|
60
|
+
|
|
61
|
+
## Common Mistakes
|
|
62
|
+
|
|
63
|
+
| Mistake | Why it is wrong | Do instead |
|
|
64
|
+
|---|---|---|
|
|
65
|
+
| Implement screens without reading DESIGN_LAYOUT | Introduces layout drift from spec | Always read the layout doc before implementing any screen |
|
|
66
|
+
| Invent API calls not in ENDPOINTS.md | Creates untracked contract dependencies | Only call APIs explicitly defined in the ENDPOINTS file |
|
|
67
|
+
| Skip permission checks on protected actions | Security gap that will fail review | Always guard protected actions with the existing permission pattern |
|
|
68
|
+
| Use a different structure than the existing frontend reference | Inconsistency maintainers must correct | Read the reference module and match its structure exactly |
|
|
69
|
+
| Treat this skill as a replacement for `sdtk-dev` | Collapses bounded specialist scope into general DEV ownership | Keep scope explicitly bounded to the current slice |
|
|
70
|
+
| Add field labels from memory | Labels drift from the spec | Copy field label text exactly from the layout or flow-action doc |
|
|
71
|
+
|
|
72
|
+
## Reference Loading Guidance
|
|
73
|
+
Read at slice start:
|
|
74
|
+
- `docs/design/DESIGN_LAYOUT_[FEATURE_KEY].md` (required)
|
|
75
|
+
- `docs/specs/[FEATURE_KEY]_FLOW_ACTION_SPEC.md` (required)
|
|
76
|
+
- `docs/api/[FEATURE_KEY]_ENDPOINTS.md` (required)
|
|
77
|
+
|
|
78
|
+
Read on demand:
|
|
79
|
+
- Existing frontend reference module in `src/frontend/` (match its patterns)
|
|
80
|
+
- `sdtk-spec.config.json` for stack-specific commands
|
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sdtk-mailbox-dispatch
|
|
3
|
-
description: Controller-owned mailbox delegation for SDTK-SPEC. Use when PM or Orchestrator needs to assign a bounded phase to Claude or Codex, preserve exact include/exclude boundaries, review raw reports against formal artifacts, and run a mandatory post-issue mailbox retrospective.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# SDTK Mailbox Dispatch
|
|
7
|
-
|
|
8
|
-
Use this skill only for controller-owned delegation. It is the shipped SDTK-SPEC mailbox flow for bounded PM or Orchestrator dispatch, not a generic autonomous worker platform.
|
|
9
|
-
|
|
10
|
-
## Critical Constraints
|
|
11
|
-
- I do not use mailbox dispatch for broad exploratory planning when the controller already has enough local context to plan safely.
|
|
12
|
-
- I do not mix transient runtime files under `governance/ai/agent-mailbox/runtime/` into feature commit boundaries.
|
|
13
|
-
- I do not widen include/exclude boundaries, fallback rules, or verification commands without an explicit controller decision.
|
|
14
|
-
- I do not leak internal backlog IDs into runtime-facing docs, templates, samples, or public guidance.
|
|
15
|
-
|
|
16
|
-
## Use When
|
|
17
|
-
- one bounded issue phase should be delegated through the mailbox runtime
|
|
18
|
-
- runtime choice between Claude and Codex matters
|
|
19
|
-
- the task needs exact include/exclude boundaries and a stable review packet
|
|
20
|
-
- the phase is implementation, review, QA, or controller acceptance
|
|
21
|
-
- you want the closeout loop to absorb new mailbox lessons automatically
|
|
22
|
-
|
|
23
|
-
## Do Not Use
|
|
24
|
-
- broad exploratory planning when the controller already has enough local context
|
|
25
|
-
- unbounded multi-issue orchestration or a generic worker platform
|
|
26
|
-
- tasks that require a direct external-CLI-to-chat-session bridge
|
|
27
|
-
|
|
28
|
-
## Required Inputs
|
|
29
|
-
Read these shipped toolkit surfaces before dispatching or reviewing a run:
|
|
30
|
-
- `toolkit/templates/mailbox/AGENT_TASK_TEMPLATE.md`
|
|
31
|
-
- `toolkit/templates/mailbox/AGENT_REPORT_TEMPLATE.md`
|
|
32
|
-
- `toolkit/scripts/agents/run-claude-task.ps1`
|
|
33
|
-
- `toolkit/scripts/agents/run-codex-task.ps1`
|
|
34
|
-
- current issue spec/plan/review artifacts for the bounded phase
|
|
35
|
-
- current git truth for the included surfaces
|
|
36
|
-
|
|
37
|
-
## Workflow
|
|
38
|
-
1. Decide whether the controller should plan locally first. Default to local planning when the codebase context is already strong.
|
|
39
|
-
2. Choose runtime:
|
|
40
|
-
- Claude for controller spec drafting, wording-heavy review, and SDTK-SPEC shaping
|
|
41
|
-
- Codex for code changes, tests, workflow/harness changes, and verification-heavy implementation
|
|
42
|
-
3. Write the task packet with exact boundary truth, boundary mode, carryover findings, formal artifact write expectation, explicit execution permission, a complete approval record for any writable implementation run, an explicit runtime-stall budget plus fallback trigger, and a clear closeout mode (`full-issue` or `phase-only`).
|
|
43
|
-
4. For implementation runs, list the exact authoritative input files needed to start the patch; do not rely on repo-wide example hunts as an unstated discovery step.`r`n5. Dispatch through the mailbox launcher into `governance/ai/agent-mailbox/runtime/...`.
|
|
44
|
-
6. Review the raw report against git truth and the formal artifact on disk. Prefer the formal artifact when console output is lossy. If an implementation run timed out or exited without a usable report, expect a launcher-authored partial-failure blocker report instead of a missing report file.
|
|
45
|
-
7. For `controller-dev-review`, `qa-review`, and `controller-acceptance`, keep the primary formal artifact on the canonical filename family and canonical verdict vocabulary for that phase. The launcher validates `toolkit/scripts/agents/validate-mailbox-formal-artifact.py` automatically when the artifact exists.
|
|
46
|
-
8. Promote only approved code/docs/tests/artifacts into tracked paths.
|
|
47
|
-
9. Run a default post-issue retrospective before the next mailbox-driven issue:
|
|
48
|
-
- update the mailbox contract/spec if a real new lesson appeared
|
|
49
|
-
- otherwise record `no new mailbox lessons` in the closeout summary
|
|
50
|
-
|
|
51
|
-
## Boundary Rules
|
|
52
|
-
- Treat runtime files under `governance/ai/agent-mailbox/runtime/` as transient.
|
|
53
|
-
- Do not mix mailbox runtime dirt into feature commit boundaries.
|
|
54
|
-
- State explicitly whether a batch is `canonical-only` or includes packaged distribution parity.
|
|
55
|
-
- Keep review, QA, and controller-acceptance phases read-only by default; writable implementation runs require explicit human-approved permission metadata in the task packet.
|
|
56
|
-
- Keep internal backlog IDs out of runtime-facing docs, templates, and public guidance.
|
|
57
|
-
- Treat listed Inputs: as the authoritative starting source set for implementation runs; broad repo-wide discovery is a fallback only when a direct dependency is missing.
|
|
58
|
-
|
|
59
|
-
## Fallback Rules
|
|
60
|
-
- If an external runtime stalls, use a bounded fallback path instead of blocking the issue. Long-running Codex implementation runs should now terminate within the declared stall budget and emit a launcher-authored partial-failure blocker report when a usable report is missing.
|
|
61
|
-
- For long implementation passes, one bounded external attempt is enough before controller-local or native fallback if the trigger defined in the task packet is reached.
|
|
62
|
-
- If quota or permission prevents the agent from writing the formal artifact, the controller may author it directly, but the artifact must state the fallback reason.
|
|
63
|
-
- QA and controller acceptance may inherit fresh controller verification only when the implementation scope is unchanged and the inheritance is declared explicitly.
|
|
64
|
-
- If the controller fixes a bounded hygiene defect between phases, later mailbox tasks must review current repo truth and treat the resolved defect as fixed instead of repeating stale findings from earlier raw reports.
|
|
65
|
-
|
|
66
|
-
## Default Phase Order
|
|
67
|
-
1. `controller-spec` or `plan`
|
|
68
|
-
2. `implementation`
|
|
69
|
-
3. `controller-dev-review`
|
|
70
|
-
4. `qa-review`
|
|
71
|
-
5. `controller-acceptance`
|
|
72
|
-
6. `commit/push`
|
|
73
|
-
7. `post-issue-retrospective`
|
|
1
|
+
---
|
|
2
|
+
name: sdtk-mailbox-dispatch
|
|
3
|
+
description: Controller-owned mailbox delegation for SDTK-SPEC. Use when PM or Orchestrator needs to assign a bounded phase to Claude or Codex, preserve exact include/exclude boundaries, review raw reports against formal artifacts, and run a mandatory post-issue mailbox retrospective.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SDTK Mailbox Dispatch
|
|
7
|
+
|
|
8
|
+
Use this skill only for controller-owned delegation. It is the shipped SDTK-SPEC mailbox flow for bounded PM or Orchestrator dispatch, not a generic autonomous worker platform.
|
|
9
|
+
|
|
10
|
+
## Critical Constraints
|
|
11
|
+
- I do not use mailbox dispatch for broad exploratory planning when the controller already has enough local context to plan safely.
|
|
12
|
+
- I do not mix transient runtime files under `governance/ai/agent-mailbox/runtime/` into feature commit boundaries.
|
|
13
|
+
- I do not widen include/exclude boundaries, fallback rules, or verification commands without an explicit controller decision.
|
|
14
|
+
- I do not leak internal backlog IDs into runtime-facing docs, templates, samples, or public guidance.
|
|
15
|
+
|
|
16
|
+
## Use When
|
|
17
|
+
- one bounded issue phase should be delegated through the mailbox runtime
|
|
18
|
+
- runtime choice between Claude and Codex matters
|
|
19
|
+
- the task needs exact include/exclude boundaries and a stable review packet
|
|
20
|
+
- the phase is implementation, review, QA, or controller acceptance
|
|
21
|
+
- you want the closeout loop to absorb new mailbox lessons automatically
|
|
22
|
+
|
|
23
|
+
## Do Not Use
|
|
24
|
+
- broad exploratory planning when the controller already has enough local context
|
|
25
|
+
- unbounded multi-issue orchestration or a generic worker platform
|
|
26
|
+
- tasks that require a direct external-CLI-to-chat-session bridge
|
|
27
|
+
|
|
28
|
+
## Required Inputs
|
|
29
|
+
Read these shipped toolkit surfaces before dispatching or reviewing a run:
|
|
30
|
+
- `toolkit/templates/mailbox/AGENT_TASK_TEMPLATE.md`
|
|
31
|
+
- `toolkit/templates/mailbox/AGENT_REPORT_TEMPLATE.md`
|
|
32
|
+
- `toolkit/scripts/agents/run-claude-task.ps1`
|
|
33
|
+
- `toolkit/scripts/agents/run-codex-task.ps1`
|
|
34
|
+
- current issue spec/plan/review artifacts for the bounded phase
|
|
35
|
+
- current git truth for the included surfaces
|
|
36
|
+
|
|
37
|
+
## Workflow
|
|
38
|
+
1. Decide whether the controller should plan locally first. Default to local planning when the codebase context is already strong.
|
|
39
|
+
2. Choose runtime:
|
|
40
|
+
- Claude for controller spec drafting, wording-heavy review, and SDTK-SPEC shaping
|
|
41
|
+
- Codex for code changes, tests, workflow/harness changes, and verification-heavy implementation
|
|
42
|
+
3. Write the task packet with exact boundary truth, boundary mode, carryover findings, formal artifact write expectation, explicit execution permission, a complete approval record for any writable implementation run, an explicit runtime-stall budget plus fallback trigger, and a clear closeout mode (`full-issue` or `phase-only`).
|
|
43
|
+
4. For implementation runs, list the exact authoritative input files needed to start the patch; do not rely on repo-wide example hunts as an unstated discovery step.`r`n5. Dispatch through the mailbox launcher into `governance/ai/agent-mailbox/runtime/...`.
|
|
44
|
+
6. Review the raw report against git truth and the formal artifact on disk. Prefer the formal artifact when console output is lossy. If an implementation run timed out or exited without a usable report, expect a launcher-authored partial-failure blocker report instead of a missing report file.
|
|
45
|
+
7. For `controller-dev-review`, `qa-review`, and `controller-acceptance`, keep the primary formal artifact on the canonical filename family and canonical verdict vocabulary for that phase. The launcher validates `toolkit/scripts/agents/validate-mailbox-formal-artifact.py` automatically when the artifact exists.
|
|
46
|
+
8. Promote only approved code/docs/tests/artifacts into tracked paths.
|
|
47
|
+
9. Run a default post-issue retrospective before the next mailbox-driven issue:
|
|
48
|
+
- update the mailbox contract/spec if a real new lesson appeared
|
|
49
|
+
- otherwise record `no new mailbox lessons` in the closeout summary
|
|
50
|
+
|
|
51
|
+
## Boundary Rules
|
|
52
|
+
- Treat runtime files under `governance/ai/agent-mailbox/runtime/` as transient.
|
|
53
|
+
- Do not mix mailbox runtime dirt into feature commit boundaries.
|
|
54
|
+
- State explicitly whether a batch is `canonical-only` or includes packaged distribution parity.
|
|
55
|
+
- Keep review, QA, and controller-acceptance phases read-only by default; writable implementation runs require explicit human-approved permission metadata in the task packet.
|
|
56
|
+
- Keep internal backlog IDs out of runtime-facing docs, templates, and public guidance.
|
|
57
|
+
- Treat listed Inputs: as the authoritative starting source set for implementation runs; broad repo-wide discovery is a fallback only when a direct dependency is missing.
|
|
58
|
+
|
|
59
|
+
## Fallback Rules
|
|
60
|
+
- If an external runtime stalls, use a bounded fallback path instead of blocking the issue. Long-running Codex implementation runs should now terminate within the declared stall budget and emit a launcher-authored partial-failure blocker report when a usable report is missing.
|
|
61
|
+
- For long implementation passes, one bounded external attempt is enough before controller-local or native fallback if the trigger defined in the task packet is reached.
|
|
62
|
+
- If quota or permission prevents the agent from writing the formal artifact, the controller may author it directly, but the artifact must state the fallback reason.
|
|
63
|
+
- QA and controller acceptance may inherit fresh controller verification only when the implementation scope is unchanged and the inheritance is declared explicitly.
|
|
64
|
+
- If the controller fixes a bounded hygiene defect between phases, later mailbox tasks must review current repo truth and treat the resolved defect as fixed instead of repeating stale findings from earlier raw reports.
|
|
65
|
+
|
|
66
|
+
## Default Phase Order
|
|
67
|
+
1. `controller-spec` or `plan`
|
|
68
|
+
2. `implementation`
|
|
69
|
+
3. `controller-dev-review`
|
|
70
|
+
4. `qa-review`
|
|
71
|
+
5. `controller-acceptance`
|
|
72
|
+
6. `commit/push`
|
|
73
|
+
7. `post-issue-retrospective`
|