Skip to content

feat(skill): add plan-first mode for manual edge routing - #338

Open
sanpatricky wants to merge 2 commits into
tt-a1i:mainfrom
sanpatricky:feat/plan-first-routing
Open

feat(skill): add plan-first mode for manual edge routing#338
sanpatricky wants to merge 2 commits into
tt-a1i:mainfrom
sanpatricky:feat/plan-first-routing

Conversation

@sanpatricky

Copy link
Copy Markdown

Problem and value

When the skill encounters edge overlaps requiring manual routing, the current instructions lead to iterative trial-and-error: guess coordinates → validate → fail → adjust → repeat. In a real-world workflow diagram with 15 edges, fixing a single overlap took 4+ iterations because the skill added manual via routing when simply removing route: "drop" would have let port spread resolve it automatically.

Fixes #336

Scope

  • What changed:
    • archify/SKILL.md step 3: added plan-first mode workflow (steps a–e) triggered when validation reports geometry errors or visual inspection reveals edge overlaps. Key addition: prefer automatic over manual — check whether removing a spread-disabling control resolves the overlap before resorting to manual via.
    • archify/SKILL.md line 46: added exception to docs-reading ban — when manual routing is needed, reading authoring-contract.md route-preset and port-spread sections is allowed before attempting fixes.
    • archify/references/authoring-contract.md § Spacing and labels: added batch-planning exception to the "one control at a time" rule — when multiple edges share a spatial channel, plan all coupled controls as a batch using --layout-json evidence.
  • What deliberately did not change: renderer behavior, validator rules, schema fields, port spread logic, template HTML.
  • No unrelated changes: confirmed.

Stability impact

  • Compatibility and migration risk: None. Only skill instructions and authoring-contract documentation changed. Existing diagrams and typed JSON are unaffected.
  • Renderer, validator, package, or generated-artifact risk: None. No code changes.
  • Failure behavior and rollback path: Revert the two commits. No migration needed.

Tests run

Not applicable — documentation-only change. No renderer, validator, or package code modified.

Visual evidence

Not applicable — this changes skill authoring instructions only, not rendered output.

Generated artifacts

None. No renderer source, schema, or example input changed.

Checklist

  • I used a minimal focused change and preserved existing typed JSON behavior unless the issue requires a contract change.
  • I ran the relevant targeted tests and npm test in archify/. — N/A: documentation-only change
  • I added or updated a regression test for behavioral changes. — N/A: no code change
  • I checked generated artifacts and package freshness when their sources changed. — N/A: no source change
  • I removed secrets, private repository content, and customer data from fixtures and screenshots.

When validation reports edge overlaps requiring manual routing, the skill
now follows a structured workflow: check port spread first, read route-mode
docs, calculate spatial budget, then batch-implement coupled controls.

Also adds a batch-planning exception to authoring-contract.md for edges
sharing a spatial channel.

Closes tt-a1i#336
…tial channels

When multiple edges share a spatial channel, the 'one control at a time'
rule causes cascading fixes. Add exception: plan all coupled controls
(via, labelAt, channelY) as a batch using --layout-json evidence.

Part of tt-a1i#336
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: plan-first mode for manual edge routing in skill instructions

1 participant