Skip to content

Implement Archify post-export visualization adapter - #3

Merged
sraphaz merged 7 commits into
mainfrom
agent/archify-visualization-adapter
Jul 23, 2026
Merged

Implement Archify post-export visualization adapter#3
sraphaz merged 7 commits into
mainfrom
agent/archify-visualization-adapter

Conversation

@sraphaz

@sraphaz sraphaz commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • Implementa o adapter Archify executável pós-export (IR → JSON → validate/render/check → HTML + manifesto).
  • Pin tt-a1i/archify@2.11.0 via ARCHIFY.lock.json + bootstrap explícito (sem download silencioso).
  • Integração opcional sky visualize / scripts/sky/visualize.ps1 sem acoplar o core.
  • Fixtures estáveis + 17 testes de contrato; diagrama real gerado a partir de surya-workspace-mvp.

Test plan

  • cd plugins/examples/archify && npm install && npm test (17/17)
  • ./scripts/sky/check-core-agnostic.ps1
  • ./scripts/sky/validate-profile.ps1 -Profile consulting-handoff -PackagePath examples/sky-forge-packages/surya-workspace-mvp -FixtureMode
  • node plugins/examples/archify/scripts/visualize.mjs --package examples/sky-forge-packages/surya-workspace-mvp --output .tmp/archify/surya-workspace-mvp --views architecture,workflow,sequence
  • Confirmar HTML com <svg> e manifesto com hashes
  • Revisar visualmente os HTMLs gerados
  • Validar em Linux/macOS (CLI Node é portátil; execução desta entrega foi em Windows)

Notas

  • Archify 2.11.0 não expõe --quality; o perfil fica na IR/manifesto.
  • Sequence no pacote surya é omitida com warning (sem sequences.yaml) — comportamento esperado.
  • Onda 2 fora de escopo: dataflow, lifecycle, showcase upload, adapters alternativos.

Note

Medium Risk
Large new surface (IR contract, external Archify pin, sanitization of secrets in diagrams) but isolated under optional plugins; core failure modes are limited to the new visualize entrypoint when the plugin is present.

Overview
Adds an optional post-export path: exported Sky packages → Sky Architecture IR → Archify JSON → validate/render/check → HTML and a provenance manifest, without making Archify part of core generation.

New contract and plugin: Versioned schemas/sky-forge/sky-architecture-ir.schema.yaml and a removable example at plugins/examples/archify/ (normalize, IR validation, architecture/workflow/sequence mappers, secret sanitization, manifest with hashes). Archify is pinned in ARCHIFY.lock.json with explicit bootstrap only—no silent download during visualize.

CLI: sky visualize and scripts/sky/visualize.ps1 delegate to the plugin; if the plugin is missing, the command prints guidance and exits 0 so validate/export and check-core-agnostic stay unchanged.

Docs/tests: ADR-0007, plugin docs, task checklist updates, fixtures, and node:test contract tests (including core-agnostic checks). .tmp/ is gitignored for generated previews.

Reviewed by Cursor Bugbot for commit 86bd09c. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@sraphaz, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 57 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9731da30-a9c0-4ed8-abaa-f5df2752be96

📥 Commits

Reviewing files that changed from the base of the PR and between dd5c901 and 86bd09c.

