@event4u/agent-config 1.13.0 → 1.15.0
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/.agent-src/commands/agent-handoff.md +4 -1
- package/.agent-src/commands/agent-status.md +3 -0
- package/.agent-src/commands/agents-audit.md +4 -0
- package/.agent-src/commands/agents-cleanup.md +6 -1
- package/.agent-src/commands/agents-prepare.md +3 -0
- package/.agent-src/commands/analyze-reference-repo.md +4 -0
- package/.agent-src/commands/bug-fix.md +7 -3
- package/.agent-src/commands/bug-investigate.md +4 -0
- package/.agent-src/commands/chat-history-checkpoint.md +126 -0
- package/.agent-src/commands/chat-history-clear.md +6 -1
- package/.agent-src/commands/chat-history-resume.md +7 -2
- package/.agent-src/commands/chat-history.md +7 -2
- package/.agent-src/commands/check-current-md.md +137 -0
- package/.agent-src/commands/commit-in-chunks.md +118 -0
- package/.agent-src/commands/commit.md +4 -0
- package/.agent-src/commands/compress.md +37 -2
- package/.agent-src/commands/context-create.md +4 -0
- package/.agent-src/commands/context-refactor.md +4 -0
- package/.agent-src/commands/copilot-agents-init.md +3 -0
- package/.agent-src/commands/copilot-agents-optimize.md +3 -0
- package/.agent-src/commands/create-pr-description.md +4 -0
- package/.agent-src/commands/create-pr.md +4 -0
- package/.agent-src/commands/do-and-judge.md +4 -1
- package/.agent-src/commands/do-in-steps.md +3 -0
- package/.agent-src/commands/e2e-heal.md +4 -0
- package/.agent-src/commands/e2e-plan.md +4 -0
- package/.agent-src/commands/estimate-ticket.md +4 -1
- package/.agent-src/commands/feature-dev.md +4 -0
- package/.agent-src/commands/feature-explore.md +4 -0
- package/.agent-src/commands/feature-plan.md +4 -0
- package/.agent-src/commands/feature-refactor.md +4 -0
- package/.agent-src/commands/feature-roadmap.md +6 -0
- package/.agent-src/commands/fix-ci.md +4 -0
- package/.agent-src/commands/fix-portability.md +5 -2
- package/.agent-src/commands/fix-pr-bot-comments.md +4 -0
- package/.agent-src/commands/fix-pr-comments.md +4 -0
- package/.agent-src/commands/fix-pr-developer-comments.md +4 -0
- package/.agent-src/commands/fix-references.md +3 -0
- package/.agent-src/commands/fix-seeder.md +4 -0
- package/.agent-src/commands/implement-ticket.md +39 -13
- package/.agent-src/commands/jira-ticket.md +4 -0
- package/.agent-src/commands/judge.md +3 -0
- package/.agent-src/commands/memory-add.md +5 -3
- package/.agent-src/commands/memory-full.md +5 -2
- package/.agent-src/commands/memory-promote.md +7 -6
- package/.agent-src/commands/mode.md +3 -0
- package/.agent-src/commands/module-create.md +4 -0
- package/.agent-src/commands/module-explore.md +4 -0
- package/.agent-src/commands/onboard.md +33 -0
- package/.agent-src/commands/optimize-agents.md +4 -0
- package/.agent-src/commands/optimize-augmentignore.md +12 -0
- package/.agent-src/commands/optimize-rtk-filters.md +3 -0
- package/.agent-src/commands/optimize-skills.md +4 -0
- package/.agent-src/commands/override-create.md +4 -0
- package/.agent-src/commands/override-manage.md +4 -0
- package/.agent-src/commands/package-reset.md +3 -0
- package/.agent-src/commands/package-test.md +3 -0
- package/.agent-src/commands/prepare-for-review.md +4 -0
- package/.agent-src/commands/project-analyze.md +4 -0
- package/.agent-src/commands/project-health.md +4 -0
- package/.agent-src/commands/propose-memory.md +6 -8
- package/.agent-src/commands/quality-fix.md +4 -0
- package/.agent-src/commands/refine-ticket.md +12 -7
- package/.agent-src/commands/review-changes.md +39 -8
- package/.agent-src/commands/review-routing.md +4 -0
- package/.agent-src/commands/roadmap-create.md +18 -0
- package/.agent-src/commands/roadmap-execute.md +14 -1
- package/.agent-src/commands/rule-compliance-audit.md +4 -0
- package/.agent-src/commands/set-cost-profile.md +11 -0
- package/.agent-src/commands/sync-agent-settings.md +12 -0
- package/.agent-src/commands/sync-gitignore.md +3 -0
- package/.agent-src/commands/tests-create.md +4 -0
- package/.agent-src/commands/tests-execute.md +6 -3
- package/.agent-src/commands/threat-model.md +4 -0
- package/.agent-src/commands/update-form-request-messages.md +4 -0
- package/.agent-src/commands/upstream-contribute.md +4 -0
- package/.agent-src/commands/work.md +161 -0
- package/.agent-src/guidelines/agent-infra/engineering-memory-data-format.md +2 -6
- package/.agent-src/guidelines/agent-infra/layered-settings.md +0 -1
- package/.agent-src/guidelines/agent-infra/memory-access.md +0 -7
- package/.agent-src/guidelines/agent-infra/role-contracts.md +2 -4
- package/.agent-src/guidelines/agent-infra/self-improvement-pipeline.md +0 -1
- package/.agent-src/guidelines/php/patterns/strategy.md +180 -2
- package/.agent-src/personas/README.md +0 -1
- package/.agent-src/rules/artifact-drafting-protocol.md +7 -2
- package/.agent-src/rules/artifact-engagement-recording.md +133 -0
- package/.agent-src/rules/ask-when-uncertain.md +18 -13
- package/.agent-src/rules/augment-portability.md +64 -37
- package/.agent-src/rules/autonomous-execution.md +158 -0
- package/.agent-src/rules/chat-history-cadence.md +109 -0
- package/.agent-src/rules/chat-history-ownership.md +123 -0
- package/.agent-src/rules/chat-history-visibility.md +96 -0
- package/.agent-src/rules/cli-output-handling.md +27 -4
- package/.agent-src/rules/command-suggestion.md +134 -0
- package/.agent-src/rules/commit-policy.md +109 -0
- package/.agent-src/rules/direct-answers.md +114 -0
- package/.agent-src/rules/docs-sync.md +36 -0
- package/.agent-src/rules/downstream-changes.md +10 -9
- package/.agent-src/rules/improve-before-implement.md +9 -6
- package/.agent-src/rules/language-and-tone.md +85 -6
- package/.agent-src/rules/non-destructive-by-default.md +117 -0
- package/.agent-src/rules/package-ci-checks.md +4 -0
- package/.agent-src/rules/preservation-guard.md +20 -0
- package/.agent-src/rules/roadmap-progress-sync.md +159 -27
- package/.agent-src/rules/role-mode-adherence.md +1 -1
- package/.agent-src/rules/scope-control.md +42 -1
- package/.agent-src/rules/size-enforcement.md +2 -3
- package/.agent-src/rules/skill-quality.md +3 -8
- package/.agent-src/rules/ui-audit-before-build.md +106 -0
- package/.agent-src/rules/user-interaction.md +107 -51
- package/.agent-src/scripts/update_roadmap_progress.py +73 -9
- package/.agent-src/skills/blade-ui/SKILL.md +47 -3
- package/.agent-src/skills/command-routing/SKILL.md +32 -0
- package/.agent-src/skills/command-writing/SKILL.md +52 -2
- package/.agent-src/skills/description-assist/SKILL.md +21 -0
- package/.agent-src/skills/estimate-ticket/SKILL.md +0 -1
- package/.agent-src/skills/existing-ui-audit/SKILL.md +202 -0
- package/.agent-src/skills/fe-design/SKILL.md +78 -61
- package/.agent-src/skills/file-editor/SKILL.md +9 -0
- package/.agent-src/skills/finishing-a-development-branch/SKILL.md +4 -0
- package/.agent-src/skills/flux/SKILL.md +31 -4
- package/.agent-src/skills/guideline-writing/SKILL.md +24 -2
- package/.agent-src/skills/learning-to-rule-or-skill/SKILL.md +51 -9
- package/.agent-src/skills/livewire/SKILL.md +49 -4
- package/.agent-src/skills/md-language-check/SKILL.md +103 -0
- package/.agent-src/skills/php-coder/SKILL.md +24 -0
- package/.agent-src/skills/react-shadcn-ui/SKILL.md +121 -0
- package/.agent-src/skills/refine-prompt/SKILL.md +220 -0
- package/.agent-src/skills/refine-ticket/SKILL.md +32 -28
- package/.agent-src/skills/roadmap-management/SKILL.md +24 -11
- package/.agent-src/skills/rule-writing/SKILL.md +23 -1
- package/.agent-src/skills/skill-writing/SKILL.md +3 -5
- package/.agent-src/skills/upstream-contribute/SKILL.md +3 -3
- package/.agent-src/skills/using-git-worktrees/SKILL.md +3 -1
- package/.agent-src/templates/AGENTS.md +24 -6
- package/.agent-src/templates/agent-settings.md +149 -0
- package/.agent-src/templates/roadmaps.md +11 -4
- package/.agent-src/templates/scripts/implement_ticket/__init__.py +63 -26
- package/.agent-src/templates/scripts/implement_ticket/__main__.py +8 -2
- package/.agent-src/templates/scripts/memory_lookup.py +1 -1
- package/.agent-src/templates/scripts/telemetry/__init__.py +42 -0
- package/.agent-src/templates/scripts/telemetry/aggregator.py +154 -0
- package/.agent-src/templates/scripts/telemetry/boundary.py +171 -0
- package/.agent-src/templates/scripts/telemetry/engagement.py +238 -0
- package/.agent-src/templates/scripts/telemetry/report_renderer.py +170 -0
- package/.agent-src/templates/scripts/telemetry/settings.py +112 -0
- package/.agent-src/templates/scripts/telemetry_record.py +166 -0
- package/.agent-src/templates/scripts/telemetry_report.py +161 -0
- package/.agent-src/templates/scripts/telemetry_status.py +142 -0
- package/.agent-src/templates/scripts/work_engine/__init__.py +58 -0
- package/.agent-src/templates/scripts/work_engine/__main__.py +9 -0
- package/.agent-src/templates/scripts/work_engine/cli.py +195 -0
- package/.agent-src/templates/scripts/work_engine/cli_args.py +116 -0
- package/.agent-src/templates/scripts/{implement_ticket → work_engine}/delivery_state.py +10 -3
- package/.agent-src/templates/scripts/work_engine/directives/__init__.py +33 -0
- package/.agent-src/templates/scripts/work_engine/directives/backend/__init__.py +98 -0
- package/.agent-src/templates/scripts/{implement_ticket/steps → work_engine/directives/backend}/analyze.py +1 -1
- package/.agent-src/templates/scripts/{implement_ticket/steps → work_engine/directives/backend}/implement.py +3 -3
- package/.agent-src/templates/scripts/{implement_ticket/steps → work_engine/directives/backend}/memory.py +2 -2
- package/.agent-src/templates/scripts/{implement_ticket/steps → work_engine/directives/backend}/plan.py +2 -2
- package/.agent-src/templates/scripts/work_engine/directives/backend/refine.py +396 -0
- package/.agent-src/templates/scripts/{implement_ticket/steps → work_engine/directives/backend}/report.py +37 -5
- package/.agent-src/templates/scripts/{implement_ticket/steps → work_engine/directives/backend}/test.py +2 -2
- package/.agent-src/templates/scripts/{implement_ticket/steps → work_engine/directives/backend}/verify.py +2 -2
- package/.agent-src/templates/scripts/work_engine/directives/mixed/__init__.py +116 -0
- package/.agent-src/templates/scripts/work_engine/directives/mixed/contract.py +254 -0
- package/.agent-src/templates/scripts/work_engine/directives/mixed/stitch.py +229 -0
- package/.agent-src/templates/scripts/work_engine/directives/mixed/ui.py +231 -0
- package/.agent-src/templates/scripts/work_engine/directives/ui/__init__.py +113 -0
- package/.agent-src/templates/scripts/work_engine/directives/ui/_passthrough.py +44 -0
- package/.agent-src/templates/scripts/work_engine/directives/ui/apply.py +241 -0
- package/.agent-src/templates/scripts/work_engine/directives/ui/audit.py +414 -0
- package/.agent-src/templates/scripts/work_engine/directives/ui/design.py +335 -0
- package/.agent-src/templates/scripts/work_engine/directives/ui/polish.py +510 -0
- package/.agent-src/templates/scripts/work_engine/directives/ui/review.py +468 -0
- package/.agent-src/templates/scripts/work_engine/directives/ui_trivial/__init__.py +119 -0
- package/.agent-src/templates/scripts/work_engine/directives/ui_trivial/_skipped.py +37 -0
- package/.agent-src/templates/scripts/work_engine/directives/ui_trivial/apply.py +165 -0
- package/.agent-src/templates/scripts/work_engine/directives/ui_trivial/refine.py +66 -0
- package/.agent-src/templates/scripts/work_engine/directives/ui_trivial/report.py +62 -0
- package/.agent-src/templates/scripts/work_engine/directives/ui_trivial/test.py +115 -0
- package/.agent-src/templates/scripts/work_engine/dispatcher.py +331 -0
- package/.agent-src/templates/scripts/work_engine/emitters.py +43 -0
- package/.agent-src/templates/scripts/work_engine/errors.py +19 -0
- package/.agent-src/templates/scripts/work_engine/hook_bootstrap.py +76 -0
- package/.agent-src/templates/scripts/work_engine/hooks/__init__.py +54 -0
- package/.agent-src/templates/scripts/work_engine/hooks/builtin/__init__.py +32 -0
- package/.agent-src/templates/scripts/work_engine/hooks/builtin/_chat_history_base.py +103 -0
- package/.agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_append.py +44 -0
- package/.agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_halt_append.py +42 -0
- package/.agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_heartbeat.py +50 -0
- package/.agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_turn_check.py +49 -0
- package/.agent-src/templates/scripts/work_engine/hooks/builtin/directive_set_guard.py +53 -0
- package/.agent-src/templates/scripts/work_engine/hooks/builtin/halt_surface_audit.py +50 -0
- package/.agent-src/templates/scripts/work_engine/hooks/builtin/state_shape_validation.py +52 -0
- package/.agent-src/templates/scripts/work_engine/hooks/builtin/trace.py +84 -0
- package/.agent-src/templates/scripts/work_engine/hooks/context.py +66 -0
- package/.agent-src/templates/scripts/work_engine/hooks/events.py +44 -0
- package/.agent-src/templates/scripts/work_engine/hooks/exceptions.py +79 -0
- package/.agent-src/templates/scripts/work_engine/hooks/registry.py +60 -0
- package/.agent-src/templates/scripts/work_engine/hooks/runner.py +73 -0
- package/.agent-src/templates/scripts/work_engine/hooks/settings.py +141 -0
- package/.agent-src/templates/scripts/work_engine/input_builders.py +163 -0
- package/.agent-src/templates/scripts/work_engine/intent/__init__.py +47 -0
- package/.agent-src/templates/scripts/work_engine/intent/classify.py +280 -0
- package/.agent-src/templates/scripts/work_engine/migration/__init__.py +8 -0
- package/.agent-src/templates/scripts/work_engine/migration/v0_to_v1.py +231 -0
- package/.agent-src/templates/scripts/{implement_ticket → work_engine}/persona_policy.py +1 -1
- package/.agent-src/templates/scripts/work_engine/resolvers/__init__.py +22 -0
- package/.agent-src/templates/scripts/work_engine/resolvers/diff.py +106 -0
- package/.agent-src/templates/scripts/work_engine/resolvers/file.py +113 -0
- package/.agent-src/templates/scripts/work_engine/resolvers/prompt.py +90 -0
- package/.agent-src/templates/scripts/work_engine/scoring/__init__.py +14 -0
- package/.agent-src/templates/scripts/work_engine/scoring/confidence.py +300 -0
- package/.agent-src/templates/scripts/work_engine/stack/__init__.py +31 -0
- package/.agent-src/templates/scripts/work_engine/stack/detect.py +187 -0
- package/.agent-src/templates/scripts/work_engine/state.py +641 -0
- package/.agent-src/templates/scripts/work_engine/state_io.py +202 -0
- package/.claude-plugin/marketplace.json +105 -2
- package/AGENTS.md +38 -8
- package/CHANGELOG.md +609 -0
- package/README.md +136 -14
- package/config/agent-settings.template.yml +45 -0
- package/config/gitignore-block.txt +4 -0
- package/docs/MIGRATION.md +122 -0
- package/docs/architecture.md +111 -35
- package/docs/contracts/STABILITY.md +95 -0
- package/docs/contracts/adr-chat-history-split.md +132 -0
- package/docs/contracts/adr-command-suggestion.md +146 -0
- package/docs/contracts/adr-implement-ticket-runtime.md +122 -0
- package/docs/contracts/adr-product-ui-track.md +384 -0
- package/docs/contracts/adr-prompt-driven-execution.md +187 -0
- package/docs/contracts/agent-memory-contract.md +149 -0
- package/docs/contracts/artifact-engagement-flow.md +262 -0
- package/docs/contracts/command-clusters.md +126 -0
- package/docs/contracts/command-suggestion-flow.md +148 -0
- package/docs/contracts/implement-ticket-flow.md +628 -0
- package/docs/contracts/linear-ai-rules-inclusion.md +143 -0
- package/docs/contracts/linear-ai-three-layers.md +131 -0
- package/docs/contracts/rule-interactions.md +107 -0
- package/docs/contracts/rule-interactions.yml +142 -0
- package/docs/contracts/ui-stack-extension.md +236 -0
- package/docs/contracts/ui-track-flow.md +338 -0
- package/docs/development.md +1 -1
- package/docs/getting-started.md +3 -3
- package/docs/installation.md +124 -2
- package/docs/migrations/commands-1.15.0.md +112 -0
- package/docs/showcase.md +204 -0
- package/docs/ui-track-mental-model.md +121 -0
- package/package.json +1 -1
- package/scripts/agent-config +199 -0
- package/scripts/audit_cloud_compatibility.py +288 -0
- package/scripts/build_cloud_bundle.py +458 -0
- package/scripts/build_linear_digest.py +263 -0
- package/scripts/chat_history.py +796 -7
- package/scripts/check_compression.py +139 -0
- package/scripts/check_iron_law_prominence.py +143 -0
- package/scripts/check_md_language.py +159 -0
- package/scripts/check_portability.py +38 -0
- package/scripts/check_public_links.py +185 -0
- package/scripts/check_references.py +1 -0
- package/scripts/check_reply_consistency.py +140 -0
- package/scripts/command_suggester/__init__.py +51 -0
- package/scripts/command_suggester/cooldown.py +132 -0
- package/scripts/command_suggester/loader.py +70 -0
- package/scripts/command_suggester/match.py +180 -0
- package/scripts/command_suggester/rank.py +120 -0
- package/scripts/command_suggester/render.py +86 -0
- package/scripts/command_suggester/sanitize.py +113 -0
- package/scripts/command_suggester/settings.py +125 -0
- package/scripts/command_suggester/types.py +78 -0
- package/scripts/hooks/augment-chat-history.sh +56 -0
- package/scripts/install-hooks.sh +67 -0
- package/scripts/install.py +150 -33
- package/scripts/lint_marketplace.py +27 -0
- package/scripts/lint_no_new_atomic_commands.py +179 -0
- package/scripts/lint_rule_interactions.py +149 -0
- package/scripts/memory_lookup.py +1 -1
- package/scripts/migrate_command_suggestions.py +151 -0
- package/scripts/release.py +297 -64
- package/scripts/schemas/command.schema.json +41 -0
- package/scripts/skill_linter.py +81 -0
- package/scripts/sync_agent_settings.py +42 -12
- package/scripts/update_counts.py +10 -0
- package/templates/consumer-settings/augment-cli-hooks.json +54 -0
- package/templates/consumer-settings/claude-settings.json +55 -1
- package/.agent-src/rules/chat-history.md +0 -171
- package/.agent-src/templates/scripts/implement_ticket/cli.py +0 -171
- package/.agent-src/templates/scripts/implement_ticket/dispatcher.py +0 -134
- package/.agent-src/templates/scripts/implement_ticket/steps/__init__.py +0 -49
- package/.agent-src/templates/scripts/implement_ticket/steps/refine.py +0 -140
|
@@ -1,18 +1,39 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: livewire
|
|
3
|
-
description: "
|
|
3
|
+
description: "Stack-implementation skill for Livewire — dispatched by `directives/ui/apply.py` (and `review.py` / `polish.py`) when the project's frontend stack is Livewire. Covers reactive state, events, lifecycle hooks, and component/view separation."
|
|
4
4
|
source: package
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# livewire
|
|
8
8
|
|
|
9
|
+
## Positioning — dispatched, not standalone
|
|
10
|
+
|
|
11
|
+
`livewire` is the **apply-step executor** for the Livewire stack. It is
|
|
12
|
+
invoked by [`directives/ui/apply.py`](../../templates/scripts/work_engine/directives/ui/apply.py)
|
|
13
|
+
once the design brief is locked, and revisited by `review.py` /
|
|
14
|
+
`polish.py` during the design-review loop. It does **not** own the
|
|
15
|
+
flow, does **not** drive the audit, and does **not** lock the design.
|
|
16
|
+
|
|
17
|
+
| Concern | Owner |
|
|
18
|
+
|---|---|
|
|
19
|
+
| Audit + token inventory (mandatory pre-step) | [`existing-ui-audit`](../existing-ui-audit/SKILL.md) |
|
|
20
|
+
| Design brief (layout / states / microcopy) | [`directives/ui/design.py`](../../templates/scripts/work_engine/directives/ui/design.py) |
|
|
21
|
+
| Universal design heuristics | [`fe-design`](../fe-design/SKILL.md) |
|
|
22
|
+
| Static Blade partials inside the view | [`blade-ui`](../blade-ui/SKILL.md) |
|
|
23
|
+
| Flux primitives inside the view | [`flux`](../flux/SKILL.md) |
|
|
24
|
+
|
|
9
25
|
## When to use
|
|
10
26
|
|
|
11
|
-
|
|
27
|
+
Cite this skill when:
|
|
28
|
+
|
|
29
|
+
- `state.stack.frontend == "livewire"` and `directives/ui/apply.py` dispatches to this skill
|
|
30
|
+
- Editing or creating Livewire components — reactive state, forms, tables, real-time updates
|
|
12
31
|
|
|
13
32
|
Do NOT use when:
|
|
14
|
-
|
|
15
|
-
-
|
|
33
|
+
|
|
34
|
+
- Static Blade views with no interactivity (use `blade-ui` skill)
|
|
35
|
+
- Flux UI primitives (use `flux` skill — `livewire` composes Flux internally)
|
|
36
|
+
- Driving the full UI flow yourself — that is the `directives/ui/` orchestrator
|
|
16
37
|
|
|
17
38
|
## Procedure: Create a Livewire component
|
|
18
39
|
|
|
@@ -58,6 +79,30 @@ Do NOT use when:
|
|
|
58
79
|
1. Livewire component class with typed properties and actions
|
|
59
80
|
2. Blade view with wire: bindings and Flux components
|
|
60
81
|
|
|
82
|
+
### Review pass — a11y findings + preview envelope
|
|
83
|
+
|
|
84
|
+
When this skill is dispatched by `directives/ui/review.py` (test slot)
|
|
85
|
+
or `directives/ui/polish.py` (verify slot) — i.e. a review/polish run,
|
|
86
|
+
not the initial apply — it also emits:
|
|
87
|
+
|
|
88
|
+
- `state.ui_review.a11y` — `{violations: [{rule, selector, severity}, ...],
|
|
89
|
+
severity_floor?, accepted_violations?}`. Use the same `(rule, selector)`
|
|
90
|
+
shape as `state.ui_audit.a11y_baseline` so the engine's de-dup matches
|
|
91
|
+
pre-existing entries on replay. Omit the envelope on apply passes; the
|
|
92
|
+
engine's `_apply_a11y_gate` only fires when a baseline is present.
|
|
93
|
+
- `state.ui_review.preview` — `{render_ok: bool, screenshot_path?,
|
|
94
|
+
dom_dump_path?, error?, skipped?}`. `render_ok: false` with `error`
|
|
95
|
+
populated triggers the `preview_render_failed` halt; `render_ok: true`
|
|
96
|
+
with `screenshot_path` threads the screenshot into the delivery
|
|
97
|
+
report's `artifacts` list. Browser tooling (Playwright/Cypress/…) is
|
|
98
|
+
a consumer-project dependency — this package does not ship one.
|
|
99
|
+
|
|
100
|
+
Polish dispatch: when the dispatcher skips `review` because a previous
|
|
101
|
+
review pass already returned `SUCCESS`, this skill MUST itself
|
|
102
|
+
synthesise the updated `state.ui_review.findings` (including any
|
|
103
|
+
remaining `a11y_violation` entries) so the engine's gate sees the
|
|
104
|
+
current state on the next polish round.
|
|
105
|
+
|
|
61
106
|
## Gotcha
|
|
62
107
|
|
|
63
108
|
- Public properties serialize between requests — don't put large objects in state.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: md-language-check
|
|
3
|
+
description: "Use BEFORE saving any .md under .augment/, .agent-src*/, or agents/ — scans umlauts, German function words, and quoted German phrases outside DE:/EN: anchor blocks. Hard gate per language-and-tone."
|
|
4
|
+
source: package
|
|
5
|
+
execution:
|
|
6
|
+
type: assisted
|
|
7
|
+
handler: shell
|
|
8
|
+
timeout_seconds: 30
|
|
9
|
+
allowed_tools: []
|
|
10
|
+
command:
|
|
11
|
+
- python3
|
|
12
|
+
- scripts/check_md_language.py
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# md-language-check
|
|
16
|
+
|
|
17
|
+
## When to use
|
|
18
|
+
|
|
19
|
+
Fire **before** saving any `.md` file under:
|
|
20
|
+
|
|
21
|
+
- `.agent-src.uncompressed/` (source of truth)
|
|
22
|
+
- `.agent-src/` (compressed projection)
|
|
23
|
+
- `.augment/` (local agent projection)
|
|
24
|
+
- `agents/` (project roadmaps, contexts, sessions)
|
|
25
|
+
|
|
26
|
+
Per [`language-and-tone`](../../rules/language-and-tone.md) § "`.md`
|
|
27
|
+
files are ALWAYS English" + § Detection heuristic, every `.md` in
|
|
28
|
+
those trees must be English. Bilingual content lives only in labeled
|
|
29
|
+
`DE: … · EN: …` anchor blocks.
|
|
30
|
+
|
|
31
|
+
Do NOT use when:
|
|
32
|
+
|
|
33
|
+
- Editing project content outside the trees above
|
|
34
|
+
- Reviewing non-`.md` files (checker rejects them)
|
|
35
|
+
|
|
36
|
+
## Procedure
|
|
37
|
+
|
|
38
|
+
### 1. Identify the file(s) about to be saved
|
|
39
|
+
|
|
40
|
+
Collect every `.md` path the agent is about to create or modify this
|
|
41
|
+
turn. Multiple files → one invocation.
|
|
42
|
+
|
|
43
|
+
### 2. Run the checker
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
python3 scripts/check_md_language.py <path> [<path> …] [--format json]
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Exit codes: `0` clean, `1` violations (save **blocked** until fixed
|
|
50
|
+
or suppressed), `3` internal error.
|
|
51
|
+
|
|
52
|
+
### 3. Resolve findings
|
|
53
|
+
|
|
54
|
+
| Kind | Cause | Fix |
|
|
55
|
+
|---|---|---|
|
|
56
|
+
| `umlaut` | German prose in body | Translate to English |
|
|
57
|
+
| `de_word` | German function word in unquoted prose | Translate; or move into `DE: … · EN: …` block |
|
|
58
|
+
|
|
59
|
+
Meta-doc that **must** quote German tokens (e.g. the heuristic in
|
|
60
|
+
`language-and-tone.md` itself) → append
|
|
61
|
+
`<!-- md-language-check: ignore -->` to that single line. Never as a
|
|
62
|
+
wholesale silencer.
|
|
63
|
+
|
|
64
|
+
### 4. Re-run and confirm
|
|
65
|
+
|
|
66
|
+
After every fix re-run on the same paths. Save proceeds only on `0`.
|
|
67
|
+
|
|
68
|
+
## Allowed escape hatches
|
|
69
|
+
|
|
70
|
+
- **Labeled anchor** — lines starting with `DE:` / `- DE:` / `* DE:`
|
|
71
|
+
(and the same for `EN:`) auto-skipped.
|
|
72
|
+
- **Fenced code blocks** — exempt; shell snippets, JSON fixtures,
|
|
73
|
+
quoted user input pass through.
|
|
74
|
+
- **Inline code** — backtick spans stripped before scanning.
|
|
75
|
+
- **Per-line marker** — `<!-- md-language-check: ignore -->` on lines
|
|
76
|
+
that genuinely quote German tokens (rare).
|
|
77
|
+
|
|
78
|
+
## Output format
|
|
79
|
+
|
|
80
|
+
1. One-line summary: `clean` or `N violation(s) found`
|
|
81
|
+
2. Per violation: `file:line — kind \`match\`` plus the offending line
|
|
82
|
+
3. Next action: translate, move into a `DE:`/`EN:` block, add the
|
|
83
|
+
per-line ignore marker, or revert
|
|
84
|
+
|
|
85
|
+
## Gotchas
|
|
86
|
+
|
|
87
|
+
- `.md` files only; non-`.md` paths emit a warning and skip
|
|
88
|
+
- Word list is short and conservative — clean run is **necessary
|
|
89
|
+
but not sufficient**; agent owns the final language judgement
|
|
90
|
+
- Frontmatter (`--- … ---`) is exempt
|
|
91
|
+
|
|
92
|
+
## Do NOT
|
|
93
|
+
|
|
94
|
+
- Do NOT silence by deleting trigger words from
|
|
95
|
+
`scripts/check_md_language.py`; extend the allow-list instead
|
|
96
|
+
- Do NOT use the ignore marker as a generic mute
|
|
97
|
+
- Do NOT skip the gate "because the file is small"
|
|
98
|
+
|
|
99
|
+
## Cloud Behavior
|
|
100
|
+
|
|
101
|
+
Cloud surfaces (Claude.ai Web, Skills API) ship without the script,
|
|
102
|
+
so this skill is **inert** there — apply the heuristic from
|
|
103
|
+
[`language-and-tone`](../../rules/language-and-tone.md) manually.
|
|
@@ -37,6 +37,30 @@ Do NOT use when:
|
|
|
37
37
|
→ See guideline `php/general.md` for detailed PHP conventions.
|
|
38
38
|
→ See guideline `php/controllers.md`, `php/eloquent.md`, etc. for domain-specific conventions.
|
|
39
39
|
|
|
40
|
+
### Step 3: Stop-gate — branching on a discriminator?
|
|
41
|
+
|
|
42
|
+
Before writing **a second** `match`/`switch` arm, **a second** `if/elseif`
|
|
43
|
+
branch, or **a second** class hardcoded to one enum/string value (e.g.
|
|
44
|
+
`Provider::FOO->value`, `'stripe'`, a `case Type::CSV`), STOP and run the
|
|
45
|
+
Strategy sniff test.
|
|
46
|
+
|
|
47
|
+
Trigger keywords in the task or surrounding code:
|
|
48
|
+
|
|
49
|
+
- enum/string used as a type-tag: `Provider`, `Type`, `Channel`, `Format`,
|
|
50
|
+
`Driver`, `Kind`
|
|
51
|
+
- repeated `match ($x)` / `switch ($x)` blocks on the same value
|
|
52
|
+
- class names that bake a single enum case in: `StripeImportService`,
|
|
53
|
+
`CsvExporter`, `Ks21Job` next to `GeoCaptureJob` with the same shape
|
|
54
|
+
- allowlist constants: `private const SUPPORTED_FOO = [Type::A, Type::B]`
|
|
55
|
+
|
|
56
|
+
→ Run the sniff test in
|
|
57
|
+
[`guidelines/php/patterns/strategy.md`](../../guidelines/php/patterns/strategy.md#sniff-test--when-an-enumstring-discriminator-wants-to-become-a-strategy).
|
|
58
|
+
Two "yes" answers → propose Strategy + Registry **before** adding the new
|
|
59
|
+
branch. Three "yes" → it is already overdue and the refactor is the change.
|
|
60
|
+
|
|
61
|
+
This gate fires **per task**, not per file — once you've passed the sniff
|
|
62
|
+
test for a given discriminator, do not re-ask on the next branch.
|
|
63
|
+
|
|
40
64
|
### Core principles
|
|
41
65
|
|
|
42
66
|
- **KISS** — simplest solution that works. No over-engineering.
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: react-shadcn-ui
|
|
3
|
+
description: "Use when building React UI on shadcn/ui primitives + Tailwind — the apply/review/polish skill dispatched by `directives/ui/*` for the `react-shadcn` stack."
|
|
4
|
+
source: package
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# react-shadcn-ui
|
|
8
|
+
|
|
9
|
+
## Compatibility
|
|
10
|
+
|
|
11
|
+
- **Tested against:** `shadcn@2.1`, Tailwind CSS `3.x`, React `18+`.
|
|
12
|
+
- Audit step (`directives/ui/audit.py`) reads the line above and compares it with `state.ui_audit.shadcn_inventory.version`; major mismatch triggers a soft halt before this skill runs.
|
|
13
|
+
|
|
14
|
+
## When to use
|
|
15
|
+
|
|
16
|
+
Use when `state.stack.frontend == "react-shadcn"` and `directives/ui/apply.py`, `review.py`, or `polish.py` dispatches to this skill, or when a React project clearly uses shadcn/ui (presence of `components.json`, `@radix-ui/*` dependencies, a `components/ui/` folder of generated primitives).
|
|
17
|
+
|
|
18
|
+
Do NOT use when:
|
|
19
|
+
|
|
20
|
+
- Project is Blade + Livewire + Flux (use `flux` / `livewire` / `blade-ui`).
|
|
21
|
+
- Project is Vue (use the Vue stack skills).
|
|
22
|
+
- Plain React without shadcn/ui — fall back to manual composition; this skill assumes the primitive set exists.
|
|
23
|
+
|
|
24
|
+
## Gotcha
|
|
25
|
+
|
|
26
|
+
- shadcn/ui is **not** an npm package. Primitives are copied into `components/ui/` and edited in-place. Do not `npm install shadcn-ui`. Run `npx shadcn@latest add <primitive>` to scaffold; then edit.
|
|
27
|
+
- Major-version drift between this skill's `## Compatibility` line and the project's installed primitives is a real risk. Audit step writes `state.ui_audit.shadcn_inventory` with the detected version — when it diverges by a major, audit emits a soft halt before this skill runs.
|
|
28
|
+
- shadcn/ui composes Radix primitives. Accessibility built in via Radix but only when wrapper components used correctly (`asChild`, `<DialogTrigger>` instead of bare `<button>`).
|
|
29
|
+
- Tailwind tokens come from `tailwind.config.{js,ts}` (`theme.extend.colors`) and CSS custom properties on `:root` and `.dark` (`--background`, `--foreground`, `--primary`, `--ring`, …). Audit writes them into `state.ui_audit.design_tokens`. Use those tokens; do not hardcode values.
|
|
30
|
+
- Dark mode is class-based (`<html class="dark">`). Every color must come from `bg-background`, `text-foreground`, etc. — never raw `bg-white`.
|
|
31
|
+
- Every interactive primitive must declare a focus-visible state via `focus-visible:ring-2 focus-visible:ring-ring`; comes free with generated primitives but easy to remove during a refactor.
|
|
32
|
+
|
|
33
|
+
## Covered primitives
|
|
34
|
+
|
|
35
|
+
Validated against the following shadcn primitives at the declared version:
|
|
36
|
+
|
|
37
|
+
- **Form / inputs:** `Button`, `Input`, `Textarea`, `Checkbox`, `RadioGroup`, `Select`, `Switch`, `Label`, `Form` (react-hook-form wrapper + `zodResolver`).
|
|
38
|
+
- **Overlay:** `Dialog`, `Sheet`, `Popover`, `Tooltip`, `DropdownMenu`, `AlertDialog`.
|
|
39
|
+
- **Layout:** `Card`, `Separator`, `Tabs`, `Accordion`, `ScrollArea`.
|
|
40
|
+
- **Data display:** `Table` (with `@tanstack/react-table`), `Badge`, `Avatar`, `Skeleton`, `Progress`.
|
|
41
|
+
- **Feedback:** `Toast` (sonner), `Alert`.
|
|
42
|
+
|
|
43
|
+
## Not covered — fall back to manual composition
|
|
44
|
+
|
|
45
|
+
- Marketing-only components (Hero, Pricing, Features) — outside shadcn/ui.
|
|
46
|
+
- `Calendar` / `DatePicker` — composition skill required, not generated.
|
|
47
|
+
- `Combobox` — built from `Command` + `Popover`; case-by-case.
|
|
48
|
+
- Streaming / partial-prerender boundaries — use the project's framework patterns (Next.js / Remix), not shadcn/ui.
|
|
49
|
+
|
|
50
|
+
## Procedure: render a shadcn/ui component for the design brief
|
|
51
|
+
|
|
52
|
+
### Step 0: Inspect
|
|
53
|
+
|
|
54
|
+
1. Read `state.ui_audit.shadcn_inventory.version` and confirm it matches the version in `## Compatibility` within the same major. If audit flagged a mismatch, user already chose to proceed — note that in `state.changes`.
|
|
55
|
+
2. Read `state.ui_audit.design_tokens` — every color, spacing, and radius in rendered output must reference a token from this map.
|
|
56
|
+
3. Read `state.ui_design`:
|
|
57
|
+
- `components` → the primitive list to compose.
|
|
58
|
+
- `microcopy` → button labels, empty-state text, validation messages. **Lock — render verbatim.**
|
|
59
|
+
- `states` → empty / loading / error / success / disabled coverage.
|
|
60
|
+
- `a11y` → ARIA labels, keyboard nav, focus order.
|
|
61
|
+
|
|
62
|
+
### Step 1: Compose primitives
|
|
63
|
+
|
|
64
|
+
1. Import primitives from project's `components/ui/` path (`@/components/ui/button`, …) — never from `shadcn` or `radix-ui`.
|
|
65
|
+
2. Compose Radix-style: `<Dialog>` → `<DialogTrigger asChild>` → `<DialogContent>` → `<DialogHeader>` → `<DialogTitle>`. Never wrap `DialogTrigger` around a pre-styled `<button>`; pass `asChild`.
|
|
66
|
+
3. Use variant API of `Button` (`variant="default" | "destructive" | "outline" | "secondary" | "ghost" | "link"`); do not override with raw Tailwind for the variant set.
|
|
67
|
+
4. Forms: `useForm` (react-hook-form) + `zodResolver(schema)` → `<Form>` → `<FormField>` → `<FormItem>` → `<FormLabel>` → `<FormControl>` → `<FormMessage>`. Validation messages come from the zod schema, mirrored to design-brief microcopy.
|
|
68
|
+
|
|
69
|
+
### Step 2: Apply tokens, dark mode, a11y
|
|
70
|
+
|
|
71
|
+
1. Colors via semantic classes: `bg-background`, `text-foreground`, `bg-primary text-primary-foreground`, `text-muted-foreground`. No `bg-white` / `text-black` / hardcoded `#fff`.
|
|
72
|
+
2. Spacing / radius from theme tokens (`rounded-lg` mapped to `--radius` in `tailwind.config.{js,ts}`). Polish refactors hardcoded values when a token equivalent exists.
|
|
73
|
+
3. Dark mode: never branch on a `dark` prop; rely on `.dark` class on root and semantic tokens.
|
|
74
|
+
4. Every interactive primitive: keyboard trigger present (Enter/Space on buttons, Esc on dialogs — Radix free), visible focus ring, `aria-label` from `state.ui_design.a11y` when icon-only.
|
|
75
|
+
|
|
76
|
+
### Step 3: State coverage
|
|
77
|
+
|
|
78
|
+
1. Empty: render design-brief empty-state copy in a `Card` or inline placeholder; never `null`.
|
|
79
|
+
2. Loading: `Skeleton` rows for tables; `Button` `disabled` + `Loader2` icon for submit-in-flight.
|
|
80
|
+
3. Error: `Alert variant="destructive"` with design-brief message; `FormMessage` for field-level errors.
|
|
81
|
+
4. Success: `toast.success(...)` from `sonner` with design-brief confirmation copy.
|
|
82
|
+
5. Disabled: `disabled` prop on trigger plus design-brief reason as `aria-describedby` text.
|
|
83
|
+
|
|
84
|
+
### Step 4: Validate
|
|
85
|
+
|
|
86
|
+
1. No raw `<input>` / `<button>` / `<select>` outside the primitive set.
|
|
87
|
+
2. No hardcoded colors / spacing — every value is a token.
|
|
88
|
+
3. Microcopy matches `state.ui_design.microcopy` byte-for-byte.
|
|
89
|
+
4. Dark mode: toggle `.dark` on `<html>`, render the component, every surface still legible (no `text-white on bg-white`).
|
|
90
|
+
5. Keyboard: Tab through every focusable element; focus ring visible.
|
|
91
|
+
|
|
92
|
+
## Output format
|
|
93
|
+
|
|
94
|
+
1. React component file(s) under project's `components/` (or `app/`) tree, importing primitives from `@/components/ui/*`.
|
|
95
|
+
2. Per file, one entry recorded in `state.changes` with `kind="ui"`, `stack="react-shadcn"`, and the design-brief summary.
|
|
96
|
+
|
|
97
|
+
### Review pass — a11y findings + preview envelope
|
|
98
|
+
|
|
99
|
+
When dispatched by `directives/ui/review.py` (test slot) or `directives/ui/polish.py` (verify slot) — review/polish run, not initial apply — also emits:
|
|
100
|
+
|
|
101
|
+
- `state.ui_review.a11y` — `{violations: [{rule, selector, severity}, ...], severity_floor?, accepted_violations?}`. Run a11y tool against rendered output (e.g. `axe-core` via Playwright, `@axe-core/react`, `jest-axe`) and translate hits into this shape. Use same `(rule, selector)` shape as `state.ui_audit.a11y_baseline` so engine's de-dup matches pre-existing entries on replay. Omit envelope on apply passes; engine's `_apply_a11y_gate` only fires when baseline present.
|
|
102
|
+
- `state.ui_review.preview` — `{render_ok: bool, screenshot_path?, dom_dump_path?, error?, skipped?}`. `render_ok: false` with `error` populated triggers `preview_render_failed` halt; `render_ok: true` with `screenshot_path` threads screenshot into delivery report's `artifacts` list. Browser tooling (Playwright/Cypress/…) is consumer-project dependency — package does not ship one.
|
|
103
|
+
|
|
104
|
+
Polish dispatch: when dispatcher skips `review` because previous review pass returned `SUCCESS`, this skill MUST itself synthesise updated `state.ui_review.findings` (including remaining `a11y_violation` entries) so engine's gate sees current state on next polish round.
|
|
105
|
+
|
|
106
|
+
## Do NOT
|
|
107
|
+
|
|
108
|
+
- Do NOT install `shadcn-ui` from npm — primitives are scaffolded.
|
|
109
|
+
- Do NOT hardcode colors / spacing / radii — use the token map.
|
|
110
|
+
- Do NOT branch on a `dark` prop — use semantic tokens + the `.dark` class.
|
|
111
|
+
- Do NOT rewrite microcopy — it is locked by `state.ui_design`.
|
|
112
|
+
- Do NOT skip `asChild` on `DialogTrigger` / `SheetTrigger` / similar Radix wrappers — breaks the accessibility contract.
|
|
113
|
+
- Do NOT introduce a non-shadcn UI library (MUI, Chakra) into the same surface — pick one system per surface.
|
|
114
|
+
|
|
115
|
+
## Auto-trigger keywords
|
|
116
|
+
|
|
117
|
+
- shadcn / shadcn ui / shadcn/ui
|
|
118
|
+
- React component (when project uses shadcn)
|
|
119
|
+
- Radix primitive
|
|
120
|
+
- Tailwind dark mode
|
|
121
|
+
- React Hook Form + zod
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "refine-prompt"
|
|
3
|
+
description: "Reconstruct a free-form prompt into actionable AC + assumptions + confidence band before the engine plans — '/work \"…\"', 'baue X', 'ist der Prompt klar genug für die Engine?'."
|
|
4
|
+
personas:
|
|
5
|
+
- developer
|
|
6
|
+
- senior-engineer
|
|
7
|
+
- ai-agent
|
|
8
|
+
source: package
|
|
9
|
+
execution:
|
|
10
|
+
type: assisted
|
|
11
|
+
handler: internal
|
|
12
|
+
allowed_tools: []
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Refine Prompt
|
|
16
|
+
|
|
17
|
+
> Move a free-form prompt from "raw text" to "engine-ready" in one run.
|
|
18
|
+
> Produces reconstructed acceptance criteria, explicit assumptions,
|
|
19
|
+
> and a confidence band that decides whether the engine proceeds
|
|
20
|
+
> silently, halts for confirmation, or refuses to plan.
|
|
21
|
+
>
|
|
22
|
+
> Sibling of [`refine-ticket`](../refine-ticket/SKILL.md) — same
|
|
23
|
+
> reconstruction-of-intent pattern, different input shape. Tickets
|
|
24
|
+
> arrive structured (id, title, AC); prompts arrive as one string.
|
|
25
|
+
|
|
26
|
+
## When to use
|
|
27
|
+
|
|
28
|
+
- The user invokes `/work "<prompt>"` or pastes a free-form request.
|
|
29
|
+
- The dispatcher hits `input.kind="prompt"` in the `refine` step.
|
|
30
|
+
- A prompt looks ambiguous, broad, or scope-undefined and the user
|
|
31
|
+
asks "ist das klar genug, um loszulegen?".
|
|
32
|
+
- Before any plan/apply step on prompt-driven work — never after.
|
|
33
|
+
|
|
34
|
+
## When NOT to use (near-misses)
|
|
35
|
+
|
|
36
|
+
| Phrasing | Route to |
|
|
37
|
+
|---|---|
|
|
38
|
+
| "refine this ticket" | [`refine-ticket`](../refine-ticket/SKILL.md) |
|
|
39
|
+
| "estimate this prompt" | not supported — score then estimate downstream |
|
|
40
|
+
| "plan this feature" | `/feature-plan` (downstream) |
|
|
41
|
+
| "is this a duplicate?" | `validate-feature-fit` (sub-skill, post-refine) |
|
|
42
|
+
|
|
43
|
+
`refine-prompt` is the *first* gate on prompt-driven flow. It does not
|
|
44
|
+
plan, does not implement, does not write back anywhere.
|
|
45
|
+
|
|
46
|
+
## Input
|
|
47
|
+
|
|
48
|
+
Exactly one path: a non-empty raw string carried in
|
|
49
|
+
`state.input.data.raw` (built by [`work_engine.resolvers.prompt`](../../templates/scripts/work_engine/resolvers/prompt.py)).
|
|
50
|
+
No branch detection, no URL parsing, no clipboard fallback — the
|
|
51
|
+
calling command (`/work`) owns prompt capture; this skill only refines.
|
|
52
|
+
|
|
53
|
+
If `raw` is missing, empty, or whitespace-only the resolver already
|
|
54
|
+
raised `PromptResolverError`. The skill never receives that input.
|
|
55
|
+
|
|
56
|
+
## Procedure
|
|
57
|
+
|
|
58
|
+
### 1. Read and analyze the prompt
|
|
59
|
+
|
|
60
|
+
Examine the raw text top to bottom *before* changing anything in
|
|
61
|
+
state. Identify the *single* desired outcome in one sentence —
|
|
62
|
+
verb + object + observable result. If the prompt names two
|
|
63
|
+
unrelated outcomes (e.g. "fix login AND refactor the dashboard"),
|
|
64
|
+
record both but flag scope-overload in step 5; the score will
|
|
65
|
+
land in `medium` or `low`.
|
|
66
|
+
|
|
67
|
+
This is an analysis pass, not an execution pass. The skill does
|
|
68
|
+
not modify the prompt, infer code changes, or call any tool — it
|
|
69
|
+
investigates the input and produces a structured envelope the
|
|
70
|
+
dispatcher reads.
|
|
71
|
+
|
|
72
|
+
### 2. Enumerate explicit constraints
|
|
73
|
+
|
|
74
|
+
Pull every concrete signal from the prompt verbatim:
|
|
75
|
+
|
|
76
|
+
- **Files / modules** named in the text (`UserController`,
|
|
77
|
+
`auth.service.ts`, `migrations/2024_…`).
|
|
78
|
+
- **Behaviour anchors** — endpoints, routes, commands, fixtures.
|
|
79
|
+
- **Hard rules** — "must not break X", "without changing the API",
|
|
80
|
+
"keep backwards compat".
|
|
81
|
+
|
|
82
|
+
Constraints come from the prompt only. Inferred constraints belong in
|
|
83
|
+
step 3 (assumptions), never here.
|
|
84
|
+
|
|
85
|
+
### 3. Infer reasonable assumptions
|
|
86
|
+
|
|
87
|
+
Anything the prompt implies but does not state. Examples:
|
|
88
|
+
|
|
89
|
+
- "fix the login bug" → assumes the bug is in the existing `auth/`
|
|
90
|
+
module (no new auth provider).
|
|
91
|
+
- "add caching" → assumes the project's primary cache driver
|
|
92
|
+
(per `.agent-settings.yml` / `config/cache.php`).
|
|
93
|
+
- "speed up the export" → assumes "faster" means runtime, not memory.
|
|
94
|
+
|
|
95
|
+
Each assumption is a single line, prefixed with `assumes:`. The
|
|
96
|
+
medium-band halt surfaces them verbatim — no rewording, no
|
|
97
|
+
explanations.
|
|
98
|
+
|
|
99
|
+
### 4. Generate the AC list
|
|
100
|
+
|
|
101
|
+
Three to seven bullet points. Each bullet is observable and
|
|
102
|
+
testable in the project's existing test surface (Pest / Jest /
|
|
103
|
+
pytest / etc.). Avoid:
|
|
104
|
+
|
|
105
|
+
- "works correctly" / "is fast" / "looks better" (untestable)
|
|
106
|
+
- "no regressions" (the test suite already covers that)
|
|
107
|
+
- "follows best practices" (not an AC)
|
|
108
|
+
|
|
109
|
+
Anchor each bullet to a constraint from step 2 or an assumption from
|
|
110
|
+
step 3 — never both implicit.
|
|
111
|
+
|
|
112
|
+
### 5. Score confidence
|
|
113
|
+
|
|
114
|
+
Delegate to [`scripts.work_engine.scoring.confidence`](../../templates/scripts/work_engine/scoring/confidence.py):
|
|
115
|
+
|
|
116
|
+
```python
|
|
117
|
+
from work_engine.scoring.confidence import score
|
|
118
|
+
result = score(raw=prompt_raw, ac=reconstructed_ac, assumptions=assumptions)
|
|
119
|
+
# result.band ∈ {"high", "medium", "low"}
|
|
120
|
+
# result.score ∈ [0.0, 1.0]
|
|
121
|
+
# result.dimensions: dict[str, int] # 0–2 per dimension
|
|
122
|
+
# result.reasons: list[str] # human-readable rationale
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
The rubric (5 dimensions × 0–2, sum / 10) and band thresholds
|
|
126
|
+
(`high ≥ 0.8`, `medium 0.5–0.79`, `low < 0.5`) are owned by
|
|
127
|
+
`confidence.py`. Do not re-derive them in prose.
|
|
128
|
+
|
|
129
|
+
## Band-action mapping
|
|
130
|
+
|
|
131
|
+
The `refine` dispatcher step in `directives/backend/refine.py` reads
|
|
132
|
+
the score and returns one of three outcomes — the skill does not
|
|
133
|
+
decide the action, only produces the inputs.
|
|
134
|
+
|
|
135
|
+
| Band | Outcome | What the user sees |
|
|
136
|
+
|---|---|---|
|
|
137
|
+
| `high` | `SUCCESS` | Silent proceed; AC + assumptions land in the delivery report |
|
|
138
|
+
| `medium` | `PARTIAL` | Assumptions report halt: numbered list of `assumes:` lines + AC, user confirms or edits |
|
|
139
|
+
| `low` | `BLOCKED` | One clarifying question (per [`ask-when-uncertain`](../../rules/ask-when-uncertain.md) Iron Law) |
|
|
140
|
+
|
|
141
|
+
## Output format
|
|
142
|
+
|
|
143
|
+
The skill emits a structured envelope; the dispatcher renders it.
|
|
144
|
+
Required fields, in order:
|
|
145
|
+
|
|
146
|
+
1. **Goal** — single sentence, verb + object + observable result
|
|
147
|
+
2. **Acceptance criteria** — numbered list, 3–7 entries, each
|
|
148
|
+
anchored to a step-2 constraint or a step-3 assumption
|
|
149
|
+
3. **Assumptions** — bullet list, each line prefixed `assumes:`
|
|
150
|
+
4. **Confidence** — band + score + per-dimension breakdown from
|
|
151
|
+
`work_engine.scoring.confidence`
|
|
152
|
+
|
|
153
|
+
The shape below is the rendered surface for `medium` / `low`
|
|
154
|
+
halts; for `high` the same envelope lands in the delivery report
|
|
155
|
+
without a halt.
|
|
156
|
+
|
|
157
|
+
````markdown
|
|
158
|
+
## Reconstructed prompt
|
|
159
|
+
|
|
160
|
+
**Goal:** <one sentence, verb + object + observable result>
|
|
161
|
+
|
|
162
|
+
**Acceptance criteria:**
|
|
163
|
+
1. <bullet>
|
|
164
|
+
2. <bullet>
|
|
165
|
+
3. <bullet>
|
|
166
|
+
|
|
167
|
+
**Assumptions:**
|
|
168
|
+
- assumes: <line>
|
|
169
|
+
- assumes: <line>
|
|
170
|
+
|
|
171
|
+
**Confidence:** medium (0.62) — goal_clarity 2 · scope_boundary 1 · ac_evidence 2 · stack_data 1 · reversibility 0
|
|
172
|
+
````
|
|
173
|
+
|
|
174
|
+
For `low`, the question replaces the AC list:
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
> The prompt does not name <missing dimension>.
|
|
178
|
+
>
|
|
179
|
+
> 1. <option that resolves the gap>
|
|
180
|
+
> 2. <alternative resolution>
|
|
181
|
+
> 3. <skip / abandon>
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
## Gotchas
|
|
185
|
+
|
|
186
|
+
- The model invents AC that *sound* observable but aren't anchored
|
|
187
|
+
in the prompt or a concrete file. Every AC must trace to a step-2
|
|
188
|
+
constraint or a step-3 assumption — no free-floating bullets.
|
|
189
|
+
- Assumptions are not commitments. The medium-band halt is the
|
|
190
|
+
user's chance to flip them; the skill never asserts an assumption
|
|
191
|
+
as fact.
|
|
192
|
+
- The scorer is heuristic, not LLM-based. Token count is not a
|
|
193
|
+
signal — a 200-word prompt can score `low` if the goal is vague,
|
|
194
|
+
and a 20-word prompt can score `high` if scope is unambiguous.
|
|
195
|
+
- UI-shaped prompts ("redesign the dashboard", "make the form
|
|
196
|
+
prettier") score `low` on `stack_data` until R3 lands the UI
|
|
197
|
+
directive set; band-action is a pointer to R3, not a refusal.
|
|
198
|
+
|
|
199
|
+
## Do NOT
|
|
200
|
+
|
|
201
|
+
- Do NOT call this skill on `input.kind="ticket"` — that path runs
|
|
202
|
+
through [`refine-ticket`](../refine-ticket/SKILL.md).
|
|
203
|
+
- Do NOT auto-confirm assumptions on the user's behalf in the
|
|
204
|
+
medium-band halt. The halt is the contract.
|
|
205
|
+
- Do NOT stack multiple clarifying questions in the low-band halt.
|
|
206
|
+
Iron Law: one question per turn.
|
|
207
|
+
- Do NOT mutate `state.input.data.raw`. The original prompt stays
|
|
208
|
+
verbatim for replay; reconstructed output lands in
|
|
209
|
+
`data.reconstructed_ac` and `data.assumptions`.
|
|
210
|
+
- Do NOT re-derive band thresholds in prose. They live in
|
|
211
|
+
`confidence.py` and only there.
|
|
212
|
+
|
|
213
|
+
## See also
|
|
214
|
+
|
|
215
|
+
- [`refine-ticket`](../refine-ticket/SKILL.md) — sibling for ticket-shaped input
|
|
216
|
+
- [`work_engine.resolvers.prompt`](../../templates/scripts/work_engine/resolvers/prompt.py) — envelope builder
|
|
217
|
+
- [`work_engine.scoring.confidence`](../../templates/scripts/work_engine/scoring/confidence.py) — rubric + band thresholds
|
|
218
|
+
- [`ask-when-uncertain`](../../rules/ask-when-uncertain.md) — one-question-per-turn Iron Law
|
|
219
|
+
- [`artifact-drafting-protocol`](../../rules/artifact-drafting-protocol.md) — this skill was drafted under it
|
|
220
|
+
- `agents/roadmaps/archive/road-to-prompt-driven-execution.md` — Phase 3 owns this skill (archived on completion)
|
|
@@ -47,19 +47,24 @@ execution:
|
|
|
47
47
|
|
|
48
48
|
## Language strategy
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
The refined output's prose language is picked once, up front, and
|
|
51
|
+
applied to every section (refined description, risks, persona voices,
|
|
52
|
+
orchestration notes, close-prompt). Fallback order — first hit wins:
|
|
52
53
|
|
|
53
|
-
1. **User-message language.**
|
|
54
|
-
|
|
54
|
+
1. **User-message language.** If the latest user message is in
|
|
55
|
+
German, the entire output is German; if English, English; etc.
|
|
56
|
+
This honours the global `language-and-tone` iron law.
|
|
55
57
|
2. **Ticket body language.** When the user's message is ambiguous
|
|
56
|
-
(one-word `/refine-ticket PROJ-123`), mirror the language the
|
|
57
|
-
is written in
|
|
58
|
-
3. **`.agent-settings.yml` default
|
|
59
|
-
|
|
58
|
+
(one-word `/refine-ticket PROJ-123`), mirror the language the
|
|
59
|
+
ticket is written in — detected from the summary + description.
|
|
60
|
+
3. **`.agent-settings.yml` default.** If both are silent or unclear,
|
|
61
|
+
fall back to the project default in `.agent-settings.yml`
|
|
62
|
+
(`personal.language` or equivalent). If that is also missing,
|
|
63
|
+
default to English.
|
|
60
64
|
|
|
61
|
-
Quoted identifiers (keys, paths,
|
|
62
|
-
prose mirrors the
|
|
65
|
+
Quoted identifiers (ticket keys, file paths, command names, code
|
|
66
|
+
snippets) stay in their native form. Only the prose mirrors the
|
|
67
|
+
selected language.
|
|
63
68
|
|
|
64
69
|
## Inputs (four equivalent paths)
|
|
65
70
|
|
|
@@ -88,8 +93,8 @@ Delegate to `jira-ticket` §1-3:
|
|
|
88
93
|
If pasted text: skip API, parse markdown, extract title + AC
|
|
89
94
|
bullets + body.
|
|
90
95
|
|
|
91
|
-
**Auto-fetch parent (Phase F4).** Before detection, check the
|
|
92
|
-
type and fold parent context in:
|
|
96
|
+
**Auto-fetch parent (Phase F4).** Before detection, check the
|
|
97
|
+
issue type and fold parent context in:
|
|
93
98
|
|
|
94
99
|
```python
|
|
95
100
|
from scripts.refine_ticket_detect import (
|
|
@@ -105,18 +110,19 @@ if issuetype_needs_parent(ticket["issuetype"]):
|
|
|
105
110
|
```
|
|
106
111
|
|
|
107
112
|
Rules:
|
|
108
|
-
- Applies to `Story` and `Sub-task` (and Linear / Shortcut
|
|
109
|
-
`Task` / `Bug` / `Epic` skip the auto-fetch unless a
|
|
110
|
-
|
|
113
|
+
- Applies to `Story` and `Sub-task` (and their Linear / Shortcut
|
|
114
|
+
equivalents). `Task` / `Bug` / `Epic` skip the auto-fetch unless a
|
|
115
|
+
`parent` link field is already populated — in that case the agent
|
|
116
|
+
folds explicitly without the issuetype guard.
|
|
111
117
|
- `fold_parent_context()` is idempotent; folding twice with the same
|
|
112
118
|
parent does not duplicate the block.
|
|
113
|
-
-
|
|
114
|
-
to orchestration notes:
|
|
119
|
+
- When the parent fetch fails (404, permission, network), skip the
|
|
120
|
+
fold and append a line to orchestration notes:
|
|
115
121
|
*"Parent `<key>` not reachable — AC may lack upstream context."*
|
|
116
122
|
|
|
117
|
-
Parent AC lines surfaced this way must be cited verbatim in the
|
|
118
|
-
output's *Open questions* section so the user sees which
|
|
119
|
-
come from the parent.
|
|
123
|
+
Parent AC lines surfaced this way must be cited verbatim in the
|
|
124
|
+
refined output's *Open questions* section so the user sees which
|
|
125
|
+
constraints come from the parent.
|
|
120
126
|
|
|
121
127
|
### 2. Inspect ticket + detect orchestration triggers
|
|
122
128
|
|
|
@@ -130,7 +136,7 @@ Then run the deterministic detection helper — do **not** re-derive trigger
|
|
|
130
136
|
logic in prose:
|
|
131
137
|
|
|
132
138
|
```bash
|
|
133
|
-
|
|
139
|
+
./agent-config refine-ticket:detect <ticket-body-file>
|
|
134
140
|
# or, inside the skill run:
|
|
135
141
|
from scripts.refine_ticket_detect import detect, load_map
|
|
136
142
|
decision = detect(ticket_body, load_map(), cwd=Path.cwd())
|
|
@@ -206,8 +212,7 @@ open a planning doc.
|
|
|
206
212
|
|
|
207
213
|
## Output template
|
|
208
214
|
|
|
209
|
-
Frozen per Q25
|
|
210
|
-
[`road-to-ticket-refinement.md`](../../../agents/roadmaps/road-to-ticket-refinement.md)).
|
|
215
|
+
Frozen per Q25.
|
|
211
216
|
|
|
212
217
|
````markdown
|
|
213
218
|
## Refined ticket
|
|
@@ -247,8 +252,8 @@ so the user can grab it verbatim.
|
|
|
247
252
|
|
|
248
253
|
## Close-prompt (mandatory final step)
|
|
249
254
|
|
|
250
|
-
**Probe write access first (Phase F6).**
|
|
251
|
-
|
|
255
|
+
**Probe write access first (Phase F6).** Before rendering, do a
|
|
256
|
+
cheap upfront check:
|
|
252
257
|
|
|
253
258
|
```python
|
|
254
259
|
from scripts.refine_ticket_detect import render_close_prompt
|
|
@@ -272,8 +277,8 @@ Behaviour:
|
|
|
272
277
|
| Probe failed (`None`) | Full three-option prompt; skill degrades to copy-paste on selection (v1 fallback) |
|
|
273
278
|
|
|
274
279
|
Per user interaction rules, accept number or free text. `editmeta`
|
|
275
|
-
is cheap and cacheable; cache per Jira project key for
|
|
276
|
-
re-probe on project change.
|
|
280
|
+
is cheap and cacheable; cache the result per Jira project key for
|
|
281
|
+
the session, re-probe on project change.
|
|
277
282
|
|
|
278
283
|
## Output format
|
|
279
284
|
|
|
@@ -306,5 +311,4 @@ re-probe on project change.
|
|
|
306
311
|
- [`feature-explore`](../../commands/feature-explore.md) — upstream idea capture; hints at `/refine-ticket` when input looks like a ticket
|
|
307
312
|
- [`feature-plan`](../../commands/feature-plan.md) — downstream planning
|
|
308
313
|
- [`adversarial-review`](../adversarial-review/SKILL.md) — same `critical-challenger` persona, different stage (post-plan)
|
|
309
|
-
- [`road-to-ticket-refinement.md`](../../../agents/roadmaps/road-to-ticket-refinement.md) — governing roadmap
|
|
310
314
|
- [`artifact-drafting-protocol`](../../rules/artifact-drafting-protocol.md) — this skill was drafted under it
|