@danmoisan/drm-copilot-mcp 1.1.23 → 1.1.25
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/out/mcp-server.js +13347 -7926
- package/package.json +1 -1
- package/resources/claude-customizations/.claude/agents/discovery-capability-sentinel.md +34 -0
- package/resources/claude-customizations/.claude/agents/legacy-parity-analyst.md +101 -43
- package/resources/claude-customizations/.claude/agents/migration-coverage-reviewer.md +107 -43
- package/resources/claude-customizations/.claude/agents/parallel-orchestrator.md +14 -0
- package/resources/claude-customizations/.claude/agents/parallel-planner.md +21 -1
- package/resources/claude-customizations/.claude/agents/pr-author.md +17 -1
- package/resources/claude-customizations/.claude/agents/requirements-reconciler.md +117 -42
- package/resources/claude-customizations/.claude/agents/runtime-characterization-analyst.md +103 -43
- package/resources/claude-customizations/.claude/hooks/discovery-capability-probe.ps1 +102 -0
- package/resources/claude-customizations/.claude/hooks/enforce-discovery-artifact-gate.ps1 +69 -194
- package/resources/claude-customizations/.claude/hooks/enforce-discovery-planning-gate.ps1 +87 -0
- package/resources/claude-customizations/.claude/hooks/enforce-epic-merge-gate.ps1 +7 -1
- package/resources/claude-customizations/.claude/hooks/enforce-model-routing-receipt.ps1 +6 -3
- package/resources/claude-customizations/.claude/hooks/enforce-orchestration-preimplementation-gate-epic-scope.ps1 +168 -48
- package/resources/claude-customizations/.claude/hooks/enforce-orchestration-preimplementation-gate.ps1 +1 -1
- package/resources/claude-customizations/.claude/hooks/enforce-powershell-batch-budget.ps1 +59 -20
- package/resources/claude-customizations/.claude/hooks/enforce-pr-author-command-allowlist.ps1 +44 -3
- package/resources/claude-customizations/.claude/hooks/enforce-pr-author-skill-helpers.ps1 +60 -4
- package/resources/claude-customizations/.claude/hooks/enforce-pr-author-skill.epic-base-branch.ps1 +4 -2
- package/resources/claude-customizations/.claude/hooks/enforce-python-batch-budget.ps1 +59 -20
- package/resources/claude-customizations/.claude/hooks/record-discovery-agent-start.ps1 +132 -0
- package/resources/claude-customizations/.claude/hooks/validate-discovery-artifact-gate.ps1 +56 -212
- package/resources/claude-customizations/.claude/hooks/validate-orchestrator-output-rejection.ps1 +172 -0
- package/resources/claude-customizations/.claude/hooks/validate-orchestrator-output.ps1 +9 -1
- package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadius.psm1 +9 -3
- package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadiusAggregate.psm1 +154 -0
- package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadiusCombination.psm1 +228 -0
- package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadiusExtraction.psm1 +1 -0
- package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadiusNormalization.psm1 +4 -2
- package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadiusScheduling.psm1 +63 -16
- package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadiusTokenShape.psm1 +56 -1
- package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadiusWriteIntent.psm1 +4 -1
- package/resources/claude-customizations/.claude/lib/codex-routing/CodexDeployment.psm1 +5 -1
- package/resources/claude-customizations/.claude/lib/codex-routing/CodexDiscoveryRouting.psm1 +161 -0
- package/resources/claude-customizations/.claude/lib/codex-routing/CodexTopology.psm1 +25 -2
- package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryAuthority.psd1 +90 -0
- package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryAuthority.psm1 +493 -0
- package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryAuthorization.psm1 +479 -0
- package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryCapability.psm1 +468 -0
- package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryEncoding.psm1 +156 -0
- package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryManifest.psm1 +384 -0
- package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryObservation.psm1 +217 -0
- package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryPayload.psm1 +276 -0
- package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryPlanning.psm1 +336 -0
- package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryRootGrant.psm1 +164 -0
- package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryStart.psm1 +440 -0
- package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryStartRecord.psm1 +296 -0
- package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryStop.psm1 +336 -0
- package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryToolRouting.psm1 +228 -0
- package/resources/claude-customizations/.claude/lib/discovery-validation/DiscoveryValidation.psm1 +188 -341
- package/resources/claude-customizations/.claude/lib/worktree-resolution/HookTargetWorktree.psm1 +391 -0
- package/resources/claude-customizations/.claude/rules/orchestrator-state.md +1 -0
- package/resources/claude-customizations/.claude/rules/parallel-orchestration.md +150 -18
- package/resources/claude-customizations/.claude/settings.json +32 -3
- package/resources/claude-customizations/.claude/skills/adjudicate-unspecified-behavior/SKILL.md +135 -0
- package/resources/claude-customizations/.claude/skills/characterize-runtime-behavior/SKILL.md +134 -0
- package/resources/claude-customizations/.claude/skills/discovery-behavior-reconciliation/SKILL.md +28 -47
- package/resources/claude-customizations/.claude/skills/discovery-coverage-ledger/SKILL.md +32 -48
- package/resources/claude-customizations/.claude/skills/discovery-parity-matrix/SKILL.md +28 -45
- package/resources/claude-customizations/.claude/skills/discovery-repo-inventory/SKILL.md +28 -62
- package/resources/claude-customizations/.claude/skills/discovery-runtime-characterization/SKILL.md +28 -45
- package/resources/claude-customizations/.claude/skills/discovery-validate-artifacts/SKILL.md +28 -61
- package/resources/claude-customizations/.claude/skills/discovery-workflow/SKILL.md +55 -139
- package/resources/claude-customizations/.claude/skills/execution-environment/SKILL.md +24 -9
- package/resources/claude-customizations/.claude/skills/extract-feature-contract/SKILL.md +133 -0
- package/resources/claude-customizations/.claude/skills/generate-acceptance-scenarios/SKILL.md +132 -0
- package/resources/claude-customizations/.claude/skills/initialize-discovery-workspace/SKILL.md +131 -0
- package/resources/claude-customizations/.claude/skills/inventory-legacy-system/SKILL.md +131 -0
- package/resources/claude-customizations/.claude/skills/orchestrate/SKILL.md +5 -4
- package/resources/claude-customizations/.claude/skills/parallel-add/SKILL.md +21 -1
- package/resources/claude-customizations/.claude/skills/parallel-close/SKILL.md +11 -1
- package/resources/claude-customizations/.claude/skills/parallel-orchestrate/SKILL.md +34 -0
- package/resources/claude-customizations/.claude/skills/parallel-plan/SKILL.md +69 -6
- package/resources/claude-customizations/.claude/skills/parallel-remove/SKILL.md +15 -0
- package/resources/claude-customizations/.claude/skills/parallel-run/SKILL.md +6 -0
- package/resources/claude-customizations/.claude/skills/pr-author/SKILL.md +21 -4
- package/resources/claude-customizations/.claude/skills/reconcile-parity-matrix/SKILL.md +131 -0
- package/resources/claude-customizations/.claude/skills/review-discovery-coverage/SKILL.md +129 -0
- package/resources/claude-customizations/.claude/skills/validate-discovery-artifacts/SKILL.md +127 -0
- package/resources/claude-customizations/config/blast-radius.json +6 -5
- package/resources/claude-customizations/config/orchestration-routing.json +61 -1
- package/resources/claude-customizations/pack-manifests/core.json +33 -1
- package/resources/codex-and-agents-customizations/.agents/skills/adjudicate-unspecified-behavior/SKILL.md +135 -0
- package/resources/codex-and-agents-customizations/.agents/skills/atomic-planner/SKILL.md +7 -0
- package/resources/codex-and-agents-customizations/.agents/skills/characterize-runtime-behavior/SKILL.md +134 -0
- package/resources/codex-and-agents-customizations/.agents/skills/discovery-behavior-reconciliation/SKILL.md +46 -0
- package/resources/codex-and-agents-customizations/.agents/skills/discovery-coverage-ledger/SKILL.md +50 -0
- package/resources/codex-and-agents-customizations/.agents/skills/discovery-parity-matrix/SKILL.md +46 -0
- package/resources/codex-and-agents-customizations/.agents/skills/discovery-repo-inventory/SKILL.md +46 -0
- package/resources/codex-and-agents-customizations/.agents/skills/discovery-runtime-characterization/SKILL.md +46 -0
- package/resources/codex-and-agents-customizations/.agents/skills/discovery-validate-artifacts/SKILL.md +46 -0
- package/resources/codex-and-agents-customizations/.agents/skills/discovery-workflow/SKILL.md +62 -0
- package/resources/codex-and-agents-customizations/.agents/skills/execution-environment/SKILL.md +24 -9
- package/resources/codex-and-agents-customizations/.agents/skills/extract-feature-contract/SKILL.md +133 -0
- package/resources/codex-and-agents-customizations/.agents/skills/generate-acceptance-scenarios/SKILL.md +132 -0
- package/resources/codex-and-agents-customizations/.agents/skills/initialize-discovery-workspace/SKILL.md +131 -0
- package/resources/codex-and-agents-customizations/.agents/skills/inventory-legacy-system/SKILL.md +131 -0
- package/resources/codex-and-agents-customizations/.agents/skills/orchestrator-workflow/SKILL.md +8 -0
- package/resources/codex-and-agents-customizations/.agents/skills/reconcile-parity-matrix/SKILL.md +131 -0
- package/resources/codex-and-agents-customizations/.agents/skills/review-discovery-coverage/SKILL.md +129 -0
- package/resources/codex-and-agents-customizations/.agents/skills/validate-discovery-artifacts/SKILL.md +127 -0
- package/resources/codex-and-agents-customizations/.codex/agents/discovery-capability-sentinel.toml +51 -0
- package/resources/codex-and-agents-customizations/.codex/agents/legacy-parity-analyst-c1.toml +148 -0
- package/resources/codex-and-agents-customizations/.codex/agents/legacy-parity-analyst-c2.toml +148 -0
- package/resources/codex-and-agents-customizations/.codex/agents/legacy-parity-analyst-c3-elevated.toml +148 -0
- package/resources/codex-and-agents-customizations/.codex/agents/legacy-parity-analyst-c3.toml +148 -0
- package/resources/codex-and-agents-customizations/.codex/agents/legacy-parity-analyst-c4.toml +148 -0
- package/resources/codex-and-agents-customizations/.codex/agents/legacy-parity-analyst.toml +148 -0
- package/resources/codex-and-agents-customizations/.codex/agents/migration-coverage-reviewer-c1.toml +154 -0
- package/resources/codex-and-agents-customizations/.codex/agents/migration-coverage-reviewer-c2.toml +154 -0
- package/resources/codex-and-agents-customizations/.codex/agents/migration-coverage-reviewer-c3-elevated.toml +154 -0
- package/resources/codex-and-agents-customizations/.codex/agents/migration-coverage-reviewer-c3.toml +154 -0
- package/resources/codex-and-agents-customizations/.codex/agents/migration-coverage-reviewer-c4.toml +154 -0
- package/resources/codex-and-agents-customizations/.codex/agents/migration-coverage-reviewer.toml +154 -0
- package/resources/codex-and-agents-customizations/.codex/agents/requirements-reconciler-c1.toml +164 -0
- package/resources/codex-and-agents-customizations/.codex/agents/requirements-reconciler-c2.toml +164 -0
- package/resources/codex-and-agents-customizations/.codex/agents/requirements-reconciler-c3-elevated.toml +164 -0
- package/resources/codex-and-agents-customizations/.codex/agents/requirements-reconciler-c3.toml +164 -0
- package/resources/codex-and-agents-customizations/.codex/agents/requirements-reconciler-c4.toml +164 -0
- package/resources/codex-and-agents-customizations/.codex/agents/requirements-reconciler.toml +164 -0
- package/resources/codex-and-agents-customizations/.codex/agents/runtime-characterization-analyst-c1.toml +150 -0
- package/resources/codex-and-agents-customizations/.codex/agents/runtime-characterization-analyst-c2.toml +150 -0
- package/resources/codex-and-agents-customizations/.codex/agents/runtime-characterization-analyst-c3-elevated.toml +150 -0
- package/resources/codex-and-agents-customizations/.codex/agents/runtime-characterization-analyst-c3.toml +150 -0
- package/resources/codex-and-agents-customizations/.codex/agents/runtime-characterization-analyst-c4.toml +150 -0
- package/resources/codex-and-agents-customizations/.codex/agents/runtime-characterization-analyst.toml +150 -0
- package/resources/codex-and-agents-customizations/.codex/config.toml +33 -3
- package/resources/codex-and-agents-customizations/.codex/hooks/codex-agent-profile-attestation.ps1 +22 -0
- package/resources/codex-and-agents-customizations/.codex/hooks/discovery-capability-probe.ps1 +97 -0
- package/resources/codex-and-agents-customizations/.codex/hooks/discovery-start-attestation.ps1 +171 -0
- package/resources/codex-and-agents-customizations/.codex/hooks/enforce-codex-model-routing.ps1 +4 -1
- package/resources/codex-and-agents-customizations/.codex/hooks/enforce-discovery-artifact-gate.ps1 +187 -0
- package/resources/codex-and-agents-customizations/.codex/hooks/enforce-discovery-planning-gate.ps1 +149 -0
- package/resources/codex-and-agents-customizations/.codex/hooks/enforce-orchestration-preimplementation-gate-epic-scope.ps1 +239 -2
- package/resources/codex-and-agents-customizations/.codex/hooks/enforce-orchestration-preimplementation-gate.ps1 +6 -15
- package/resources/codex-and-agents-customizations/.codex/hooks/enforce-powershell-batch-budget.ps1 +54 -15
- package/resources/codex-and-agents-customizations/.codex/hooks/enforce-python-batch-budget.ps1 +54 -15
- package/resources/codex-and-agents-customizations/.codex/hooks/hook-target-worktree.ps1 +369 -0
- package/resources/codex-and-agents-customizations/.codex/hooks/record-subagent-routing-attestation.ps1 +8 -0
- package/resources/codex-and-agents-customizations/.codex/hooks/validate-codex-subagent-routing.ps1 +22 -1
- package/resources/codex-and-agents-customizations/.codex/hooks/validate-discovery-agent-output.ps1 +178 -0
- package/resources/codex-and-agents-customizations/.codex/scripts/Resolve-CodexTopology.ps1 +11 -1
- package/resources/codex-and-agents-customizations/pack-manifests/core.json +63 -1
- package/resources/config/orchestration-routing.json +61 -1
- package/resources/customizations/.github/agents/discovery-capability-sentinel.agent.md +34 -0
- package/resources/customizations/.github/agents/legacy-parity-analyst.agent.md +122 -0
- package/resources/customizations/.github/agents/migration-coverage-reviewer.agent.md +128 -0
- package/resources/customizations/.github/agents/requirements-reconciler.agent.md +138 -0
- package/resources/customizations/.github/agents/runtime-characterization-analyst.agent.md +124 -0
- package/resources/customizations/.github/hooks/discovery-agent-start.ps1 +139 -0
- package/resources/customizations/.github/hooks/discovery-agent-stop.ps1 +123 -0
- package/resources/customizations/.github/hooks/discovery-capability-probe.ps1 +98 -0
- package/resources/customizations/.github/hooks/discovery-planning.ps1 +91 -0
- package/resources/customizations/.github/hooks/discovery-pre-tool.ps1 +123 -0
- package/resources/customizations/.github/hooks/discovery.json +35 -0
- package/resources/customizations/.github/instructions/mermaid.instructions.md +85 -0
- package/resources/customizations/.github/prompts/execute-hard-lock.prompt.md +105 -0
- package/resources/customizations/.github/skills/adjudicate-unspecified-behavior/SKILL.md +135 -0
- package/resources/customizations/.github/skills/characterize-runtime-behavior/SKILL.md +134 -0
- package/resources/customizations/.github/skills/discovery-behavior-reconciliation/SKILL.md +46 -0
- package/resources/customizations/.github/skills/discovery-coverage-ledger/SKILL.md +50 -0
- package/resources/customizations/.github/skills/discovery-parity-matrix/SKILL.md +46 -0
- package/resources/customizations/.github/skills/discovery-repo-inventory/SKILL.md +46 -0
- package/resources/customizations/.github/skills/discovery-runtime-characterization/SKILL.md +46 -0
- package/resources/customizations/.github/skills/discovery-validate-artifacts/SKILL.md +46 -0
- package/resources/customizations/.github/skills/discovery-workflow/SKILL.md +62 -0
- package/resources/customizations/.github/skills/execution-environment/SKILL.md +24 -9
- package/resources/customizations/.github/skills/extract-feature-contract/SKILL.md +133 -0
- package/resources/customizations/.github/skills/generate-acceptance-scenarios/SKILL.md +132 -0
- package/resources/customizations/.github/skills/initialize-discovery-workspace/SKILL.md +131 -0
- package/resources/customizations/.github/skills/inventory-legacy-system/SKILL.md +131 -0
- package/resources/customizations/.github/skills/reconcile-parity-matrix/SKILL.md +131 -0
- package/resources/customizations/.github/skills/review-discovery-coverage/SKILL.md +129 -0
- package/resources/customizations/.github/skills/validate-discovery-artifacts/SKILL.md +127 -0
- package/resources/lib/codex-routing/CodexDeployment.psm1 +5 -1
- package/resources/lib/codex-routing/CodexDiscoveryRouting.psm1 +161 -0
- package/resources/lib/codex-routing/CodexTopology.psm1 +25 -2
- package/resources/lib/discovery-validation/DiscoveryAuthority.psd1 +90 -0
- package/resources/lib/discovery-validation/DiscoveryAuthority.psm1 +493 -0
- package/resources/lib/discovery-validation/DiscoveryAuthorization.psm1 +479 -0
- package/resources/lib/discovery-validation/DiscoveryCapability.psm1 +468 -0
- package/resources/lib/discovery-validation/DiscoveryEncoding.psm1 +156 -0
- package/resources/lib/discovery-validation/DiscoveryManifest.psm1 +384 -0
- package/resources/lib/discovery-validation/DiscoveryObservation.psm1 +217 -0
- package/resources/lib/discovery-validation/DiscoveryPayload.psm1 +276 -0
- package/resources/lib/discovery-validation/DiscoveryPlanning.psm1 +336 -0
- package/resources/lib/discovery-validation/DiscoveryRootGrant.psm1 +164 -0
- package/resources/lib/discovery-validation/DiscoveryStart.psm1 +440 -0
- package/resources/lib/discovery-validation/DiscoveryStartRecord.psm1 +296 -0
- package/resources/lib/discovery-validation/DiscoveryStop.psm1 +336 -0
- package/resources/lib/discovery-validation/DiscoveryToolRouting.psm1 +228 -0
- package/resources/powershell/PoshQC/PoshQC.Parallel.psm1 +452 -0
- package/resources/powershell/PoshQC/PoshQC.Shard.psm1 +106 -8
- package/resources/powershell/PoshQC/PoshQC.Testing.psm1 +12 -0
- package/resources/powershell/PoshQC/PoshQC.psd1 +6 -1
- package/resources/powershell/PoshQC/PoshQC.psm1 +7 -1
- package/resources/powershell/PoshQC/README.md +20 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: execution-environment
|
|
3
|
-
description: 'Execution-environment brief for research, planning, preflight, execution, and orchestration. Use before planning or delegating work so tool routes, command-text restrictions, the batch budget, hook context, CI shape, contract tests, evidence rules, coverage and file-size gates, and test-isolation checks are known and are not restated in plans.'
|
|
3
|
+
description: 'Execution-environment brief for research, planning, preflight, execution, and orchestration. Use before planning or delegating work so tool routes, command-text restrictions, the batch budget, hook context, CI shape, contract tests, evidence rules, coverage and file-size gates, test runtime, and test-isolation checks are known and are not restated in plans.'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Execution-Environment Brief
|
|
@@ -36,17 +36,20 @@ Two separate mechanisms restrict Bash command text. They are kept apart here bec
|
|
|
36
36
|
|
|
37
37
|
## Batch Budget
|
|
38
38
|
|
|
39
|
-
- In direct mode the batch-budget hooks allow at most three distinct production files per kind in one session: the fourth distinct non-test PowerShell file is denied with `POWERSHELL_LARGE_PATH_REQUIRED` and the fourth distinct non-test Python file with `PYTHON_LARGE_PATH_REQUIRED` (`.claude/hooks/enforce-powershell-batch-budget.ps1` and `.claude/hooks/enforce-python-batch-budget.ps1`; Codex copies under `.codex/hooks/`). Test files never count.
|
|
40
|
-
- Exemption: the cap does not apply when `artifacts/orchestration/orchestrator-state.json` in the worktree
|
|
39
|
+
- In direct mode the batch-budget hooks allow at most three distinct production files per kind in one session and one resolved worktree: the fourth distinct non-test PowerShell file is denied with `POWERSHELL_LARGE_PATH_REQUIRED` and the fourth distinct non-test Python file with `PYTHON_LARGE_PATH_REQUIRED` (`.claude/hooks/enforce-powershell-batch-budget.ps1` and `.claude/hooks/enforce-python-batch-budget.ps1`; Codex copies under `.codex/hooks/`). Test files never count.
|
|
40
|
+
- Exemption: the cap does not apply when `artifacts/orchestration/orchestrator-state.json` in the worktree containing the edited file selects the `large`, `remediation`, or `preparation` route and is not terminal (`Test-BatchBudgetLargePathRoute` in `.claude/hooks/enforce-batch-budget-route.ps1`). That worktree is resolved by `Resolve-HookTargetWorktree` in `.claude/lib/worktree-resolution/HookTargetWorktree.psm1` (Codex twin `.codex/hooks/hook-target-worktree.ps1`): an absolute path resolves to its nearest enclosing registered git worktree, and a relative path, a path in no registered worktree, or an ambiguous result uses the session root. An isolated subagent worktree has no checkpoint, because `artifacts/` is gitignored, so direct mode applies there.
|
|
41
41
|
- Bundle mirror copies under `extensions/drm-copilot/resources/` are production files and count against the cap.
|
|
42
|
-
- A scratch `.ps1` file counts when it resolves inside the worktree root. Files under `SCRATCH`, which is outside the worktree root, are discarded without consuming a slot.
|
|
42
|
+
- A scratch `.ps1` file counts when it resolves inside the worktree root and outside that root's `artifacts/` directory. Files under `SCRATCH`, which is outside the worktree root, are discarded without consuming a slot.
|
|
43
|
+
- Paths under the root-level `artifacts/` directory of the resolved worktree never count: they are allowed without consuming a slot and write no state. A nested directory named `artifacts` elsewhere in the tree still counts.
|
|
44
|
+
- Claude edits to a sibling registered worktree count against that worktree's own budget, because containment uses the resolved root; a path outside every registered worktree keeps the session root and is discarded by containment. Codex has no containment filter, so a Codex edit outside every registered worktree counts against the session root.
|
|
43
45
|
- Only `Write` and `Edit` calls are seen (the hook matcher is `Write|Edit`). Files written by Bash, by a copy script, or by a generator are not seen.
|
|
44
|
-
- Budget state is kept per session under `.claude/state
|
|
46
|
+
- Budget state is kept per session and per resolved worktree root under the session root's `.claude/state/` (Codex `.codex/state/`): the session root keeps `<kind>-batch-budget.<session id>.json`, and another worktree uses `<kind>-batch-budget.<session id>.<worktree key>.json` with the key from `Get-HookTargetWorktreeKey`. No state is written into another worktree, and there is no automatic reset.
|
|
45
47
|
|
|
46
48
|
## Hook Execution Context
|
|
47
49
|
|
|
48
50
|
- Hooks for an isolated subagent run inside the subagent's worktree with that worktree's hook scripts, which are `main`'s copies. A hook change on a branch is not exercised by isolated subagents until it merges.
|
|
49
51
|
- Hook behavior on a branch is therefore proven by Pester suites, not by a live subagent run. A live check of a branch hook needs a non-isolated delegation from the item worktree.
|
|
52
|
+
- The batch-budget hooks evaluate the checkpoint of the target worktree that `Resolve-HookTargetWorktree` resolves for the edited file, so an edit made from a coordinating session into an item worktree is evaluated against the item worktree's checkpoint. The preimplementation gate (#1010) resolves the file path of a Write or Edit call and the `-C` values and absolute operands of `git add` and `git commit` through the same resolver, and denies when the worktree listing fails or names no worktree; its delegation checks still resolve by portable identity. The PR authoring gate (#1011) resolves the branch that a `gh pr create` or `gh pr edit` command names (`--head`, `--branch`, or a `branch:` label) through the same resolver when the command carries no canonical issue number line, and otherwise keeps its portable-identity and current-branch resolution. The other gates that read `artifacts/orchestration/orchestrator-state.json` are unchanged and still use the root that holds the hook script.
|
|
50
53
|
- Enforcement hooks do not invoke Python; bash is preferred and PowerShell is acceptable (`tests/scripts/claude-runtime/enforcement-hooks-no-python-invocation.Tests.ps1`).
|
|
51
54
|
|
|
52
55
|
## MCP Surfaces Run the Installed Extension
|
|
@@ -58,12 +61,12 @@ Two separate mechanisms restrict Bash command text. They are kept apart here bec
|
|
|
58
61
|
## CI Shape and Required Checks
|
|
59
62
|
|
|
60
63
|
- `.github/workflows/ci.yml` triggers on `push` to `main` and `development`, on `pull_request` to `main`, `development`, and `epic/**`, on `workflow_dispatch`, and on `merge_group` (`types: [checks_requested]`, added by issue #952), with no path filters. When the merge queue on `main` is enabled, every required check is produced by a `merge_group` run of `ci.yml` as well as by the pull-request run; `.github/workflows/README.md` (`## Triggers`) records the trigger set.
|
|
61
|
-
- Jobs in `ci.yml` and their check names: `Change scope` (job `changes`, the change-scope decision below); `CI full run` (job `full-run-marker`, which runs only on a full run, marks that run as a valid base for later decisions, and is not a required check); `quality-checks7 / Code Quality & Tests (<python-version>)` on Python 3.
|
|
64
|
+
- Jobs in `ci.yml` and their check names: `Change scope` (job `changes`, the change-scope decision below); `CI full run` (job `full-run-marker`, which runs only on a full run, marks that run as a valid base for later decisions, and is not a required check); `quality-checks7 / Code Quality & Tests (<python-version>)` on Python 3.11, 3.12, and 3.13 (`_quality-checks.yml`: Black check, Ruff, Pyright, the Codex generator `--check`, the tier classification, and Pytest on every version; Pytest with line and branch coverage and the coverage-threshold check on the JSON report totals run on 3.13 only); `security-scan / Security Scanning` (its `safety check` step carries `continue-on-error: true` and does not fail the check); `docs-validation / Documentation Validation`; `build-check / Build Package`; `shell-coverage / Shell Coverage (Bats + kcov)`; `drm-copilot-extension-tests / drm-copilot Extension Tests (<os>)` on `ubuntu-latest` and `windows-latest`; `root-typescript-tests / Root TypeScript Tests (<os>)` on `ubuntu-latest` and `windows-latest`; `NPM Audit Gate / npm audit (<manifest>)` (the calling job carries the name `NPM Audit Gate`); and the `poshqc` group below.
|
|
62
65
|
- PowerShell CI (`_poshqc.yml`): `poshqc / PowerShell QC static` (format and analyze on `windows-latest`); the shard matrix `poshqc / PowerShell QC shard 1`, `shard 2`, and `shard 3` (`Invoke-PoshQCTest -ShardIndex -ShardCount` over the scan folders of `config/poshqc-scan.json`, with coverage, on `windows-latest`); the aggregator `poshqc / PowerShell QC`, which requires the static and shard jobs to succeed, verifies shard completeness against a Pester discovery count, and merges shard coverage; and `poshqc / PowerShell hook suites (Linux)`, which runs only `tests/scripts/claude-hooks` and `tests/scripts/codex-hooks` on `ubuntu-latest` with coverage disabled. A new test file under a scanned folder is assigned to a shard automatically and is counted by the completeness check.
|
|
63
66
|
- Change-scope decision (issue #962): the `Change scope` job runs `scripts/ci/Invoke-CiChangeScope.ps1` and publishes the job output `code`. The decision is `code=false` (docs-only) only on a `pull_request` event from this repository, through one of two comparisons. Green-run base: every file changed since the newest successful `ci.yml` run on the pull-request branch whose `CI full run` job succeeded, and whose head commit is present and an ancestor of the current head, is on the allowlist `config/ci-docs-only-paths.json`; the reason is `DOCS_ONLY_SINCE_<green head sha>`. Merge-base fallback (issue #973): when the green-run step ends with no earlier full green run (`NO_FULL_GREEN_RUN`), a missing base (`BASE_NOT_PRESENT`), or a non-ancestor base (`BASE_NOT_ANCESTOR`), and the pull request's base ref is exactly `main`, the script computes `git merge-base` of the payload base SHA (`BASE_SHA`, from `github.event.pull_request.base.sha`; the base ref arrives as `BASE_REF`) and the head, lists the files changed since that merge base with the same diff arguments, and decides `DOCS_ONLY_SINCE_MERGE_BASE_<merge base sha>` when every changed file is allowlisted. Both comparisons run the diff with rename detection off, so both the old and the new path of a rename are classified. A path is allowlisted when it starts with `docs/features/active/`, `docs/features/archive/`, `docs/features/completed/`, `docs/features/epics/`, `docs/features/parallel/`, `docs/features/potential/`, or `docs/research/`, does not start with `docs/features/templates/` or `docs/features/potential/template.md`, and ends in `.md`, `.txt`, `.log`, `.json`, or `.xml`; the allowlist file itself is not allowlisted. Every other case is a full run (`code=true`): `push`, `merge_group`, and `workflow_dispatch` events, a fork pull request, unreadable run or job data, no earlier full green run or a missing or non-ancestor base when the base ref is not `main`, a merge base that cannot be resolved (`MERGE_BASE_UNRESOLVED`, for example a blank base SHA or a base commit missing from the checkout), a failed ancestry check, an empty diff, any path outside the allowlist, and any error. The decision step carries `continue-on-error: true` and the callers compare the output with `!= 'false'`, so a failed or missing decision also gives a full run.
|
|
64
67
|
- Docs-only behavior (`code=false`): `ci.yml` passes `run-heavy: false` to `_quality-checks.yml`, `_security-scan.yml`, `_build-check.yml`, `_poshqc.yml`, `_shell-coverage.yml`, and `_drm-copilot-extension-tests.yml`. Each required job still starts under its full-run check name with every step skipped, so every required context reports `success` without running its suite. In `_poshqc.yml` the aggregator `poshqc / PowerShell QC` runs with every step gated, and `poshqc / PowerShell QC static`, the shard jobs, and `poshqc / PowerShell hook suites (Linux)` are skipped at job level. `docs-validation / Documentation Validation` runs in full. `root-typescript-tests`, `NPM Audit Gate`, and `CI full run` are skipped at job level. A `success` on a docs-only commit is therefore not evidence that the heavy suites pass for that commit; that evidence is the newest run whose `CI full run` job succeeded.
|
|
65
68
|
- A commit that changes any path outside the allowlist (any code, workflow, configuration, script, test, or customization file) runs the full set of jobs, and its `CI full run` job marks it as a base for later docs-only decisions. A standalone `workflow_dispatch` of a reusable workflow, or a caller that omits `run-heavy`, also runs in full. `.github/workflows/README.md` (`## Change-Scope Decision (Issue #962)`) records the reason codes and the per-context behavior table.
|
|
66
|
-
- Required contexts of ruleset 15241672, confirmed by the orchestrator through `gh api` on 2026-10-16: `drm-copilot-extension-tests / drm-copilot Extension Tests (ubuntu-latest)`, `drm-copilot-extension-tests / drm-copilot Extension Tests (windows-latest)`, `docs-validation / Documentation Validation`, `poshqc / PowerShell QC`, `shell-coverage / Shell Coverage (Bats + kcov)`, `security-scan / Security Scanning`, `quality-checks7 / Code Quality & Tests (3.
|
|
69
|
+
- Required contexts of ruleset 15241672, confirmed by the orchestrator through `gh api` on 2026-10-16: `drm-copilot-extension-tests / drm-copilot Extension Tests (ubuntu-latest)`, `drm-copilot-extension-tests / drm-copilot Extension Tests (windows-latest)`, `docs-validation / Documentation Validation`, `poshqc / PowerShell QC`, `shell-coverage / Shell Coverage (Bats + kcov)`, `security-scan / Security Scanning`, `quality-checks7 / Code Quality & Tests (3.11)`, `quality-checks7 / Code Quality & Tests (3.12)`, `quality-checks7 / Code Quality & Tests (3.13)`, `build-check / Build Package`.
|
|
67
70
|
- Refresh rule: a change that renames a job, adds or removes a matrix entry, or changes the ruleset refreshes this list in the same change, and the orchestrator re-confirms the contexts with a read-only `gh api repos/drmoisan/drm-copilot/rulesets/15241672` call before relying on them.
|
|
68
71
|
- Skipped-check semantics: a job skipped by an `if:` condition reports success to a required check; a workflow that does not run at all reports nothing, which leaves the required check pending.
|
|
69
72
|
- A pull request into a branch other than `main`, `development`, or `epic/**` gets no CI run; dispatch `ci.yml` manually for it.
|
|
@@ -101,7 +104,7 @@ These pass every validator rule and are found only by reading the plan against t
|
|
|
101
104
|
- A checkbox diff-pair assertion against a file the plan adds, and a CRLF fixture under the `eol=lf` attribute rule.
|
|
102
105
|
- A new TypeScript production file without its own `coverageThreshold` entry in `extensions/drm-copilot/jest.config.cjs`, whose threshold map has per-file entries only and no `global` key.
|
|
103
106
|
- A per-file coverage floor asserted for code that the tests replace with blanket mocks.
|
|
104
|
-
- Batch-budget exhaustion
|
|
107
|
+
- Batch-budget exhaustion within one worktree over a session, and an acceptance condition that depends on a branch hook being exercised by an isolated subagent.
|
|
105
108
|
- `origin/main` advancing during planning: scope diffs anchor on the merge base of `origin/main` and `HEAD`, never on `origin/main` itself.
|
|
106
109
|
- `Measure-Object -Line` counts non-empty lines only; physical line counts use `wc -l` or `@(Get-Content -LiteralPath <path>).Count`.
|
|
107
110
|
- A coverage argument written as a filesystem path measures nothing; the dotted module form is required, and branch figures come from the JSON report, not the combined terminal column.
|
|
@@ -124,6 +127,17 @@ These pass every validator rule and are found only by reading the plan against t
|
|
|
124
127
|
- PowerShell: per-file line coverage is read from `artifacts/pester/powershell-coverage.xml` written by the self-hosted PoshQC module.
|
|
125
128
|
- File size follows three tiers for production, test, and reusable script files, counted in logical lines (a trailing terminator adds no line): at 500 lines look for a logical split (guidance); at 700 lines split more aggressively, and reviewers report a non-blocking Warning (advisory); above 800 lines a split is enforced regardless of logical separability (hard limit; exactly 800 passes). The hard limit is enforced by `tests/scripts/ci/FileSizePolicy.RepoGate.Tests.ps1` in the existing PowerShell shards against `config/file-size-baseline.json`, where legacy files above 800 may shrink (with the entry tightened) or stay equal but may not grow, and by the PreToolUse hook `.claude/hooks/enforce-file-size-limit.ps1` (`.codex/hooks/enforce-file-size-limit.ps1`). New logic in a file near a tier goes into a new module and a new test file. Markdown is exempt.
|
|
126
129
|
|
|
130
|
+
## Test Runtime
|
|
131
|
+
|
|
132
|
+
- A unit test runs in milliseconds. A full suite above about 15 minutes, or a single unit test above about 10 seconds, indicates repeated work in the code under test or its fixtures, not missing parallelism.
|
|
133
|
+
- Diagnose before proposing sharding or parallel workers. First aggregate per-test and per-module time from the JUnit report that the full run already writes (`--junitxml`); a small fraction of tests usually holds most of the time. Then run the slowest test under a profiler (`python -m cProfile -o <file> -m pytest <node id>`) and read the profile with `pstats`.
|
|
134
|
+
- Fix repeated production work first. An immutable structure, such as a schema registry that is rebuilt and re-verified on every call, is built once per owning instance. This speeds up the runtime as well as the tests.
|
|
135
|
+
- Second, build an expensive immutable fixture once per session and hand each test its own copy wherever a test could mutate it, so test independence is unchanged.
|
|
136
|
+
- Parallel workers reduce wall-clock time only: they are capped by the slowest test and leave the cost in the product.
|
|
137
|
+
- pytest: pass `-n auto` (pytest-xdist) on the command line of the CI step `Run tests with Pytest` and of the parallel VS Code tasks, never in `addopts`, because the VS Code Test Explorer keys results to the wrong file when `addopts` carries it. `-n auto` counts physical cores, so a runner can start fewer workers than it has vCPUs; measure it against an explicit count such as `-n 4` before keeping it. pytest-cov combines the worker coverage into one report, and the serial `poetry run pytest` command remains the isolation reference.
|
|
138
|
+
- Pester: Pester 5 has no in-process parallel mode, so parallel Pester runs are process-per-shard: `Invoke-PoshQCTest -ShardIndex -ShardCount` on the CI runners and `Invoke-PoshQCParallelTest` locally. Read the per-file `time` of the JUnit `testsuite` elements before changing the shard count or the weights in `config/poshqc-shard-weights.json`.
|
|
139
|
+
- A candidate fix can be measured before the tree is edited by loading a pytest plugin module from `SCRATCH` with `-p <module>` and `PYTHONPATH`.
|
|
140
|
+
|
|
127
141
|
## Test Isolation Checks
|
|
128
142
|
|
|
129
143
|
- Tests create no temporary files; file and transcript reads go through injected seams with in-memory content.
|
|
@@ -131,5 +145,6 @@ These pass every validator rule and are found only by reading the plan against t
|
|
|
131
145
|
- a seeded shuffled Jest run (`node run-jest.cjs --randomize --seed=<n>` in `extensions/drm-copilot/`) with the seed recorded;
|
|
132
146
|
- a reversed-order run of the new or changed Python test modules in one process;
|
|
133
147
|
- a seeded shuffled file-order run of the touched Pester suites in one process, with at least three seeds and each seed and its file order recorded;
|
|
134
|
-
- a fresh single-process Pester run over `tests/scripts`, which is the CI shape
|
|
148
|
+
- a fresh single-process Pester run over `tests/scripts`, which is the CI shape;
|
|
149
|
+
- in addition to the serial runs, a concurrent-shard Pester run through `Invoke-PoshQCParallelTest` and a `pytest -n auto` run, both with zero failures.
|
|
135
150
|
- An order dependence found by any run is fixed on both sides: the suite that leaves state behind (globals, functions, environment variables, mocks, imported modules, script-scope state) and the suite that assumes prior state. Every seed is then re-run.
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: extract-feature-contract
|
|
3
|
+
description: 'Extract evidence-backed feature contracts for selected legacy components and record unresolved behavior. Use when asked to document a feature contract from source, tests, documentation and supplied evidence.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Extract Feature Contract
|
|
7
|
+
|
|
8
|
+
## When to Use This Skill
|
|
9
|
+
|
|
10
|
+
Use for selected component or feature extraction after scope and source references are supplied. This workflow records source behavior without approving a target design.
|
|
11
|
+
|
|
12
|
+
## Inputs
|
|
13
|
+
|
|
14
|
+
These are human-facing workflow selections, not additional service-request fields.
|
|
15
|
+
Supply explicit selections; neither omitted inputs nor profile roots create authority.
|
|
16
|
+
|
|
17
|
+
| Input | Required contract |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| profile | Required validated profile and trusted workspace binding. |
|
|
20
|
+
| component_ids | Required explicit selected components; preserve unrelated coverage members. |
|
|
21
|
+
| feature_ids | Required explicit feature IDs, including IDs for proposed new contracts. |
|
|
22
|
+
| source_refs | Required selected source references with revision/content identity. |
|
|
23
|
+
| test_refs | Required explicit selection or honest empty set of relevant test references. |
|
|
24
|
+
| documentation_refs | Required explicit selection or honest empty set of documentation references. |
|
|
25
|
+
| evidence_refs | Required explicit selection or honest empty set of supplied evidence references. |
|
|
26
|
+
|
|
27
|
+
## Routing
|
|
28
|
+
|
|
29
|
+
Logical role: `legacy-parity-analyst`.
|
|
30
|
+
The root owns preparation and launch; this skill never auto-launches a logical
|
|
31
|
+
role through frontmatter. The existing resolver selects the exact deployment,
|
|
32
|
+
model, effort and profile hash under the existing C1-C4 ceiling and execution
|
|
33
|
+
context. Do not choose a model, self-launch, create another scheduler or promote
|
|
34
|
+
an ordinary discovery action into an issue. The production-write count is zero.
|
|
35
|
+
|
|
36
|
+
## Exact output boundary
|
|
37
|
+
|
|
38
|
+
These rows are maximum workflow caps, not instructions to create every kind.
|
|
39
|
+
Only the prepared required outputs may be created or replaced.
|
|
40
|
+
|
|
41
|
+
| Artifact kind | Profile key | Constraint |
|
|
42
|
+
| --- | --- | --- |
|
|
43
|
+
| feature-contract | feature_contracts | Selected feature IDs only |
|
|
44
|
+
| coverage-ledger | coverage_ledger | Selected component dispositions only |
|
|
45
|
+
| evidence-reference | evidence | Explicitly granted supporting evidence only |
|
|
46
|
+
| unspecified-behavior | unspecified_behaviors | Selected unresolved IDs only |
|
|
47
|
+
| unspecified-behavior-collection | unspecified_behaviors | Selected unresolved members only |
|
|
48
|
+
| required-output-manifest | reports | Exact invocation manifest only |
|
|
49
|
+
|
|
50
|
+
The profile keys are maximum configured locations, not write grants. Each
|
|
51
|
+
prepared output row binds `artifact_kind`, `id`, `path`, `format` and
|
|
52
|
+
`expected_sha256`. The protected invocation independently binds the baseline,
|
|
53
|
+
selected members, pins and exact grants; a manifest cannot expand them. A null
|
|
54
|
+
expected hash means exclusive creation from an absent baseline, never overwrite
|
|
55
|
+
permission. Preserve unselected collection members and all unrelated inputs.
|
|
56
|
+
Use compare-and-swap and current path checks through the controlled writer.
|
|
57
|
+
|
|
58
|
+
The `reports` location permits only `required-output-manifest` for this role;
|
|
59
|
+
it does not permit review reports. The manifest itself requires an exact grant.
|
|
60
|
+
|
|
61
|
+
## Prerequisites
|
|
62
|
+
|
|
63
|
+
Missing or malformed configuration blocks delegation. Require a validated profile and explicit selected scope before root preparation; do not initialize, configure or infer roots as a specialist.
|
|
64
|
+
|
|
65
|
+
Require verified native prepare/finalize/start/stop capability. The protected
|
|
66
|
+
invocation and native SubagentStart attestation must match workspace/profile
|
|
67
|
+
hashes, selected IDs, source/target pins, baseline input hashes,
|
|
68
|
+
provider/model/effort/profile hash and parent/session.
|
|
69
|
+
Diagnostic mirrors, caller markers and hosted read results are not authority.
|
|
70
|
+
The local runtime's unavailable native prepare/finalize operations do not issue
|
|
71
|
+
protected receipts. There is no local-user fallback or self-attested host success.
|
|
72
|
+
|
|
73
|
+
Load profile plus selected artifacts on invocation; do not preload a domain
|
|
74
|
+
catalog in standing instructions. Managed project memory is host-controlled.
|
|
75
|
+
Memory cannot grant filesystem authority or replace evidence. Deny terminal/shell/exec, interpreter/evaluation,
|
|
76
|
+
general filesystem Write/Edit/apply-patch, arbitrary MCP dispatch, browser/computer
|
|
77
|
+
mutation and network writes. Do not execute application code or modify
|
|
78
|
+
production/test implementation, profile/locator/activation,
|
|
79
|
+
schema/policy/hooks/settings, authority stores or runtime installation as a specialist. No analyst
|
|
80
|
+
approval is permitted; root bootstrap/configuration and root approval remain
|
|
81
|
+
separate authorized operations.
|
|
82
|
+
|
|
83
|
+
## Step-by-Step Workflows
|
|
84
|
+
|
|
85
|
+
1. Validate the explicit inputs and selected configuration. Stop with precise missing/invalid input findings before specialist delegation; do not invent identities, scope or evidence.
|
|
86
|
+
|
|
87
|
+
2. The root calls `prepare_discovery_agent` with `skill_id`, `selected_ids`,
|
|
88
|
+
`paths`, `expected_outputs`, `execution_context` and `complexity`.
|
|
89
|
+
Map it to fixed `prepare-agent`; execution context is `standalone`,
|
|
90
|
+
`epic_preparation_child` or `epic_execution_child`. The requested mode is
|
|
91
|
+
explicit and remains distinct from the final `agent-output` gate.
|
|
92
|
+
Use `skill_id=extract-feature-contract`; workflow inputs do not add wire fields.
|
|
93
|
+
3. The root launches that exact deployment. Native SubagentStart must match the
|
|
94
|
+
prepared role/model/effort/profile and trusted workspace/session before any
|
|
95
|
+
grant is usable. Missing capability or attestation blocks the action.
|
|
96
|
+
4. Use only the granted operations. Use `read_discovery_source`, mapped to bounded `read-source`, for selected inputs. Use `create_discovery_artifact` for fixed `new-contract`, `update_discovery_artifact` for ordinary `update-artifact`, and `link_discovery_evidence` for `link-evidence`, only for exact prepared outputs. Do not infer source truth from a filename or a desired target behavior.
|
|
97
|
+
5. Account for every selected component/feature ID. Distinguish verified observations, inference and unknown facts; preserve precise source/evidence references and unresolved questions. Record unknown or contradictory behavior as unresolved. Never convert source facts into approved target requirements. Update only the selected coverage dispositions justified by inspection. Do not invent product decisions, target implementation evidence or successful runtime results.
|
|
98
|
+
6. Produce every exact required output and the stored `required-output-manifest`,
|
|
99
|
+
preserving its output array order for the digest. Validate claims, references,
|
|
100
|
+
pins and selected-ID accounting. Purpose-built tools supply authorized proposal
|
|
101
|
+
inputs for `input_path`/`evidence_path`; never invent a generic Write staging
|
|
102
|
+
step. Server-side role checks, exact one-use authorization and prospective
|
|
103
|
+
validation remain mandatory. Bounded source reads preserve content identity
|
|
104
|
+
and line ranges; truncation requires a narrower selection, not a completeness
|
|
105
|
+
claim or filesystem fallback.
|
|
106
|
+
7. Call `finalize_discovery_agent` as the specialist, mapped to `finalize-agent`
|
|
107
|
+
with `mode=agent-output`, non-null `invocation_ref` and no operation inputs.
|
|
108
|
+
It validates the protected invocation's outputs, not final-message paths.
|
|
109
|
+
Native SubagentStop then verifies current output authority.
|
|
110
|
+
Missing final text cannot skip native stop validation.
|
|
111
|
+
8. After native stop, the root records the explicit result, content-addressed artifact references,
|
|
112
|
+
selected-ID accounting and all findings. A successful tool call or generated
|
|
113
|
+
path alone is not evidence of completed discovery.
|
|
114
|
+
|
|
115
|
+
## Stop and result
|
|
116
|
+
|
|
117
|
+
Return selected contract IDs and evidence digests with unresolved work. A structurally valid draft may be useful incremental output without satisfying discovery or planning completion.
|
|
118
|
+
|
|
119
|
+
Structural success is not discovery, parity or planning completion.
|
|
120
|
+
Missing prepare/finalize/start/stop capability, missing outputs, invalid claims,
|
|
121
|
+
unresolved required work, wrong role/model/start context or a stale/missing
|
|
122
|
+
receipt blocks successful completion. Return explicit
|
|
123
|
+
PASS, FAIL or BLOCKED, distinguishing valid incremental outputs from a passing
|
|
124
|
+
completion gate. Missing native enforcement remains BLOCKED even when ordinary
|
|
125
|
+
local-user operations can run; do not substitute CLI success for native authority.
|
|
126
|
+
|
|
127
|
+
## References
|
|
128
|
+
|
|
129
|
+
- [Canonical legacy-parity-analyst contract](../../agents/legacy-parity-analyst.agent.md)
|
|
130
|
+
- Installed v2 `service-request` and `required-output-manifest` schema contracts;
|
|
131
|
+
consume them through the authoritative runtime, with no checkout-schema fallback.
|
|
132
|
+
- The selected profile and pinned local artifacts supplied for this invocation;
|
|
133
|
+
references do not preload catalogs or grant access to unselected paths.
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: generate-acceptance-scenarios
|
|
3
|
+
description: 'Generate traceable acceptance specifications, eligible views and explicit pending material. Use when asked to derive acceptance scenarios from confirmed contracts and approved decisions.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Generate Acceptance Scenarios
|
|
7
|
+
|
|
8
|
+
## When to Use This Skill
|
|
9
|
+
|
|
10
|
+
Use for an explicit acceptance selection and requested render format. Generated specifications define requirements; they do not prove implementation.
|
|
11
|
+
|
|
12
|
+
## Inputs
|
|
13
|
+
|
|
14
|
+
These are human-facing workflow selections, not additional service-request fields.
|
|
15
|
+
Supply explicit selections; neither omitted inputs nor profile roots create authority.
|
|
16
|
+
|
|
17
|
+
| Input | Required contract |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| profile | Required validated profile and trusted workspace binding. |
|
|
20
|
+
| contract_refs | Required confirmed contract references and source pins. |
|
|
21
|
+
| approved_decision_refs | Required applicable approved decisions or an explicit empty selection. |
|
|
22
|
+
| kind | Required supported acceptance kind. |
|
|
23
|
+
| feature_filter | Optional explicit selected features; absence uses only the prepared selection. |
|
|
24
|
+
| client_filter | Optional explicit selected clients; absence uses only the prepared selection. |
|
|
25
|
+
| platform_filter | Optional explicit selected platforms; preserve platform identity. |
|
|
26
|
+
| mode_filter | Optional explicit selected modes; preserve declared mode identity. |
|
|
27
|
+
| format | Required explicit supported render format; expected outputs bind each actual serialization format. |
|
|
28
|
+
|
|
29
|
+
## Routing
|
|
30
|
+
|
|
31
|
+
Logical role: `requirements-reconciler`.
|
|
32
|
+
The root owns preparation and launch; this skill never auto-launches a logical
|
|
33
|
+
role through frontmatter. The existing resolver selects the exact deployment,
|
|
34
|
+
model, effort and profile hash under the existing C1-C4 ceiling and execution
|
|
35
|
+
context. Do not choose a model, self-launch, create another scheduler or promote
|
|
36
|
+
an ordinary discovery action into an issue. The production-write count is zero.
|
|
37
|
+
|
|
38
|
+
## Exact output boundary
|
|
39
|
+
|
|
40
|
+
These rows are maximum workflow caps, not instructions to create every kind.
|
|
41
|
+
Only the prepared required outputs may be created or replaced.
|
|
42
|
+
|
|
43
|
+
| Artifact kind | Profile key | Constraint |
|
|
44
|
+
| --- | --- | --- |
|
|
45
|
+
| acceptance-specification | acceptance | Selected structured specifications and pending records |
|
|
46
|
+
| acceptance-view | acceptance | Selected eligible Markdown/Gherkin views or pending material |
|
|
47
|
+
| required-output-manifest | reports | Exact invocation manifest only |
|
|
48
|
+
|
|
49
|
+
The profile keys are maximum configured locations, not write grants. Each
|
|
50
|
+
prepared output row binds `artifact_kind`, `id`, `path`, `format` and
|
|
51
|
+
`expected_sha256`. The protected invocation independently binds the baseline,
|
|
52
|
+
selected members, pins and exact grants; a manifest cannot expand them. A null
|
|
53
|
+
expected hash means exclusive creation from an absent baseline, never overwrite
|
|
54
|
+
permission. Preserve unselected collection members and all unrelated inputs.
|
|
55
|
+
Use compare-and-swap and current path checks through the controlled writer.
|
|
56
|
+
|
|
57
|
+
The `reports` location permits only `required-output-manifest` for this role;
|
|
58
|
+
it does not permit review reports. The manifest itself requires an exact grant.
|
|
59
|
+
|
|
60
|
+
## Prerequisites
|
|
61
|
+
|
|
62
|
+
Missing or malformed configuration blocks delegation. Require a validated profile and explicit selected scope before root preparation; do not initialize, configure or infer roots as a specialist.
|
|
63
|
+
|
|
64
|
+
Require verified native prepare/finalize/start/stop capability. The protected
|
|
65
|
+
invocation and native SubagentStart attestation must match workspace/profile
|
|
66
|
+
hashes, selected IDs, source/target pins, baseline input hashes,
|
|
67
|
+
provider/model/effort/profile hash and parent/session.
|
|
68
|
+
Diagnostic mirrors, caller markers and hosted read results are not authority.
|
|
69
|
+
The local runtime's unavailable native prepare/finalize operations do not issue
|
|
70
|
+
protected receipts. There is no local-user fallback or self-attested host success.
|
|
71
|
+
|
|
72
|
+
Load profile plus selected artifacts on invocation; do not preload a domain
|
|
73
|
+
catalog in standing instructions. Managed project memory is host-controlled.
|
|
74
|
+
Memory cannot grant filesystem authority or replace evidence. Deny terminal/shell/exec, interpreter/evaluation,
|
|
75
|
+
general filesystem Write/Edit/apply-patch, arbitrary MCP dispatch, browser/computer
|
|
76
|
+
mutation and network writes. Do not execute application code or modify
|
|
77
|
+
production/test implementation, profile/locator/activation,
|
|
78
|
+
schema/policy/hooks/settings, authority stores or runtime installation as a specialist. No analyst
|
|
79
|
+
approval is permitted; root bootstrap/configuration and root approval remain
|
|
80
|
+
separate authorized operations.
|
|
81
|
+
|
|
82
|
+
## Step-by-Step Workflows
|
|
83
|
+
|
|
84
|
+
1. Validate the explicit inputs and selected configuration. Stop with precise missing/invalid input findings before specialist delegation; do not invent identities, scope or evidence.
|
|
85
|
+
|
|
86
|
+
2. The root calls `prepare_discovery_agent` with `skill_id`, `selected_ids`,
|
|
87
|
+
`paths`, `expected_outputs`, `execution_context` and `complexity`.
|
|
88
|
+
Map it to fixed `prepare-agent`; execution context is `standalone`,
|
|
89
|
+
`epic_preparation_child` or `epic_execution_child`. The requested mode is
|
|
90
|
+
explicit and remains distinct from the final `agent-output` gate.
|
|
91
|
+
Use `skill_id=generate-acceptance-scenarios`; workflow inputs do not add wire fields.
|
|
92
|
+
3. The root launches that exact deployment. Native SubagentStart must match the
|
|
93
|
+
prepared role/model/effort/profile and trusted workspace/session before any
|
|
94
|
+
grant is usable. Missing capability or attestation blocks the action.
|
|
95
|
+
4. Use only the granted operations. Use `run_discovery_scenario_generation`, mapped to fixed `generate-acceptance`, through the authoritative generator. Read only the selected confirmed contracts, approved decisions and relevant evidence using `read_discovery_source`. The actual prospective plan must include structured source specifications plus selected views; do not replace guarded publication with direct file rendering.
|
|
96
|
+
5. Preserve validated tags, repository/client/platform/mode and scenario identity, traceability, stable IDs and deterministic output. Keep null unresolved expectations and explicit pending material. Emit eligible Markdown/Gherkin views only; a pending specification cannot become ready through a format change. Derived criteria do not authorize `feature_contracts` writes. Do not alter observed source facts, approve decisions or check off implementation criteria; generated specifications are not implementation or runtime evidence.
|
|
97
|
+
6. Produce every exact required output and the stored `required-output-manifest`,
|
|
98
|
+
preserving its output array order for the digest. Validate claims, references,
|
|
99
|
+
pins and selected-ID accounting. Purpose-built tools supply authorized proposal
|
|
100
|
+
inputs for `input_path`/`evidence_path`; never invent a generic Write staging
|
|
101
|
+
step. Server-side role checks, exact one-use authorization and prospective
|
|
102
|
+
validation remain mandatory. Bounded source reads preserve content identity
|
|
103
|
+
and line ranges; truncation requires a narrower selection, not a completeness
|
|
104
|
+
claim or filesystem fallback.
|
|
105
|
+
7. Call `finalize_discovery_agent` as the specialist, mapped to `finalize-agent`
|
|
106
|
+
with `mode=agent-output`, non-null `invocation_ref` and no operation inputs.
|
|
107
|
+
It validates the protected invocation's outputs, not final-message paths.
|
|
108
|
+
Native SubagentStop then verifies current output authority.
|
|
109
|
+
Missing final text cannot skip native stop validation.
|
|
110
|
+
8. After native stop, the root records the explicit result, content-addressed artifact references,
|
|
111
|
+
selected-ID accounting and all findings. A successful tool call or generated
|
|
112
|
+
path alone is not evidence of completed discovery.
|
|
113
|
+
|
|
114
|
+
## Stop and result
|
|
115
|
+
|
|
116
|
+
Return structured ready and pending counts, content-addressed records/views and findings. Generated acceptance specifications are not implementation or runtime evidence and do not satisfy completion by themselves.
|
|
117
|
+
|
|
118
|
+
Structural success is not discovery, parity or planning completion.
|
|
119
|
+
Missing prepare/finalize/start/stop capability, missing outputs, invalid claims,
|
|
120
|
+
unresolved required work, wrong role/model/start context or a stale/missing
|
|
121
|
+
receipt blocks successful completion. Return explicit
|
|
122
|
+
PASS, FAIL or BLOCKED, distinguishing valid incremental outputs from a passing
|
|
123
|
+
completion gate. Missing native enforcement remains BLOCKED even when ordinary
|
|
124
|
+
local-user operations can run; do not substitute CLI success for native authority.
|
|
125
|
+
|
|
126
|
+
## References
|
|
127
|
+
|
|
128
|
+
- [Canonical requirements-reconciler contract](../../agents/requirements-reconciler.agent.md)
|
|
129
|
+
- Installed v2 `service-request` and `required-output-manifest` schema contracts;
|
|
130
|
+
consume them through the authoritative runtime, with no checkout-schema fallback.
|
|
131
|
+
- The selected profile and pinned local artifacts supplied for this invocation;
|
|
132
|
+
references do not preload catalogs or grant access to unselected paths.
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: initialize-discovery-workspace
|
|
3
|
+
description: 'Initialize or explicitly configure a discovery workspace through root-owned operations before constrained review. Use when asked to bootstrap a discovery workspace or preview its initial structure.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Initialize Discovery Workspace
|
|
7
|
+
|
|
8
|
+
## When to Use This Skill
|
|
9
|
+
|
|
10
|
+
Use when a workspace needs explicit bootstrap inputs or controlled configuration. Missing initial configuration is allowed only for the root bootstrap stage.
|
|
11
|
+
|
|
12
|
+
## Inputs
|
|
13
|
+
|
|
14
|
+
These are human-facing workflow selections, not additional service-request fields.
|
|
15
|
+
Supply explicit selections; neither omitted inputs nor profile roots create authority.
|
|
16
|
+
|
|
17
|
+
| Input | Required contract |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| system_id | Required explicit system identity, independently of system_name. |
|
|
20
|
+
| system_name | Required explicit display name; do not infer it from repository paths. |
|
|
21
|
+
| repository_id | Required explicit repository identity. |
|
|
22
|
+
| repository_role | Required explicit supported repository role. |
|
|
23
|
+
| roots | Required explicit source/test/documentation and other applicable roots, or honest draft choices. |
|
|
24
|
+
| draft_inputs | Optional explicit draft/unknown inputs when completeness is not established. |
|
|
25
|
+
| dry_run | Required explicit preview intent; dry-run creates no configuration or authority. |
|
|
26
|
+
| profile_selection | Optional explicit profile selection for root configure; no ancestor or checkout inference. |
|
|
27
|
+
|
|
28
|
+
## Routing
|
|
29
|
+
|
|
30
|
+
Logical role: `migration-coverage-reviewer`.
|
|
31
|
+
The root owns preparation and launch; this skill never auto-launches a logical
|
|
32
|
+
role through frontmatter. The existing resolver selects the exact deployment,
|
|
33
|
+
model, effort and profile hash under the existing C1-C4 ceiling and execution
|
|
34
|
+
context. Do not choose a model, self-launch, create another scheduler or promote
|
|
35
|
+
an ordinary discovery action into an issue. The production-write count is zero.
|
|
36
|
+
|
|
37
|
+
## Exact output boundary
|
|
38
|
+
|
|
39
|
+
These rows are maximum workflow caps, not instructions to create every kind.
|
|
40
|
+
Only the prepared required outputs may be created or replaced.
|
|
41
|
+
|
|
42
|
+
| Artifact kind | Profile key | Constraint |
|
|
43
|
+
| --- | --- | --- |
|
|
44
|
+
| validation-report | reports | Exact projected/resulting structural review |
|
|
45
|
+
| coverage-report | reports | Exact projected/resulting structural review |
|
|
46
|
+
| required-output-manifest | reports | Exact invocation manifest only |
|
|
47
|
+
|
|
48
|
+
The profile keys are maximum configured locations, not write grants. Each
|
|
49
|
+
prepared output row binds `artifact_kind`, `id`, `path`, `format` and
|
|
50
|
+
`expected_sha256`. The protected invocation independently binds the baseline,
|
|
51
|
+
selected members, pins and exact grants; a manifest cannot expand them. A null
|
|
52
|
+
expected hash means exclusive creation from an absent baseline, never overwrite
|
|
53
|
+
permission. Preserve unselected collection members and all unrelated inputs.
|
|
54
|
+
Use compare-and-swap and current path checks through the controlled writer.
|
|
55
|
+
|
|
56
|
+
Only exact selected reports and the invocation manifest may be written. A profile
|
|
57
|
+
report root and a validation report pair never grant report-root-wide writes.
|
|
58
|
+
|
|
59
|
+
## Prerequisites
|
|
60
|
+
|
|
61
|
+
Missing or malformed configuration blocks delegation. This is the sole missing-profile bootstrap exception: only the root may call `run_discovery_init`/`configure_discovery_workspace` with explicit inputs. Validate any existing configuration; do not bypass malformed state. Root configuration outputs are outside the reviewer's output table and grants. A missing valid projected/resulting context blocks reviewer preparation.
|
|
62
|
+
|
|
63
|
+
Require verified native prepare/finalize/start/stop capability. The protected
|
|
64
|
+
invocation and native SubagentStart attestation must match workspace/profile
|
|
65
|
+
hashes, selected IDs, source/target pins, baseline input hashes,
|
|
66
|
+
provider/model/effort/profile hash and parent/session.
|
|
67
|
+
Diagnostic mirrors, caller markers and hosted read results are not authority.
|
|
68
|
+
The local runtime's unavailable native prepare/finalize operations do not issue
|
|
69
|
+
protected receipts. There is no local-user fallback or self-attested host success.
|
|
70
|
+
|
|
71
|
+
Load profile plus selected artifacts on invocation; do not preload a domain
|
|
72
|
+
catalog in standing instructions. Managed project memory is host-controlled.
|
|
73
|
+
Memory cannot grant filesystem authority or replace evidence. Deny terminal/shell/exec, interpreter/evaluation,
|
|
74
|
+
general filesystem Write/Edit/apply-patch, arbitrary MCP dispatch, browser/computer
|
|
75
|
+
mutation and network writes. Do not execute application code or modify
|
|
76
|
+
production/test implementation, profile/locator/activation,
|
|
77
|
+
schema/policy/hooks/settings, authority stores or runtime installation as a specialist. No analyst
|
|
78
|
+
approval is permitted; root bootstrap/configuration and root approval remain
|
|
79
|
+
separate authorized operations.
|
|
80
|
+
|
|
81
|
+
## Step-by-Step Workflows
|
|
82
|
+
|
|
83
|
+
1. The root validates explicit bootstrap inputs, calls `run_discovery_init` mapped to `init`, and uses `configure_discovery_workspace` mapped to `configure` only for explicit profile selection/activation. Preserve no-overwrite conflict/skip behavior and dry-run no-effects semantics. Do not inspect ancestors or read arbitrary templates. Obtain a valid projected/resulting configuration before preparing the reviewer; a dry-run projection is not an activated workspace or host authority.
|
|
84
|
+
|
|
85
|
+
2. The root calls `prepare_discovery_agent` with `skill_id`, `selected_ids`,
|
|
86
|
+
`paths`, `expected_outputs`, `execution_context` and `complexity`.
|
|
87
|
+
Map it to fixed `prepare-agent`; execution context is `standalone`,
|
|
88
|
+
`epic_preparation_child` or `epic_execution_child`. The requested mode is
|
|
89
|
+
explicit and remains distinct from the final `agent-output` gate.
|
|
90
|
+
Use `skill_id=initialize-discovery-workspace`; workflow inputs do not add wire fields.
|
|
91
|
+
3. The root launches that exact deployment. Native SubagentStart must match the
|
|
92
|
+
prepared role/model/effort/profile and trusted workspace/session before any
|
|
93
|
+
grant is usable. Missing capability or attestation blocks the action.
|
|
94
|
+
4. Use only the granted operations. After root bootstrap, the reviewer uses `validate_discovery_artifacts` for the exact projected/resulting structural review and its selected report pair. The reviewer writes exact reports, never configuration, and never receives profile, locator, activation, authority or installation writes. If the native provider cannot prepare a review for the valid projected context, return BLOCKED instead of inventing a persisted profile.
|
|
95
|
+
5. A truthful initialized draft may pass structural validation while discovery-complete, parity-complete and planning remain blocked. Review only root-supplied projected/resulting inputs and exact reports; preserve draft/unknown markers and empty-scope distinctions. Root local-user CLI success cannot serve as a native reviewer invocation or protected receipt.
|
|
96
|
+
6. Produce every exact required output and the stored `required-output-manifest`,
|
|
97
|
+
preserving its output array order for the digest. Validate claims, references,
|
|
98
|
+
pins and selected-ID accounting. Purpose-built tools supply authorized proposal
|
|
99
|
+
inputs for `input_path`/`evidence_path`; never invent a generic Write staging
|
|
100
|
+
step. Server-side role checks, exact one-use authorization and prospective
|
|
101
|
+
validation remain mandatory. Bounded source reads preserve content identity
|
|
102
|
+
and line ranges; truncation requires a narrower selection, not a completeness
|
|
103
|
+
claim or filesystem fallback.
|
|
104
|
+
7. Call `finalize_discovery_agent` as the specialist, mapped to `finalize-agent`
|
|
105
|
+
with `mode=agent-output`, non-null `invocation_ref` and no operation inputs.
|
|
106
|
+
It validates the protected invocation's outputs, not final-message paths.
|
|
107
|
+
Native SubagentStop then verifies current output authority.
|
|
108
|
+
Missing final text cannot skip native stop validation.
|
|
109
|
+
8. After native stop, the root records the explicit result, content-addressed artifact references,
|
|
110
|
+
selected-ID accounting and all findings. A successful tool call or generated
|
|
111
|
+
path alone is not evidence of completed discovery.
|
|
112
|
+
|
|
113
|
+
## Stop and result
|
|
114
|
+
|
|
115
|
+
Return root initialization/configuration results and the separately authorized reviewer result. If a preview leaves required stored outputs absent, finalization remains blocked; never fabricate writes or receipts. A dry-run or draft structure is not completed discovery; unavailable reviewer capability remains an explicit block even if root bootstrap succeeded.
|
|
116
|
+
|
|
117
|
+
Structural success is not discovery, parity or planning completion.
|
|
118
|
+
Missing prepare/finalize/start/stop capability, missing outputs, invalid claims,
|
|
119
|
+
unresolved required work, wrong role/model/start context or a stale/missing
|
|
120
|
+
receipt blocks successful completion. Return explicit
|
|
121
|
+
PASS, FAIL or BLOCKED, distinguishing valid incremental outputs from a passing
|
|
122
|
+
completion gate. Missing native enforcement remains BLOCKED even when ordinary
|
|
123
|
+
local-user operations can run; do not substitute CLI success for native authority.
|
|
124
|
+
|
|
125
|
+
## References
|
|
126
|
+
|
|
127
|
+
- [Canonical migration-coverage-reviewer contract](../../agents/migration-coverage-reviewer.agent.md)
|
|
128
|
+
- Installed v2 `service-request` and `required-output-manifest` schema contracts;
|
|
129
|
+
consume them through the authoritative runtime, with no checkout-schema fallback.
|
|
130
|
+
- The selected profile and pinned local artifacts supplied for this invocation;
|
|
131
|
+
references do not preload catalogs or grant access to unselected paths.
|