@flaviogarrido/reversa 0.0.0-stage → 1.3.7
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/LICENSE +21 -0
- package/README.md +487 -2
- package/agents/fg-backlog/SKILL.md +129 -0
- package/agents/fg-backlog/agents/openai.yaml +5 -0
- package/agents/fg-backlog/references/backlog-template.md +60 -0
- package/agents/fg-backlog/references/priorizacao.md +41 -0
- package/agents/impeccable/LICENSE +191 -0
- package/agents/impeccable/NOTICE.md +11 -0
- package/agents/impeccable/SKILL.md +88 -0
- package/agents/impeccable/agents/impeccable_asset_producer.toml +47 -0
- package/agents/impeccable/agents/impeccable_documenter.toml +27 -0
- package/agents/impeccable/agents/impeccable_finish_reviewer.toml +41 -0
- package/agents/impeccable/agents/impeccable_manual_edit_applier.toml +95 -0
- package/agents/impeccable/agents/openai.yaml +4 -0
- package/agents/impeccable/reference/adapt.md +318 -0
- package/agents/impeccable/reference/adapt.native.md +58 -0
- package/agents/impeccable/reference/android.md +46 -0
- package/agents/impeccable/reference/animate.md +89 -0
- package/agents/impeccable/reference/audit.md +139 -0
- package/agents/impeccable/reference/audit.native.md +139 -0
- package/agents/impeccable/reference/bolder.md +33 -0
- package/agents/impeccable/reference/clarify.md +94 -0
- package/agents/impeccable/reference/colorize.md +86 -0
- package/agents/impeccable/reference/component-review.md +63 -0
- package/agents/impeccable/reference/craft-floor.md +44 -0
- package/agents/impeccable/reference/craft.md +5 -0
- package/agents/impeccable/reference/critique.md +819 -0
- package/agents/impeccable/reference/degraded/asset-producer.md +42 -0
- package/agents/impeccable/reference/degraded/documenter.md +24 -0
- package/agents/impeccable/reference/degraded/finish-reviewer.md +38 -0
- package/agents/impeccable/reference/degraded/manual-edit-applier.md +92 -0
- package/agents/impeccable/reference/delight.md +70 -0
- package/agents/impeccable/reference/distill.md +111 -0
- package/agents/impeccable/reference/doctor.md +54 -0
- package/agents/impeccable/reference/document.md +416 -0
- package/agents/impeccable/reference/extract.md +69 -0
- package/agents/impeccable/reference/generate.md +101 -0
- package/agents/impeccable/reference/harden.md +343 -0
- package/agents/impeccable/reference/hooks.md +113 -0
- package/agents/impeccable/reference/init.md +131 -0
- package/agents/impeccable/reference/ios.md +51 -0
- package/agents/impeccable/reference/layout.md +84 -0
- package/agents/impeccable/reference/live-setup.md +104 -0
- package/agents/impeccable/reference/live.md +325 -0
- package/agents/impeccable/reference/mode-operate.md +21 -0
- package/agents/impeccable/reference/mode-persuade.md +19 -0
- package/agents/impeccable/reference/mode-read.md +21 -0
- package/agents/impeccable/reference/new-work.md +154 -0
- package/agents/impeccable/reference/onboard.md +234 -0
- package/agents/impeccable/reference/operate.md +61 -0
- package/agents/impeccable/reference/optimize.md +258 -0
- package/agents/impeccable/reference/overdrive.md +127 -0
- package/agents/impeccable/reference/polish.md +105 -0
- package/agents/impeccable/reference/quieter.md +99 -0
- package/agents/impeccable/reference/region-map.md +26 -0
- package/agents/impeccable/reference/routing.md +24 -0
- package/agents/impeccable/reference/shape.md +59 -0
- package/agents/impeccable/reference/typeset.md +90 -0
- package/agents/impeccable/reference/visualize.md +47 -0
- package/agents/impeccable/reversa-bundle.json +16 -0
- package/agents/impeccable/scripts/VERSION +1 -0
- package/agents/impeccable/scripts/command-metadata.json +98 -0
- package/agents/impeccable/scripts/data/font-index-failures.json +121 -0
- package/agents/impeccable/scripts/data/font-index.json +1 -0
- package/agents/impeccable/scripts/impeccable +212 -0
- package/agents/impeccable/scripts/impeccable.cmd +239 -0
- package/agents/impeccable/scripts/live-browser-dom.js +320 -0
- package/agents/impeccable/scripts/live-browser-ignores.js +242 -0
- package/agents/impeccable/scripts/live-browser-session.js +180 -0
- package/agents/impeccable/scripts/live-browser.js +13557 -0
- package/agents/impeccable/scripts/modern-screenshot.umd.js +14 -0
- package/agents/reversa/SKILL.md +135 -0
- package/agents/reversa/agents/openai.yaml +3 -0
- package/agents/reversa/references/checkpoint-guide.md +106 -0
- package/agents/reversa/references/state-schema.md +80 -0
- package/agents/reversa/references/step-01-first-run.md +63 -0
- package/agents/reversa/references/step-02-resume.md +88 -0
- package/agents/reversa/references/step-03-specs-organization.md +145 -0
- package/agents/reversa/references/step-04-regression-check.md +94 -0
- package/agents/reversa-add/SKILL.md +131 -0
- package/agents/reversa-add/agents/openai.yaml +5 -0
- package/agents/reversa-agents-help/SKILL.md +211 -0
- package/agents/reversa-agents-help/agents/openai.yaml +3 -0
- package/agents/reversa-arbiter/SKILL.md +140 -0
- package/agents/reversa-arbiter/agents/openai.yaml +5 -0
- package/agents/reversa-archaeologist/SKILL.md +95 -0
- package/agents/reversa-archaeologist/agents/openai.yaml +5 -0
- package/agents/reversa-archaeologist/references/modules-schema.md +69 -0
- package/agents/reversa-architect/SKILL.md +93 -0
- package/agents/reversa-architect/agents/openai.yaml +5 -0
- package/agents/reversa-arquitetura-3d/SKILL.md +163 -0
- package/agents/reversa-arquitetura-3d/agents/openai.yaml +5 -0
- package/agents/reversa-arquitetura-3d/references/ARCH_TOUR.md +242 -0
- package/agents/reversa-arquitetura-3d/references/CALL_GRAPH_3D.md +217 -0
- package/agents/reversa-arquitetura-3d/references/CODE_CITY.md +228 -0
- package/agents/reversa-arquitetura-3d/references/DEPENDENCY_GRAPH_3D.md +240 -0
- package/agents/reversa-arquitetura-3d/references/ERRORS.md +286 -0
- package/agents/reversa-arquitetura-3d/references/LAYER_STACK.md +230 -0
- package/agents/reversa-arquitetura-3d/references/THREE_PATTERNS.md +221 -0
- package/agents/reversa-audit/SKILL.md +98 -0
- package/agents/reversa-audit/agents/openai.yaml +5 -0
- package/agents/reversa-autonomous/SKILL.md +139 -0
- package/agents/reversa-autonomous/agents/openai.yaml +3 -0
- package/agents/reversa-brainstorm/SKILL.md +131 -0
- package/agents/reversa-brainstorm/agents/openai.yaml +3 -0
- package/agents/reversa-challenger/SKILL.md +122 -0
- package/agents/reversa-challenger/agents/openai.yaml +5 -0
- package/agents/reversa-clarify/SKILL.md +103 -0
- package/agents/reversa-clarify/agents/openai.yaml +5 -0
- package/agents/reversa-code-express/SKILL.md +252 -0
- package/agents/reversa-code-express/agents/openai.yaml +5 -0
- package/agents/reversa-coding/SKILL.md +172 -0
- package/agents/reversa-coding/agents/openai.yaml +5 -0
- package/agents/reversa-curator/SKILL.md +133 -0
- package/agents/reversa-curator/agents/openai.yaml +5 -0
- package/agents/reversa-curator/references/decision-rubric.md +52 -0
- package/agents/reversa-curator/references/templates/discard_log.md +37 -0
- package/agents/reversa-curator/references/templates/target_business_rules.md +54 -0
- package/agents/reversa-data-master/SKILL.md +67 -0
- package/agents/reversa-data-master/agents/openai.yaml +5 -0
- package/agents/reversa-debugger/SKILL.md +178 -0
- package/agents/reversa-debugger/agents/openai.yaml +3 -0
- package/agents/reversa-debugger/references/bug-schema.md +123 -0
- package/agents/reversa-debugger/references/bugs-readme-template.md +76 -0
- package/agents/reversa-debugger-debate/SKILL.md +75 -0
- package/agents/reversa-debugger-debate/agents/openai.yaml +5 -0
- package/agents/reversa-debugger-debate/references/debate-protocol.md +102 -0
- package/agents/reversa-debugger-fix/SKILL.md +170 -0
- package/agents/reversa-debugger-fix/agents/openai.yaml +5 -0
- package/agents/reversa-debugger-graph/SKILL.md +94 -0
- package/agents/reversa-debugger-graph/agents/openai.yaml +5 -0
- package/agents/reversa-decouple/SKILL.md +78 -0
- package/agents/reversa-decouple/agents/openai.yaml +5 -0
- package/agents/reversa-depth-inspection/SKILL.md +99 -0
- package/agents/reversa-depth-inspection/agents/openai.yaml +5 -0
- package/agents/reversa-design-system/SKILL.md +77 -0
- package/agents/reversa-design-system/agents/openai.yaml +5 -0
- package/agents/reversa-designer/SKILL.md +217 -0
- package/agents/reversa-designer/agents/openai.yaml +5 -0
- package/agents/reversa-designer/references/paradigm-checklist.md +50 -0
- package/agents/reversa-designer/references/templates/data_migration_plan.md +80 -0
- package/agents/reversa-designer/references/templates/target_architecture.md +68 -0
- package/agents/reversa-designer/references/templates/target_data_model.md +64 -0
- package/agents/reversa-designer/references/templates/target_domain_model.md +62 -0
- package/agents/reversa-designer/references/templates/topology_decision.md +82 -0
- package/agents/reversa-detective/SKILL.md +82 -0
- package/agents/reversa-detective/agents/openai.yaml +5 -0
- package/agents/reversa-docs/SKILL.md +241 -0
- package/agents/reversa-docs/agents/openai.yaml +3 -0
- package/agents/reversa-docs/references/config-schema.json +108 -0
- package/agents/reversa-docs/references/expected_sources.yaml +60 -0
- package/agents/reversa-docs-analyst/SKILL.md +163 -0
- package/agents/reversa-docs-analyst/agents/openai.yaml +5 -0
- package/agents/reversa-docs-mapper/SKILL.md +167 -0
- package/agents/reversa-docs-mapper/agents/openai.yaml +5 -0
- package/agents/reversa-docs-mapper/references/extraction-policy.md +44 -0
- package/agents/reversa-docs-publisher/SKILL.md +323 -0
- package/agents/reversa-docs-publisher/agents/openai.yaml +5 -0
- package/agents/reversa-docs-publisher/references/auxiliary_sources.yaml +27 -0
- package/agents/reversa-docs-publisher/references/vendor-pins.yaml +149 -0
- package/agents/reversa-docs-storyteller/SKILL.md +189 -0
- package/agents/reversa-docs-storyteller/agents/openai.yaml +5 -0
- package/agents/reversa-drafter/SKILL.md +189 -0
- package/agents/reversa-drafter/agents/openai.yaml +5 -0
- package/agents/reversa-especialista-d3/SKILL.md +37 -0
- package/agents/reversa-especialista-d3/agents/openai.yaml +5 -0
- package/agents/reversa-especialista-d3/references/api-core.md +13 -0
- package/agents/reversa-especialista-d3/references/interatividade.md +5 -0
- package/agents/reversa-especialista-d3/references/layouts-complexos.md +8 -0
- package/agents/reversa-explorer/SKILL.md +110 -0
- package/agents/reversa-explorer/agents/openai.yaml +5 -0
- package/agents/reversa-extract-soul/SKILL.md +221 -0
- package/agents/reversa-extract-soul/agents/openai.yaml +5 -0
- package/agents/reversa-forward/SKILL.md +235 -0
- package/agents/reversa-forward/agents/openai.yaml +3 -0
- package/agents/reversa-forward-autonomous/SKILL.md +184 -0
- package/agents/reversa-forward-autonomous/agents/openai.yaml +3 -0
- package/agents/reversa-framer/SKILL.md +124 -0
- package/agents/reversa-framer/agents/openai.yaml +5 -0
- package/agents/reversa-highcharts-visualizer/SKILL.md +123 -0
- package/agents/reversa-highcharts-visualizer/agents/openai.yaml +5 -0
- package/agents/reversa-highcharts-visualizer/references/CHART_CATALOG.md +450 -0
- package/agents/reversa-highcharts-visualizer/references/ERRORS.md +99 -0
- package/agents/reversa-highcharts-visualizer/references/HIGHCHARTS_PATTERNS.md +347 -0
- package/agents/reversa-highcharts-visualizer/scripts/analyze_data.py +219 -0
- package/agents/reversa-highcharts-visualizer/scripts/parse_data.py +246 -0
- package/agents/reversa-highcharts-visualizer/scripts/sample_data.py +208 -0
- package/agents/reversa-ideator/SKILL.md +139 -0
- package/agents/reversa-ideator/agents/openai.yaml +5 -0
- package/agents/reversa-image-prompt-json/SKILL.md +210 -0
- package/agents/reversa-image-prompt-json/agents/openai.yaml +5 -0
- package/agents/reversa-image-prompt-json/references/Examples.md +123 -0
- package/agents/reversa-inspector/SKILL.md +147 -0
- package/agents/reversa-inspector/agents/openai.yaml +5 -0
- package/agents/reversa-inspector/references/parity-coverage-matrix.md +54 -0
- package/agents/reversa-inspector/references/templates/parity_specs.md +64 -0
- package/agents/reversa-inspector/references/templates/parity_test.feature +40 -0
- package/agents/reversa-migrate/SKILL.md +282 -0
- package/agents/reversa-migrate/agents/openai.yaml +3 -0
- package/agents/reversa-migrate/references/auto-defaults.md +52 -0
- package/agents/reversa-migrate/references/expected_legacy_artifacts.yaml +69 -0
- package/agents/reversa-migrate/references/handoff-checklist.md +34 -0
- package/agents/reversa-migrate/references/state.json +28 -0
- package/agents/reversa-migrate/references/templates/ambiguity_log.md +43 -0
- package/agents/reversa-migrate/references/templates/handoff.md +91 -0
- package/agents/reversa-migrate/references/templates/migration_brief.md +52 -0
- package/agents/reversa-migrate/references/templates/pending_decisions.md +36 -0
- package/agents/reversa-modularize/SKILL.md +77 -0
- package/agents/reversa-modularize/agents/openai.yaml +5 -0
- package/agents/reversa-n8n/SKILL.md +256 -0
- package/agents/reversa-n8n/agents/openai.yaml +5 -0
- package/agents/reversa-n8n/references/node-catalog.md +245 -0
- package/agents/reversa-new/SKILL.md +328 -0
- package/agents/reversa-new/agents/openai.yaml +3 -0
- package/agents/reversa-optimize/SKILL.md +80 -0
- package/agents/reversa-optimize/agents/openai.yaml +5 -0
- package/agents/reversa-paradigm-advisor/SKILL.md +168 -0
- package/agents/reversa-paradigm-advisor/agents/openai.yaml +5 -0
- package/agents/reversa-paradigm-advisor/references/paradigm-catalog.md +73 -0
- package/agents/reversa-paradigm-advisor/references/templates/paradigm_decision.md +69 -0
- package/agents/reversa-plan/SKILL.md +92 -0
- package/agents/reversa-plan/agents/openai.yaml +5 -0
- package/agents/reversa-pre-spec/SKILL.md +133 -0
- package/agents/reversa-pre-spec/agents/openai.yaml +5 -0
- package/agents/reversa-pricing/SKILL.md +181 -0
- package/agents/reversa-pricing/agents/openai.yaml +3 -0
- package/agents/reversa-pricing-advisor/SKILL.md +322 -0
- package/agents/reversa-pricing-advisor/agents/openai.yaml +5 -0
- package/agents/reversa-pricing-advisor/references/advisor-schema.json +196 -0
- package/agents/reversa-pricing-advisor/references/advisor-template.md +106 -0
- package/agents/reversa-pricing-advisor/references/sale-models.md +237 -0
- package/agents/reversa-pricing-estimate/SKILL.md +287 -0
- package/agents/reversa-pricing-estimate/agents/openai.yaml +5 -0
- package/agents/reversa-pricing-estimate/references/effort-formula.md +146 -0
- package/agents/reversa-pricing-estimate/references/estimate-schema.json +141 -0
- package/agents/reversa-pricing-estimate/references/estimate-template.md +153 -0
- package/agents/reversa-pricing-estimate/references/example-estimate.json +74 -0
- package/agents/reversa-pricing-estimate/references/example-estimate.md +88 -0
- package/agents/reversa-pricing-estimate/references/market-benchmarks.md +102 -0
- package/agents/reversa-pricing-estimate/references/value-formula.md +123 -0
- package/agents/reversa-pricing-product/SKILL.md +299 -0
- package/agents/reversa-pricing-product/agents/openai.yaml +5 -0
- package/agents/reversa-pricing-product/references/breakeven-formula.md +237 -0
- package/agents/reversa-pricing-product/references/product-schema.json +288 -0
- package/agents/reversa-pricing-product/references/product-template.md +113 -0
- package/agents/reversa-pricing-product/references/store-commissions.md +57 -0
- package/agents/reversa-pricing-profile/SKILL.md +390 -0
- package/agents/reversa-pricing-profile/agents/openai.yaml +5 -0
- package/agents/reversa-pricing-profile/references/example-profile.json +23 -0
- package/agents/reversa-pricing-profile/references/example-profile.md +46 -0
- package/agents/reversa-pricing-profile/references/profile-schema.json +227 -0
- package/agents/reversa-pricing-profile/references/tax-regimes.md +106 -0
- package/agents/reversa-pricing-research/SKILL.md +352 -0
- package/agents/reversa-pricing-research/agents/openai.yaml +5 -0
- package/agents/reversa-pricing-research/references/research-policy.md +213 -0
- package/agents/reversa-pricing-research/references/research-schema.json +330 -0
- package/agents/reversa-pricing-size/SKILL.md +205 -0
- package/agents/reversa-pricing-size/agents/openai.yaml +5 -0
- package/agents/reversa-pricing-size/references/example-size.json +41 -0
- package/agents/reversa-pricing-size/references/size-schema.json +120 -0
- package/agents/reversa-pricing-size/references/sizing-formula.md +183 -0
- package/agents/reversa-principles/SKILL.md +82 -0
- package/agents/reversa-principles/agents/openai.yaml +5 -0
- package/agents/reversa-prune/SKILL.md +85 -0
- package/agents/reversa-prune/agents/openai.yaml +5 -0
- package/agents/reversa-quality/SKILL.md +87 -0
- package/agents/reversa-quality/agents/openai.yaml +5 -0
- package/agents/reversa-reconstructor/SKILL.md +243 -0
- package/agents/reversa-reconstructor/agents/openai.yaml +5 -0
- package/agents/reversa-reconstructor/references/reconstruction-plan-migration-template.md +89 -0
- package/agents/reversa-reconstructor/references/reconstruction-plan-template.md +77 -0
- package/agents/reversa-refactor/SKILL.md +112 -0
- package/agents/reversa-refactor/agents/openai.yaml +3 -0
- package/agents/reversa-refactor/references/opportunity-schema.md +68 -0
- package/agents/reversa-refactor/references/refactor-readme-template.md +35 -0
- package/agents/reversa-requirements/SKILL.md +217 -0
- package/agents/reversa-requirements/agents/openai.yaml +5 -0
- package/agents/reversa-researcher/SKILL.md +136 -0
- package/agents/reversa-researcher/agents/openai.yaml +5 -0
- package/agents/reversa-restructure/SKILL.md +78 -0
- package/agents/reversa-restructure/agents/openai.yaml +5 -0
- package/agents/reversa-resume/SKILL.md +141 -0
- package/agents/reversa-resume/agents/openai.yaml +5 -0
- package/agents/reversa-reviewer/SKILL.md +163 -0
- package/agents/reversa-reviewer/agents/openai.yaml +5 -0
- package/agents/reversa-reviewer/references/confidence-report-template.md +73 -0
- package/agents/reversa-reviewer/references/confidence-rules.md +65 -0
- package/agents/reversa-reviewer/references/questions-template.md +74 -0
- package/agents/reversa-scout/SKILL.md +82 -0
- package/agents/reversa-scout/agents/openai.yaml +5 -0
- package/agents/reversa-scout/references/surface-schema.md +93 -0
- package/agents/reversa-screen-translator/SKILL.md +279 -0
- package/agents/reversa-screen-translator/agents/openai.yaml +5 -0
- package/agents/reversa-screen-translator/references/adapter-pairs.md +97 -0
- package/agents/reversa-screen-translator/references/platform-detection.md +73 -0
- package/agents/reversa-screen-translator/references/templates/golden_manifest.yaml +62 -0
- package/agents/reversa-screen-translator/references/templates/inventory.schema.json +132 -0
- package/agents/reversa-screen-translator/references/templates/screen_deviation_log.md +66 -0
- package/agents/reversa-screen-translator/references/templates/screen_modernization_decision.md +106 -0
- package/agents/reversa-screen-translator/references/templates/target_screens.md +206 -0
- package/agents/reversa-selo-generativo/SKILL.md +176 -0
- package/agents/reversa-selo-generativo/agents/openai.yaml +5 -0
- package/agents/reversa-selo-generativo/references/ERRORS.md +212 -0
- package/agents/reversa-selo-generativo/references/GENERATIVE_PATTERNS.md +365 -0
- package/agents/reversa-selo-generativo/references/PALETTE_BY_STYLE.md +176 -0
- package/agents/reversa-simplify/SKILL.md +79 -0
- package/agents/reversa-simplify/agents/openai.yaml +5 -0
- package/agents/reversa-spec-sdd/SKILL.md +278 -0
- package/agents/reversa-spec-sdd/agents/openai.yaml +5 -0
- package/agents/reversa-spec-sdd/assets/spec_examples.md +159 -0
- package/agents/reversa-spec-sdd/references/evaluation_rubric.md +113 -0
- package/agents/reversa-spec-sdd/references/sdd_guide.md +124 -0
- package/agents/reversa-spec-sdd/references/spec_template.md +231 -0
- package/agents/reversa-spec-sdd/scripts/spec_scorer.py +476 -0
- package/agents/reversa-standardize/SKILL.md +76 -0
- package/agents/reversa-standardize/agents/openai.yaml +5 -0
- package/agents/reversa-strategist/SKILL.md +119 -0
- package/agents/reversa-strategist/agents/openai.yaml +5 -0
- package/agents/reversa-strategist/references/migration-strategies.md +41 -0
- package/agents/reversa-strategist/references/templates/cutover_plan.md +60 -0
- package/agents/reversa-strategist/references/templates/migration_strategy.md +55 -0
- package/agents/reversa-strategist/references/templates/risk_register.md +44 -0
- package/agents/reversa-sync/SKILL.md +100 -0
- package/agents/reversa-sync/agents/openai.yaml +5 -0
- package/agents/reversa-to-do/SKILL.md +89 -0
- package/agents/reversa-to-do/agents/openai.yaml +5 -0
- package/agents/reversa-visor/SKILL.md +91 -0
- package/agents/reversa-visor/agents/openai.yaml +5 -0
- package/agents/reversa-writer/SKILL.md +212 -0
- package/agents/reversa-writer/agents/openai.yaml +5 -0
- package/agents/reversa-writer/references/design-template.md +49 -0
- package/agents/reversa-writer/references/requirements-template.md +62 -0
- package/agents/reversa-writer/references/tasks-template.md +39 -0
- package/bin/reversa.js +65 -0
- package/lib/commands/add-engine.js +97 -0
- package/lib/commands/export-diagrams.js +194 -0
- package/lib/commands/install.js +260 -0
- package/lib/commands/status.js +35 -0
- package/lib/commands/uninstall.js +159 -0
- package/lib/commands/update.js +252 -0
- package/lib/installer/bundled.js +42 -0
- package/lib/installer/detector.js +167 -0
- package/lib/installer/manifest.js +61 -0
- package/lib/installer/orange-prompts.js +13 -0
- package/lib/installer/policy.js +53 -0
- package/lib/installer/prompts.js +252 -0
- package/lib/installer/validator.js +22 -0
- package/lib/installer/writer.js +376 -0
- package/lib/utils/banner.js +35 -0
- package/lib/utils/json-safe.js +10 -0
- package/lib/utils/package-info.js +22 -0
- package/package.json +51 -4
- package/templates/config.toml +46 -0
- package/templates/config.user.toml +8 -0
- package/templates/documentation/assets/css/style.css +476 -0
- package/templates/documentation/assets/js/nav.js +141 -0
- package/templates/documentation/assets/js/sidebar.js +162 -0
- package/templates/documentation/demo/viewer-demo.html +200 -0
- package/templates/documentation/pages/arquitetura.html.tpl +36 -0
- package/templates/documentation/pages/deck.html.tpl +27 -0
- package/templates/documentation/pages/features/feature.html.tpl +44 -0
- package/templates/documentation/pages/glossario.html.tpl +30 -0
- package/templates/documentation/pages/index.html.tpl +32 -0
- package/templates/documentation/pages/metricas.html.tpl +43 -0
- package/templates/documentation/pages/modulos.html.tpl +33 -0
- package/templates/documentation/pages/timeline.html.tpl +33 -0
- package/templates/documentation/pages/topologia.html.tpl +31 -0
- package/templates/documentation/scripts/convert_chronicle.py +71 -0
- package/templates/documentation/scripts/convert_soul.py +73 -0
- package/templates/documentation/scripts/extract_deps.py +54 -0
- package/templates/documentation/scripts/extract_modules.py +90 -0
- package/templates/documentation/scripts/list_specs.py +74 -0
- package/templates/documentation/viewer.html +60 -0
- package/templates/engines/AGENTS.md +26 -0
- package/templates/engines/CLAUDE.md +27 -0
- package/templates/engines/CONVENTIONS.md +26 -0
- package/templates/engines/GEMINI.md +26 -0
- package/templates/engines/amazonq +7 -0
- package/templates/engines/clinerules +7 -0
- package/templates/engines/copilot-instructions +26 -0
- package/templates/engines/cursorrules +7 -0
- package/templates/engines/roorules +7 -0
- package/templates/engines/windsurf +7 -0
- package/templates/forward/body/actions-template.md +83 -0
- package/templates/forward/body/principles-template.md +75 -0
- package/templates/forward/body/quality-template.md +103 -0
- package/templates/forward/body/requirements-template.md +121 -0
- package/templates/forward/body/roadmap-template.md +107 -0
- package/templates/forward/hooks.yml +60 -0
- package/templates/forward/scripts/ps/bind-to-extraction.ps1 +71 -0
- package/templates/forward/scripts/ps/prepare-roadmap.ps1 +84 -0
- package/templates/forward/scripts/ps/verify-prerequisites.ps1 +103 -0
- package/templates/forward/scripts/sh/bind-to-extraction.sh +103 -0
- package/templates/forward/scripts/sh/prepare-roadmap.sh +79 -0
- package/templates/forward/scripts/sh/verify-prerequisites.sh +125 -0
- package/templates/forward/setup.json +24 -0
- package/templates/hooks/README.md +41 -0
- package/templates/hooks/check-legacy-policy.mjs +0 -0
- package/templates/migration/artifacts/ambiguity_log.md +43 -0
- package/templates/migration/artifacts/cutover_plan.md +60 -0
- package/templates/migration/artifacts/data_migration_plan.md +80 -0
- package/templates/migration/artifacts/discard_log.md +37 -0
- package/templates/migration/artifacts/handoff.md +76 -0
- package/templates/migration/artifacts/migration_brief.md +52 -0
- package/templates/migration/artifacts/migration_strategy.md +55 -0
- package/templates/migration/artifacts/paradigm_decision.md +69 -0
- package/templates/migration/artifacts/parity_specs.md +64 -0
- package/templates/migration/artifacts/parity_test.feature +40 -0
- package/templates/migration/artifacts/pending_decisions.md +36 -0
- package/templates/migration/artifacts/risk_register.md +44 -0
- package/templates/migration/artifacts/target_architecture.md +68 -0
- package/templates/migration/artifacts/target_business_rules.md +54 -0
- package/templates/migration/artifacts/target_data_model.md +64 -0
- package/templates/migration/artifacts/target_domain_model.md +62 -0
- package/templates/migration/catalogs/migration_strategies.md +101 -0
- package/templates/migration/catalogs/paradigm_catalog.md +101 -0
- package/templates/migration/expected_legacy_artifacts.yaml +77 -0
- package/templates/migration/state.json +28 -0
- package/templates/plan.md +65 -0
- package/templates/reversa-config.json +5 -0
- package/templates/state.json +18 -0
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { readFileSync, existsSync, mkdirSync, writeFileSync, readdirSync, statSync, unlinkSync } from 'fs';
|
|
2
|
+
import { join, resolve, isAbsolute, relative } from 'path';
|
|
3
|
+
import { npxCommand } from '../utils/package-info.js';
|
|
4
|
+
import { execFileSync } from 'child_process';
|
|
5
|
+
import { tmpdir } from 'os';
|
|
6
|
+
import { readJsonSafe } from '../utils/json-safe.js';
|
|
7
|
+
|
|
8
|
+
const MMDC_TIMEOUT_MS = 60_000;
|
|
9
|
+
|
|
10
|
+
export default async function exportDiagrams(args) {
|
|
11
|
+
const { default: chalk } = await import('chalk');
|
|
12
|
+
const { default: ora } = await import('ora');
|
|
13
|
+
|
|
14
|
+
const format = args.find(a => a.startsWith('--format='))?.split('=')[1] || 'svg';
|
|
15
|
+
const customOutput = args.find(a => a.startsWith('--output='))?.split('=')[1];
|
|
16
|
+
|
|
17
|
+
if (!['svg', 'png'].includes(format)) {
|
|
18
|
+
console.error(chalk.red(`\n Invalid format: "${format}". Use --format=svg or --format=png\n`));
|
|
19
|
+
process.exit(1);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const mmdc = findMmdc();
|
|
23
|
+
if (!mmdc) {
|
|
24
|
+
console.log(chalk.yellow('\n @mermaid-js/mermaid-cli not found.'));
|
|
25
|
+
console.log(' Install with: ' + chalk.bold('npm install -g @mermaid-js/mermaid-cli'));
|
|
26
|
+
console.log(' Then run: ' + chalk.bold(npxCommand('export-diagrams') + '\n'));
|
|
27
|
+
process.exit(1);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const statePath = join(process.cwd(), '.reversa', 'state.json');
|
|
31
|
+
if (!existsSync(statePath)) {
|
|
32
|
+
console.log(chalk.yellow('\n Reversa is not installed in this directory.'));
|
|
33
|
+
console.log(' Run ' + chalk.bold(npxCommand('install')) + ' to install.\n');
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const state = readJsonSafe(statePath);
|
|
38
|
+
const outputFolder = state.output_folder || '_reversa_sdd';
|
|
39
|
+
const sddPath = join(process.cwd(), outputFolder);
|
|
40
|
+
|
|
41
|
+
if (!existsSync(sddPath)) {
|
|
42
|
+
console.log(chalk.yellow(`\n Output folder not found: ${outputFolder}`));
|
|
43
|
+
console.log(' Run the agents first to generate the artifacts.\n');
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
let diagramsDir;
|
|
48
|
+
try {
|
|
49
|
+
diagramsDir = customOutput
|
|
50
|
+
? resolveOutputDir(customOutput)
|
|
51
|
+
: join(sddPath, 'diagrams');
|
|
52
|
+
} catch (err) {
|
|
53
|
+
console.error(chalk.red(`\n ${err.message}\n`));
|
|
54
|
+
process.exit(1);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
mkdirSync(diagramsDir, { recursive: true });
|
|
58
|
+
|
|
59
|
+
const spinner = ora(`Looking for diagrams in ${outputFolder}...`).start();
|
|
60
|
+
const mdFiles = findMdFiles(sddPath);
|
|
61
|
+
const blocks = [];
|
|
62
|
+
|
|
63
|
+
for (const file of mdFiles) {
|
|
64
|
+
const content = readFileSync(file, 'utf8');
|
|
65
|
+
const found = extractMermaidBlocks(content);
|
|
66
|
+
if (found.length > 0) {
|
|
67
|
+
const rel = file.replace(sddPath, '').replace(/\\/g, '/').replace(/^\//, '');
|
|
68
|
+
found.forEach((diagram, i) => blocks.push({ diagram, source: rel, index: i }));
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (blocks.length === 0) {
|
|
73
|
+
spinner.warn('No Mermaid diagrams found. Run the agents first.');
|
|
74
|
+
console.log();
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
spinner.succeed(`${blocks.length} diagram(s) found.`);
|
|
79
|
+
console.log();
|
|
80
|
+
|
|
81
|
+
let success = 0;
|
|
82
|
+
let failed = 0;
|
|
83
|
+
|
|
84
|
+
for (const { diagram, source, index } of blocks) {
|
|
85
|
+
const baseName = source
|
|
86
|
+
.replace(/\.md$/, '')
|
|
87
|
+
.replace(/\//g, '-')
|
|
88
|
+
.replace(/[^a-zA-Z0-9-_]/g, '_');
|
|
89
|
+
const countForSource = blocks.filter(b => b.source === source).length;
|
|
90
|
+
const suffix = countForSource > 1 ? `-${index + 1}` : '';
|
|
91
|
+
const outName = `${baseName}${suffix}.${format}`;
|
|
92
|
+
const outPath = join(diagramsDir, outName);
|
|
93
|
+
const tmpFile = join(tmpdir(), `reversa-${Date.now()}-${index}.mmd`);
|
|
94
|
+
const spin = ora(` Exporting ${outName}...`).start();
|
|
95
|
+
|
|
96
|
+
try {
|
|
97
|
+
writeFileSync(tmpFile, diagram, 'utf8');
|
|
98
|
+
runMmdc(mmdc, ['-i', tmpFile, '-o', outPath]);
|
|
99
|
+
spin.succeed(chalk.hex('#ffa203')(` ✓ ${outName}`));
|
|
100
|
+
success++;
|
|
101
|
+
} catch (err) {
|
|
102
|
+
const detail = err.stderr?.toString().split('\n')[0] || err.message;
|
|
103
|
+
spin.fail(chalk.red(` ✗ ${outName}: ${detail}`));
|
|
104
|
+
failed++;
|
|
105
|
+
} finally {
|
|
106
|
+
try { unlinkSync(tmpFile); } catch {}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
console.log();
|
|
111
|
+
console.log(chalk.bold(' Export complete:'));
|
|
112
|
+
console.log(` ${chalk.hex('#ffa203')(success + ' exported')}${failed > 0 ? ' ' + chalk.red(failed + ' error(s)') : ''}`);
|
|
113
|
+
console.log(` Folder: ${chalk.cyan(diagramsDir)}\n`);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function resolveOutputDir(customOutput) {
|
|
117
|
+
if (/[\n\r\0]/.test(customOutput)) {
|
|
118
|
+
throw new Error('Invalid --output: contains control characters');
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const target = isAbsolute(customOutput)
|
|
122
|
+
? resolve(customOutput)
|
|
123
|
+
: resolve(process.cwd(), customOutput);
|
|
124
|
+
|
|
125
|
+
const rel = relative(process.cwd(), target);
|
|
126
|
+
if (rel.startsWith('..') || isAbsolute(rel)) {
|
|
127
|
+
throw new Error(`Invalid --output: path must stay inside the project (${target})`);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
return target;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function runMmdc(mmdc, extraArgs) {
|
|
134
|
+
execFileSync(mmdc.command, [...mmdc.prefixArgs, ...extraArgs], {
|
|
135
|
+
stdio: 'pipe',
|
|
136
|
+
shell: mmdc.shell,
|
|
137
|
+
timeout: MMDC_TIMEOUT_MS,
|
|
138
|
+
cwd: process.cwd(),
|
|
139
|
+
windowsHide: true,
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function findMmdc() {
|
|
144
|
+
const localJs = join(process.cwd(), 'node_modules', '@mermaid-js', 'mermaid-cli', 'src', 'cli.js');
|
|
145
|
+
if (existsSync(localJs)) {
|
|
146
|
+
return { command: process.execPath, prefixArgs: [localJs], shell: false };
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const localBin = join(process.cwd(), 'node_modules', '.bin', 'mmdc');
|
|
150
|
+
if (process.platform === 'win32') {
|
|
151
|
+
const localCmd = localBin + '.cmd';
|
|
152
|
+
if (existsSync(localCmd)) {
|
|
153
|
+
return { command: localCmd, prefixArgs: [], shell: true };
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
if (existsSync(localBin)) {
|
|
157
|
+
return { command: localBin, prefixArgs: [], shell: false };
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
try {
|
|
161
|
+
const finder = process.platform === 'win32' ? 'where' : 'which';
|
|
162
|
+
const out = execFileSync(finder, ['mmdc'], { stdio: ['ignore', 'pipe', 'ignore'] })
|
|
163
|
+
.toString().trim().split(/\r?\n/)[0];
|
|
164
|
+
if (out && existsSync(out)) {
|
|
165
|
+
const isWinScript = process.platform === 'win32' && /\.(cmd|bat)$/i.test(out);
|
|
166
|
+
return { command: out, prefixArgs: [], shell: isWinScript };
|
|
167
|
+
}
|
|
168
|
+
} catch {}
|
|
169
|
+
|
|
170
|
+
return null;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function findMdFiles(dir) {
|
|
174
|
+
const results = [];
|
|
175
|
+
for (const entry of readdirSync(dir)) {
|
|
176
|
+
const full = join(dir, entry);
|
|
177
|
+
if (statSync(full).isDirectory()) {
|
|
178
|
+
results.push(...findMdFiles(full));
|
|
179
|
+
} else if (entry.endsWith('.md')) {
|
|
180
|
+
results.push(full);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
return results;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
function extractMermaidBlocks(content) {
|
|
187
|
+
const regex = /```mermaid\n([\s\S]*?)```/g;
|
|
188
|
+
const blocks = [];
|
|
189
|
+
let match;
|
|
190
|
+
while ((match = regex.exec(content)) !== null) {
|
|
191
|
+
blocks.push(match[1].trim());
|
|
192
|
+
}
|
|
193
|
+
return blocks;
|
|
194
|
+
}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { join, resolve } from 'path';
|
|
2
|
+
import { readFileSync, writeFileSync, existsSync } from 'fs';
|
|
3
|
+
import { fileURLToPath } from 'url';
|
|
4
|
+
import { dirname } from 'path';
|
|
5
|
+
import { detectEngines, ENGINES } from '../installer/detector.js';
|
|
6
|
+
import { checkExistingInstallation } from '../installer/validator.js';
|
|
7
|
+
import { runInstallPrompts, MIGRATION_AGENT_IDS, TRANSLATOR_AGENT_IDS, FORWARD_AGENT_IDS, PRICING_AGENT_IDS, DOCS_AGENT_IDS, IDEATION_AGENT_IDS, NEW_PROJECT_AGENT_IDS, BUGS_AGENT_IDS, REFACTOR_AGENT_IDS, FRONTEND_AGENT_IDS } from '../installer/prompts.js';
|
|
8
|
+
import { Writer } from '../installer/writer.js';
|
|
9
|
+
import { renderImpeccableNotice } from '../installer/bundled.js';
|
|
10
|
+
import { buildManifest, saveManifest, loadManifest } from '../installer/manifest.js';
|
|
11
|
+
import { readJsonSafe } from '../utils/json-safe.js';
|
|
12
|
+
import { PACKAGE_NAME } from '../utils/package-info.js';
|
|
13
|
+
import { clearTerminalForLogo, renderReversaLogo } from '../utils/banner.js';
|
|
14
|
+
|
|
15
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
16
|
+
const REPO_ROOT = resolve(__dirname, '..', '..');
|
|
17
|
+
|
|
18
|
+
function getVersion() {
|
|
19
|
+
try {
|
|
20
|
+
const pkg = readJsonSafe(join(REPO_ROOT, 'package.json'));
|
|
21
|
+
return pkg.version ?? '0.0.0';
|
|
22
|
+
} catch {
|
|
23
|
+
return '0.0.0';
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export default async function install(args) {
|
|
28
|
+
const { default: chalk } = await import('chalk');
|
|
29
|
+
const { default: ora } = await import('ora');
|
|
30
|
+
|
|
31
|
+
const projectRoot = resolve(process.cwd());
|
|
32
|
+
const version = getVersion();
|
|
33
|
+
|
|
34
|
+
clearTerminalForLogo();
|
|
35
|
+
console.log(renderReversaLogo(chalk));
|
|
36
|
+
console.log('');
|
|
37
|
+
console.log(chalk.gray('AI-Powered Reverse Engineering Framework'));
|
|
38
|
+
console.log('');
|
|
39
|
+
console.log(chalk.bold('Installation'));
|
|
40
|
+
console.log('');
|
|
41
|
+
|
|
42
|
+
// Check existing installation
|
|
43
|
+
const existing = checkExistingInstallation(projectRoot);
|
|
44
|
+
if (existing.installed) {
|
|
45
|
+
console.log(chalk.yellow(` Reversa is already installed (v${existing.version}) in this project.\n`));
|
|
46
|
+
const { default: inquirer } = await import('inquirer');
|
|
47
|
+
const { proceed } = await inquirer.prompt([{
|
|
48
|
+
prefix: '',
|
|
49
|
+
type: 'confirm',
|
|
50
|
+
name: 'proceed',
|
|
51
|
+
message: '\nDo you want to reinstall / update the configuration?',
|
|
52
|
+
default: false,
|
|
53
|
+
}]);
|
|
54
|
+
if (!proceed) {
|
|
55
|
+
console.log(chalk.gray('\n Installation cancelled.\n'));
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Detect engines
|
|
61
|
+
const detectedEngines = detectEngines(projectRoot);
|
|
62
|
+
const detected = detectedEngines.filter(e => e.detected).map(e => e.name).join(', ');
|
|
63
|
+
if (detected) {
|
|
64
|
+
console.log(chalk.gray(`Detected: ${detected}`));
|
|
65
|
+
console.log('');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Collect answers
|
|
69
|
+
let answers;
|
|
70
|
+
try {
|
|
71
|
+
answers = await runInstallPrompts(detectedEngines);
|
|
72
|
+
} catch (err) {
|
|
73
|
+
if (err.isTtyError || err.message?.includes('cancel')) {
|
|
74
|
+
console.log(chalk.gray('\n Installation cancelled.\n'));
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
throw err;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const selectedEngines = ENGINES.filter(e => answers.engines.includes(e.id));
|
|
81
|
+
const writer = new Writer(projectRoot);
|
|
82
|
+
|
|
83
|
+
const spinner = ora({ text: 'Installing agents...', color: 'cyan' }).start();
|
|
84
|
+
|
|
85
|
+
try {
|
|
86
|
+
// Install skills for each agent x engine
|
|
87
|
+
for (const agent of answers.agents) {
|
|
88
|
+
for (const engine of selectedEngines) {
|
|
89
|
+
await writer.installSkill(agent, engine.skillsDir);
|
|
90
|
+
if (engine.universalSkillsDir && engine.universalSkillsDir !== engine.skillsDir) {
|
|
91
|
+
await writer.installSkill(agent, engine.universalSkillsDir);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// Stop spinner before possible interactive conflict prompts
|
|
97
|
+
spinner.stop();
|
|
98
|
+
|
|
99
|
+
// Instalar entry file de cada engine (deduplica arquivos compartilhados)
|
|
100
|
+
const seenEntryFiles = new Set();
|
|
101
|
+
for (const engine of selectedEngines) {
|
|
102
|
+
if (!engine.entryFile) continue;
|
|
103
|
+
if (seenEntryFiles.has(engine.entryFile)) continue;
|
|
104
|
+
seenEntryFiles.add(engine.entryFile);
|
|
105
|
+
await writer.installEntryFile(engine, {
|
|
106
|
+
outputFolder: answers.output_folder,
|
|
107
|
+
forwardFolder: answers.forward_folder,
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
spinner.start('Creating .reversa/ structure...');
|
|
112
|
+
|
|
113
|
+
// Criar estrutura .reversa/
|
|
114
|
+
writer.createReversaDir(answers, version);
|
|
115
|
+
|
|
116
|
+
// Se reinstall: atualizar engines/agents/config no state.json existente
|
|
117
|
+
if (existing.installed) {
|
|
118
|
+
const statePath = join(projectRoot, '.reversa', 'state.json');
|
|
119
|
+
if (existsSync(statePath)) {
|
|
120
|
+
const s = readJsonSafe(statePath);
|
|
121
|
+
s.engines = answers.engines;
|
|
122
|
+
s.agents = answers.agents;
|
|
123
|
+
s.package = PACKAGE_NAME;
|
|
124
|
+
s.version = version;
|
|
125
|
+
writeFileSync(join(projectRoot, '.reversa', 'version'), version, 'utf8');
|
|
126
|
+
s.answer_mode = answers.answer_mode;
|
|
127
|
+
s.output_folder = answers.output_folder;
|
|
128
|
+
writeFileSync(statePath, JSON.stringify(s, null, 2), 'utf8');
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// .gitignore
|
|
133
|
+
if (answers.git_strategy === 'gitignore') {
|
|
134
|
+
writer.updateGitignore(answers.output_folder);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
writer.saveCreatedFiles();
|
|
138
|
+
|
|
139
|
+
spinner.text = 'Generating manifest...';
|
|
140
|
+
|
|
141
|
+
// Manifest com caminhos relativos, apenas arquivos (não diretórios)
|
|
142
|
+
const existingManifest = existing.installed ? loadManifest(projectRoot) : {};
|
|
143
|
+
const newManifest = buildManifest(projectRoot, writer.manifestPaths);
|
|
144
|
+
saveManifest(projectRoot, { ...existingManifest, ...newManifest });
|
|
145
|
+
|
|
146
|
+
spinner.succeed(chalk.hex('#ffa203')('Installation complete!'));
|
|
147
|
+
} catch (err) {
|
|
148
|
+
spinner.fail(chalk.red('Error during installation.'));
|
|
149
|
+
throw err;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// Resumo
|
|
153
|
+
const engineNames = selectedEngines.map(e => e.name).join(', ');
|
|
154
|
+
const migrationInstalled = answers.agents.filter(a => MIGRATION_AGENT_IDS.includes(a));
|
|
155
|
+
const translatorsInstalled = answers.agents.filter(a => TRANSLATOR_AGENT_IDS.includes(a));
|
|
156
|
+
const forwardInstalled = answers.agents.filter(a => FORWARD_AGENT_IDS.includes(a));
|
|
157
|
+
const pricingInstalled = answers.agents.filter(a => PRICING_AGENT_IDS.includes(a));
|
|
158
|
+
const docsInstalled = answers.agents.filter(a => DOCS_AGENT_IDS.includes(a));
|
|
159
|
+
const ideationInstalled = answers.agents.filter(a => IDEATION_AGENT_IDS.includes(a));
|
|
160
|
+
const newProjectInstalled = answers.agents.filter(a => NEW_PROJECT_AGENT_IDS.includes(a));
|
|
161
|
+
const bugsInstalled = answers.agents.filter(a => BUGS_AGENT_IDS.includes(a));
|
|
162
|
+
const refactorInstalled = answers.agents.filter(a => REFACTOR_AGENT_IDS.includes(a));
|
|
163
|
+
const frontendInstalled = answers.agents.filter(a => FRONTEND_AGENT_IDS.includes(a));
|
|
164
|
+
const discoveryInstalled = answers.agents.filter(a =>
|
|
165
|
+
!MIGRATION_AGENT_IDS.includes(a) &&
|
|
166
|
+
!TRANSLATOR_AGENT_IDS.includes(a) &&
|
|
167
|
+
!FORWARD_AGENT_IDS.includes(a) &&
|
|
168
|
+
!PRICING_AGENT_IDS.includes(a) &&
|
|
169
|
+
!DOCS_AGENT_IDS.includes(a) &&
|
|
170
|
+
!IDEATION_AGENT_IDS.includes(a) &&
|
|
171
|
+
!NEW_PROJECT_AGENT_IDS.includes(a) &&
|
|
172
|
+
!BUGS_AGENT_IDS.includes(a) &&
|
|
173
|
+
!REFACTOR_AGENT_IDS.includes(a) &&
|
|
174
|
+
!FRONTEND_AGENT_IDS.includes(a)
|
|
175
|
+
);
|
|
176
|
+
|
|
177
|
+
console.log('');
|
|
178
|
+
console.log(chalk.bold(' Summary:'));
|
|
179
|
+
console.log(` ${chalk.cyan('Project:')} ${answers.project_name}`);
|
|
180
|
+
console.log(` ${chalk.cyan('Engines:')} ${engineNames}`);
|
|
181
|
+
console.log(` ${chalk.cyan('Version:')} ${version}`);
|
|
182
|
+
console.log('');
|
|
183
|
+
console.log(chalk.bold(' Agents installed:'));
|
|
184
|
+
console.log(` ${chalk.cyan('Discovery Team:')} ${discoveryInstalled.length} agent(s)`);
|
|
185
|
+
if (migrationInstalled.length > 0) {
|
|
186
|
+
console.log(` ${chalk.cyan('Migration Team:')} ${migrationInstalled.length} agent(s)`);
|
|
187
|
+
}
|
|
188
|
+
if (forwardInstalled.length > 0) {
|
|
189
|
+
console.log(` ${chalk.cyan('Code Forward Cycle:')} ${forwardInstalled.length} agent(s)`);
|
|
190
|
+
}
|
|
191
|
+
if (ideationInstalled.length > 0) {
|
|
192
|
+
console.log(` ${chalk.cyan('Ideation Team:')} ${ideationInstalled.length} agent(s)`);
|
|
193
|
+
}
|
|
194
|
+
if (newProjectInstalled.length > 0) {
|
|
195
|
+
console.log(` ${chalk.cyan('New Project Team:')} ${newProjectInstalled.length} agent(s)`);
|
|
196
|
+
}
|
|
197
|
+
if (docsInstalled.length > 0) {
|
|
198
|
+
console.log(` ${chalk.cyan('Documentation Team:')} ${docsInstalled.length} agent(s)`);
|
|
199
|
+
}
|
|
200
|
+
if (bugsInstalled.length > 0) {
|
|
201
|
+
console.log(` ${chalk.cyan('Bug Team:')} ${bugsInstalled.length} agent(s)`);
|
|
202
|
+
}
|
|
203
|
+
if (refactorInstalled.length > 0) {
|
|
204
|
+
console.log(` ${chalk.cyan('Code Quality Team:')} ${refactorInstalled.length} agent(s)`);
|
|
205
|
+
}
|
|
206
|
+
if (translatorsInstalled.length > 0) {
|
|
207
|
+
console.log(` ${chalk.cyan('Translators:')} ${translatorsInstalled.length} agent(s)`);
|
|
208
|
+
}
|
|
209
|
+
if (pricingInstalled.length > 0) {
|
|
210
|
+
console.log(` ${chalk.cyan('Pricing:')} ${pricingInstalled.length} agent(s)`);
|
|
211
|
+
}
|
|
212
|
+
if (frontendInstalled.length > 0) {
|
|
213
|
+
console.log(` ${chalk.cyan('Front-end Team:')} ${frontendInstalled.length} agent(s) (Impeccable, Apache 2.0)`);
|
|
214
|
+
}
|
|
215
|
+
console.log('');
|
|
216
|
+
|
|
217
|
+
if (selectedEngines.length > 0) {
|
|
218
|
+
const names = selectedEngines.map(e => e.name);
|
|
219
|
+
const namesStr = names.length > 1
|
|
220
|
+
? names.slice(0, -1).join(', ') + ' or ' + names.slice(-1)[0]
|
|
221
|
+
: names[0];
|
|
222
|
+
const hasSlashEngine = selectedEngines.some(e => e.id !== 'codex' && e.id !== 'hermes');
|
|
223
|
+
const startCommand = hasSlashEngine ? '/reversa' : 'reversa';
|
|
224
|
+
console.log(chalk.cyan(` → Open ${namesStr} and type: ${startCommand} in the chat to start the discovery`));
|
|
225
|
+
if (migrationInstalled.length > 0) {
|
|
226
|
+
const migrateCommand = hasSlashEngine ? '/reversa-migrate' : 'reversa-migrate';
|
|
227
|
+
console.log(chalk.cyan(` → After discovery completes, run ${migrateCommand} to plan the rebuild`));
|
|
228
|
+
}
|
|
229
|
+
if (docsInstalled.length > 0) {
|
|
230
|
+
const docsCommand = hasSlashEngine ? '/reversa-docs' : 'reversa-docs';
|
|
231
|
+
console.log(chalk.cyan(` → For a visual HTML mini-site of the project, run ${docsCommand} after discovery`));
|
|
232
|
+
}
|
|
233
|
+
if (newProjectInstalled.length > 0) {
|
|
234
|
+
const newCommand = hasSlashEngine ? '/reversa-new' : 'reversa-new';
|
|
235
|
+
console.log(chalk.cyan(` → For a brand-new project from idea to specs, run ${newCommand}`));
|
|
236
|
+
}
|
|
237
|
+
if (bugsInstalled.length > 0) {
|
|
238
|
+
const bugCommand = hasSlashEngine ? '/reversa-debugger' : 'reversa-debugger';
|
|
239
|
+
const bugFixCommand = hasSlashEngine ? '/reversa-debugger-fix' : 'reversa-debugger-fix';
|
|
240
|
+
console.log(chalk.cyan(` → To track a defect, run ${bugCommand}; to fix a registered one, run ${bugFixCommand}`));
|
|
241
|
+
}
|
|
242
|
+
if (refactorInstalled.length > 0) {
|
|
243
|
+
const refactorCommand = hasSlashEngine ? '/reversa-refactor' : 'reversa-refactor';
|
|
244
|
+
console.log(chalk.cyan(` → To improve existing code (refactor, optimize, prune dead code), run ${refactorCommand} after discovery`));
|
|
245
|
+
}
|
|
246
|
+
if (translatorsInstalled.includes('reversa-n8n')) {
|
|
247
|
+
const n8nCommand = hasSlashEngine ? '/reversa-n8n' : 'reversa-n8n';
|
|
248
|
+
console.log(chalk.cyan(` → To analyze N8N workflows, drop the JSONs in n8n_json_workflows/ and run ${n8nCommand}`));
|
|
249
|
+
}
|
|
250
|
+
if (pricingInstalled.length > 0) {
|
|
251
|
+
const pricingCommand = hasSlashEngine ? '/reversa-pricing' : 'reversa-pricing';
|
|
252
|
+
console.log(chalk.cyan(` → To price your software or a feature, run ${pricingCommand} (advisor → profile → product, or size → estimate per feature)`));
|
|
253
|
+
}
|
|
254
|
+
if (frontendInstalled.length > 0) {
|
|
255
|
+
console.log('');
|
|
256
|
+
renderImpeccableNotice(chalk, { hasSlashEngine }).forEach(line => console.log(line));
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
console.log('');
|
|
260
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { existsSync } from 'fs';
|
|
2
|
+
import { join } from 'path';
|
|
3
|
+
import { npxCommand } from '../utils/package-info.js';
|
|
4
|
+
import { readJsonSafe } from '../utils/json-safe.js';
|
|
5
|
+
|
|
6
|
+
export default async function status(args) {
|
|
7
|
+
const { default: chalk } = await import('chalk');
|
|
8
|
+
|
|
9
|
+
const statePath = join(process.cwd(), '.reversa', 'state.json');
|
|
10
|
+
|
|
11
|
+
if (!existsSync(statePath)) {
|
|
12
|
+
console.log(chalk.yellow('\n Reversa is not installed in this directory.'));
|
|
13
|
+
console.log(' Run ' + chalk.bold(npxCommand('install')) + ' to install.\n');
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const state = readJsonSafe(statePath);
|
|
18
|
+
|
|
19
|
+
console.log(chalk.bold('\n Reversa: Status\n'));
|
|
20
|
+
console.log(` Project: ${chalk.cyan(state.project || '(not set)')}`);
|
|
21
|
+
console.log(` User: ${chalk.cyan(state.user_name || '(not set)')}`);
|
|
22
|
+
console.log(` Version: ${chalk.cyan(state.version || '?')}`);
|
|
23
|
+
console.log(` Current phase: ${chalk.cyan(state.phase || 'Not started')}`);
|
|
24
|
+
console.log(` Chat language: ${chalk.cyan(state.chat_language || 'pt-br')}`);
|
|
25
|
+
console.log(` Docs language: ${chalk.cyan(state.doc_language || 'pt-br')}`);
|
|
26
|
+
|
|
27
|
+
if (state.completed?.length > 0) {
|
|
28
|
+
console.log(`\n Completed: ${state.completed.map(f => chalk.hex('#ffa203')('✓ ' + f)).join(', ')}`);
|
|
29
|
+
}
|
|
30
|
+
if (state.pending?.length > 0) {
|
|
31
|
+
console.log(` Pending: ${state.pending.map(f => chalk.gray('○ ' + f)).join(', ')}`);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
console.log();
|
|
35
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { existsSync, readFileSync, rmSync, unlinkSync, statSync } from 'fs';
|
|
2
|
+
import { join, resolve } from 'path';
|
|
3
|
+
import { checkExistingInstallation } from '../installer/validator.js';
|
|
4
|
+
import { loadManifest, fileStatus } from '../installer/manifest.js';
|
|
5
|
+
|
|
6
|
+
export default async function uninstall(args) {
|
|
7
|
+
const { default: chalk } = await import('chalk');
|
|
8
|
+
const { default: inquirer } = await import('inquirer');
|
|
9
|
+
|
|
10
|
+
const projectRoot = resolve(process.cwd());
|
|
11
|
+
|
|
12
|
+
console.log(chalk.bold('\n Reversa: Uninstall\n'));
|
|
13
|
+
|
|
14
|
+
const existing = checkExistingInstallation(projectRoot);
|
|
15
|
+
if (!existing.installed) {
|
|
16
|
+
console.log(chalk.yellow(' Reversa is not installed in this directory.\n'));
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const state = existing.state;
|
|
21
|
+
const createdFiles = state.created_files ?? [];
|
|
22
|
+
const outputFolder = state.output_folder ?? '_reversa_sdd';
|
|
23
|
+
|
|
24
|
+
// Classificar arquivos via manifest
|
|
25
|
+
const manifest = loadManifest(projectRoot);
|
|
26
|
+
const toRemove = [];
|
|
27
|
+
const modifiedFiles = [];
|
|
28
|
+
|
|
29
|
+
for (const relPath of createdFiles) {
|
|
30
|
+
const hash = manifest[relPath];
|
|
31
|
+
if (hash) {
|
|
32
|
+
const status = fileStatus(projectRoot, relPath, hash);
|
|
33
|
+
if (status === 'modified') {
|
|
34
|
+
modifiedFiles.push(relPath);
|
|
35
|
+
continue; // será tratado separadamente
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
const absPath = join(projectRoot, relPath);
|
|
39
|
+
if (existsSync(absPath)) toRemove.push(relPath);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Separar em categorias para exibição
|
|
43
|
+
const skillEntries = toRemove.filter(f => f.replace(/\\/g, '/').includes('skills'));
|
|
44
|
+
const entryFiles = toRemove.filter(f =>
|
|
45
|
+
['CLAUDE.md', 'AGENTS.md', 'GEMINI.md', '.cursorrules', '.windsurfrules', '.gitignore']
|
|
46
|
+
.some(name => f.endsWith(name))
|
|
47
|
+
);
|
|
48
|
+
const otherFiles = toRemove.filter(f => !skillEntries.includes(f) && !entryFiles.includes(f));
|
|
49
|
+
|
|
50
|
+
console.log(' Files to be removed:\n');
|
|
51
|
+
|
|
52
|
+
if (entryFiles.length > 0) {
|
|
53
|
+
console.log(chalk.bold(' Entry files:'));
|
|
54
|
+
entryFiles.forEach(f => console.log(chalk.red(` ✗ ${f}`)));
|
|
55
|
+
}
|
|
56
|
+
if (skillEntries.length > 0) {
|
|
57
|
+
const skillDirs = [...new Set(skillEntries.map(f =>
|
|
58
|
+
f.replace(/\\/g, '/').split('/').slice(0, 3).join('/')
|
|
59
|
+
))];
|
|
60
|
+
console.log(chalk.bold(`\n Skills:`));
|
|
61
|
+
skillDirs.forEach(d => console.log(chalk.red(` ✗ ${d}/`)));
|
|
62
|
+
}
|
|
63
|
+
if (otherFiles.length > 0) {
|
|
64
|
+
console.log(chalk.bold('\n Other:'));
|
|
65
|
+
otherFiles.forEach(f => console.log(chalk.red(` ✗ ${f}`)));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
console.log(chalk.bold('\n Folders:'));
|
|
69
|
+
console.log(chalk.red(' ✗ .reversa/'));
|
|
70
|
+
|
|
71
|
+
const outputDir = join(projectRoot, outputFolder);
|
|
72
|
+
const hasOutputDir = existsSync(outputDir);
|
|
73
|
+
if (hasOutputDir) {
|
|
74
|
+
console.log(chalk.yellow(` ? ${outputFolder}/ (asked separately)`));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Warn about modified files
|
|
78
|
+
if (modifiedFiles.length > 0) {
|
|
79
|
+
console.log(chalk.yellow(`\n ${modifiedFiles.length} file(s) modified by you will be kept:`));
|
|
80
|
+
modifiedFiles.forEach(f => console.log(chalk.gray(` ✎ ${f}`)));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
console.log('');
|
|
84
|
+
|
|
85
|
+
// Confirmação explícita
|
|
86
|
+
const { confirmed } = await inquirer.prompt([{
|
|
87
|
+
prefix: '',
|
|
88
|
+
type: 'input',
|
|
89
|
+
name: 'confirmed',
|
|
90
|
+
message: `\nType ${chalk.red('"remove"')} to confirm uninstallation:`,
|
|
91
|
+
validate: (v) => v === 'remove' || 'Type exactly "remove" to confirm.',
|
|
92
|
+
}]);
|
|
93
|
+
|
|
94
|
+
if (confirmed !== 'remove') {
|
|
95
|
+
console.log(chalk.gray('\n Uninstallation cancelled.\n'));
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
let removed = 0;
|
|
100
|
+
let errors = 0;
|
|
101
|
+
|
|
102
|
+
for (const relPath of toRemove) {
|
|
103
|
+
const absPath = join(projectRoot, relPath);
|
|
104
|
+
try {
|
|
105
|
+
if (existsSync(absPath)) {
|
|
106
|
+
if (statSync(absPath).isDirectory()) {
|
|
107
|
+
rmSync(absPath, { recursive: true, force: true });
|
|
108
|
+
} else {
|
|
109
|
+
unlinkSync(absPath);
|
|
110
|
+
}
|
|
111
|
+
removed++;
|
|
112
|
+
}
|
|
113
|
+
} catch {
|
|
114
|
+
console.error(chalk.red(` Error removing: ${relPath}`));
|
|
115
|
+
errors++;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// Remover .reversa/ por inteiro
|
|
120
|
+
const reversaDir = join(projectRoot, '.reversa');
|
|
121
|
+
try {
|
|
122
|
+
if (existsSync(reversaDir)) {
|
|
123
|
+
rmSync(reversaDir, { recursive: true, force: true });
|
|
124
|
+
removed++;
|
|
125
|
+
}
|
|
126
|
+
} catch {
|
|
127
|
+
console.error(chalk.red(' Error removing .reversa/'));
|
|
128
|
+
errors++;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// Pasta de saída — perguntar separadamente
|
|
132
|
+
if (hasOutputDir) {
|
|
133
|
+
console.log('');
|
|
134
|
+
const { removeOutput } = await inquirer.prompt([{
|
|
135
|
+
prefix: '',
|
|
136
|
+
type: 'confirm',
|
|
137
|
+
name: 'removeOutput',
|
|
138
|
+
message: `\nAlso remove the specifications folder ${chalk.cyan(outputFolder + '/')}?`,
|
|
139
|
+
default: false,
|
|
140
|
+
}]);
|
|
141
|
+
if (removeOutput) {
|
|
142
|
+
try {
|
|
143
|
+
rmSync(outputDir, { recursive: true, force: true });
|
|
144
|
+
console.log(chalk.red(` ✗ ${outputFolder}/ removed.`));
|
|
145
|
+
} catch {
|
|
146
|
+
console.error(chalk.red(` Error removing ${outputFolder}/`));
|
|
147
|
+
}
|
|
148
|
+
} else {
|
|
149
|
+
console.log(chalk.gray(` → ${outputFolder}/ kept.`));
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
console.log('');
|
|
154
|
+
if (errors === 0) {
|
|
155
|
+
console.log(chalk.hex('#ffa203')(' Reversa removed successfully.\n'));
|
|
156
|
+
} else {
|
|
157
|
+
console.log(chalk.yellow(` Completed with ${errors} error(s). Check the files above.\n`));
|
|
158
|
+
}
|
|
159
|
+
}
|