중간 저장
This commit is contained in:
29
plugins/cut-design-debugger/.codex-plugin/plugin.json
Normal file
29
plugins/cut-design-debugger/.codex-plugin/plugin.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "cut-design-debugger",
|
||||
"version": "0.1.0",
|
||||
"description": "Repository-local tools for changing and validating Tornado3/Karisma election cuts.",
|
||||
"keywords": [
|
||||
"tornado3",
|
||||
"karisma",
|
||||
"election-cuts"
|
||||
],
|
||||
"skills": "./skills/",
|
||||
"interface": {
|
||||
"displayName": "Cut Design Debugger",
|
||||
"shortDescription": "Modify, inspect, and validate Tornado3 election cuts.",
|
||||
"longDescription": "Use repo-local skills and validation wrappers to change cut layouts, debug scene mappings, and verify Karisma output.",
|
||||
"developerName": "Repo Local",
|
||||
"category": "Productivity",
|
||||
"capabilities": [
|
||||
"Interactive",
|
||||
"Write",
|
||||
"Debug"
|
||||
],
|
||||
"defaultPrompt": [
|
||||
"Inspect this cut and make the smallest safe design change.",
|
||||
"Find why this cut is missing scene values or assets.",
|
||||
"Run validation for this cut and summarize what failed."
|
||||
],
|
||||
"brandColor": "#2563EB"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
name: cut-design-debugger
|
||||
description: Modify and validate Tornado3/Karisma election cut designs in this repository. Use when Codex needs to change a cut layout or asset mapping, troubleshoot scene-variable visibility or style issues, inspect T3_Cut scene behavior, or run repo-local validation after a cut change.
|
||||
---
|
||||
|
||||
# Cut Design Debugger
|
||||
|
||||
Use this skill to make the smallest safe change to a cut-related workflow, then validate it with the repo's existing Karisma tools.
|
||||
|
||||
## Workflow
|
||||
|
||||
1. Identify the target before editing.
|
||||
- Confirm the requested template, cut, channel, and visible symptom.
|
||||
- Search the repo spec first: `SYSTEM_SPEC.md`, `RGB_SPEC_CUT_MAPPING.md`, and `CURRENT_IMPLEMENTATION_STATUS_2026-04-17.md`.
|
||||
- Map the request to the owning code before changing anything. Read [repo-map.md](references/repo-map.md) when the affected area is not obvious.
|
||||
|
||||
2. Edit the smallest surface that can explain the behavior.
|
||||
- Catalog or cut-list problems usually live in `FormatCatalogService`, `MainViewModel`, or thumbnail helpers.
|
||||
- Scene resolution, path, and asset lookup issues usually live in `KarismaSceneResolver`, `KarismaSceneVariableCatalog`, `TornadoPathResolver`, or `KarismaTornado3Adapter`.
|
||||
- Runtime value, visibility, color, and candidate-slot logic usually lives in `KarismaTornado3Adapter`.
|
||||
- If the problem exists only inside external `T3_Cut` assets, call that out explicitly before assuming a repo-side fix exists.
|
||||
|
||||
3. Validate in layers after every meaningful change.
|
||||
- Always run `dotnet build Tornado3_2026Election.slnx` when code changed.
|
||||
- Use [validation-workflow.md](references/validation-workflow.md) for command selection.
|
||||
- For a scoped live pass, prefer `scripts/validate-cut.ps1`.
|
||||
- For scene-level snapshots or raw object checks, use `tools/KarismaTcpProbe` directly.
|
||||
- If live Karisma or `T3_Cut` is unavailable, still run the build and document the missing external dependency.
|
||||
|
||||
4. Report the result in operational terms.
|
||||
- Name the files changed.
|
||||
- List the commands run.
|
||||
- Say what was verified, what remains unverified, and whether external Karisma or `T3_Cut` access blocked anything.
|
||||
|
||||
## Repo Notes
|
||||
|
||||
- Treat the repo as the source of truth for cut metadata and validation helpers.
|
||||
- Treat `T3_Cut` as an external dependency that may contain the real scene or asset causing the issue.
|
||||
- Prefer targeted validation with a template or cut filter instead of sweeping the whole catalog unless the user asks for a broad audit.
|
||||
- Reuse existing `tools/KarismaTcpProbe/scene-ops/*.json` fixtures when they match the symptom instead of inventing a new validation format.
|
||||
|
||||
## Resources
|
||||
|
||||
- `scripts/validate-cut.ps1`: run scoped live validation against the existing `KarismaTcpProbe` tool.
|
||||
- [repo-map.md](references/repo-map.md): load when you need to find the owning file quickly.
|
||||
- [validation-workflow.md](references/validation-workflow.md): load when you need the exact validation command for the current symptom.
|
||||
@@ -0,0 +1,4 @@
|
||||
interface:
|
||||
display_name: "Cut Design Debugger"
|
||||
short_description: "Modify and validate Tornado3 election cut designs."
|
||||
default_prompt: "Inspect the requested cut, make the smallest safe design or mapping change, then run the relevant validation steps and summarize the result."
|
||||
@@ -0,0 +1,35 @@
|
||||
# Repo Map
|
||||
|
||||
Use this reference to decide where a cut-related change belongs.
|
||||
|
||||
## Specs and current behavior
|
||||
|
||||
- `SYSTEM_SPEC.md`: high-level broadcast, catalog, thumbnail, and `T3_Cut` rules.
|
||||
- `RGB_SPEC_CUT_MAPPING.md`: color and cut mapping notes.
|
||||
- `CURRENT_IMPLEMENTATION_STATUS_2026-04-17.md`: implemented behavior and current constraints.
|
||||
|
||||
## UI and cut-list behavior
|
||||
|
||||
- `Tornado3_2026Election/MainWindow.xaml`: cut-list and control UI.
|
||||
- `Tornado3_2026Election/ViewModels/MainViewModel.cs`: cut-list items, thumbnail generation command, filter state.
|
||||
- `Tornado3_2026Election/ViewModels/CutListEntryViewModel.cs`: per-cut thumbnail and duration state.
|
||||
|
||||
## Catalog, scene lookup, and paths
|
||||
|
||||
- `Tornado3_2026Election/Services/FormatCatalogService.cs`: template and cut catalog.
|
||||
- `Tornado3_2026Election/Services/KarismaSceneResolver.cs`: resolve the actual `.tscn` or `_loop.tscn` path.
|
||||
- `Tornado3_2026Election/Services/KarismaSceneVariableCatalog.cs`: scene-variable discovery and lookup cache.
|
||||
- `Tornado3_2026Election/Services/TornadoPathResolver.cs`: default and normalized `T3_Cut` path handling.
|
||||
- `Tornado3_2026Election/Services/CutThumbnailAssetCatalog.cs`: project thumbnail asset locations.
|
||||
|
||||
## Runtime apply logic
|
||||
|
||||
- `Tornado3_2026Election/Services/KarismaTornado3Adapter.cs`: object values, style colors, visibility, candidate slots, asset lookup, live apply flow.
|
||||
- `Tornado3_2026Election/Services/KarismaThumbnailGeneratorService.cs`: generate thumbnail PNGs from Karisma.
|
||||
- `Tornado3_2026Election/Services/MockTornado3Adapter.cs`: fallback behavior when live Karisma is unavailable.
|
||||
|
||||
## Validation tools
|
||||
|
||||
- `tools/KarismaTcpProbe/Program.cs`: raw commands for scene validation, folder inspection, scene image capture, and live-cut validation.
|
||||
- `tools/KarismaTcpProbe/LiveCutValidation.cs`: A/B live validation runner and report generation.
|
||||
- `tools/KarismaTcpProbe/scene-ops/*.json`: reusable scene operation fixtures for targeted checks.
|
||||
@@ -0,0 +1,57 @@
|
||||
# Validation Workflow
|
||||
|
||||
Choose the lightest command that still proves the change.
|
||||
|
||||
## 1. Always build after code changes
|
||||
|
||||
```powershell
|
||||
dotnet build Tornado3_2026Election.slnx
|
||||
```
|
||||
|
||||
## 2. Run scoped live validation for a cut or template
|
||||
|
||||
Use the local wrapper when Karisma and `T3_Cut` are available.
|
||||
|
||||
```powershell
|
||||
powershell -ExecutionPolicy Bypass -File plugins/cut-design-debugger/skills/cut-design-debugger/scripts/validate-cut.ps1 `
|
||||
-ImageRootPath 'C:\Path\To\T3_Cut' `
|
||||
-Filter '1-2위_ani_광역단체장'
|
||||
```
|
||||
|
||||
Useful flags:
|
||||
|
||||
- `-Limit 1`: validate only the first matching item.
|
||||
- `-IncludeVideoWall`: include VideoWall templates.
|
||||
- `-OutputPath <dir>`: write reports to a custom artifact directory.
|
||||
|
||||
## 3. Capture a scene image without running the full live pass
|
||||
|
||||
Use this when the problem is visual and you already know the exact `.tscn` scene path.
|
||||
|
||||
```powershell
|
||||
dotnet run --project tools/KarismaTcpProbe/KarismaTcpProbe.csproj -- `
|
||||
--save-scene-image `
|
||||
--scene 'C:\Path\To\T3_Cut\SomeScene.tscn' `
|
||||
--output artifacts\scene-captures\some-scene.png
|
||||
```
|
||||
|
||||
## 4. Validate scene operations against a fixture
|
||||
|
||||
Use this when the issue is about values, visibility, or style updates for known scene objects.
|
||||
|
||||
```powershell
|
||||
dotnet run --project tools/KarismaTcpProbe/KarismaTcpProbe.csproj -- `
|
||||
--validate-scene-values `
|
||||
--scene 'C:\Path\To\T3_Cut\SomeScene.tscn' `
|
||||
--operations tools/KarismaTcpProbe/scene-ops/1-2위_ani_광역단체장_style.json `
|
||||
--output artifacts\scene-validation\style.md
|
||||
```
|
||||
|
||||
## 5. Inspect a whole folder when the object names are unclear
|
||||
|
||||
```powershell
|
||||
dotnet run --project tools/KarismaTcpProbe/KarismaTcpProbe.csproj -- `
|
||||
--inspect-tscn-folder `
|
||||
--root 'C:\Path\To\T3_Cut' `
|
||||
--output artifacts\scene-inspection\inspection.md
|
||||
```
|
||||
@@ -0,0 +1,65 @@
|
||||
param(
|
||||
[string]$ImageRootPath = "",
|
||||
[string]$Filter = "",
|
||||
[string]$OutputPath = "",
|
||||
[int]$Limit = 0,
|
||||
[int]$OnAirDelayMs = 900,
|
||||
[int]$BetweenDelayMs = 250,
|
||||
[switch]$IncludeVideoWall
|
||||
)
|
||||
|
||||
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..\..\..\..")).Path
|
||||
$probeProject = Join-Path $repoRoot "tools\KarismaTcpProbe\KarismaTcpProbe.csproj"
|
||||
|
||||
if ([string]::IsNullOrWhiteSpace($OutputPath))
|
||||
{
|
||||
$timestamp = Get-Date -Format "yyyyMMdd_HHmmss"
|
||||
$OutputPath = Join-Path $repoRoot "artifacts\cut-design-debugger\live-cut-validation\$timestamp"
|
||||
}
|
||||
|
||||
$commandArgs = @(
|
||||
"run",
|
||||
"--project", $probeProject,
|
||||
"--",
|
||||
"--validate-live-cuts",
|
||||
"--output", $OutputPath,
|
||||
"--onair-delay-ms", $OnAirDelayMs.ToString(),
|
||||
"--between-delay-ms", $BetweenDelayMs.ToString()
|
||||
)
|
||||
|
||||
if (-not [string]::IsNullOrWhiteSpace($ImageRootPath))
|
||||
{
|
||||
$commandArgs += @("--image-root", $ImageRootPath)
|
||||
}
|
||||
|
||||
if (-not [string]::IsNullOrWhiteSpace($Filter))
|
||||
{
|
||||
$commandArgs += @("--filter", $Filter)
|
||||
}
|
||||
|
||||
if ($Limit -gt 0)
|
||||
{
|
||||
$commandArgs += @("--limit", $Limit.ToString())
|
||||
}
|
||||
|
||||
if ($IncludeVideoWall)
|
||||
{
|
||||
$commandArgs += "--include-videowall"
|
||||
}
|
||||
|
||||
Write-Host "Running live-cut validation..."
|
||||
Write-Host "Repo Root : $repoRoot"
|
||||
Write-Host "Output : $OutputPath"
|
||||
if (-not [string]::IsNullOrWhiteSpace($Filter))
|
||||
{
|
||||
Write-Host "Filter : $Filter"
|
||||
}
|
||||
|
||||
& dotnet @commandArgs
|
||||
if ($LASTEXITCODE -ne 0)
|
||||
{
|
||||
exit $LASTEXITCODE
|
||||
}
|
||||
|
||||
$summaryPath = Join-Path $OutputPath "summary.md"
|
||||
Write-Host "Validation report: $summaryPath"
|
||||
Reference in New Issue
Block a user