⛔ Files ignored due to path filters (1)
  • plugins/examples/archify/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (49)
  • .gitignore
  • docs/_meta/PLUGINS.md
  • docs/adr/ADR-0007-archify-post-export-visualization-adapter.md
  • docs/tasks/CURSOR_IMPLEMENT_ARCHIFY_VISUALIZATION_ADAPTER.md
  • plugins/README.md
  • plugins/examples/archify/.gitignore
  • plugins/examples/archify/ARCHIFY.lock.json
  • plugins/examples/archify/README.md
  • plugins/examples/archify/package.json
  • plugins/examples/archify/plugin.yaml
  • plugins/examples/archify/scripts/bootstrap-archify.mjs
  • plugins/examples/archify/scripts/visualize.mjs
  • plugins/examples/archify/scripts/visualize.ps1
  • plugins/examples/archify/src/hash.mjs
  • plugins/examples/archify/src/load-package.mjs
  • plugins/examples/archify/src/log.mjs
  • plugins/examples/archify/src/manifest.mjs
  • plugins/examples/archify/src/mappers/architecture.mjs
  • plugins/examples/archify/src/mappers/sequence.mjs
  • plugins/examples/archify/src/mappers/workflow.mjs
  • plugins/examples/archify/src/normalize-ir.mjs
  • plugins/examples/archify/src/resolve-archify.mjs
  • plugins/examples/archify/src/sanitize.mjs
  • plugins/examples/archify/src/validate-ir.mjs
  • plugins/examples/archify/tests/contract.test.mjs
  • plugins/examples/archify/tests/core-agnostic.test.mjs
  • plugins/examples/archify/tests/fixtures/bad-relationship/architecture.yaml
  • plugins/examples/archify/tests/fixtures/bad-relationship/brief.yaml
  • plugins/examples/archify/tests/fixtures/complete-valid/architecture.yaml
  • plugins/examples/archify/tests/fixtures/complete-valid/brief.yaml
  • plugins/examples/archify/tests/fixtures/complete-valid/handoff-solution.yaml
  • plugins/examples/archify/tests/fixtures/complete-valid/package.yaml
  • plugins/examples/archify/tests/fixtures/complete-valid/sequences.yaml
  • plugins/examples/archify/tests/fixtures/confirmed-no-refs/architecture.yaml
  • plugins/examples/archify/tests/fixtures/confirmed-no-refs/brief.yaml
  • plugins/examples/archify/tests/fixtures/minimal-valid/architecture.yaml
  • plugins/examples/archify/tests/fixtures/minimal-valid/brief.yaml
  • plugins/examples/archify/tests/fixtures/missing-architecture/brief.yaml
  • plugins/examples/archify/tests/fixtures/with-inferred/architecture.yaml
  • plugins/examples/archify/tests/fixtures/with-inferred/brief.yaml
  • plugins/examples/archify/tests/fixtures/with-secrets/architecture.yaml
  • plugins/examples/archify/tests/fixtures/with-secrets/brief.yaml
  • plugins/examples/archify/tests/fixtures/with-sequence/architecture.yaml
  • plugins/examples/archify/tests/fixtures/with-sequence/brief.yaml
  • plugins/examples/archify/tests/fixtures/with-sequence/sequences.yaml
  • plugins/examples/archify/tests/sanitize.test.mjs
  • schemas/sky-forge/sky-architecture-ir.schema.yaml
  • scripts/sky/sky.ps1
  • scripts/sky/visualize.ps1
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/archify-visualization-adapter

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Add Sky Architecture IR normalization, Archify mappers, pinned bootstrap, CLI wrappers, contract tests, and optional sky visualize integration without coupling the core.

Co-authored-by: Cursor <cursoragent@cursor.com>
@sraphaz
sraphaz marked this pull request as ready for review July 22, 2026 00:01
@sraphaz sraphaz changed the title Define Archify post-export visualization adapter Implement Archify post-export visualization adapter Jul 22, 2026
@cursor

cursor Bot commented Jul 22, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_8dd85243-2b08-47b0-b435-26988cbad426)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 315326f94c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/examples/archify/src/mappers/sequence.mjs
Comment thread scripts/sky/visualize.ps1
Filter sequence messages by sequences.yaml provenance so architecture
topology edges are not rendered as sequence steps, and resolve -Slug
packages from SKY_OUTPUTS_DIR before local fallbacks.

Co-authored-by: Cursor <cursoragent@cursor.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 3 potential issues.

Fix All in Cursor

You can send follow-ups to the cloud agent here.

Reviewed by Cursor Bugbot for commit 86bd09c. Configure here.

Comment thread scripts/sky/visualize.ps1
(Join-Path $RepoRoot ".sky\sessions\$Slug\package"),
(Join-Path $RepoRoot "examples\sky-forge-packages\$Slug")
)
$PackagePath = $candidates | Where-Object { Test-Path $_ } | Select-Object -First 1

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slug resolves incompatible export directory

High Severity

When -Slug is used, the first existing candidate is Get-SkyOutputDirForSlug, but export-package.ps1 lays out brief.yaml and an architecture/ tree—not root architecture.yaml. The Archify adapter requires brief.yaml and architecture.yaml at the package root, so a typical post-export -Slug run fails even after a successful export.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 86bd09c. Configure here.

type: toArchifyType(milestones[0].kind),
label: shortenLabel(milestones[0].name),
sublabel: milestones[0].name,
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Workflow duplicates milestone node id

Medium Severity

If workflow evidence has milestones but no package gates, working already contains milestone nodes and the mapper adds milestones[0] again on the delivery lane with the same id, producing duplicate workflow nodes in the Archify JSON.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 86bd09c. Configure here.

Comment thread scripts/sky/sky.ps1
& (Join-Path $PSScriptRoot 'visualize.ps1') @vArgs
if ($Slug) {
Invoke-AgentAudit $Slug 'delivery-steward' 'visualize.archify' 'invoke_skill' 'ok' "renderer=$Renderer"
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Audit logs success after visualize fails

Medium Severity

The new visualize command always calls Invoke-AgentAudit with status ok when -Slug is set, without checking the exit code from visualize.ps1, so failed visualization runs are recorded as successful in the audit trail.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 86bd09c. Configure here.

@sraphaz
sraphaz merged commit ed5ea0d into main Jul 23, 2026
5 checks passed
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.

1 participant