imhcode 1.0.0
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/.github/ISSUE_TEMPLATE/bug_report.md +41 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +39 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +29 -0
- package/.github/copilot-instructions.md +43 -0
- package/.github/workflows/framework-validator.yml +53 -0
- package/.gitignore.template +15 -0
- package/AGENTS.md +69 -0
- package/CLAUDE.md +27 -0
- package/README.md +63 -0
- package/SETUP.md +81 -0
- package/USER_MANUAL.md +70 -0
- package/agents/android-executor/SYSTEM.md +32 -0
- package/agents/android-executor/agent.yml +53 -0
- package/agents/debugger/SYSTEM.md +32 -0
- package/agents/debugger/agent.yml +56 -0
- package/agents/designer/SYSTEM.md +32 -0
- package/agents/designer/agent.yml +59 -0
- package/agents/devops-executor/SYSTEM.md +32 -0
- package/agents/devops-executor/agent.yml +56 -0
- package/agents/flutter-executor/SYSTEM.md +32 -0
- package/agents/flutter-executor/agent.yml +54 -0
- package/agents/ios-executor/SYSTEM.md +32 -0
- package/agents/ios-executor/agent.yml +53 -0
- package/agents/java-executor/SYSTEM.md +32 -0
- package/agents/java-executor/agent.yml +57 -0
- package/agents/laravel-executor/SYSTEM.md +32 -0
- package/agents/laravel-executor/agent.yml +59 -0
- package/agents/nextjs-executor/SYSTEM.md +32 -0
- package/agents/nextjs-executor/agent.yml +60 -0
- package/agents/planner/SYSTEM.md +32 -0
- package/agents/planner/agent.yml +56 -0
- package/agents/python-executor/SYSTEM.md +32 -0
- package/agents/python-executor/agent.yml +58 -0
- package/agents/react-executor/SYSTEM.md +32 -0
- package/agents/react-executor/agent.yml +58 -0
- package/agents/react-native-executor/SYSTEM.md +32 -0
- package/agents/react-native-executor/agent.yml +53 -0
- package/agents/security-auditor/SYSTEM.md +32 -0
- package/agents/security-auditor/agent.yml +56 -0
- package/agents/seo-optimizer/SYSTEM.md +32 -0
- package/agents/seo-optimizer/agent.yml +54 -0
- package/agents/systems-executor/SYSTEM.md +32 -0
- package/agents/systems-executor/agent.yml +54 -0
- package/agents/tester/SYSTEM.md +32 -0
- package/agents/tester/agent.yml +58 -0
- package/agents/vue-executor/SYSTEM.md +32 -0
- package/agents/vue-executor/agent.yml +58 -0
- package/agents/web3-executor/SYSTEM.md +32 -0
- package/agents/web3-executor/agent.yml +55 -0
- package/bin/imhcode.js +1634 -0
- package/dist/orchestrator/builder.d.ts +23 -0
- package/dist/orchestrator/builder.d.ts.map +1 -0
- package/dist/orchestrator/builder.js +231 -0
- package/dist/orchestrator/builder.js.map +1 -0
- package/dist/orchestrator/executor.d.ts +43 -0
- package/dist/orchestrator/executor.d.ts.map +1 -0
- package/dist/orchestrator/executor.js +356 -0
- package/dist/orchestrator/executor.js.map +1 -0
- package/dist/orchestrator/index.d.ts +35 -0
- package/dist/orchestrator/index.d.ts.map +1 -0
- package/dist/orchestrator/index.js +490 -0
- package/dist/orchestrator/index.js.map +1 -0
- package/dist/orchestrator/loader.d.ts +33 -0
- package/dist/orchestrator/loader.d.ts.map +1 -0
- package/dist/orchestrator/loader.js +203 -0
- package/dist/orchestrator/loader.js.map +1 -0
- package/dist/orchestrator/registry.d.ts +63 -0
- package/dist/orchestrator/registry.d.ts.map +1 -0
- package/dist/orchestrator/registry.js +181 -0
- package/dist/orchestrator/registry.js.map +1 -0
- package/dist/orchestrator/schema.d.ts +132 -0
- package/dist/orchestrator/schema.d.ts.map +1 -0
- package/dist/orchestrator/schema.js +101 -0
- package/dist/orchestrator/schema.js.map +1 -0
- package/dist/orchestrator/session.d.ts +25 -0
- package/dist/orchestrator/session.d.ts.map +1 -0
- package/dist/orchestrator/session.js +80 -0
- package/dist/orchestrator/session.js.map +1 -0
- package/dist/orchestrator/types.d.ts +91 -0
- package/dist/orchestrator/types.d.ts.map +1 -0
- package/dist/orchestrator/types.js +7 -0
- package/dist/orchestrator/types.js.map +1 -0
- package/package.json +95 -0
- package/skills/AnimatePresence/SKILL.md +3 -0
- package/skills/accessibility/SKILL.md +146 -0
- package/skills/agent-architecture-audit/SKILL.md +256 -0
- package/skills/agent-eval/SKILL.md +145 -0
- package/skills/agent-introspection-debugging/SKILL.md +153 -0
- package/skills/agentic-engineering/SKILL.md +63 -0
- package/skills/ai-regression-testing/SKILL.md +385 -0
- package/skills/android-clean-architecture/SKILL.md +339 -0
- package/skills/animated-component-libraries/SKILL.md +8 -0
- package/skills/animejs/SKILL.md +8 -0
- package/skills/api-connector-builder/SKILL.md +120 -0
- package/skills/api-design/SKILL.md +523 -0
- package/skills/apple/SKILL.md +158 -0
- package/skills/apple/metadata.json +16 -0
- package/skills/architecture-decision-records/SKILL.md +179 -0
- package/skills/article-writing/SKILL.md +79 -0
- package/skills/automation-audit-ops/SKILL.md +142 -0
- package/skills/awwwards/SKILL.md +162 -0
- package/skills/awwwards/metadata.json +16 -0
- package/skills/babylonjs-engine/SKILL.md +8 -0
- package/skills/backend-patterns/SKILL.md +561 -0
- package/skills/baqir-docs/SKILL.md +3 -0
- package/skills/barba-js/SKILL.md +8 -0
- package/skills/benchmark/SKILL.md +93 -0
- package/skills/best-practice/SKILL.md +7 -0
- package/skills/best-practice/assets/claude-memory/claude-memory-monorepo.jpg +0 -0
- package/skills/best-practice/assets/claude-power-ups/dial-the-model-1.png +0 -0
- package/skills/best-practice/assets/claude-power-ups/dial-the-model-2.png +0 -0
- package/skills/best-practice/assets/claude-power-ups/dial-the-model-3.png +0 -0
- package/skills/best-practice/assets/claude-power-ups/powerup-menu.png +0 -0
- package/skills/best-practice/claude-cli-startup-flags.md +231 -0
- package/skills/best-practice/claude-commands.md +132 -0
- package/skills/best-practice/claude-mcp.md +132 -0
- package/skills/best-practice/claude-memory.md +121 -0
- package/skills/best-practice/claude-power-ups.md +66 -0
- package/skills/best-practice/claude-settings.md +1170 -0
- package/skills/best-practice/claude-skills.md +58 -0
- package/skills/best-practice/claude-subagents.md +56 -0
- package/skills/blender-motion-state-inspection/SKILL.md +164 -0
- package/skills/bootstrap-patterns/SKILL.md +316 -0
- package/skills/brand-guidelines/LICENSE.txt +202 -0
- package/skills/brand-guidelines/SKILL.md +73 -0
- package/skills/brand-voice/SKILL.md +97 -0
- package/skills/brand-voice/references/voice-profile-schema.md +55 -0
- package/skills/browser-qa/SKILL.md +87 -0
- package/skills/canary-watch/SKILL.md +107 -0
- package/skills/canvas-design/LICENSE.txt +202 -0
- package/skills/canvas-design/SKILL.md +8 -0
- package/skills/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
- package/skills/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
- package/skills/caveman/SKILL.md +74 -0
- package/skills/changelog-generator/SKILL.md +104 -0
- package/skills/cisco-ios-patterns/SKILL.md +163 -0
- package/skills/ckm:design-system/SKILL.md +3 -0
- package/skills/ckm:slides/SKILL.md +3 -0
- package/skills/claude-red/SKILL.md +35 -0
- package/skills/click-path-audit/SKILL.md +244 -0
- package/skills/clickhouse-io/SKILL.md +439 -0
- package/skills/codebase-onboarding/SKILL.md +233 -0
- package/skills/coding-standards/SKILL.md +549 -0
- package/skills/compose-multiplatform-patterns/SKILL.md +299 -0
- package/skills/computational-architecture/SKILL.md +31 -0
- package/skills/content-engine/SKILL.md +131 -0
- package/skills/content-research-writer/SKILL.md +538 -0
- package/skills/continuous-agent-loop/SKILL.md +45 -0
- package/skills/cost-aware-llm-pipeline/SKILL.md +183 -0
- package/skills/cpp-coding-standards/SKILL.md +723 -0
- package/skills/crosspost/SKILL.md +111 -0
- package/skills/css-container-queries/SKILL.md +132 -0
- package/skills/customer-billing-ops/SKILL.md +140 -0
- package/skills/customs-trade-compliance/SKILL.md +263 -0
- package/skills/dart-flutter-patterns/SKILL.md +563 -0
- package/skills/dashboard-builder/SKILL.md +108 -0
- package/skills/data-scraper-agent/SKILL.md +764 -0
- package/skills/database-migrations/SKILL.md +429 -0
- package/skills/deep-research/SKILL.md +159 -0
- package/skills/defi-amm-security/SKILL.md +166 -0
- package/skills/deployment-patterns/SKILL.md +427 -0
- package/skills/design-auditor/README.md +504 -0
- package/skills/design-auditor/README_KR.md +327 -0
- package/skills/design-auditor/SKILL.md +8 -0
- package/skills/design-auditor/references/animation.md +300 -0
- package/skills/design-auditor/references/color.md +241 -0
- package/skills/design-auditor/references/corner-radius.md +331 -0
- package/skills/design-auditor/references/elevation.md +249 -0
- package/skills/design-auditor/references/ethics.md +877 -0
- package/skills/design-auditor/references/figma-mcp.md +377 -0
- package/skills/design-auditor/references/heuristics.md +730 -0
- package/skills/design-auditor/references/i18n.md +254 -0
- package/skills/design-auditor/references/iconography.md +201 -0
- package/skills/design-auditor/references/microcopy.md +227 -0
- package/skills/design-auditor/references/navigation.md +311 -0
- package/skills/design-auditor/references/spacing.md +313 -0
- package/skills/design-auditor/references/states.md +254 -0
- package/skills/design-auditor/references/tokens.md +286 -0
- package/skills/design-auditor/references/typography.md +273 -0
- package/skills/design-system/SKILL.md +82 -0
- package/skills/design-tokens-system/SKILL.md +156 -0
- package/skills/development-workflows/SKILL.md +7 -0
- package/skills/development-workflows/cross-model-workflow/assets/cross-model-workflow.png +0 -0
- package/skills/development-workflows/cross-model-workflow/cross-model-workflow.md +55 -0
- package/skills/development-workflows/rpi/.claude/agents/code-reviewer.md +21 -0
- package/skills/development-workflows/rpi/.claude/agents/constitutional-validator.md +288 -0
- package/skills/development-workflows/rpi/.claude/agents/documentation-analyst-writer.md +64 -0
- package/skills/development-workflows/rpi/.claude/agents/product-manager.md +15 -0
- package/skills/development-workflows/rpi/.claude/agents/requirement-parser.md +238 -0
- package/skills/development-workflows/rpi/.claude/agents/senior-software-engineer.md +15 -0
- package/skills/development-workflows/rpi/.claude/agents/technical-cto-advisor.md +201 -0
- package/skills/development-workflows/rpi/.claude/agents/ux-designer.md +14 -0
- package/skills/development-workflows/rpi/.claude/commands/rpi/implement.md +634 -0
- package/skills/development-workflows/rpi/.claude/commands/rpi/plan.md +416 -0
- package/skills/development-workflows/rpi/.claude/commands/rpi/research.md +381 -0
- package/skills/development-workflows/rpi/rpi-workflow.md +101 -0
- package/skills/development-workflows/rpi/rpi-workflow.svg +178 -0
- package/skills/django-celery/SKILL.md +457 -0
- package/skills/django-patterns/SKILL.md +734 -0
- package/skills/django-security/SKILL.md +593 -0
- package/skills/django-tdd/SKILL.md +729 -0
- package/skills/dmux-workflows/SKILL.md +7 -0
- package/skills/docker-patterns/SKILL.md +364 -0
- package/skills/documentation-lookup/SKILL.md +90 -0
- package/skills/domain-name-brainstormer/SKILL.md +212 -0
- package/skills/dribbble/SKILL.md +160 -0
- package/skills/dribbble/metadata.json +16 -0
- package/skills/e2e-testing/SKILL.md +326 -0
- package/skills/empirical-research/SKILL.md +22 -0
- package/skills/error-handling/SKILL.md +376 -0
- package/skills/eval-harness/SKILL.md +270 -0
- package/skills/evm-token-decimals/SKILL.md +130 -0
- package/skills/fastapi-patterns/SKILL.md +327 -0
- package/skills/finance-billing-ops/SKILL.md +127 -0
- package/skills/flox-environments/SKILL.md +496 -0
- package/skills/flutter-dart-code-review/SKILL.md +435 -0
- package/skills/foundation-models-on-device/SKILL.md +243 -0
- package/skills/framer/SKILL.md +159 -0
- package/skills/framer/metadata.json +16 -0
- package/skills/frontend-design/LICENSE.txt +21 -0
- package/skills/frontend-design/README.md +71 -0
- package/skills/frontend-design/SKILL.md +115 -0
- package/skills/frontend-design-direction/SKILL.md +92 -0
- package/skills/frontend-patterns/SKILL.md +7 -0
- package/skills/frontend-slides/SKILL.md +184 -0
- package/skills/frontend-slides/STYLE_PRESETS.md +330 -0
- package/skills/frontend-slides/animation-patterns.md +122 -0
- package/skills/frontend-slides/html-template.md +419 -0
- package/skills/frontend-slides/scripts/export-pdf.sh +418 -0
- package/skills/frontend-slides/scripts/extract-pptx.py +96 -0
- package/skills/frontend-slides/viewport-base.css +153 -0
- package/skills/gateguard/SKILL.md +125 -0
- package/skills/git-workflow/SKILL.md +715 -0
- package/skills/github-ops/SKILL.md +144 -0
- package/skills/golang-patterns/SKILL.md +674 -0
- package/skills/golang-testing/SKILL.md +720 -0
- package/skills/graphify/__init__.py +28 -0
- package/skills/graphify/__main__.py +2899 -0
- package/skills/graphify/analyze.py +608 -0
- package/skills/graphify/benchmark.py +152 -0
- package/skills/graphify/build.py +366 -0
- package/skills/graphify/cache.py +244 -0
- package/skills/graphify/callflow_html.py +2014 -0
- package/skills/graphify/cluster.py +267 -0
- package/skills/graphify/dedup.py +414 -0
- package/skills/graphify/detect.py +1018 -0
- package/skills/graphify/export.py +1264 -0
- package/skills/graphify/extract.py +6646 -0
- package/skills/graphify/global_graph.py +155 -0
- package/skills/graphify/google_workspace.py +223 -0
- package/skills/graphify/hooks.py +304 -0
- package/skills/graphify/ingest.py +331 -0
- package/skills/graphify/llm.py +1111 -0
- package/skills/graphify/manifest.py +4 -0
- package/skills/graphify/prs.py +746 -0
- package/skills/graphify/report.py +203 -0
- package/skills/graphify/security.py +242 -0
- package/skills/graphify/serve.py +899 -0
- package/skills/graphify/skill-aider.md +1229 -0
- package/skills/graphify/skill-claw.md +1229 -0
- package/skills/graphify/skill-codex.md +1290 -0
- package/skills/graphify/skill-copilot.md +1317 -0
- package/skills/graphify/skill-droid.md +1285 -0
- package/skills/graphify/skill-kiro.md +1228 -0
- package/skills/graphify/skill-opencode.md +1340 -0
- package/skills/graphify/skill-pi.md +1228 -0
- package/skills/graphify/skill-trae.md +1254 -0
- package/skills/graphify/skill-vscode.md +258 -0
- package/skills/graphify/skill-windows.md +1434 -0
- package/skills/graphify/skill.md +1086 -0
- package/skills/graphify/transcribe.py +184 -0
- package/skills/graphify/tree_html.py +580 -0
- package/skills/graphify/validate.py +72 -0
- package/skills/graphify/watch.py +728 -0
- package/skills/graphify/wiki.py +259 -0
- package/skills/growth-marketing/SKILL.md +26 -0
- package/skills/gsap-scrolltrigger/SKILL.md +8 -0
- package/skills/healthcare-cdss-patterns/SKILL.md +245 -0
- package/skills/healthcare-emr-patterns/SKILL.md +159 -0
- package/skills/healthcare-phi-compliance/SKILL.md +145 -0
- package/skills/hexagonal-architecture/SKILL.md +276 -0
- package/skills/hipaa-compliance/SKILL.md +78 -0
- package/skills/homelab-network-setup/SKILL.md +129 -0
- package/skills/imhcode/SKILL.md +183 -0
- package/skills/imhcode-brainstorm/SKILL.md +37 -0
- package/skills/imhcode-codebase-knowledge/SKILL.md +37 -0
- package/skills/imhcode-codebase-knowledge/assets/templates/ARCHITECTURE.md +49 -0
- package/skills/imhcode-codebase-knowledge/assets/templates/CONCERNS.md +56 -0
- package/skills/imhcode-codebase-knowledge/assets/templates/CONVENTIONS.md +52 -0
- package/skills/imhcode-codebase-knowledge/assets/templates/INTEGRATIONS.md +48 -0
- package/skills/imhcode-codebase-knowledge/assets/templates/STACK.md +56 -0
- package/skills/imhcode-codebase-knowledge/assets/templates/STRUCTURE.md +44 -0
- package/skills/imhcode-codebase-knowledge/assets/templates/TESTING.md +57 -0
- package/skills/imhcode-codebase-knowledge/references/inquiry-checkpoints.md +70 -0
- package/skills/imhcode-codebase-knowledge/references/stack-detection.md +131 -0
- package/skills/imhcode-codebase-knowledge/scripts/scan.py +712 -0
- package/skills/imhcode-dispatch/SKILL.md +31 -0
- package/skills/imhcode-saas-architect/SKILL.md +55 -0
- package/skills/imhcode-security/SKILL.md +42 -0
- package/skills/imhcode-sprint-planner/SKILL.md +42 -0
- package/skills/inventory-demand-planning/SKILL.md +247 -0
- package/skills/investor-materials/SKILL.md +96 -0
- package/skills/investor-outreach/SKILL.md +91 -0
- package/skills/ios-icon-gen/SKILL.md +157 -0
- package/skills/ios-icon-gen/scripts/generate_icons.swift +258 -0
- package/skills/ios-icon-gen/scripts/iconify_gen.sh +235 -0
- package/skills/java-coding-standards/SKILL.md +383 -0
- package/skills/jpa-patterns/SKILL.md +151 -0
- package/skills/kotlin-ktor-patterns/SKILL.md +689 -0
- package/skills/kotlin-patterns/SKILL.md +711 -0
- package/skills/laravel-patterns/SKILL.md +415 -0
- package/skills/laravel-plugin-discovery/SKILL.md +229 -0
- package/skills/laravel-security/SKILL.md +285 -0
- package/skills/laravel-tdd/SKILL.md +283 -0
- package/skills/laravel-verification/SKILL.md +179 -0
- package/skills/lightweight-3d-effects/SKILL.md +8 -0
- package/skills/linear/SKILL.md +156 -0
- package/skills/linear/metadata.json +16 -0
- package/skills/liquid-glass-design/SKILL.md +279 -0
- package/skills/llm-trading-agent-security/SKILL.md +146 -0
- package/skills/locomotive-scroll/SKILL.md +8 -0
- package/skills/logistics-exception-management/SKILL.md +222 -0
- package/skills/lottie-animations/SKILL.md +8 -0
- package/skills/make-interfaces-feel-better/SKILL.md +151 -0
- package/skills/mcp-server-patterns/SKILL.md +69 -0
- package/skills/meeting-insights-analyzer/SKILL.md +327 -0
- package/skills/micro-interactions/SKILL.md +178 -0
- package/skills/mle-workflow/SKILL.md +346 -0
- package/skills/mobbin/SKILL.md +157 -0
- package/skills/mobbin/metadata.json +16 -0
- package/skills/mobile-app-design/README.md +302 -0
- package/skills/mobile-app-design/SKILL.md +330 -0
- package/skills/mobile-app-design/examples/design-system-config.ts +685 -0
- package/skills/mobile-app-design/examples/form-validation-example.tsx +501 -0
- package/skills/mobile-app-design/examples/optimized-list-example.tsx +384 -0
- package/skills/mobile-app-design/examples/profile-screen-example.tsx +450 -0
- package/skills/mobile-app-design/references/accessibility-checklist.md +525 -0
- package/skills/mobile-app-design/references/android-guidelines.md +582 -0
- package/skills/mobile-app-design/references/common-mistakes.md +834 -0
- package/skills/mobile-app-design/references/ios-guidelines.md +421 -0
- package/skills/mobile-app-design/references/performance-patterns.md +705 -0
- package/skills/mobile-app-design/references/platform-differences.md +353 -0
- package/skills/mobile-app-design/references/ui-libraries.md +729 -0
- package/skills/mobile-app-design/scripts/accessibility-audit.sh +281 -0
- package/skills/mobile-app-design/scripts/check-contrast.py +188 -0
- package/skills/mobile-app-design/scripts/validate-touch-targets.sh +228 -0
- package/skills/mobile-app-ui-design/INDEX.md +131 -0
- package/skills/mobile-app-ui-design/README.md +135 -0
- package/skills/mobile-app-ui-design/SKILL.md +7 -0
- package/skills/mobile-app-ui-design/references/industry-conventions.md +151 -0
- package/skills/modern-web-design/SKILL.md +8 -0
- package/skills/motion-advanced/SKILL.md +596 -0
- package/skills/motion-design/SKILL.md +21 -0
- package/skills/motion-foundations/SKILL.md +299 -0
- package/skills/motion-framer/SKILL.md +8 -0
- package/skills/motion-patterns/SKILL.md +435 -0
- package/skills/motion-ui/SKILL.md +575 -0
- package/skills/mysql-patterns/SKILL.md +412 -0
- package/skills/nestjs-patterns/SKILL.md +230 -0
- package/skills/network-config-validation/SKILL.md +210 -0
- package/skills/nextjs-turbopack/SKILL.md +44 -0
- package/skills/nodejs-keccak256/SKILL.md +102 -0
- package/skills/nothing-design/SKILL.md +177 -0
- package/skills/nothing-design/references/components.md +153 -0
- package/skills/nothing-design/references/platform-mapping.md +64 -0
- package/skills/nothing-design/references/tokens.md +142 -0
- package/skills/nuxt4-patterns/SKILL.md +100 -0
- package/skills/openclaw-persona-forge/SKILL.md +288 -0
- package/skills/openclaw-persona-forge/gacha.py +224 -0
- package/skills/openclaw-persona-forge/gacha.sh +5 -0
- package/skills/openclaw-persona-forge/references/avatar-style.md +124 -0
- package/skills/openclaw-persona-forge/references/boundary-rules.md +53 -0
- package/skills/openclaw-persona-forge/references/error-handling.md +53 -0
- package/skills/openclaw-persona-forge/references/identity-tension.md +48 -0
- package/skills/openclaw-persona-forge/references/naming-system.md +39 -0
- package/skills/openclaw-persona-forge/references/output-template.md +166 -0
- package/skills/orchestration-workflow/SKILL.md +199 -0
- package/skills/orchestration-workflow/orchestration-workflow.gif +0 -0
- package/skills/orchestration-workflow/orchestration-workflow.md +199 -0
- package/skills/orchestration-workflow/orchestration-workflow.svg +78 -0
- package/skills/orchestration-workflow/output.md +13 -0
- package/skills/orchestration-workflow/weather.svg +6 -0
- package/skills/pixijs-2d/SKILL.md +8 -0
- package/skills/plan-orchestrate/SKILL.md +262 -0
- package/skills/plankton-code-quality/SKILL.md +236 -0
- package/skills/postgres-patterns/SKILL.md +147 -0
- package/skills/ppt-mckinsey/SKILL.md +27 -0
- package/skills/prisma-patterns/SKILL.md +371 -0
- package/skills/product-capability/SKILL.md +141 -0
- package/skills/product-lens/SKILL.md +92 -0
- package/skills/production-audit/SKILL.md +206 -0
- package/skills/project-flow-ops/SKILL.md +111 -0
- package/skills/prompt-optimizer/SKILL.md +398 -0
- package/skills/python-patterns/SKILL.md +750 -0
- package/skills/python-testing/SKILL.md +816 -0
- package/skills/pytorch-patterns/SKILL.md +396 -0
- package/skills/quarkus-patterns/SKILL.md +722 -0
- package/skills/radix-ui-primitives/SKILL.md +86 -0
- package/skills/react-native-best-practices/SKILL.md +83 -0
- package/skills/react-native-brownfield-migration/SKILL.md +115 -0
- package/skills/react-spring-physics/SKILL.md +8 -0
- package/skills/react-three-fiber/SKILL.md +8 -0
- package/skills/recsys-pipeline-architect/SKILL.md +114 -0
- package/skills/redis-patterns/SKILL.md +403 -0
- package/skills/remotion-video-creation/SKILL.md +43 -0
- package/skills/remotion-video-creation/rules/3d.md +86 -0
- package/skills/remotion-video-creation/rules/animations.md +29 -0
- package/skills/remotion-video-creation/rules/assets/charts-bar-chart.tsx +173 -0
- package/skills/remotion-video-creation/rules/assets/text-animations-typewriter.tsx +100 -0
- package/skills/remotion-video-creation/rules/assets/text-animations-word-highlight.tsx +108 -0
- package/skills/remotion-video-creation/rules/assets.md +78 -0
- package/skills/remotion-video-creation/rules/audio.md +172 -0
- package/skills/remotion-video-creation/rules/calculate-metadata.md +104 -0
- package/skills/remotion-video-creation/rules/can-decode.md +75 -0
- package/skills/remotion-video-creation/rules/charts.md +58 -0
- package/skills/remotion-video-creation/rules/compositions.md +146 -0
- package/skills/remotion-video-creation/rules/display-captions.md +126 -0
- package/skills/remotion-video-creation/rules/extract-frames.md +229 -0
- package/skills/remotion-video-creation/rules/fonts.md +152 -0
- package/skills/remotion-video-creation/rules/get-audio-duration.md +58 -0
- package/skills/remotion-video-creation/rules/get-video-dimensions.md +68 -0
- package/skills/remotion-video-creation/rules/get-video-duration.md +58 -0
- package/skills/remotion-video-creation/rules/gifs.md +138 -0
- package/skills/remotion-video-creation/rules/images.md +130 -0
- package/skills/remotion-video-creation/rules/import-srt-captions.md +67 -0
- package/skills/remotion-video-creation/rules/lottie.md +67 -0
- package/skills/remotion-video-creation/rules/measuring-dom-nodes.md +34 -0
- package/skills/remotion-video-creation/rules/measuring-text.md +143 -0
- package/skills/remotion-video-creation/rules/sequencing.md +106 -0
- package/skills/remotion-video-creation/rules/tailwind.md +11 -0
- package/skills/remotion-video-creation/rules/text-animations.md +20 -0
- package/skills/remotion-video-creation/rules/timing.md +179 -0
- package/skills/remotion-video-creation/rules/transcribe-captions.md +19 -0
- package/skills/remotion-video-creation/rules/transitions.md +122 -0
- package/skills/remotion-video-creation/rules/trimming.md +52 -0
- package/skills/remotion-video-creation/rules/videos.md +171 -0
- package/skills/repo-scan/SKILL.md +78 -0
- package/skills/responsive-email-templates/SKILL.md +110 -0
- package/skills/rive-interactive/SKILL.md +8 -0
- package/skills/rust-patterns/SKILL.md +499 -0
- package/skills/rust-testing/SKILL.md +500 -0
- package/skills/scroll-reveal-libraries/SKILL.md +8 -0
- package/skills/security-bounty-hunter/SKILL.md +99 -0
- package/skills/security-review/SKILL.md +503 -0
- package/skills/security-review/cloud-infrastructure-security.md +361 -0
- package/skills/security-scan/SKILL.md +165 -0
- package/skills/seo/SKILL.md +154 -0
- package/skills/seo-growth/SKILL.md +34 -0
- package/skills/shadcn-ui-patterns/SKILL.md +123 -0
- package/skills/spline-interactive/SKILL.md +8 -0
- package/skills/springboot-patterns/SKILL.md +314 -0
- package/skills/springboot-security/SKILL.md +272 -0
- package/skills/springboot-tdd/SKILL.md +158 -0
- package/skills/strategic-compact/SKILL.md +131 -0
- package/skills/stripe/SKILL.md +168 -0
- package/skills/stripe/metadata.json +16 -0
- package/skills/swift-actor-persistence/SKILL.md +143 -0
- package/skills/swift-concurrency-6-2/SKILL.md +216 -0
- package/skills/swiftui-patterns/SKILL.md +259 -0
- package/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/skills/systematic-debugging/SKILL.md +296 -0
- package/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/skills/systematic-debugging/find-polluter.sh +63 -0
- package/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/skills/systematic-debugging/test-academic.md +14 -0
- package/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/skills/tailwindcss-v4/SKILL.md +107 -0
- package/skills/tdd-workflow/SKILL.md +463 -0
- package/skills/team-builder/SKILL.md +168 -0
- package/skills/test-driven-development/SKILL.md +371 -0
- package/skills/test-driven-development/testing-anti-patterns.md +299 -0
- package/skills/theme-factory/LICENSE.txt +202 -0
- package/skills/theme-factory/SKILL.md +59 -0
- package/skills/theme-factory/theme-showcase.pdf +0 -0
- package/skills/theme-factory/themes/arctic-frost.md +19 -0
- package/skills/theme-factory/themes/botanical-garden.md +19 -0
- package/skills/theme-factory/themes/desert-rose.md +19 -0
- package/skills/theme-factory/themes/forest-canopy.md +19 -0
- package/skills/theme-factory/themes/golden-hour.md +19 -0
- package/skills/theme-factory/themes/midnight-galaxy.md +19 -0
- package/skills/theme-factory/themes/modern-minimalist.md +19 -0
- package/skills/theme-factory/themes/ocean-depths.md +19 -0
- package/skills/theme-factory/themes/sunset-boulevard.md +19 -0
- package/skills/theme-factory/themes/tech-innovation.md +19 -0
- package/skills/threejs-webgl/SKILL.md +8 -0
- package/skills/trailofbits-auditing/SKILL.md +30 -0
- package/skills/twitter-algorithm-optimizer/SKILL.md +327 -0
- package/skills/typeui-cli/SKILL.md +90 -0
- package/skills/typeui-main/DESIGN.md +114 -0
- package/skills/typeui-main/LICENSE.md +9 -0
- package/skills/typeui-main/README.md +84 -0
- package/skills/typeui-main/REGISTRY.md +60 -0
- package/skills/typeui-main/SKILL.md +114 -0
- package/skills/typeui-main/package-lock.json +2123 -0
- package/skills/typeui-main/package.json +56 -0
- package/skills/typeui-main/skills/typeui-cli/SKILL.md +90 -0
- package/skills/typeui-main/src/cli.ts +282 -0
- package/skills/typeui-main/src/config.ts +28 -0
- package/skills/typeui-main/src/domain/designSystemSchema.ts +77 -0
- package/skills/typeui-main/src/generation/existingDesignSystem.ts +228 -0
- package/skills/typeui-main/src/generation/randomDesignSystem.ts +348 -0
- package/skills/typeui-main/src/generation/runDesignGeneration.ts +31 -0
- package/skills/typeui-main/src/generation/runGeneration.ts +36 -0
- package/skills/typeui-main/src/generation/runPull.ts +62 -0
- package/skills/typeui-main/src/io/updateSkillFile.ts +118 -0
- package/skills/typeui-main/src/prompts/designSystem.ts +755 -0
- package/skills/typeui-main/src/prompts/registry.ts +72 -0
- package/skills/typeui-main/src/registry/registryClient.ts +246 -0
- package/skills/typeui-main/src/renderers/claudeRenderer.ts +10 -0
- package/skills/typeui-main/src/renderers/codexRenderer.ts +10 -0
- package/skills/typeui-main/src/renderers/cursorRenderer.ts +10 -0
- package/skills/typeui-main/src/renderers/index.ts +14 -0
- package/skills/typeui-main/src/renderers/openCodeRenderer.ts +10 -0
- package/skills/typeui-main/src/renderers/shared.ts +252 -0
- package/skills/typeui-main/src/skillMetadata.ts +19 -0
- package/skills/typeui-main/src/types.ts +204 -0
- package/skills/typeui-main/src/ui/banner.ts +20 -0
- package/skills/typeui-main/test/existingDesignSystem.test.ts +67 -0
- package/skills/typeui-main/test/orchestrator.test.ts +113 -0
- package/skills/typeui-main/test/randomDesignSystem.test.ts +20 -0
- package/skills/typeui-main/test/registryClient.test.ts +408 -0
- package/skills/typeui-main/test/renderers.test.ts +41 -0
- package/skills/typeui-main/test/runDesignGeneration.test.ts +52 -0
- package/skills/typeui-main/test/runPull.test.ts +92 -0
- package/skills/typeui-main/test/skillMetadata.test.ts +11 -0
- package/skills/typeui-main/test/updateSkillFile.test.ts +160 -0
- package/skills/typeui-main/tsconfig.json +16 -0
- package/skills/ui-demo/SKILL.md +465 -0
- package/skills/ui-to-vue/SKILL.md +134 -0
- package/skills/ui-ux-pro-max/.claude/skills/banner-design/SKILL.md +192 -0
- package/skills/ui-ux-pro-max/.claude/skills/banner-design/references/banner-sizes-and-styles.md +118 -0
- package/skills/ui-ux-pro-max/.claude/skills/brand/SKILL.md +97 -0
- package/skills/ui-ux-pro-max/.claude/skills/brand/references/approval-checklist.md +169 -0
- package/skills/ui-ux-pro-max/.claude/skills/brand/references/asset-organization.md +157 -0
- package/skills/ui-ux-pro-max/.claude/skills/brand/references/brand-guideline-template.md +140 -0
- package/skills/ui-ux-pro-max/.claude/skills/brand/references/color-palette-management.md +186 -0
- package/skills/ui-ux-pro-max/.claude/skills/brand/references/consistency-checklist.md +94 -0
- package/skills/ui-ux-pro-max/.claude/skills/brand/references/logo-usage-rules.md +185 -0
- package/skills/ui-ux-pro-max/.claude/skills/brand/references/messaging-framework.md +85 -0
- package/skills/ui-ux-pro-max/.claude/skills/brand/references/typography-specifications.md +214 -0
- package/skills/ui-ux-pro-max/.claude/skills/brand/references/update.md +118 -0
- package/skills/ui-ux-pro-max/.claude/skills/brand/references/visual-identity.md +96 -0
- package/skills/ui-ux-pro-max/.claude/skills/brand/references/voice-framework.md +88 -0
- package/skills/ui-ux-pro-max/.claude/skills/brand/scripts/extract-colors.cjs +341 -0
- package/skills/ui-ux-pro-max/.claude/skills/brand/scripts/inject-brand-context.cjs +349 -0
- package/skills/ui-ux-pro-max/.claude/skills/brand/scripts/sync-brand-to-tokens.cjs +266 -0
- package/skills/ui-ux-pro-max/.claude/skills/brand/scripts/validate-asset.cjs +387 -0
- package/skills/ui-ux-pro-max/.claude/skills/brand/templates/brand-guidelines-starter.md +275 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/SKILL.md +302 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/data/cip/deliverables.csv +51 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/data/cip/industries.csv +21 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/data/cip/mockup-contexts.csv +21 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/data/cip/styles.csv +21 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/data/icon/styles.csv +16 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/data/logo/colors.csv +56 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/data/logo/industries.csv +56 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/data/logo/styles.csv +56 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/references/banner-sizes-and-styles.md +118 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/references/cip-deliverable-guide.md +95 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/references/cip-design.md +121 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/references/cip-prompt-engineering.md +84 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/references/cip-style-guide.md +68 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/references/design-routing.md +207 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/references/icon-design.md +122 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/references/logo-color-psychology.md +101 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/references/logo-design.md +92 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/references/logo-prompt-engineering.md +158 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/references/logo-style-guide.md +109 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/references/slides-copywriting-formulas.md +84 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/references/slides-create.md +4 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/references/slides-html-template.md +295 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/references/slides-layout-patterns.md +137 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/references/slides-strategies.md +94 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/references/slides.md +42 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/references/social-photos-design.md +329 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/scripts/cip/core.py +215 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/scripts/cip/generate.py +484 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/scripts/cip/render-html.py +424 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/scripts/cip/search.py +127 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/scripts/icon/generate.py +487 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/scripts/logo/core.py +175 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/scripts/logo/generate.py +362 -0
- package/skills/ui-ux-pro-max/.claude/skills/design/scripts/logo/search.py +114 -0
- package/skills/ui-ux-pro-max/.claude/skills/design-system/SKILL.md +244 -0
- package/skills/ui-ux-pro-max/.claude/skills/design-system/data/slide-backgrounds.csv +11 -0
- package/skills/ui-ux-pro-max/.claude/skills/design-system/data/slide-charts.csv +26 -0
- package/skills/ui-ux-pro-max/.claude/skills/design-system/data/slide-color-logic.csv +14 -0
- package/skills/ui-ux-pro-max/.claude/skills/design-system/data/slide-copy.csv +26 -0
- package/skills/ui-ux-pro-max/.claude/skills/design-system/data/slide-layout-logic.csv +16 -0
- package/skills/ui-ux-pro-max/.claude/skills/design-system/data/slide-layouts.csv +26 -0
- package/skills/ui-ux-pro-max/.claude/skills/design-system/data/slide-strategies.csv +16 -0
- package/skills/ui-ux-pro-max/.claude/skills/design-system/data/slide-typography.csv +15 -0
- package/skills/ui-ux-pro-max/.claude/skills/design-system/references/component-specs.md +236 -0
- package/skills/ui-ux-pro-max/.claude/skills/design-system/references/component-tokens.md +214 -0
- package/skills/ui-ux-pro-max/.claude/skills/design-system/references/primitive-tokens.md +203 -0
- package/skills/ui-ux-pro-max/.claude/skills/design-system/references/semantic-tokens.md +215 -0
- package/skills/ui-ux-pro-max/.claude/skills/design-system/references/states-and-variants.md +241 -0
- package/skills/ui-ux-pro-max/.claude/skills/design-system/references/tailwind-integration.md +251 -0
- package/skills/ui-ux-pro-max/.claude/skills/design-system/references/token-architecture.md +224 -0
- package/skills/ui-ux-pro-max/.claude/skills/design-system/scripts/embed-tokens.cjs +99 -0
- package/skills/ui-ux-pro-max/.claude/skills/design-system/scripts/fetch-background.py +317 -0
- package/skills/ui-ux-pro-max/.claude/skills/design-system/scripts/generate-slide.py +753 -0
- package/skills/ui-ux-pro-max/.claude/skills/design-system/scripts/generate-tokens.cjs +205 -0
- package/skills/ui-ux-pro-max/.claude/skills/design-system/scripts/html-token-validator.py +327 -0
- package/skills/ui-ux-pro-max/.claude/skills/design-system/scripts/search-slides.py +218 -0
- package/skills/ui-ux-pro-max/.claude/skills/design-system/scripts/slide-token-validator.py +35 -0
- package/skills/ui-ux-pro-max/.claude/skills/design-system/scripts/slide_search_core.py +453 -0
- package/skills/ui-ux-pro-max/.claude/skills/design-system/scripts/validate-tokens.cjs +251 -0
- package/skills/ui-ux-pro-max/.claude/skills/design-system/templates/design-tokens-starter.json +143 -0
- package/skills/ui-ux-pro-max/.claude/skills/slides/SKILL.md +42 -0
- package/skills/ui-ux-pro-max/.claude/skills/slides/references/copywriting-formulas.md +84 -0
- package/skills/ui-ux-pro-max/.claude/skills/slides/references/create.md +4 -0
- package/skills/ui-ux-pro-max/.claude/skills/slides/references/html-template.md +295 -0
- package/skills/ui-ux-pro-max/.claude/skills/slides/references/layout-patterns.md +137 -0
- package/skills/ui-ux-pro-max/.claude/skills/slides/references/slide-strategies.md +94 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/LICENSE.txt +202 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/SKILL.md +324 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/ArsenalSC-OFL.txt +93 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/BigShoulders-Bold.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/BigShoulders-OFL.txt +93 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/BigShoulders-Regular.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/Boldonse-OFL.txt +93 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/Boldonse-Regular.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/CrimsonPro-OFL.txt +93 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/DMMono-OFL.txt +93 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/DMMono-Regular.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/EricaOne-OFL.txt +94 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/EricaOne-Regular.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/GeistMono-Bold.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/GeistMono-OFL.txt +93 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/GeistMono-Regular.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/Gloock-OFL.txt +93 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/Gloock-Regular.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/InstrumentSans-OFL.txt +93 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/Italiana-OFL.txt +93 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/Italiana-Regular.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/Jura-Light.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/Jura-Medium.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/Jura-OFL.txt +93 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/Lora-Bold.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/Lora-BoldItalic.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/Lora-Italic.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/Lora-OFL.txt +93 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/Lora-Regular.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/NationalPark-Bold.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/NationalPark-OFL.txt +93 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/NationalPark-Regular.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/Outfit-Bold.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/Outfit-OFL.txt +93 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/Outfit-Regular.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/PixelifySans-Medium.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/PixelifySans-OFL.txt +93 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/PoiretOne-OFL.txt +93 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/PoiretOne-Regular.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/RedHatMono-Bold.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/RedHatMono-OFL.txt +93 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/RedHatMono-Regular.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/Silkscreen-OFL.txt +93 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/Silkscreen-Regular.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/SmoochSans-Medium.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/SmoochSans-OFL.txt +93 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/Tektur-Medium.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/Tektur-OFL.txt +93 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/Tektur-Regular.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/WorkSans-Bold.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/WorkSans-Italic.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/WorkSans-OFL.txt +93 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/WorkSans-Regular.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/YoungSerif-OFL.txt +93 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/canvas-fonts/YoungSerif-Regular.ttf +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/references/canvas-design-system.md +320 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/references/shadcn-accessibility.md +471 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/references/shadcn-components.md +424 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/references/shadcn-theming.md +373 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/references/tailwind-customization.md +483 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/references/tailwind-responsive.md +382 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/references/tailwind-utilities.md +455 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/scripts/.coverage +0 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/scripts/requirements.txt +17 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/scripts/shadcn_add.py +292 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/scripts/tailwind_config_gen.py +456 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/scripts/tests/coverage-ui.json +1 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/scripts/tests/requirements.txt +3 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/scripts/tests/test_shadcn_add.py +266 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-styling/scripts/tests/test_tailwind_config_gen.py +336 -0
- package/skills/ui-ux-pro-max/.claude/skills/ui-ux-pro-max/SKILL.md +659 -0
- package/skills/ui-ux-pro-max/.claude-plugin/marketplace.json +35 -0
- package/skills/ui-ux-pro-max/.claude-plugin/plugin.json +11 -0
- package/skills/ui-ux-pro-max/.github/workflows/claude-code-review.yml +44 -0
- package/skills/ui-ux-pro-max/.github/workflows/claude.yml +50 -0
- package/skills/ui-ux-pro-max/.github/workflows/python-package-conda.yml +34 -0
- package/skills/ui-ux-pro-max/CLAUDE.md +98 -0
- package/skills/ui-ux-pro-max/LICENSE +21 -0
- package/skills/ui-ux-pro-max/README.md +513 -0
- package/skills/ui-ux-pro-max/SKILL.md +292 -0
- package/skills/ui-ux-pro-max/cli/README.md +63 -0
- package/skills/ui-ux-pro-max/cli/assets/data/_sync_all.py +414 -0
- package/skills/ui-ux-pro-max/cli/assets/data/app-interface.csv +31 -0
- package/skills/ui-ux-pro-max/cli/assets/data/charts.csv +26 -0
- package/skills/ui-ux-pro-max/cli/assets/data/colors.csv +162 -0
- package/skills/ui-ux-pro-max/cli/assets/data/design.csv +1776 -0
- package/skills/ui-ux-pro-max/cli/assets/data/draft.csv +1779 -0
- package/skills/ui-ux-pro-max/cli/assets/data/google-fonts.csv +1924 -0
- package/skills/ui-ux-pro-max/cli/assets/data/icons.csv +105 -0
- package/skills/ui-ux-pro-max/cli/assets/data/landing.csv +31 -0
- package/skills/ui-ux-pro-max/cli/assets/data/products.csv +162 -0
- package/skills/ui-ux-pro-max/cli/assets/data/react-performance.csv +45 -0
- package/skills/ui-ux-pro-max/cli/assets/data/stacks/angular.csv +51 -0
- package/skills/ui-ux-pro-max/cli/assets/data/stacks/astro.csv +54 -0
- package/skills/ui-ux-pro-max/cli/assets/data/stacks/flutter.csv +53 -0
- package/skills/ui-ux-pro-max/cli/assets/data/stacks/html-tailwind.csv +56 -0
- package/skills/ui-ux-pro-max/cli/assets/data/stacks/jetpack-compose.csv +53 -0
- package/skills/ui-ux-pro-max/cli/assets/data/stacks/laravel.csv +51 -0
- package/skills/ui-ux-pro-max/cli/assets/data/stacks/nextjs.csv +53 -0
- package/skills/ui-ux-pro-max/cli/assets/data/stacks/nuxt-ui.csv +51 -0
- package/skills/ui-ux-pro-max/cli/assets/data/stacks/nuxtjs.csv +59 -0
- package/skills/ui-ux-pro-max/cli/assets/data/stacks/react-native.csv +52 -0
- package/skills/ui-ux-pro-max/cli/assets/data/stacks/react.csv +54 -0
- package/skills/ui-ux-pro-max/cli/assets/data/stacks/shadcn.csv +61 -0
- package/skills/ui-ux-pro-max/cli/assets/data/stacks/svelte.csv +54 -0
- package/skills/ui-ux-pro-max/cli/assets/data/stacks/swiftui.csv +51 -0
- package/skills/ui-ux-pro-max/cli/assets/data/stacks/threejs.csv +54 -0
- package/skills/ui-ux-pro-max/cli/assets/data/stacks/vue.csv +50 -0
- package/skills/ui-ux-pro-max/cli/assets/data/styles.csv +85 -0
- package/skills/ui-ux-pro-max/cli/assets/data/typography.csv +74 -0
- package/skills/ui-ux-pro-max/cli/assets/data/ui-reasoning.csv +162 -0
- package/skills/ui-ux-pro-max/cli/assets/data/ux-guidelines.csv +100 -0
- package/skills/ui-ux-pro-max/cli/assets/scripts/core.py +247 -0
- package/skills/ui-ux-pro-max/cli/assets/scripts/design_system.py +1148 -0
- package/skills/ui-ux-pro-max/cli/assets/scripts/search.py +114 -0
- package/skills/ui-ux-pro-max/cli/assets/templates/base/quick-reference.md +297 -0
- package/skills/ui-ux-pro-max/cli/assets/templates/base/skill-content.md +353 -0
- package/skills/ui-ux-pro-max/cli/assets/templates/platforms/agent.json +21 -0
- package/skills/ui-ux-pro-max/cli/assets/templates/platforms/augment.json +18 -0
- package/skills/ui-ux-pro-max/cli/assets/templates/platforms/claude.json +21 -0
- package/skills/ui-ux-pro-max/cli/assets/templates/platforms/codebuddy.json +21 -0
- package/skills/ui-ux-pro-max/cli/assets/templates/platforms/codex.json +21 -0
- package/skills/ui-ux-pro-max/cli/assets/templates/platforms/continue.json +21 -0
- package/skills/ui-ux-pro-max/cli/assets/templates/platforms/copilot.json +21 -0
- package/skills/ui-ux-pro-max/cli/assets/templates/platforms/cursor.json +21 -0
- package/skills/ui-ux-pro-max/cli/assets/templates/platforms/droid.json +21 -0
- package/skills/ui-ux-pro-max/cli/assets/templates/platforms/gemini.json +21 -0
- package/skills/ui-ux-pro-max/cli/assets/templates/platforms/kilocode.json +21 -0
- package/skills/ui-ux-pro-max/cli/assets/templates/platforms/kiro.json +21 -0
- package/skills/ui-ux-pro-max/cli/assets/templates/platforms/opencode.json +21 -0
- package/skills/ui-ux-pro-max/cli/assets/templates/platforms/qoder.json +21 -0
- package/skills/ui-ux-pro-max/cli/assets/templates/platforms/roocode.json +21 -0
- package/skills/ui-ux-pro-max/cli/assets/templates/platforms/trae.json +21 -0
- package/skills/ui-ux-pro-max/cli/assets/templates/platforms/warp.json +18 -0
- package/skills/ui-ux-pro-max/cli/assets/templates/platforms/windsurf.json +21 -0
- package/skills/ui-ux-pro-max/cli/bun.lock +77 -0
- package/skills/ui-ux-pro-max/cli/package-lock.json +370 -0
- package/skills/ui-ux-pro-max/cli/package.json +48 -0
- package/skills/ui-ux-pro-max/cli/src/commands/init.ts +216 -0
- package/skills/ui-ux-pro-max/cli/src/commands/uninstall.ts +135 -0
- package/skills/ui-ux-pro-max/cli/src/commands/update.ts +36 -0
- package/skills/ui-ux-pro-max/cli/src/commands/versions.ts +42 -0
- package/skills/ui-ux-pro-max/cli/src/index.ts +83 -0
- package/skills/ui-ux-pro-max/cli/src/types/index.ts +68 -0
- package/skills/ui-ux-pro-max/cli/src/utils/detect.ts +120 -0
- package/skills/ui-ux-pro-max/cli/src/utils/extract.ts +149 -0
- package/skills/ui-ux-pro-max/cli/src/utils/github.ts +104 -0
- package/skills/ui-ux-pro-max/cli/src/utils/logger.ts +11 -0
- package/skills/ui-ux-pro-max/cli/src/utils/template.ts +243 -0
- package/skills/ui-ux-pro-max/cli/tsconfig.json +17 -0
- package/skills/ui-ux-pro-max/data/charts.csv +26 -0
- package/skills/ui-ux-pro-max/data/colors.csv +97 -0
- package/skills/ui-ux-pro-max/data/icons.csv +101 -0
- package/skills/ui-ux-pro-max/data/landing.csv +31 -0
- package/skills/ui-ux-pro-max/data/products.csv +97 -0
- package/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
- package/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/skills/ui-ux-pro-max/data/styles.csv +68 -0
- package/skills/ui-ux-pro-max/data/typography.csv +58 -0
- package/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/skills/ui-ux-pro-max/docs//344/270/211/344/270/252 data-scripts-templates /347/232/204/345/214/272/345/210/253.md" +30 -0
- package/skills/ui-ux-pro-max/preview/xiaomaomi-app.html +411 -0
- package/skills/ui-ux-pro-max/screenshots/website.png +0 -0
- package/skills/ui-ux-pro-max/scripts/core.py +253 -0
- package/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
- package/skills/ui-ux-pro-max/scripts/search.py +114 -0
- package/skills/ui-ux-pro-max/skill.json +41 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/data/_sync_all.py +414 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/data/app-interface.csv +31 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/data/charts.csv +26 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/data/colors.csv +162 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/data/design.csv +1776 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/data/draft.csv +1779 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/data/google-fonts.csv +1924 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/data/icons.csv +106 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/data/landing.csv +35 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/data/products.csv +162 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/data/stacks/angular.csv +51 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/data/stacks/astro.csv +54 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/data/stacks/laravel.csv +51 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/data/stacks/threejs.csv +54 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/data/styles.csv +85 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/data/typography.csv +74 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/data/ui-reasoning.csv +162 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/scripts/core.py +262 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/scripts/design_system.py +1148 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/scripts/search.py +114 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/templates/base/quick-reference.md +297 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/templates/base/skill-content.md +358 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/templates/platforms/agent.json +21 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/templates/platforms/augment.json +18 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/templates/platforms/claude.json +21 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/templates/platforms/codebuddy.json +21 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/templates/platforms/codex.json +21 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/templates/platforms/continue.json +21 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/templates/platforms/copilot.json +21 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/templates/platforms/cursor.json +21 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/templates/platforms/droid.json +21 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/templates/platforms/gemini.json +21 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/templates/platforms/kilocode.json +21 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/templates/platforms/kiro.json +21 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/templates/platforms/opencode.json +21 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/templates/platforms/qoder.json +21 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/templates/platforms/roocode.json +21 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/templates/platforms/trae.json +21 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/templates/platforms/warp.json +18 -0
- package/skills/ui-ux-pro-max/src/ui-ux-pro-max/templates/platforms/windsurf.json +21 -0
- package/skills/uncloud/SKILL.md +343 -0
- package/skills/upgrading-react-native/SKILL.md +58 -0
- package/skills/using-git-worktrees/SKILL.md +215 -0
- package/skills/vercel/SKILL.md +161 -0
- package/skills/vercel/metadata.json +16 -0
- package/skills/verification-loop/SKILL.md +126 -0
- package/skills/view-transitions-api/SKILL.md +108 -0
- package/skills/vite-patterns/SKILL.md +449 -0
- package/skills/vue3-composition-patterns/SKILL.md +375 -0
- package/skills/waza-habits/SKILL.md +22 -0
- package/skills/webapp-testing/LICENSE.txt +202 -0
- package/skills/webapp-testing/SKILL.md +96 -0
- package/skills/webapp-testing/examples/console_logging.py +35 -0
- package/skills/webapp-testing/examples/element_discovery.py +40 -0
- package/skills/webapp-testing/examples/static_html_automation.py +33 -0
- package/skills/webapp-testing/scripts/with_server.py +106 -0
- package/src/orchestrator/builder.ts +234 -0
- package/src/orchestrator/executor.ts +386 -0
- package/src/orchestrator/index.ts +535 -0
- package/src/orchestrator/loader.ts +237 -0
- package/src/orchestrator/registry.ts +211 -0
- package/src/orchestrator/schema.ts +141 -0
- package/src/orchestrator/session.ts +128 -0
- package/src/orchestrator/types.ts +109 -0
- package/tsconfig.json +21 -0
|
@@ -0,0 +1,1434 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: graphify-windows
|
|
3
|
+
description: "any input (code, docs, papers, images) → knowledge graph → clustered communities → HTML + JSON + audit report. Use when user asks any question about a codebase, project content, architecture, or file relationships — especially if graphify-out/ exists. Provides persistent graph with god nodes, community detection, and BFS/DFS query tools."
|
|
4
|
+
trigger: /graphify
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /graphify
|
|
8
|
+
|
|
9
|
+
Turn any folder of files into a navigable knowledge graph with community detection, an honest audit trail, and three outputs: interactive HTML, GraphRAG-ready JSON, and a plain-language GRAPH_REPORT.md.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
/graphify # full pipeline on current directory → Obsidian vault
|
|
15
|
+
/graphify <path> # full pipeline on specific path
|
|
16
|
+
/graphify <path> --mode deep # thorough extraction, richer INFERRED edges
|
|
17
|
+
/graphify <path> --update # incremental - re-extract only new/changed files
|
|
18
|
+
/graphify <path> --directed # build directed graph (preserves edge direction: source→target)
|
|
19
|
+
/graphify <path> --cluster-only # rerun clustering on existing graph
|
|
20
|
+
/graphify <path> --no-viz # skip visualization, just report + JSON
|
|
21
|
+
/graphify <path> --html # (HTML is generated by default - this flag is a no-op)
|
|
22
|
+
/graphify <path> --svg # also export graph.svg (embeds in Notion, GitHub)
|
|
23
|
+
/graphify <path> --graphml # export graph.graphml (Gephi, yEd)
|
|
24
|
+
/graphify <path> --neo4j # generate graphify-out/cypher.txt for Neo4j
|
|
25
|
+
/graphify <path> --neo4j-push bolt://localhost:7687 # push directly to Neo4j
|
|
26
|
+
/graphify <path> --wiki # build agent-crawlable wiki (index.md + one article per community)
|
|
27
|
+
/graphify <path> --obsidian --obsidian-dir ~/vaults/my-project # write vault to custom path (e.g. existing vault)
|
|
28
|
+
/graphify <path> --mcp # start MCP stdio server for agent access
|
|
29
|
+
/graphify <path> --watch # watch folder, auto-rebuild on code changes (no LLM needed)
|
|
30
|
+
/graphify add <url> # fetch URL, save to ./raw, update graph
|
|
31
|
+
/graphify add <url> --author "Name" # tag who wrote it
|
|
32
|
+
/graphify add <url> --contributor "Name" # tag who added it to the corpus
|
|
33
|
+
/graphify query "<question>" # BFS traversal - broad context
|
|
34
|
+
/graphify query "<question>" --dfs # DFS - trace a specific path
|
|
35
|
+
/graphify query "<question>" --budget 1500 # cap answer at N tokens
|
|
36
|
+
/graphify path "AuthModule" "Database" # shortest path between two concepts
|
|
37
|
+
/graphify explain "SwinTransformer" # plain-language explanation of a node
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## What graphify is for
|
|
41
|
+
|
|
42
|
+
graphify is built around Andrej Karpathy's /raw folder workflow: drop anything into a folder - papers, tweets, screenshots, code, notes - and get a structured knowledge graph that shows you what you didn't know was connected.
|
|
43
|
+
|
|
44
|
+
Three things it does that your AI assistant alone cannot:
|
|
45
|
+
1. **Persistent graph** - relationships are stored in `graphify-out/graph.json` and survive across sessions. Ask questions weeks later without re-reading everything.
|
|
46
|
+
2. **Honest audit trail** - every edge is tagged EXTRACTED, INFERRED, or AMBIGUOUS. You know what was found vs invented.
|
|
47
|
+
3. **Cross-document surprise** - community detection finds connections between concepts in different files that you would never think to ask about directly.
|
|
48
|
+
|
|
49
|
+
Use it for:
|
|
50
|
+
- A codebase you're new to (understand architecture before touching anything)
|
|
51
|
+
- A reading list (papers + tweets + notes → one navigable graph)
|
|
52
|
+
- A research corpus (citation graph + concept graph in one)
|
|
53
|
+
- Your personal /raw folder (drop everything in, let it grow, query it)
|
|
54
|
+
|
|
55
|
+
## What You Must Do When Invoked
|
|
56
|
+
|
|
57
|
+
If the user invoked `/graphify --help` or `/graphify -h` (with no other arguments), print the contents of the `## Usage` section above verbatim and stop. Do not run any commands, do not detect files, do not default the path to `.`. Just print the Usage block and return.
|
|
58
|
+
|
|
59
|
+
If no path was given, use `.` (current directory). Do not ask the user for a path.
|
|
60
|
+
|
|
61
|
+
Follow these steps in order. Do not skip steps.
|
|
62
|
+
|
|
63
|
+
### Step 1 - Ensure graphify is installed
|
|
64
|
+
|
|
65
|
+
```powershell
|
|
66
|
+
# Detect Python with graphify — uv/pipx-aware (fixes #831)
|
|
67
|
+
New-Item -ItemType Directory -Force -Path graphify-out | Out-Null
|
|
68
|
+
$GRAPHIFY_PYTHON = $null
|
|
69
|
+
|
|
70
|
+
function Find-GraphifyPython {
|
|
71
|
+
# 1. uv tool install — 'uv tool dir' is authoritative, respects UV_TOOL_DIR automatically
|
|
72
|
+
if (Get-Command uv -ErrorAction SilentlyContinue) {
|
|
73
|
+
$uvDir = (uv tool dir 2>$null).Trim()
|
|
74
|
+
if ($uvDir) {
|
|
75
|
+
$py = Join-Path $uvDir "graphifyy\Scripts\python.exe"
|
|
76
|
+
if (Test-Path $py) {
|
|
77
|
+
& $py -c "import graphify" 2>$null
|
|
78
|
+
if ($LASTEXITCODE -eq 0) { return $py }
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
# 2. pipx install — 'pipx environment' respects PIPX_HOME automatically
|
|
83
|
+
if (Get-Command pipx -ErrorAction SilentlyContinue) {
|
|
84
|
+
$venvs = (pipx environment --value PIPX_LOCAL_VENVS 2>$null).Trim()
|
|
85
|
+
if ($venvs) {
|
|
86
|
+
$py = Join-Path $venvs "graphifyy\Scripts\python.exe"
|
|
87
|
+
if (Test-Path $py) {
|
|
88
|
+
& $py -c "import graphify" 2>$null
|
|
89
|
+
if ($LASTEXITCODE -eq 0) { return $py }
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
# 3. Active venv / conda / pip-into-current-env
|
|
94
|
+
$pyCmd = Get-Command python -ErrorAction SilentlyContinue
|
|
95
|
+
if ($pyCmd) {
|
|
96
|
+
& $pyCmd.Source -c "import graphify" 2>$null
|
|
97
|
+
if ($LASTEXITCODE -eq 0) {
|
|
98
|
+
return (& $pyCmd.Source -c "import sys; print(sys.executable)").Trim()
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return $null
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
# Try to find the right Python (uv → pipx → active env)
|
|
105
|
+
$GRAPHIFY_PYTHON = Find-GraphifyPython
|
|
106
|
+
|
|
107
|
+
# Not found — install then re-detect
|
|
108
|
+
if (-not $GRAPHIFY_PYTHON) {
|
|
109
|
+
if (Get-Command uv -ErrorAction SilentlyContinue) {
|
|
110
|
+
uv tool install --upgrade graphifyy -q 2>&1 | Select-Object -Last 3
|
|
111
|
+
} else {
|
|
112
|
+
pip install graphifyy -q 2>&1 | Select-Object -Last 3
|
|
113
|
+
}
|
|
114
|
+
$GRAPHIFY_PYTHON = Find-GraphifyPython
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
# Save interpreter path — all subsequent steps read this
|
|
118
|
+
$GRAPHIFY_PYTHON | Out-File -FilePath graphify-out\.graphify_python -Encoding utf8 -NoNewline
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
If the import succeeds, print nothing and move straight to Step 2.
|
|
122
|
+
|
|
123
|
+
### Step 2 - Detect files
|
|
124
|
+
|
|
125
|
+
```powershell
|
|
126
|
+
@'
|
|
127
|
+
import json
|
|
128
|
+
from graphify.detect import detect
|
|
129
|
+
from pathlib import Path
|
|
130
|
+
result = detect(Path('INPUT_PATH'))
|
|
131
|
+
print(json.dumps(result, ensure_ascii=False))
|
|
132
|
+
'@ | Out-File -FilePath graphify-out\.graphify_step_2_detect_files_3.py -Encoding utf8
|
|
133
|
+
& (Get-Content graphify-out\.graphify_python) graphify-out\.graphify_step_2_detect_files_3.py | Out-File -FilePath graphify-out\.graphify_detect.json -Encoding utf8
|
|
134
|
+
Remove-Item -ErrorAction SilentlyContinue graphify-out\.graphify_step_2_detect_files_3.py
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Replace INPUT_PATH with the actual path the user provided. Do NOT cat or print the JSON - read it silently and present a clean summary instead:
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
Corpus: X files · ~Y words
|
|
141
|
+
code: N files (.py .ts .go ...)
|
|
142
|
+
docs: N files (.md .txt ...)
|
|
143
|
+
papers: N files (.pdf ...)
|
|
144
|
+
images: N files
|
|
145
|
+
video: N files (.mp4 .mp3 ...)
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Omit any category with 0 files from the summary.
|
|
149
|
+
|
|
150
|
+
Then act on it:
|
|
151
|
+
- If `total_files` is 0: stop with "No supported files found in [path]."
|
|
152
|
+
- If `skipped_sensitive` is non-empty: mention file count skipped, not the file names.
|
|
153
|
+
- If `total_words` > 2,000,000 OR `total_files` > 200: show the warning and the top 5 subdirectories by file count, then ask which subfolder to run on. Wait for the user's answer before proceeding.
|
|
154
|
+
- Otherwise: proceed directly to Step 2.5 if video files were detected, or Step 3 if not.
|
|
155
|
+
|
|
156
|
+
### Step 2.5 - Transcribe video / audio files (only if video files detected)
|
|
157
|
+
|
|
158
|
+
Skip this step entirely if `detect` returned zero `video` files.
|
|
159
|
+
|
|
160
|
+
Video and audio files cannot be read directly. Transcribe them to text first, then treat the transcripts as doc files in Step 3.
|
|
161
|
+
|
|
162
|
+
**Strategy:** Read the god nodes from the detect output or analysis file. You are already a language model - write a one-sentence domain hint yourself from those labels. Then pass it to Whisper as the initial prompt. No separate API call needed.
|
|
163
|
+
|
|
164
|
+
**However**, if the corpus has *only* video files and no other docs/code, use the generic fallback prompt: `"Use proper punctuation and paragraph breaks."`
|
|
165
|
+
|
|
166
|
+
**Step 1 - Write the Whisper prompt yourself.**
|
|
167
|
+
|
|
168
|
+
Read the top god node labels from detect output or analysis, then compose a short domain hint sentence, for example:
|
|
169
|
+
|
|
170
|
+
- Labels: `transformer, attention, encoder, decoder` -> `"Machine learning research on transformer architectures and attention mechanisms. Use proper punctuation and paragraph breaks."`
|
|
171
|
+
- Labels: `kubernetes, deployment, pod, helm` -> `"DevOps discussion about Kubernetes deployments and Helm charts. Use proper punctuation and paragraph breaks."`
|
|
172
|
+
|
|
173
|
+
Set it as `$env:GRAPHIFY_WHISPER_PROMPT` before running the transcription command.
|
|
174
|
+
|
|
175
|
+
**Step 2 - Transcribe (PowerShell):**
|
|
176
|
+
|
|
177
|
+
```powershell
|
|
178
|
+
@'
|
|
179
|
+
import json, os
|
|
180
|
+
from pathlib import Path
|
|
181
|
+
from graphify.transcribe import transcribe_all
|
|
182
|
+
|
|
183
|
+
detect = json.loads(Path('graphify-out/.graphify_detect.json').read_text(encoding="utf-8"))
|
|
184
|
+
video_files = detect.get('files', {}).get('video', [])
|
|
185
|
+
prompt = os.environ.get('GRAPHIFY_WHISPER_PROMPT', 'Use proper punctuation and paragraph breaks.')
|
|
186
|
+
|
|
187
|
+
transcript_paths = transcribe_all(video_files, initial_prompt=prompt)
|
|
188
|
+
print(json.dumps(transcript_paths, ensure_ascii=False))
|
|
189
|
+
'@ | Out-File -FilePath graphify-out\.graphify_step_transcribe.py -Encoding utf8
|
|
190
|
+
& (Get-Content graphify-out\.graphify_python) graphify-out\.graphify_step_transcribe.py | Out-File -FilePath graphify-out\.graphify_transcripts.json -Encoding utf8
|
|
191
|
+
Remove-Item -ErrorAction SilentlyContinue graphify-out\.graphify_step_transcribe.py
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
After transcription:
|
|
195
|
+
- Read the transcript paths from `graphify-out\.graphify_transcripts.json`
|
|
196
|
+
- Add them to the docs list before dispatching semantic subagents in Step 3B
|
|
197
|
+
- Print how many transcripts were created: `Transcribed N video file(s) -> treating as docs`
|
|
198
|
+
- If transcription fails for a file, print a warning and continue with the rest
|
|
199
|
+
|
|
200
|
+
**Whisper model:** Default is `base`. If the user passed `--whisper-model <name>`, set `$env:GRAPHIFY_WHISPER_MODEL = "<name>"` before running the command above.
|
|
201
|
+
|
|
202
|
+
### Step 3 - Extract entities and relationships
|
|
203
|
+
|
|
204
|
+
**Before starting:** note whether `--mode deep` was given. You must pass `DEEP_MODE=true` to every subagent in Step B2 if it was. Track this from the original invocation - do not lose it.
|
|
205
|
+
|
|
206
|
+
This step has two parts: **structural extraction** (deterministic, free) and **semantic extraction** (your AI model, costs tokens).
|
|
207
|
+
|
|
208
|
+
**Run Part A (AST) and Part B (semantic) in parallel. Dispatch all semantic subagents AND start AST extraction in the same message. Both can run simultaneously since they operate on different file types. Merge results in Part C as before.**
|
|
209
|
+
|
|
210
|
+
Note: Parallelizing AST + semantic saves 5-15s on large corpora. AST is deterministic and fast; start it while subagents are processing docs/papers.
|
|
211
|
+
|
|
212
|
+
#### Part A - Structural extraction for code files
|
|
213
|
+
|
|
214
|
+
For any code files detected, run AST extraction in parallel with Part B subagents:
|
|
215
|
+
|
|
216
|
+
```powershell
|
|
217
|
+
@'
|
|
218
|
+
import json
|
|
219
|
+
from graphify.extract import collect_files, extract
|
|
220
|
+
from pathlib import Path
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
def main():
|
|
224
|
+
code_files = []
|
|
225
|
+
detect = json.loads(Path('graphify-out/.graphify_detect.json').read_text(encoding="utf-8"))
|
|
226
|
+
for f in detect.get('files', {}).get('code', []):
|
|
227
|
+
code_files.extend(collect_files(Path(f)) if Path(f).is_dir() else [Path(f)])
|
|
228
|
+
|
|
229
|
+
if code_files:
|
|
230
|
+
result = extract(code_files)
|
|
231
|
+
Path('graphify-out/.graphify_ast.json').write_text(json.dumps(result, indent=2, ensure_ascii=False), encoding="utf-8")
|
|
232
|
+
print(f'AST: {len(result["nodes"])} nodes, {len(result["edges"])} edges')
|
|
233
|
+
else:
|
|
234
|
+
Path('graphify-out/.graphify_ast.json').write_text(json.dumps({'nodes':[],'edges':[],'input_tokens':0,'output_tokens':0}, ensure_ascii=False), encoding="utf-8")
|
|
235
|
+
print('No code files - skipping AST extraction')
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
# Windows-spawn ProcessPoolExecutor (used inside extract()) re-imports this
|
|
239
|
+
# script in each worker; without an `if __name__ == "__main__":` guard the
|
|
240
|
+
# pool would recursively spawn itself. graphify v0.7.11+ falls back to
|
|
241
|
+
# sequential extraction if the pool dies, but the guard keeps multi-core
|
|
242
|
+
# extraction working on Windows.
|
|
243
|
+
if __name__ == '__main__':
|
|
244
|
+
main()
|
|
245
|
+
'@ | Out-File -FilePath graphify-out\.graphify_step_ast.py -Encoding utf8
|
|
246
|
+
& (Get-Content graphify-out\.graphify_python) graphify-out\.graphify_step_ast.py
|
|
247
|
+
Remove-Item -ErrorAction SilentlyContinue graphify-out\.graphify_step_ast.py
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
#### Part B - Semantic extraction (parallel subagents)
|
|
251
|
+
|
|
252
|
+
**Fast path:** If detection found zero docs, papers, and images (code-only corpus), skip Part B entirely and go straight to Part C. AST handles code - there is nothing for semantic subagents to do.
|
|
253
|
+
|
|
254
|
+
**MANDATORY: You MUST use the Agent tool here. Reading files yourself one-by-one is forbidden - it is 5-10x slower. If you do not use the Agent tool you are doing this wrong.**
|
|
255
|
+
|
|
256
|
+
Before dispatching subagents, print a timing estimate:
|
|
257
|
+
- Load `total_words` and file counts from `graphify-out/.graphify_detect.json`
|
|
258
|
+
- Estimate agents needed: `ceil(uncached_non_code_files / 22)` (chunk size is 20-25)
|
|
259
|
+
- Estimate time: ~45s per agent batch (they run in parallel, so total ≈ 45s × ceil(agents/parallel_limit))
|
|
260
|
+
- Print: "Semantic extraction: ~N files → X agents, estimated ~Ys"
|
|
261
|
+
|
|
262
|
+
**Step B0 - Check extraction cache first**
|
|
263
|
+
|
|
264
|
+
Before dispatching any subagents, check which files already have cached extraction results:
|
|
265
|
+
|
|
266
|
+
```powershell
|
|
267
|
+
@'
|
|
268
|
+
import json
|
|
269
|
+
from graphify.cache import check_semantic_cache
|
|
270
|
+
from pathlib import Path
|
|
271
|
+
|
|
272
|
+
detect = json.loads(Path('graphify-out/.graphify_detect.json').read_text(encoding="utf-8"))
|
|
273
|
+
all_files = [f for files in detect['files'].values() for f in files]
|
|
274
|
+
|
|
275
|
+
cached_nodes, cached_edges, cached_hyperedges, uncached = check_semantic_cache(all_files)
|
|
276
|
+
|
|
277
|
+
if cached_nodes or cached_edges or cached_hyperedges:
|
|
278
|
+
Path('graphify-out/.graphify_cached.json').write_text(json.dumps({'nodes': cached_nodes, 'edges': cached_edges, 'hyperedges': cached_hyperedges}, ensure_ascii=False), encoding="utf-8")
|
|
279
|
+
Path('graphify-out/.graphify_uncached.txt').write_text('\n'.join(uncached), encoding="utf-8")
|
|
280
|
+
print(f'Cache: {len(all_files)-len(uncached)} files hit, {len(uncached)} files need extraction')
|
|
281
|
+
'@ | Out-File -FilePath graphify-out\.graphify_step_3_extract_entities_and_relations_5.py -Encoding utf8
|
|
282
|
+
& (Get-Content graphify-out\.graphify_python) graphify-out\.graphify_step_3_extract_entities_and_relations_5.py
|
|
283
|
+
Remove-Item -ErrorAction SilentlyContinue graphify-out\.graphify_step_3_extract_entities_and_relations_5.py
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
Only dispatch subagents for files listed in `.graphify_uncached.txt`. If all files are cached, skip to Part C directly.
|
|
287
|
+
|
|
288
|
+
**Step B1 - Split into chunks**
|
|
289
|
+
|
|
290
|
+
Load files from `.graphify_uncached.txt`. Split into chunks of 20-25 files each. Each image gets its own chunk (vision needs separate context).
|
|
291
|
+
|
|
292
|
+
**Step B2 - Dispatch ALL subagents in a single message**
|
|
293
|
+
|
|
294
|
+
Call the Agent tool multiple times IN THE SAME RESPONSE - one call per chunk. This is the only way they run in parallel. If you make one Agent call, wait, then make another, you are doing it sequentially and defeating the purpose.
|
|
295
|
+
|
|
296
|
+
Concrete example for 3 chunks:
|
|
297
|
+
```
|
|
298
|
+
[Agent tool call 1: files 1-15]
|
|
299
|
+
[Agent tool call 2: files 16-30]
|
|
300
|
+
[Agent tool call 3: files 31-45]
|
|
301
|
+
```
|
|
302
|
+
All three in one message. Not three separate messages.
|
|
303
|
+
|
|
304
|
+
Each subagent receives this exact prompt (substitute FILE_LIST, CHUNK_NUM, TOTAL_CHUNKS, and DEEP_MODE):
|
|
305
|
+
|
|
306
|
+
```
|
|
307
|
+
You are a graphify extraction subagent. Read the files listed and extract a knowledge graph fragment.
|
|
308
|
+
Output ONLY valid JSON matching the schema below - no explanation, no markdown fences, no preamble.
|
|
309
|
+
|
|
310
|
+
Files (chunk CHUNK_NUM of TOTAL_CHUNKS):
|
|
311
|
+
FILE_LIST
|
|
312
|
+
|
|
313
|
+
Rules:
|
|
314
|
+
- EXTRACTED: relationship explicit in source (import, call, citation, "see §3.2")
|
|
315
|
+
- INFERRED: reasonable inference (shared data structure, implied dependency)
|
|
316
|
+
- AMBIGUOUS: uncertain - flag for review, do not omit
|
|
317
|
+
|
|
318
|
+
Code files: focus on semantic edges AST cannot find (call relationships, shared data, arch patterns).
|
|
319
|
+
Do not re-extract imports - AST already has those.
|
|
320
|
+
Doc/paper files: extract named concepts, entities, citations. For rationale (WHY decisions were made, trade-offs, design intent): store as a `rationale` attribute on the relevant concept node — do NOT create a separate rationale node or fragment node. Only create a node for something that is itself a named entity or concept. Use `file_type:"rationale"` for concept-like nodes (ideas, principles, mechanisms, design patterns). Do NOT invent file_types like `concept` — valid values are only `code|document|paper|image|rationale`.
|
|
321
|
+
Code files: when adding `calls` edges, source MUST be the caller (the function/class doing the calling), target MUST be the callee. Never reverse this direction.
|
|
322
|
+
Image files: use vision to understand what the image IS - do not just OCR.
|
|
323
|
+
UI screenshot: layout patterns, design decisions, key elements, purpose.
|
|
324
|
+
Chart: metric, trend/insight, data source.
|
|
325
|
+
Tweet/post: claim as node, author, concepts mentioned.
|
|
326
|
+
Diagram: components and connections.
|
|
327
|
+
Research figure: what it demonstrates, method, result.
|
|
328
|
+
Handwritten/whiteboard: ideas and arrows, mark uncertain readings AMBIGUOUS.
|
|
329
|
+
|
|
330
|
+
DEEP_MODE (if --mode deep was given): be aggressive with INFERRED edges - indirect deps,
|
|
331
|
+
shared assumptions, latent couplings. Mark uncertain ones AMBIGUOUS instead of omitting.
|
|
332
|
+
|
|
333
|
+
Semantic similarity: if two concepts in this chunk solve the same problem or represent the same idea without any structural link (no import, no call, no citation), add a `semantically_similar_to` edge marked INFERRED with a confidence_score reflecting how similar they are (0.6-0.95). Examples:
|
|
334
|
+
- Two functions that both validate user input but never call each other
|
|
335
|
+
- A class in code and a concept in a paper that describe the same algorithm
|
|
336
|
+
- Two error types that handle the same failure mode differently
|
|
337
|
+
Only add these when the similarity is genuinely non-obvious and cross-cutting. Do not add them for trivially similar things.
|
|
338
|
+
|
|
339
|
+
Hyperedges: if 3 or more nodes clearly participate together in a shared concept, flow, or pattern that is not captured by pairwise edges alone, add a hyperedge to a top-level `hyperedges` array. Examples:
|
|
340
|
+
- All classes that implement a common protocol or interface
|
|
341
|
+
- All functions in an authentication flow (even if they don't all call each other)
|
|
342
|
+
- All concepts from a paper section that form one coherent idea
|
|
343
|
+
Use sparingly — only when the group relationship adds information beyond the pairwise edges. Maximum 3 hyperedges per chunk.
|
|
344
|
+
|
|
345
|
+
If a file has YAML frontmatter (--- ... ---), copy source_url, captured_at, author,
|
|
346
|
+
contributor onto every node from that file.
|
|
347
|
+
|
|
348
|
+
confidence_score is REQUIRED on every edge - never omit it, never use 0.5 as a default:
|
|
349
|
+
- EXTRACTED edges: confidence_score = 1.0 always
|
|
350
|
+
- INFERRED edges: pick exactly ONE value from this set — never 0.5:
|
|
351
|
+
0.95 direct structural evidence (shared data structure, named cross-file reference).
|
|
352
|
+
0.85 strong inference (clear functional alignment, no direct symbol link).
|
|
353
|
+
0.75 reasonable inference (shared problem domain + similar shape, requires interpretation).
|
|
354
|
+
0.65 weak inference (thematically related, no shape evidence).
|
|
355
|
+
0.55 speculative but plausible (surface-level co-occurrence only).
|
|
356
|
+
Models follow discrete rubrics better than continuous ranges; the bimodal
|
|
357
|
+
distribution observed in production (>50% at 0.5, >40% at 0.85+) shows the
|
|
358
|
+
range guidance is being collapsed to a binary. If no value above fits, mark
|
|
359
|
+
the edge AMBIGUOUS rather than picking 0.4 or below.
|
|
360
|
+
- AMBIGUOUS edges: 0.1-0.3
|
|
361
|
+
|
|
362
|
+
Output exactly this JSON (no other text):
|
|
363
|
+
{"nodes":[{"id":"filestem_entityname","label":"Human Readable Name","file_type":"code|document|paper|image|rationale","source_file":"relative/path","source_location":null,"source_url":null,"captured_at":null,"author":null,"contributor":null}],"edges":[{"source":"node_id","target":"node_id","relation":"calls|implements|references|cites|conceptually_related_to|shares_data_with|semantically_similar_to|rationale_for","confidence":"EXTRACTED|INFERRED|AMBIGUOUS","confidence_score":1.0,"source_file":"relative/path","source_location":null,"weight":1.0}],"hyperedges":[{"id":"snake_case_id","label":"Human Readable Label","nodes":["node_id1","node_id2","node_id3"],"relation":"participate_in|implement|form","confidence":"EXTRACTED|INFERRED","confidence_score":0.75,"source_file":"relative/path"}],"input_tokens":0,"output_tokens":0}
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
**Step B3 - Collect, cache, and merge**
|
|
367
|
+
|
|
368
|
+
Wait for all subagents. For each result:
|
|
369
|
+
- Check that `graphify-out/.graphify_chunk_NN.json` exists on disk — this is the success signal
|
|
370
|
+
- If the file exists and contains valid JSON with `nodes` and `edges`, include it and save to cache
|
|
371
|
+
- If the file is missing, the subagent was likely dispatched as read-only (Explore type) — print a warning: "chunk N missing from disk — subagent may have been read-only. Re-run with general-purpose agent." Do not silently skip.
|
|
372
|
+
- If a subagent failed or returned invalid JSON, print a warning and skip that chunk - do not abort
|
|
373
|
+
|
|
374
|
+
If more than half the chunks failed or are missing, stop and tell the user to re-run and ensure `subagent_type="general-purpose"` is used.
|
|
375
|
+
|
|
376
|
+
Merge all chunk files into `.graphify_semantic_new.json`. **After each Agent call completes, read the real token counts from the Agent tool result's `usage` field and write them back into the chunk JSON before merging** — the chunk JSON itself always has placeholder zeros. Then run:
|
|
377
|
+
```powershell
|
|
378
|
+
& (Get-Content graphify-out\.graphify_python) -c "
|
|
379
|
+
import json, glob
|
|
380
|
+
from pathlib import Path
|
|
381
|
+
|
|
382
|
+
chunks = sorted(glob.glob('graphify-out/.graphify_chunk_*.json'))
|
|
383
|
+
all_nodes, all_edges, all_hyperedges = [], [], []
|
|
384
|
+
total_in, total_out = 0, 0
|
|
385
|
+
for c in chunks:
|
|
386
|
+
d = json.loads(Path(c).read_text(encoding=\"utf-8\"))
|
|
387
|
+
all_nodes += d.get('nodes', [])
|
|
388
|
+
all_edges += d.get('edges', [])
|
|
389
|
+
all_hyperedges += d.get('hyperedges', [])
|
|
390
|
+
total_in += d.get('input_tokens', 0)
|
|
391
|
+
total_out += d.get('output_tokens', 0)
|
|
392
|
+
Path('graphify-out/.graphify_semantic_new.json').write_text(json.dumps({
|
|
393
|
+
'nodes': all_nodes, 'edges': all_edges, 'hyperedges': all_hyperedges,
|
|
394
|
+
'input_tokens': total_in, 'output_tokens': total_out,
|
|
395
|
+
}, indent=2, ensure_ascii=False), encoding=\"utf-8\")
|
|
396
|
+
print(f'Merged {len(chunks)} chunks: {total_in:,} in / {total_out:,} out tokens')
|
|
397
|
+
"
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
Save new results to cache:
|
|
401
|
+
```powershell
|
|
402
|
+
@'
|
|
403
|
+
import json
|
|
404
|
+
from graphify.cache import save_semantic_cache
|
|
405
|
+
from pathlib import Path
|
|
406
|
+
|
|
407
|
+
new = json.loads(Path('graphify-out/.graphify_semantic_new.json').read_text(encoding="utf-8")) if Path('graphify-out/.graphify_semantic_new.json').exists() else {'nodes':[],'edges':[],'hyperedges':[]}
|
|
408
|
+
saved = save_semantic_cache(new.get('nodes', []), new.get('edges', []), new.get('hyperedges', []))
|
|
409
|
+
print(f'Cached {saved} files')
|
|
410
|
+
'@ | Out-File -FilePath graphify-out\.graphify_step_3_extract_entities_and_relations_6.py -Encoding utf8
|
|
411
|
+
& (Get-Content graphify-out\.graphify_python) graphify-out\.graphify_step_3_extract_entities_and_relations_6.py
|
|
412
|
+
Remove-Item -ErrorAction SilentlyContinue graphify-out\.graphify_step_3_extract_entities_and_relations_6.py
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
Merge cached + new results into `graphify-out/.graphify_semantic.json`:
|
|
416
|
+
```powershell
|
|
417
|
+
@'
|
|
418
|
+
import json
|
|
419
|
+
from pathlib import Path
|
|
420
|
+
|
|
421
|
+
cached = json.loads(Path('graphify-out/.graphify_cached.json').read_text(encoding="utf-8")) if Path('graphify-out/.graphify_cached.json').exists() else {'nodes':[],'edges':[],'hyperedges':[]}
|
|
422
|
+
new = json.loads(Path('graphify-out/.graphify_semantic_new.json').read_text(encoding="utf-8")) if Path('graphify-out/.graphify_semantic_new.json').exists() else {'nodes':[],'edges':[],'hyperedges':[]}
|
|
423
|
+
|
|
424
|
+
all_nodes = cached['nodes'] + new.get('nodes', [])
|
|
425
|
+
all_edges = cached['edges'] + new.get('edges', [])
|
|
426
|
+
all_hyperedges = cached.get('hyperedges', []) + new.get('hyperedges', [])
|
|
427
|
+
seen = set()
|
|
428
|
+
deduped = []
|
|
429
|
+
for n in all_nodes:
|
|
430
|
+
if n['id'] not in seen:
|
|
431
|
+
seen.add(n['id'])
|
|
432
|
+
deduped.append(n)
|
|
433
|
+
|
|
434
|
+
merged = {
|
|
435
|
+
'nodes': deduped,
|
|
436
|
+
'edges': all_edges,
|
|
437
|
+
'hyperedges': all_hyperedges,
|
|
438
|
+
'input_tokens': new.get('input_tokens', 0),
|
|
439
|
+
'output_tokens': new.get('output_tokens', 0),
|
|
440
|
+
}
|
|
441
|
+
Path('graphify-out/.graphify_semantic.json').write_text(json.dumps(merged, indent=2, ensure_ascii=False), encoding="utf-8")
|
|
442
|
+
print(f'Extraction complete - {len(deduped)} nodes, {len(all_edges)} edges ({len(cached["nodes"])} from cache, {len(new.get("nodes",[]))} new)')
|
|
443
|
+
'@ | Out-File -FilePath graphify-out\.graphify_step_3_extract_entities_and_relations_7.py -Encoding utf8
|
|
444
|
+
& (Get-Content graphify-out\.graphify_python) graphify-out\.graphify_step_3_extract_entities_and_relations_7.py
|
|
445
|
+
Remove-Item -ErrorAction SilentlyContinue graphify-out\.graphify_step_3_extract_entities_and_relations_7.py
|
|
446
|
+
```
|
|
447
|
+
Clean up temp files: `Remove-Item -ErrorAction SilentlyContinue graphify-out\.graphify_cached.json, graphify-out\.graphify_uncached.txt, graphify-out\.graphify_semantic_new.json`
|
|
448
|
+
|
|
449
|
+
#### Part C - Merge AST + semantic into final extraction
|
|
450
|
+
|
|
451
|
+
```powershell
|
|
452
|
+
@'
|
|
453
|
+
import sys, json
|
|
454
|
+
from pathlib import Path
|
|
455
|
+
|
|
456
|
+
ast = json.loads(Path('graphify-out/.graphify_ast.json').read_text(encoding="utf-8"))
|
|
457
|
+
sem = json.loads(Path('graphify-out/.graphify_semantic.json').read_text(encoding="utf-8"))
|
|
458
|
+
|
|
459
|
+
# Merge: AST nodes first, semantic nodes deduplicated by id
|
|
460
|
+
seen = {n['id'] for n in ast['nodes']}
|
|
461
|
+
merged_nodes = list(ast['nodes'])
|
|
462
|
+
for n in sem['nodes']:
|
|
463
|
+
if n['id'] not in seen:
|
|
464
|
+
merged_nodes.append(n)
|
|
465
|
+
seen.add(n['id'])
|
|
466
|
+
|
|
467
|
+
merged_edges = ast['edges'] + sem['edges']
|
|
468
|
+
merged_hyperedges = sem.get('hyperedges', [])
|
|
469
|
+
merged = {
|
|
470
|
+
'nodes': merged_nodes,
|
|
471
|
+
'edges': merged_edges,
|
|
472
|
+
'hyperedges': merged_hyperedges,
|
|
473
|
+
'input_tokens': sem.get('input_tokens', 0),
|
|
474
|
+
'output_tokens': sem.get('output_tokens', 0),
|
|
475
|
+
}
|
|
476
|
+
Path('graphify-out/.graphify_extract.json').write_text(json.dumps(merged, indent=2, ensure_ascii=False), encoding="utf-8")
|
|
477
|
+
total = len(merged_nodes)
|
|
478
|
+
edges = len(merged_edges)
|
|
479
|
+
print(f'Merged: {total} nodes, {edges} edges ({len(ast["nodes"])} AST + {len(sem["nodes"])} semantic)')
|
|
480
|
+
'@ | Out-File -FilePath graphify-out\.graphify_step_3_extract_entities_and_relations_8.py -Encoding utf8
|
|
481
|
+
& (Get-Content graphify-out\.graphify_python) graphify-out\.graphify_step_3_extract_entities_and_relations_8.py
|
|
482
|
+
Remove-Item -ErrorAction SilentlyContinue graphify-out\.graphify_step_3_extract_entities_and_relations_8.py
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
### Step 4 - Build graph, cluster, analyze, generate outputs
|
|
486
|
+
|
|
487
|
+
```powershell
|
|
488
|
+
New-Item -ItemType Directory -Force -Path graphify-out | Out-Null
|
|
489
|
+
@'
|
|
490
|
+
import sys, json
|
|
491
|
+
from graphify.build import build_from_json
|
|
492
|
+
from graphify.cluster import cluster, score_all
|
|
493
|
+
from graphify.analyze import god_nodes, surprising_connections, suggest_questions
|
|
494
|
+
from graphify.report import generate
|
|
495
|
+
from graphify.export import to_json
|
|
496
|
+
from pathlib import Path
|
|
497
|
+
|
|
498
|
+
extraction = json.loads(Path('graphify-out/.graphify_extract.json').read_text(encoding="utf-8"))
|
|
499
|
+
detection = json.loads(Path('graphify-out/.graphify_detect.json').read_text(encoding="utf-8"))
|
|
500
|
+
|
|
501
|
+
G = build_from_json(extraction)
|
|
502
|
+
communities = cluster(G)
|
|
503
|
+
cohesion = score_all(G, communities)
|
|
504
|
+
tokens = {'input': extraction.get('input_tokens', 0), 'output': extraction.get('output_tokens', 0)}
|
|
505
|
+
gods = god_nodes(G)
|
|
506
|
+
surprises = surprising_connections(G, communities)
|
|
507
|
+
labels = {cid: 'Community ' + str(cid) for cid in communities}
|
|
508
|
+
# Placeholder questions - regenerated with real labels in Step 5
|
|
509
|
+
questions = suggest_questions(G, communities, labels)
|
|
510
|
+
|
|
511
|
+
report = generate(G, communities, cohesion, labels, gods, surprises, detection, tokens, 'INPUT_PATH', suggested_questions=questions)
|
|
512
|
+
Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding="utf-8")
|
|
513
|
+
to_json(G, communities, 'graphify-out/graph.json')
|
|
514
|
+
|
|
515
|
+
analysis = {
|
|
516
|
+
'communities': {str(k): v for k, v in communities.items()},
|
|
517
|
+
'cohesion': {str(k): v for k, v in cohesion.items()},
|
|
518
|
+
'gods': gods,
|
|
519
|
+
'surprises': surprises,
|
|
520
|
+
'questions': questions,
|
|
521
|
+
}
|
|
522
|
+
Path('graphify-out/.graphify_analysis.json').write_text(json.dumps(analysis, indent=2, ensure_ascii=False), encoding="utf-8")
|
|
523
|
+
if G.number_of_nodes() == 0:
|
|
524
|
+
print('ERROR: Graph is empty - extraction produced no nodes.')
|
|
525
|
+
print('Possible causes: all files were skipped, binary-only corpus, or extraction failed.')
|
|
526
|
+
raise SystemExit(1)
|
|
527
|
+
print(f'Graph: {G.number_of_nodes()} nodes, {G.number_of_edges()} edges, {len(communities)} communities')
|
|
528
|
+
'@ | Out-File -FilePath graphify-out\.graphify_step_4_build_graph_cluster_analyze_ge_9.py -Encoding utf8
|
|
529
|
+
& (Get-Content graphify-out\.graphify_python) graphify-out\.graphify_step_4_build_graph_cluster_analyze_ge_9.py
|
|
530
|
+
Remove-Item -ErrorAction SilentlyContinue graphify-out\.graphify_step_4_build_graph_cluster_analyze_ge_9.py
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
If this step prints `ERROR: Graph is empty`, stop and tell the user what happened - do not proceed to labeling or visualization.
|
|
534
|
+
|
|
535
|
+
Replace INPUT_PATH with the actual path.
|
|
536
|
+
|
|
537
|
+
### Step 5 - Label communities
|
|
538
|
+
|
|
539
|
+
Read `graphify-out/.graphify_analysis.json`. For each community key, look at its node labels and write a 2-5 word plain-language name (e.g. "Attention Mechanism", "Training Pipeline", "Data Loading").
|
|
540
|
+
|
|
541
|
+
Then regenerate the report and save the labels for the visualizer:
|
|
542
|
+
|
|
543
|
+
```powershell
|
|
544
|
+
@'
|
|
545
|
+
import sys, json
|
|
546
|
+
from graphify.build import build_from_json
|
|
547
|
+
from graphify.cluster import score_all
|
|
548
|
+
from graphify.analyze import god_nodes, surprising_connections, suggest_questions
|
|
549
|
+
from graphify.report import generate
|
|
550
|
+
from pathlib import Path
|
|
551
|
+
|
|
552
|
+
extraction = json.loads(Path('graphify-out/.graphify_extract.json').read_text(encoding="utf-8"))
|
|
553
|
+
detection = json.loads(Path('graphify-out/.graphify_detect.json').read_text(encoding="utf-8"))
|
|
554
|
+
analysis = json.loads(Path('graphify-out/.graphify_analysis.json').read_text(encoding="utf-8"))
|
|
555
|
+
|
|
556
|
+
G = build_from_json(extraction)
|
|
557
|
+
communities = {int(k): v for k, v in analysis['communities'].items()}
|
|
558
|
+
cohesion = {int(k): v for k, v in analysis['cohesion'].items()}
|
|
559
|
+
tokens = {'input': extraction.get('input_tokens', 0), 'output': extraction.get('output_tokens', 0)}
|
|
560
|
+
|
|
561
|
+
# LABELS - replace these with the names you chose above
|
|
562
|
+
labels = LABELS_DICT
|
|
563
|
+
|
|
564
|
+
# Regenerate questions with real community labels (labels affect question phrasing)
|
|
565
|
+
questions = suggest_questions(G, communities, labels)
|
|
566
|
+
|
|
567
|
+
report = generate(G, communities, cohesion, labels, analysis['gods'], analysis['surprises'], detection, tokens, 'INPUT_PATH', suggested_questions=questions)
|
|
568
|
+
Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding="utf-8")
|
|
569
|
+
Path('graphify-out/.graphify_labels.json').write_text(json.dumps({str(k): v for k, v in labels.items()}, ensure_ascii=False), encoding="utf-8")
|
|
570
|
+
print('Report updated with community labels')
|
|
571
|
+
'@ | Out-File -FilePath graphify-out\.graphify_step_5_label_communities_10.py -Encoding utf8
|
|
572
|
+
& (Get-Content graphify-out\.graphify_python) graphify-out\.graphify_step_5_label_communities_10.py
|
|
573
|
+
Remove-Item -ErrorAction SilentlyContinue graphify-out\.graphify_step_5_label_communities_10.py
|
|
574
|
+
```
|
|
575
|
+
|
|
576
|
+
Replace `LABELS_DICT` with the actual dict you constructed (e.g. `{0: "Attention Mechanism", 1: "Training Pipeline"}`).
|
|
577
|
+
Replace INPUT_PATH with the actual path.
|
|
578
|
+
|
|
579
|
+
### Step 6 - Generate Obsidian vault (opt-in) + HTML
|
|
580
|
+
|
|
581
|
+
**Generate HTML always** (unless `--no-viz`). **Obsidian vault only if `--obsidian` was explicitly given** — skip it otherwise, it generates one file per node.
|
|
582
|
+
|
|
583
|
+
If `--obsidian` was given:
|
|
584
|
+
|
|
585
|
+
- If `--obsidian-dir <path>` was also given, use that path as the vault directory. Otherwise default to `graphify-out/obsidian`.
|
|
586
|
+
|
|
587
|
+
```powershell
|
|
588
|
+
@'
|
|
589
|
+
import sys, json
|
|
590
|
+
from graphify.build import build_from_json
|
|
591
|
+
from graphify.export import to_obsidian, to_canvas
|
|
592
|
+
from pathlib import Path
|
|
593
|
+
|
|
594
|
+
extraction = json.loads(Path('graphify-out/.graphify_extract.json').read_text(encoding="utf-8"))
|
|
595
|
+
analysis = json.loads(Path('graphify-out/.graphify_analysis.json').read_text(encoding="utf-8"))
|
|
596
|
+
labels_raw = json.loads(Path('graphify-out/.graphify_labels.json').read_text(encoding="utf-8")) if Path('graphify-out/.graphify_labels.json').exists() else {}
|
|
597
|
+
|
|
598
|
+
G = build_from_json(extraction)
|
|
599
|
+
communities = {int(k): v for k, v in analysis['communities'].items()}
|
|
600
|
+
cohesion = {int(k): v for k, v in analysis['cohesion'].items()}
|
|
601
|
+
labels = {int(k): v for k, v in labels_raw.items()}
|
|
602
|
+
|
|
603
|
+
obsidian_dir = 'OBSIDIAN_DIR' # replace with --obsidian-dir value, or 'graphify-out/obsidian' if not given
|
|
604
|
+
|
|
605
|
+
n = to_obsidian(G, communities, obsidian_dir, community_labels=labels or None, cohesion=cohesion)
|
|
606
|
+
print(f'Obsidian vault: {n} notes in {obsidian_dir}/')
|
|
607
|
+
|
|
608
|
+
to_canvas(G, communities, f'{obsidian_dir}/graph.canvas', community_labels=labels or None)
|
|
609
|
+
print(f'Canvas: {obsidian_dir}/graph.canvas - open in Obsidian for structured community layout')
|
|
610
|
+
print()
|
|
611
|
+
print(f'Open {obsidian_dir}/ as a vault in Obsidian.')
|
|
612
|
+
print(' Graph view - nodes colored by community (set automatically)')
|
|
613
|
+
print(' graph.canvas - structured layout with communities as groups')
|
|
614
|
+
print(' _COMMUNITY_* - overview notes with cohesion scores and dataview queries')
|
|
615
|
+
'@ | Out-File -FilePath graphify-out\.graphify_step_6_generate_obsidian_vault_opt_in_11.py -Encoding utf8
|
|
616
|
+
& (Get-Content graphify-out\.graphify_python) graphify-out\.graphify_step_6_generate_obsidian_vault_opt_in_11.py
|
|
617
|
+
Remove-Item -ErrorAction SilentlyContinue graphify-out\.graphify_step_6_generate_obsidian_vault_opt_in_11.py
|
|
618
|
+
```
|
|
619
|
+
|
|
620
|
+
Generate the HTML graph (always, unless `--no-viz`):
|
|
621
|
+
|
|
622
|
+
```powershell
|
|
623
|
+
@'
|
|
624
|
+
import sys, json
|
|
625
|
+
from graphify.build import build_from_json
|
|
626
|
+
from graphify.export import to_html
|
|
627
|
+
from pathlib import Path
|
|
628
|
+
|
|
629
|
+
extraction = json.loads(Path('graphify-out/.graphify_extract.json').read_text(encoding="utf-8"))
|
|
630
|
+
analysis = json.loads(Path('graphify-out/.graphify_analysis.json').read_text(encoding="utf-8"))
|
|
631
|
+
labels_raw = json.loads(Path('graphify-out/.graphify_labels.json').read_text(encoding="utf-8")) if Path('graphify-out/.graphify_labels.json').exists() else {}
|
|
632
|
+
|
|
633
|
+
G = build_from_json(extraction)
|
|
634
|
+
communities = {int(k): v for k, v in analysis['communities'].items()}
|
|
635
|
+
labels = {int(k): v for k, v in labels_raw.items()}
|
|
636
|
+
|
|
637
|
+
if G.number_of_nodes() > 5000:
|
|
638
|
+
print(f'Graph has {G.number_of_nodes()} nodes - too large for HTML viz. Use Obsidian vault instead.')
|
|
639
|
+
else:
|
|
640
|
+
to_html(G, communities, 'graphify-out/graph.html', community_labels=labels or None)
|
|
641
|
+
print('graph.html written - open in any browser, no server needed')
|
|
642
|
+
'@ | Out-File -FilePath graphify-out\.graphify_step_6_generate_obsidian_vault_opt_in_12.py -Encoding utf8
|
|
643
|
+
& (Get-Content graphify-out\.graphify_python) graphify-out\.graphify_step_6_generate_obsidian_vault_opt_in_12.py
|
|
644
|
+
Remove-Item -ErrorAction SilentlyContinue graphify-out\.graphify_step_6_generate_obsidian_vault_opt_in_12.py
|
|
645
|
+
```
|
|
646
|
+
|
|
647
|
+
### Step 7 - Neo4j export (only if --neo4j or --neo4j-push flag)
|
|
648
|
+
|
|
649
|
+
**If `--neo4j`** - generate a Cypher file for manual import:
|
|
650
|
+
|
|
651
|
+
```powershell
|
|
652
|
+
@'
|
|
653
|
+
import sys, json
|
|
654
|
+
from graphify.build import build_from_json
|
|
655
|
+
from graphify.export import to_cypher
|
|
656
|
+
from pathlib import Path
|
|
657
|
+
|
|
658
|
+
G = build_from_json(json.loads(Path('graphify-out/.graphify_extract.json').read_text(encoding="utf-8")))
|
|
659
|
+
to_cypher(G, 'graphify-out/cypher.txt')
|
|
660
|
+
print('cypher.txt written - import with: cypher-shell < graphify-out/cypher.txt')
|
|
661
|
+
'@ | Out-File -FilePath graphify-out\.graphify_step_7_neo4j_export_only_if_neo4j_or__13.py -Encoding utf8
|
|
662
|
+
& (Get-Content graphify-out\.graphify_python) graphify-out\.graphify_step_7_neo4j_export_only_if_neo4j_or__13.py
|
|
663
|
+
Remove-Item -ErrorAction SilentlyContinue graphify-out\.graphify_step_7_neo4j_export_only_if_neo4j_or__13.py
|
|
664
|
+
```
|
|
665
|
+
|
|
666
|
+
**If `--neo4j-push <uri>`** - push directly to a running Neo4j instance. Ask the user for credentials if not provided:
|
|
667
|
+
|
|
668
|
+
```powershell
|
|
669
|
+
@'
|
|
670
|
+
import sys, json
|
|
671
|
+
from graphify.build import build_from_json
|
|
672
|
+
from graphify.cluster import cluster
|
|
673
|
+
from graphify.export import push_to_neo4j
|
|
674
|
+
from pathlib import Path
|
|
675
|
+
|
|
676
|
+
extraction = json.loads(Path('graphify-out/.graphify_extract.json').read_text(encoding="utf-8"))
|
|
677
|
+
analysis = json.loads(Path('graphify-out/.graphify_analysis.json').read_text(encoding="utf-8"))
|
|
678
|
+
G = build_from_json(extraction)
|
|
679
|
+
communities = {int(k): v for k, v in analysis['communities'].items()}
|
|
680
|
+
|
|
681
|
+
result = push_to_neo4j(G, uri='NEO4J_URI', user='NEO4J_USER', password='NEO4J_PASSWORD', communities=communities)
|
|
682
|
+
print(f'Pushed to Neo4j: {result["nodes"]} nodes, {result["edges"]} edges')
|
|
683
|
+
'@ | Out-File -FilePath graphify-out\.graphify_step_7_neo4j_export_only_if_neo4j_or__14.py -Encoding utf8
|
|
684
|
+
& (Get-Content graphify-out\.graphify_python) graphify-out\.graphify_step_7_neo4j_export_only_if_neo4j_or__14.py
|
|
685
|
+
Remove-Item -ErrorAction SilentlyContinue graphify-out\.graphify_step_7_neo4j_export_only_if_neo4j_or__14.py
|
|
686
|
+
```
|
|
687
|
+
|
|
688
|
+
Replace `NEO4J_URI`, `NEO4J_USER`, `NEO4J_PASSWORD` with actual values. Default URI is `bolt://localhost:7687`, default user is `neo4j`. Uses MERGE - safe to re-run without creating duplicates.
|
|
689
|
+
|
|
690
|
+
### Step 7b - SVG export (only if --svg flag)
|
|
691
|
+
|
|
692
|
+
```powershell
|
|
693
|
+
@'
|
|
694
|
+
import sys, json
|
|
695
|
+
from graphify.build import build_from_json
|
|
696
|
+
from graphify.export import to_svg
|
|
697
|
+
from pathlib import Path
|
|
698
|
+
|
|
699
|
+
extraction = json.loads(Path('graphify-out/.graphify_extract.json').read_text(encoding="utf-8"))
|
|
700
|
+
analysis = json.loads(Path('graphify-out/.graphify_analysis.json').read_text(encoding="utf-8"))
|
|
701
|
+
labels_raw = json.loads(Path('graphify-out/.graphify_labels.json').read_text(encoding="utf-8")) if Path('graphify-out/.graphify_labels.json').exists() else {}
|
|
702
|
+
|
|
703
|
+
G = build_from_json(extraction)
|
|
704
|
+
communities = {int(k): v for k, v in analysis['communities'].items()}
|
|
705
|
+
labels = {int(k): v for k, v in labels_raw.items()}
|
|
706
|
+
|
|
707
|
+
to_svg(G, communities, 'graphify-out/graph.svg', community_labels=labels or None)
|
|
708
|
+
print('graph.svg written - embeds in Obsidian, Notion, GitHub READMEs')
|
|
709
|
+
'@ | Out-File -FilePath graphify-out\.graphify_step_7b_svg_export_only_if_svg_flag_15.py -Encoding utf8
|
|
710
|
+
& (Get-Content graphify-out\.graphify_python) graphify-out\.graphify_step_7b_svg_export_only_if_svg_flag_15.py
|
|
711
|
+
Remove-Item -ErrorAction SilentlyContinue graphify-out\.graphify_step_7b_svg_export_only_if_svg_flag_15.py
|
|
712
|
+
```
|
|
713
|
+
|
|
714
|
+
### Step 7c - GraphML export (only if --graphml flag)
|
|
715
|
+
|
|
716
|
+
```powershell
|
|
717
|
+
@'
|
|
718
|
+
import json
|
|
719
|
+
from graphify.build import build_from_json
|
|
720
|
+
from graphify.export import to_graphml
|
|
721
|
+
from pathlib import Path
|
|
722
|
+
|
|
723
|
+
extraction = json.loads(Path('graphify-out/.graphify_extract.json').read_text(encoding="utf-8"))
|
|
724
|
+
analysis = json.loads(Path('graphify-out/.graphify_analysis.json').read_text(encoding="utf-8"))
|
|
725
|
+
|
|
726
|
+
G = build_from_json(extraction)
|
|
727
|
+
communities = {int(k): v for k, v in analysis['communities'].items()}
|
|
728
|
+
|
|
729
|
+
to_graphml(G, communities, 'graphify-out/graph.graphml')
|
|
730
|
+
print('graph.graphml written - open in Gephi, yEd, or any GraphML tool')
|
|
731
|
+
'@ | Out-File -FilePath graphify-out\.graphify_step_7c_graphml_export_only_if_graphml_16.py -Encoding utf8
|
|
732
|
+
& (Get-Content graphify-out\.graphify_python) graphify-out\.graphify_step_7c_graphml_export_only_if_graphml_16.py
|
|
733
|
+
Remove-Item -ErrorAction SilentlyContinue graphify-out\.graphify_step_7c_graphml_export_only_if_graphml_16.py
|
|
734
|
+
```
|
|
735
|
+
|
|
736
|
+
### Step 7d - MCP server (only if --mcp flag)
|
|
737
|
+
|
|
738
|
+
```powershell
|
|
739
|
+
& (Get-Content graphify-out\.graphify_python) -m graphify.serve graphify-out/graph.json
|
|
740
|
+
```
|
|
741
|
+
|
|
742
|
+
This starts a stdio MCP server that exposes tools: `query_graph`, `get_node`, `get_neighbors`, `get_community`, `god_nodes`, `graph_stats`, `shortest_path`. Add to Claude Desktop or any MCP-compatible agent orchestrator so other agents can query the graph live.
|
|
743
|
+
|
|
744
|
+
To configure in Claude Desktop, add to `claude_desktop_config.json`:
|
|
745
|
+
```json
|
|
746
|
+
{
|
|
747
|
+
"mcpServers": {
|
|
748
|
+
"graphify": {
|
|
749
|
+
"command": "python",
|
|
750
|
+
"args": ["-m", "graphify.serve", "/absolute/path/to/graphify-out/graph.json"]
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
```
|
|
755
|
+
|
|
756
|
+
### Step 8 - Token reduction benchmark (only if total_words > 5000)
|
|
757
|
+
|
|
758
|
+
If `total_words` from `graphify-out/.graphify_detect.json` is greater than 5,000, run:
|
|
759
|
+
|
|
760
|
+
```powershell
|
|
761
|
+
@'
|
|
762
|
+
import json
|
|
763
|
+
from graphify.benchmark import run_benchmark, print_benchmark
|
|
764
|
+
from pathlib import Path
|
|
765
|
+
|
|
766
|
+
detection = json.loads(Path('graphify-out/.graphify_detect.json').read_text(encoding="utf-8"))
|
|
767
|
+
result = run_benchmark('graphify-out/graph.json', corpus_words=detection['total_words'])
|
|
768
|
+
print_benchmark(result)
|
|
769
|
+
'@ | Out-File -FilePath graphify-out\.graphify_step_8_token_reduction_benchmark_only_17.py -Encoding utf8
|
|
770
|
+
& (Get-Content graphify-out\.graphify_python) graphify-out\.graphify_step_8_token_reduction_benchmark_only_17.py
|
|
771
|
+
Remove-Item -ErrorAction SilentlyContinue graphify-out\.graphify_step_8_token_reduction_benchmark_only_17.py
|
|
772
|
+
```
|
|
773
|
+
|
|
774
|
+
Print the output directly in chat. If `total_words <= 5000`, skip silently - the graph value is structural clarity, not token compression, for small corpora.
|
|
775
|
+
|
|
776
|
+
---
|
|
777
|
+
|
|
778
|
+
### Step 9 - Save manifest, update cost tracker, clean up, and report
|
|
779
|
+
|
|
780
|
+
```powershell
|
|
781
|
+
@'
|
|
782
|
+
import json
|
|
783
|
+
from pathlib import Path
|
|
784
|
+
from datetime import datetime, timezone
|
|
785
|
+
from graphify.detect import save_manifest
|
|
786
|
+
|
|
787
|
+
# Save manifest for --update
|
|
788
|
+
detect = json.loads(Path('graphify-out/.graphify_detect.json').read_text(encoding="utf-8"))
|
|
789
|
+
save_manifest(detect['files'])
|
|
790
|
+
|
|
791
|
+
# Update cumulative cost tracker
|
|
792
|
+
extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text(encoding="utf-8"))
|
|
793
|
+
input_tok = extract.get('input_tokens', 0)
|
|
794
|
+
output_tok = extract.get('output_tokens', 0)
|
|
795
|
+
|
|
796
|
+
cost_path = Path('graphify-out/cost.json')
|
|
797
|
+
if cost_path.exists():
|
|
798
|
+
cost = json.loads(cost_path.read_text(encoding="utf-8"))
|
|
799
|
+
else:
|
|
800
|
+
cost = {'runs': [], 'total_input_tokens': 0, 'total_output_tokens': 0}
|
|
801
|
+
|
|
802
|
+
cost['runs'].append({
|
|
803
|
+
'date': datetime.now(timezone.utc).isoformat(),
|
|
804
|
+
'input_tokens': input_tok,
|
|
805
|
+
'output_tokens': output_tok,
|
|
806
|
+
'files': detect.get('total_files', 0),
|
|
807
|
+
})
|
|
808
|
+
cost['total_input_tokens'] += input_tok
|
|
809
|
+
cost['total_output_tokens'] += output_tok
|
|
810
|
+
cost_path.write_text(json.dumps(cost, indent=2, ensure_ascii=False), encoding="utf-8")
|
|
811
|
+
|
|
812
|
+
print(f'This run: {input_tok:,} input tokens, {output_tok:,} output tokens')
|
|
813
|
+
print(f'All time: {cost["total_input_tokens"]:,} input, {cost["total_output_tokens"]:,} output ({len(cost["runs"])} runs)')
|
|
814
|
+
'@ | Out-File -FilePath graphify-out\.graphify_step_9_save_manifest_update_cost_trac_18.py -Encoding utf8
|
|
815
|
+
& (Get-Content graphify-out\.graphify_python) graphify-out\.graphify_step_9_save_manifest_update_cost_trac_18.py
|
|
816
|
+
Remove-Item -ErrorAction SilentlyContinue graphify-out\.graphify_step_9_save_manifest_update_cost_trac_18.py
|
|
817
|
+
Remove-Item -ErrorAction SilentlyContinue graphify-out\.graphify_detect.json, graphify-out\.graphify_extract.json, graphify-out\.graphify_ast.json, graphify-out\.graphify_semantic.json, graphify-out\.graphify_analysis.json, graphify-out\.graphify_labels.json
|
|
818
|
+
Remove-Item -ErrorAction SilentlyContinue graphify-out/.needs_update
|
|
819
|
+
```
|
|
820
|
+
|
|
821
|
+
Tell the user (omit the obsidian line unless --obsidian was given):
|
|
822
|
+
```
|
|
823
|
+
Graph complete. Outputs in PATH_TO_DIR/graphify-out/
|
|
824
|
+
|
|
825
|
+
graph.html - interactive graph, open in browser
|
|
826
|
+
GRAPH_REPORT.md - audit report
|
|
827
|
+
graph.json - raw graph data
|
|
828
|
+
obsidian/ - Obsidian vault (only if --obsidian was given)
|
|
829
|
+
```
|
|
830
|
+
|
|
831
|
+
If graphify saved you time, consider supporting it: https://github.com/sponsors/safishamsi
|
|
832
|
+
|
|
833
|
+
Replace PATH_TO_DIR with the actual absolute path of the directory that was processed.
|
|
834
|
+
|
|
835
|
+
Then paste these sections from GRAPH_REPORT.md directly into the chat:
|
|
836
|
+
- God Nodes
|
|
837
|
+
- Surprising Connections
|
|
838
|
+
- Suggested Questions
|
|
839
|
+
|
|
840
|
+
Do NOT paste the full report - just those three sections. Keep it concise.
|
|
841
|
+
|
|
842
|
+
Then immediately offer to explore. Pick the single most interesting suggested question from the report - the one that crosses the most community boundaries or has the most surprising bridge node - and ask:
|
|
843
|
+
|
|
844
|
+
> "The most interesting question this graph can answer: **[question]**. Want me to trace it?"
|
|
845
|
+
|
|
846
|
+
If the user says yes, run `/graphify query "[question]"` on the graph and walk them through the answer using the graph structure - which nodes connect, which community boundaries get crossed, what the path reveals. Keep going as long as they want to explore. Each answer should end with a natural follow-up ("this connects to X - want to go deeper?") so the session feels like navigation, not a one-shot report.
|
|
847
|
+
|
|
848
|
+
The graph is the map. Your job after the pipeline is to be the guide.
|
|
849
|
+
|
|
850
|
+
---
|
|
851
|
+
|
|
852
|
+
## For --update (incremental re-extraction)
|
|
853
|
+
|
|
854
|
+
Use when you've added or modified files since the last run. Only re-extracts changed files - saves tokens and time.
|
|
855
|
+
|
|
856
|
+
```powershell
|
|
857
|
+
@'
|
|
858
|
+
import sys, json
|
|
859
|
+
from graphify.detect import detect_incremental, save_manifest
|
|
860
|
+
from pathlib import Path
|
|
861
|
+
|
|
862
|
+
result = detect_incremental(Path('INPUT_PATH'))
|
|
863
|
+
new_total = result.get('new_total', 0)
|
|
864
|
+
print(json.dumps(result, indent=2, ensure_ascii=False))
|
|
865
|
+
Path('graphify-out/.graphify_incremental.json').write_text(json.dumps(result, ensure_ascii=False), encoding="utf-8")
|
|
866
|
+
deleted = list(result.get('deleted_files', []))
|
|
867
|
+
if new_total == 0 and not deleted:
|
|
868
|
+
print('No files changed since last run. Nothing to update.')
|
|
869
|
+
raise SystemExit(0)
|
|
870
|
+
if deleted:
|
|
871
|
+
print(f'{len(deleted)} deleted file(s) to prune.')
|
|
872
|
+
if new_total > 0:
|
|
873
|
+
print(f'{new_total} new/changed file(s) to re-extract.')
|
|
874
|
+
'@ | Out-File -FilePath graphify-out\.graphify_step_for_update_incremental_re_extracti_19.py -Encoding utf8
|
|
875
|
+
& (Get-Content graphify-out\.graphify_python) graphify-out\.graphify_step_for_update_incremental_re_extracti_19.py
|
|
876
|
+
Remove-Item -ErrorAction SilentlyContinue graphify-out\.graphify_step_for_update_incremental_re_extracti_19.py
|
|
877
|
+
```
|
|
878
|
+
|
|
879
|
+
If new files exist, first check whether all changed files are code files:
|
|
880
|
+
|
|
881
|
+
```powershell
|
|
882
|
+
@'
|
|
883
|
+
import json
|
|
884
|
+
from pathlib import Path
|
|
885
|
+
|
|
886
|
+
result = json.loads(open('graphify-out/.graphify_incremental.json', encoding='utf-8').read()) if Path('graphify-out/.graphify_incremental.json').exists() else {}
|
|
887
|
+
code_exts = {'.py','.ts','.js','.go','.rs','.java','.cpp','.c','.rb','.swift','.kt','.cs','.scala','.php','.cc','.cxx','.hpp','.h','.kts','.lua','.toc'}
|
|
888
|
+
new_files = result.get('new_files', {})
|
|
889
|
+
all_changed = [f for files in new_files.values() for f in files]
|
|
890
|
+
code_only = all(Path(f).suffix.lower() in code_exts for f in all_changed)
|
|
891
|
+
print('code_only:', code_only)
|
|
892
|
+
'@ | Out-File -FilePath graphify-out\.graphify_step_for_update_incremental_re_extracti_20.py -Encoding utf8
|
|
893
|
+
& (Get-Content graphify-out\.graphify_python) graphify-out\.graphify_step_for_update_incremental_re_extracti_20.py
|
|
894
|
+
Remove-Item -ErrorAction SilentlyContinue graphify-out\.graphify_step_for_update_incremental_re_extracti_20.py
|
|
895
|
+
```
|
|
896
|
+
|
|
897
|
+
If `code_only` is True: print `[graphify update] Code-only changes detected - skipping semantic extraction (no LLM needed)`, run only Step 3A (AST) on the changed files, skip Step 3B entirely (no subagents), then go straight to merge and Steps 4–8.
|
|
898
|
+
|
|
899
|
+
If `code_only` is False (any changed file is a doc/paper/image): run the full Steps 3A–3C pipeline as normal.
|
|
900
|
+
|
|
901
|
+
|
|
902
|
+
If no new files exist (only deletions), create an empty extraction so the merge step can prune:
|
|
903
|
+
|
|
904
|
+
```powershell
|
|
905
|
+
if (-not (Test-Path graphify-out\.graphify_extract.json)) {
|
|
906
|
+
Write-Host '[graphify update] Only deletions -- creating empty extraction for merge.'
|
|
907
|
+
@'
|
|
908
|
+
import json
|
|
909
|
+
from pathlib import Path
|
|
910
|
+
Path('graphify-out/.graphify_extract.json').write_text(json.dumps({'nodes':[],'edges':[],'hyperedges':[],'input_tokens':0,'output_tokens':0}), encoding='utf-8')
|
|
911
|
+
'@ | Out-File -FilePath graphify-out\.graphify_step_empty_extract.py -Encoding utf8
|
|
912
|
+
& (Get-Content graphify-out\.graphify_python) graphify-out\.graphify_step_empty_extract.py
|
|
913
|
+
Remove-Item -ErrorAction SilentlyContinue graphify-out\.graphify_step_empty_extract.py
|
|
914
|
+
}
|
|
915
|
+
```
|
|
916
|
+
|
|
917
|
+
|
|
918
|
+
Then:
|
|
919
|
+
|
|
920
|
+
```powershell
|
|
921
|
+
@'
|
|
922
|
+
import sys, json
|
|
923
|
+
from graphify.build import build_from_json
|
|
924
|
+
from graphify.export import to_json
|
|
925
|
+
from networkx.readwrite import json_graph
|
|
926
|
+
import networkx as nx
|
|
927
|
+
from pathlib import Path
|
|
928
|
+
|
|
929
|
+
# Load existing graph
|
|
930
|
+
existing_data = json.loads(Path('graphify-out/graph.json').read_text(encoding="utf-8"))
|
|
931
|
+
G_existing = json_graph.node_link_graph(existing_data, edges='links')
|
|
932
|
+
|
|
933
|
+
# Load new extraction
|
|
934
|
+
new_extraction = json.loads(Path('graphify-out/.graphify_extract.json').read_text(encoding="utf-8"))
|
|
935
|
+
G_new = build_from_json(new_extraction)
|
|
936
|
+
|
|
937
|
+
# Prune nodes from deleted files
|
|
938
|
+
incremental = json.loads(Path('graphify-out/.graphify_incremental.json').read_text(encoding="utf-8"))
|
|
939
|
+
deleted = set(incremental.get('deleted_files', []))
|
|
940
|
+
if deleted:
|
|
941
|
+
to_remove = [n for n, d in G_existing.nodes(data=True) if d.get('source_file') in deleted]
|
|
942
|
+
G_existing.remove_nodes_from(to_remove)
|
|
943
|
+
if to_remove:
|
|
944
|
+
print(f'Pruned {len(to_remove)} ghost node(s) from {len(deleted)} deleted file(s) — drift detected and corrected.')
|
|
945
|
+
else:
|
|
946
|
+
print(f'{len(deleted)} file(s) deleted since last run, but no ghost nodes were present in the graph — no drift.')
|
|
947
|
+
|
|
948
|
+
# Merge: new nodes/edges into existing graph
|
|
949
|
+
G_existing.update(G_new)
|
|
950
|
+
print(f'Merged: {G_existing.number_of_nodes()} nodes, {G_existing.number_of_edges()} edges')
|
|
951
|
+
|
|
952
|
+
# Save manifest with the CURRENT full file list so the next --update
|
|
953
|
+
# diffs against today's filesystem state, not the prior --update's
|
|
954
|
+
# baseline. Without this, deleted files get reported as ghosts again
|
|
955
|
+
# on every subsequent --update until a full rebuild runs.
|
|
956
|
+
from graphify.detect import save_manifest
|
|
957
|
+
save_manifest(incremental['files'])
|
|
958
|
+
print('[graphify update] Manifest saved.')
|
|
959
|
+
'@ | Out-File -FilePath graphify-out\.graphify_step_for_update_incremental_re_extracti_21.py -Encoding utf8
|
|
960
|
+
& (Get-Content graphify-out\.graphify_python) graphify-out\.graphify_step_for_update_incremental_re_extracti_21.py
|
|
961
|
+
Remove-Item -ErrorAction SilentlyContinue graphify-out\.graphify_step_for_update_incremental_re_extracti_21.py
|
|
962
|
+
```
|
|
963
|
+
|
|
964
|
+
Then run Steps 4–8 on the merged graph as normal.
|
|
965
|
+
|
|
966
|
+
After Step 4, show the graph diff:
|
|
967
|
+
|
|
968
|
+
```powershell
|
|
969
|
+
@'
|
|
970
|
+
import json
|
|
971
|
+
from graphify.analyze import graph_diff
|
|
972
|
+
from graphify.build import build_from_json
|
|
973
|
+
from networkx.readwrite import json_graph
|
|
974
|
+
import networkx as nx
|
|
975
|
+
from pathlib import Path
|
|
976
|
+
|
|
977
|
+
# Load old graph (before update) from backup written before merge
|
|
978
|
+
old_data = json.loads(Path('graphify-out/.graphify_old.json').read_text(encoding="utf-8")) if Path('graphify-out/.graphify_old.json').exists() else None
|
|
979
|
+
new_extract = json.loads(Path('graphify-out/.graphify_extract.json').read_text(encoding="utf-8"))
|
|
980
|
+
G_new = build_from_json(new_extract)
|
|
981
|
+
|
|
982
|
+
if old_data:
|
|
983
|
+
G_old = json_graph.node_link_graph(old_data, edges='links')
|
|
984
|
+
diff = graph_diff(G_old, G_new)
|
|
985
|
+
print(diff['summary'])
|
|
986
|
+
if diff['new_nodes']:
|
|
987
|
+
print('New nodes:', ', '.join(n['label'] for n in diff['new_nodes'][:5]))
|
|
988
|
+
if diff['new_edges']:
|
|
989
|
+
print('New edges:', len(diff['new_edges']))
|
|
990
|
+
'@ | Out-File -FilePath graphify-out\.graphify_step_for_update_incremental_re_extracti_22.py -Encoding utf8
|
|
991
|
+
& (Get-Content graphify-out\.graphify_python) graphify-out\.graphify_step_for_update_incremental_re_extracti_22.py
|
|
992
|
+
Remove-Item -ErrorAction SilentlyContinue graphify-out\.graphify_step_for_update_incremental_re_extracti_22.py
|
|
993
|
+
```
|
|
994
|
+
|
|
995
|
+
Before the merge step, save the old graph: `Copy-Item graphify-out/graph.json graphify-out\.graphify_old.json`
|
|
996
|
+
Clean up after: `Remove-Item -ErrorAction SilentlyContinue graphify-out\.graphify_old.json`
|
|
997
|
+
|
|
998
|
+
---
|
|
999
|
+
|
|
1000
|
+
## For --cluster-only
|
|
1001
|
+
|
|
1002
|
+
Skip Steps 1–3. Load the existing graph from `graphify-out/graph.json` and re-run clustering:
|
|
1003
|
+
|
|
1004
|
+
```powershell
|
|
1005
|
+
@'
|
|
1006
|
+
import sys, json
|
|
1007
|
+
from graphify.cluster import cluster, score_all
|
|
1008
|
+
from graphify.analyze import god_nodes, surprising_connections
|
|
1009
|
+
from graphify.report import generate
|
|
1010
|
+
from graphify.export import to_json
|
|
1011
|
+
from networkx.readwrite import json_graph
|
|
1012
|
+
import networkx as nx
|
|
1013
|
+
from pathlib import Path
|
|
1014
|
+
|
|
1015
|
+
data = json.loads(Path('graphify-out/graph.json').read_text(encoding="utf-8"))
|
|
1016
|
+
G = json_graph.node_link_graph(data, edges='links')
|
|
1017
|
+
|
|
1018
|
+
detection = {'total_files': 0, 'total_words': 99999, 'needs_graph': True, 'warning': None,
|
|
1019
|
+
'files': {'code': [], 'document': [], 'paper': []}}
|
|
1020
|
+
tokens = {'input': 0, 'output': 0}
|
|
1021
|
+
|
|
1022
|
+
communities = cluster(G)
|
|
1023
|
+
cohesion = score_all(G, communities)
|
|
1024
|
+
gods = god_nodes(G)
|
|
1025
|
+
surprises = surprising_connections(G, communities)
|
|
1026
|
+
labels = {cid: 'Community ' + str(cid) for cid in communities}
|
|
1027
|
+
|
|
1028
|
+
report = generate(G, communities, cohesion, labels, gods, surprises, detection, tokens, '.')
|
|
1029
|
+
Path('graphify-out/GRAPH_REPORT.md').write_text(report, encoding="utf-8")
|
|
1030
|
+
to_json(G, communities, 'graphify-out/graph.json')
|
|
1031
|
+
|
|
1032
|
+
analysis = {
|
|
1033
|
+
'communities': {str(k): v for k, v in communities.items()},
|
|
1034
|
+
'cohesion': {str(k): v for k, v in cohesion.items()},
|
|
1035
|
+
'gods': gods,
|
|
1036
|
+
'surprises': surprises,
|
|
1037
|
+
}
|
|
1038
|
+
Path('graphify-out/.graphify_analysis.json').write_text(json.dumps(analysis, indent=2, ensure_ascii=False), encoding="utf-8")
|
|
1039
|
+
print(f'Re-clustered: {len(communities)} communities')
|
|
1040
|
+
'@ | Out-File -FilePath graphify-out\.graphify_step_for_cluster_only_23.py -Encoding utf8
|
|
1041
|
+
& (Get-Content graphify-out\.graphify_python) graphify-out\.graphify_step_for_cluster_only_23.py
|
|
1042
|
+
Remove-Item -ErrorAction SilentlyContinue graphify-out\.graphify_step_for_cluster_only_23.py
|
|
1043
|
+
```
|
|
1044
|
+
|
|
1045
|
+
Then run Steps 5–9 as normal (label communities, generate viz, benchmark, clean up, report).
|
|
1046
|
+
|
|
1047
|
+
---
|
|
1048
|
+
|
|
1049
|
+
## For /graphify query
|
|
1050
|
+
|
|
1051
|
+
Two traversal modes - choose based on the question:
|
|
1052
|
+
|
|
1053
|
+
| Mode | Flag | Best for |
|
|
1054
|
+
|------|------|----------|
|
|
1055
|
+
| BFS (default) | _(none)_ | "What is X connected to?" - broad context, nearest neighbors first |
|
|
1056
|
+
| DFS | `--dfs` | "How does X reach Y?" - trace a specific chain or dependency path |
|
|
1057
|
+
|
|
1058
|
+
First check the graph exists:
|
|
1059
|
+
```powershell
|
|
1060
|
+
@'
|
|
1061
|
+
from pathlib import Path
|
|
1062
|
+
if not Path('graphify-out/graph.json').exists():
|
|
1063
|
+
print('ERROR: No graph found. Run /graphify <path> first to build the graph.')
|
|
1064
|
+
raise SystemExit(1)
|
|
1065
|
+
'@ | Out-File -FilePath graphify-out\.graphify_step_for_graphify_query_24.py -Encoding utf8
|
|
1066
|
+
& (Get-Content graphify-out\.graphify_python) graphify-out\.graphify_step_for_graphify_query_24.py
|
|
1067
|
+
Remove-Item -ErrorAction SilentlyContinue graphify-out\.graphify_step_for_graphify_query_24.py
|
|
1068
|
+
```
|
|
1069
|
+
If it fails, stop and tell the user to run `/graphify <path>` first.
|
|
1070
|
+
|
|
1071
|
+
Load `graphify-out/graph.json`, then:
|
|
1072
|
+
|
|
1073
|
+
1. Find the 1-3 nodes whose label best matches key terms in the question.
|
|
1074
|
+
2. Run the appropriate traversal from each starting node.
|
|
1075
|
+
3. Read the subgraph - node labels, edge relations, confidence tags, source locations.
|
|
1076
|
+
4. Answer using **only** what the graph contains. Quote `source_location` when citing a specific fact.
|
|
1077
|
+
5. If the graph lacks enough information, say so - do not hallucinate edges.
|
|
1078
|
+
|
|
1079
|
+
```powershell
|
|
1080
|
+
@'
|
|
1081
|
+
import sys, json
|
|
1082
|
+
from networkx.readwrite import json_graph
|
|
1083
|
+
import networkx as nx
|
|
1084
|
+
from pathlib import Path
|
|
1085
|
+
|
|
1086
|
+
data = json.loads(Path('graphify-out/graph.json').read_text(encoding="utf-8"))
|
|
1087
|
+
G = json_graph.node_link_graph(data, edges='links')
|
|
1088
|
+
|
|
1089
|
+
question = 'QUESTION'
|
|
1090
|
+
mode = 'MODE' # 'bfs' or 'dfs'
|
|
1091
|
+
terms = [t.lower() for t in question.split() if len(t) > 3]
|
|
1092
|
+
|
|
1093
|
+
# Find best-matching start nodes
|
|
1094
|
+
scored = []
|
|
1095
|
+
for nid, ndata in G.nodes(data=True):
|
|
1096
|
+
label = ndata.get('label', '').lower()
|
|
1097
|
+
score = sum(1 for t in terms if t in label)
|
|
1098
|
+
if score > 0:
|
|
1099
|
+
scored.append((score, nid))
|
|
1100
|
+
scored.sort(reverse=True)
|
|
1101
|
+
start_nodes = [nid for _, nid in scored[:3]]
|
|
1102
|
+
|
|
1103
|
+
if not start_nodes:
|
|
1104
|
+
print('No matching nodes found for query terms:', terms)
|
|
1105
|
+
sys.exit(0)
|
|
1106
|
+
|
|
1107
|
+
subgraph_nodes = set()
|
|
1108
|
+
subgraph_edges = []
|
|
1109
|
+
|
|
1110
|
+
if mode == 'dfs':
|
|
1111
|
+
# DFS: follow one path as deep as possible before backtracking.
|
|
1112
|
+
# Depth-limited to 6 to avoid traversing the whole graph.
|
|
1113
|
+
visited = set()
|
|
1114
|
+
stack = [(n, 0) for n in reversed(start_nodes)]
|
|
1115
|
+
while stack:
|
|
1116
|
+
node, depth = stack.pop()
|
|
1117
|
+
if node in visited or depth > 6:
|
|
1118
|
+
continue
|
|
1119
|
+
visited.add(node)
|
|
1120
|
+
subgraph_nodes.add(node)
|
|
1121
|
+
for neighbor in G.neighbors(node):
|
|
1122
|
+
if neighbor not in visited:
|
|
1123
|
+
stack.append((neighbor, depth + 1))
|
|
1124
|
+
subgraph_edges.append((node, neighbor))
|
|
1125
|
+
else:
|
|
1126
|
+
# BFS: explore all neighbors layer by layer up to depth 3.
|
|
1127
|
+
frontier = set(start_nodes)
|
|
1128
|
+
subgraph_nodes = set(start_nodes)
|
|
1129
|
+
for _ in range(3):
|
|
1130
|
+
next_frontier = set()
|
|
1131
|
+
for n in frontier:
|
|
1132
|
+
for neighbor in G.neighbors(n):
|
|
1133
|
+
if neighbor not in subgraph_nodes:
|
|
1134
|
+
next_frontier.add(neighbor)
|
|
1135
|
+
subgraph_edges.append((n, neighbor))
|
|
1136
|
+
subgraph_nodes.update(next_frontier)
|
|
1137
|
+
frontier = next_frontier
|
|
1138
|
+
|
|
1139
|
+
# Token-budget aware output: rank by relevance, cut at budget (~4 chars/token)
|
|
1140
|
+
token_budget = BUDGET # default 2000
|
|
1141
|
+
char_budget = token_budget * 4
|
|
1142
|
+
|
|
1143
|
+
# Score each node by term overlap for ranked output
|
|
1144
|
+
def relevance(nid):
|
|
1145
|
+
label = G.nodes[nid].get('label', '').lower()
|
|
1146
|
+
return sum(1 for t in terms if t in label)
|
|
1147
|
+
|
|
1148
|
+
ranked_nodes = sorted(subgraph_nodes, key=relevance, reverse=True)
|
|
1149
|
+
|
|
1150
|
+
lines = [f'Traversal: {mode.upper()} | Start: {[G.nodes[n].get("label",n) for n in start_nodes]} | {len(subgraph_nodes)} nodes']
|
|
1151
|
+
for nid in ranked_nodes:
|
|
1152
|
+
d = G.nodes[nid]
|
|
1153
|
+
lines.append(f' NODE {d.get("label", nid)} [src={d.get("source_file","")} loc={d.get("source_location","")}]')
|
|
1154
|
+
for u, v in subgraph_edges:
|
|
1155
|
+
if u in subgraph_nodes and v in subgraph_nodes:
|
|
1156
|
+
_raw = G[u][v]; d = next(iter(_raw.values()), {}) if isinstance(G, nx.MultiGraph) else _raw
|
|
1157
|
+
lines.append(f' EDGE {G.nodes[u].get("label",u)} --{d.get("relation","")} [{d.get("confidence","")}]--> {G.nodes[v].get("label",v)}')
|
|
1158
|
+
|
|
1159
|
+
output = '\n'.join(lines)
|
|
1160
|
+
if len(output) > char_budget:
|
|
1161
|
+
output = output[:char_budget] + f'\n... (truncated at ~{token_budget} token budget - use --budget N for more)'
|
|
1162
|
+
print(output)
|
|
1163
|
+
'@ | Out-File -FilePath graphify-out\.graphify_step_for_graphify_query_25.py -Encoding utf8
|
|
1164
|
+
& (Get-Content graphify-out\.graphify_python) graphify-out\.graphify_step_for_graphify_query_25.py
|
|
1165
|
+
Remove-Item -ErrorAction SilentlyContinue graphify-out\.graphify_step_for_graphify_query_25.py
|
|
1166
|
+
```
|
|
1167
|
+
|
|
1168
|
+
Replace `QUESTION` with the user's actual question, `MODE` with `bfs` or `dfs`, and `BUDGET` with the token budget (default `2000`, or whatever `--budget N` specifies). Then answer based on the subgraph output above.
|
|
1169
|
+
|
|
1170
|
+
After writing the answer, save it back into the graph so it improves future queries:
|
|
1171
|
+
|
|
1172
|
+
```powershell
|
|
1173
|
+
& (Get-Content graphify-out\.graphify_python) -m graphify save-result --question "QUESTION" --answer "ANSWER" --type query --nodes NODE1 NODE2
|
|
1174
|
+
```
|
|
1175
|
+
|
|
1176
|
+
Replace `QUESTION` with the question, `ANSWER` with your full answer text, `SOURCE_NODES` with the list of node labels you cited. This closes the feedback loop: the next `--update` will extract this Q&A as a node in the graph.
|
|
1177
|
+
|
|
1178
|
+
---
|
|
1179
|
+
|
|
1180
|
+
## For /graphify path
|
|
1181
|
+
|
|
1182
|
+
Find the shortest path between two named concepts in the graph.
|
|
1183
|
+
|
|
1184
|
+
First check the graph exists:
|
|
1185
|
+
```powershell
|
|
1186
|
+
@'
|
|
1187
|
+
from pathlib import Path
|
|
1188
|
+
if not Path('graphify-out/graph.json').exists():
|
|
1189
|
+
print('ERROR: No graph found. Run /graphify <path> first to build the graph.')
|
|
1190
|
+
raise SystemExit(1)
|
|
1191
|
+
'@ | Out-File -FilePath graphify-out\.graphify_step_for_graphify_path_26.py -Encoding utf8
|
|
1192
|
+
& (Get-Content graphify-out\.graphify_python) graphify-out\.graphify_step_for_graphify_path_26.py
|
|
1193
|
+
Remove-Item -ErrorAction SilentlyContinue graphify-out\.graphify_step_for_graphify_path_26.py
|
|
1194
|
+
```
|
|
1195
|
+
If it fails, stop and tell the user to run `/graphify <path>` first.
|
|
1196
|
+
|
|
1197
|
+
```powershell
|
|
1198
|
+
@'
|
|
1199
|
+
import json, sys
|
|
1200
|
+
import networkx as nx
|
|
1201
|
+
from networkx.readwrite import json_graph
|
|
1202
|
+
from pathlib import Path
|
|
1203
|
+
|
|
1204
|
+
data = json.loads(Path('graphify-out/graph.json').read_text(encoding="utf-8"))
|
|
1205
|
+
G = json_graph.node_link_graph(data, edges='links')
|
|
1206
|
+
|
|
1207
|
+
a_term = 'NODE_A'
|
|
1208
|
+
b_term = 'NODE_B'
|
|
1209
|
+
|
|
1210
|
+
def find_node(term):
|
|
1211
|
+
term = term.lower()
|
|
1212
|
+
scored = sorted(
|
|
1213
|
+
[(sum(1 for w in term.split() if w in G.nodes[n].get('label','').lower()), n)
|
|
1214
|
+
for n in G.nodes()],
|
|
1215
|
+
reverse=True
|
|
1216
|
+
)
|
|
1217
|
+
return scored[0][1] if scored and scored[0][0] > 0 else None
|
|
1218
|
+
|
|
1219
|
+
src = find_node(a_term)
|
|
1220
|
+
tgt = find_node(b_term)
|
|
1221
|
+
|
|
1222
|
+
if not src or not tgt:
|
|
1223
|
+
print(f'Could not find nodes matching: {a_term!r} or {b_term!r}')
|
|
1224
|
+
sys.exit(0)
|
|
1225
|
+
|
|
1226
|
+
try:
|
|
1227
|
+
path = nx.shortest_path(G, src, tgt)
|
|
1228
|
+
print(f'Shortest path ({len(path)-1} hops):')
|
|
1229
|
+
for i, nid in enumerate(path):
|
|
1230
|
+
label = G.nodes[nid].get('label', nid)
|
|
1231
|
+
if i < len(path) - 1:
|
|
1232
|
+
_raw = G[nid][path[i+1]]; edge = next(iter(_raw.values()), {}) if isinstance(G, nx.MultiGraph) else _raw
|
|
1233
|
+
rel = edge.get('relation', '')
|
|
1234
|
+
conf = edge.get('confidence', '')
|
|
1235
|
+
print(f' {label} --{rel}--> [{conf}]')
|
|
1236
|
+
else:
|
|
1237
|
+
print(f' {label}')
|
|
1238
|
+
except nx.NetworkXNoPath:
|
|
1239
|
+
print(f'No path found between {a_term!r} and {b_term!r}')
|
|
1240
|
+
except nx.NodeNotFound as e:
|
|
1241
|
+
print(f'Node not found: {e}')
|
|
1242
|
+
'@ | Out-File -FilePath graphify-out\.graphify_step_for_graphify_path_27.py -Encoding utf8
|
|
1243
|
+
& (Get-Content graphify-out\.graphify_python) graphify-out\.graphify_step_for_graphify_path_27.py
|
|
1244
|
+
Remove-Item -ErrorAction SilentlyContinue graphify-out\.graphify_step_for_graphify_path_27.py
|
|
1245
|
+
```
|
|
1246
|
+
|
|
1247
|
+
Replace `NODE_A` and `NODE_B` with the actual concept names from the user. Then explain the path in plain language - what each hop means, why it's significant.
|
|
1248
|
+
|
|
1249
|
+
After writing the explanation, save it back:
|
|
1250
|
+
|
|
1251
|
+
```powershell
|
|
1252
|
+
& (Get-Content graphify-out\.graphify_python) -m graphify save-result --question "Path from NODE_A to NODE_B" --answer "ANSWER" --type path_query --nodes NODE_A NODE_B
|
|
1253
|
+
```
|
|
1254
|
+
|
|
1255
|
+
---
|
|
1256
|
+
|
|
1257
|
+
## For /graphify explain
|
|
1258
|
+
|
|
1259
|
+
Give a plain-language explanation of a single node - everything connected to it.
|
|
1260
|
+
|
|
1261
|
+
First check the graph exists:
|
|
1262
|
+
```powershell
|
|
1263
|
+
@'
|
|
1264
|
+
from pathlib import Path
|
|
1265
|
+
if not Path('graphify-out/graph.json').exists():
|
|
1266
|
+
print('ERROR: No graph found. Run /graphify <path> first to build the graph.')
|
|
1267
|
+
raise SystemExit(1)
|
|
1268
|
+
'@ | Out-File -FilePath graphify-out\.graphify_step_for_graphify_explain_28.py -Encoding utf8
|
|
1269
|
+
& (Get-Content graphify-out\.graphify_python) graphify-out\.graphify_step_for_graphify_explain_28.py
|
|
1270
|
+
Remove-Item -ErrorAction SilentlyContinue graphify-out\.graphify_step_for_graphify_explain_28.py
|
|
1271
|
+
```
|
|
1272
|
+
If it fails, stop and tell the user to run `/graphify <path>` first.
|
|
1273
|
+
|
|
1274
|
+
```powershell
|
|
1275
|
+
@'
|
|
1276
|
+
import json, sys
|
|
1277
|
+
import networkx as nx
|
|
1278
|
+
from networkx.readwrite import json_graph
|
|
1279
|
+
from pathlib import Path
|
|
1280
|
+
|
|
1281
|
+
data = json.loads(Path('graphify-out/graph.json').read_text(encoding="utf-8"))
|
|
1282
|
+
G = json_graph.node_link_graph(data, edges='links')
|
|
1283
|
+
|
|
1284
|
+
term = 'NODE_NAME'
|
|
1285
|
+
term_lower = term.lower()
|
|
1286
|
+
|
|
1287
|
+
# Find best matching node
|
|
1288
|
+
scored = sorted(
|
|
1289
|
+
[(sum(1 for w in term_lower.split() if w in G.nodes[n].get('label','').lower()), n)
|
|
1290
|
+
for n in G.nodes()],
|
|
1291
|
+
reverse=True
|
|
1292
|
+
)
|
|
1293
|
+
if not scored or scored[0][0] == 0:
|
|
1294
|
+
print(f'No node matching {term!r}')
|
|
1295
|
+
sys.exit(0)
|
|
1296
|
+
|
|
1297
|
+
nid = scored[0][1]
|
|
1298
|
+
data_n = G.nodes[nid]
|
|
1299
|
+
print(f'NODE: {data_n.get("label", nid)}')
|
|
1300
|
+
print(f' source: {data_n.get("source_file","unknown")}')
|
|
1301
|
+
print(f' type: {data_n.get("file_type","unknown")}')
|
|
1302
|
+
print(f' degree: {G.degree(nid)}')
|
|
1303
|
+
print()
|
|
1304
|
+
print('CONNECTIONS:')
|
|
1305
|
+
for neighbor in G.neighbors(nid):
|
|
1306
|
+
_raw = G[nid][neighbor]; edge = next(iter(_raw.values()), {}) if isinstance(G, nx.MultiGraph) else _raw
|
|
1307
|
+
nlabel = G.nodes[neighbor].get('label', neighbor)
|
|
1308
|
+
rel = edge.get('relation', '')
|
|
1309
|
+
conf = edge.get('confidence', '')
|
|
1310
|
+
src_file = G.nodes[neighbor].get('source_file', '')
|
|
1311
|
+
print(f' --{rel}--> {nlabel} [{conf}] ({src_file})')
|
|
1312
|
+
'@ | Out-File -FilePath graphify-out\.graphify_step_for_graphify_explain_29.py -Encoding utf8
|
|
1313
|
+
& (Get-Content graphify-out\.graphify_python) graphify-out\.graphify_step_for_graphify_explain_29.py
|
|
1314
|
+
Remove-Item -ErrorAction SilentlyContinue graphify-out\.graphify_step_for_graphify_explain_29.py
|
|
1315
|
+
```
|
|
1316
|
+
|
|
1317
|
+
Replace `NODE_NAME` with the concept the user asked about. Then write a 3-5 sentence explanation of what this node is, what it connects to, and why those connections are significant. Use the source locations as citations.
|
|
1318
|
+
|
|
1319
|
+
After writing the explanation, save it back:
|
|
1320
|
+
|
|
1321
|
+
```powershell
|
|
1322
|
+
& (Get-Content graphify-out\.graphify_python) -m graphify save-result --question "Explain NODE_NAME" --answer "ANSWER" --type explain --nodes NODE_NAME
|
|
1323
|
+
```
|
|
1324
|
+
|
|
1325
|
+
---
|
|
1326
|
+
|
|
1327
|
+
## For /graphify add
|
|
1328
|
+
|
|
1329
|
+
Fetch a URL and add it to the corpus, then update the graph.
|
|
1330
|
+
|
|
1331
|
+
```powershell
|
|
1332
|
+
@'
|
|
1333
|
+
import sys
|
|
1334
|
+
from graphify.ingest import ingest
|
|
1335
|
+
from pathlib import Path
|
|
1336
|
+
|
|
1337
|
+
try:
|
|
1338
|
+
out = ingest('URL', Path('./raw'), author='AUTHOR', contributor='CONTRIBUTOR')
|
|
1339
|
+
print(f'Saved to {out}')
|
|
1340
|
+
except ValueError as e:
|
|
1341
|
+
print(f'error: {e}', file=sys.stderr)
|
|
1342
|
+
sys.exit(1)
|
|
1343
|
+
except RuntimeError as e:
|
|
1344
|
+
print(f'error: {e}', file=sys.stderr)
|
|
1345
|
+
sys.exit(1)
|
|
1346
|
+
'@ | Out-File -FilePath graphify-out\.graphify_step_for_graphify_add_30.py -Encoding utf8
|
|
1347
|
+
& (Get-Content graphify-out\.graphify_python) graphify-out\.graphify_step_for_graphify_add_30.py
|
|
1348
|
+
Remove-Item -ErrorAction SilentlyContinue graphify-out\.graphify_step_for_graphify_add_30.py
|
|
1349
|
+
```
|
|
1350
|
+
|
|
1351
|
+
Replace `URL` with the actual URL, `AUTHOR` with the user's name if provided, `CONTRIBUTOR` likewise. If the command exits with an error, tell the user what went wrong - do not silently continue. After a successful save, automatically run the `--update` pipeline on `./raw` to merge the new file into the existing graph.
|
|
1352
|
+
|
|
1353
|
+
Supported URL types (auto-detected):
|
|
1354
|
+
- Twitter/X → fetched via oEmbed, saved as `.md` with tweet text and author
|
|
1355
|
+
- arXiv → abstract + metadata saved as `.md`
|
|
1356
|
+
- PDF → downloaded as `.pdf`
|
|
1357
|
+
- Images (.png/.jpg/.webp) → downloaded, vision extraction runs on next build
|
|
1358
|
+
- Any webpage → converted to markdown via html2text
|
|
1359
|
+
|
|
1360
|
+
---
|
|
1361
|
+
|
|
1362
|
+
## For --watch
|
|
1363
|
+
|
|
1364
|
+
Start a background watcher that monitors a folder and auto-updates the graph when files change.
|
|
1365
|
+
|
|
1366
|
+
```powershell
|
|
1367
|
+
& (Get-Content graphify-out\.graphify_python) -m graphify.watch INPUT_PATH --debounce 3
|
|
1368
|
+
```
|
|
1369
|
+
|
|
1370
|
+
Replace INPUT_PATH with the folder to watch. Behavior depends on what changed:
|
|
1371
|
+
|
|
1372
|
+
- **Code files only (.py, .ts, .go, etc.):** re-runs AST extraction + rebuild + cluster immediately, no LLM needed. `graph.json` and `GRAPH_REPORT.md` are updated automatically.
|
|
1373
|
+
- **Docs, papers, or images:** writes a `graphify-out/needs_update` flag and prints a notification to run `/graphify --update` (LLM semantic re-extraction required).
|
|
1374
|
+
|
|
1375
|
+
Debounce (default 3s): waits until file activity stops before triggering, so a wave of parallel agent writes doesn't trigger a rebuild per file.
|
|
1376
|
+
|
|
1377
|
+
Press Ctrl+C to stop.
|
|
1378
|
+
|
|
1379
|
+
For agentic workflows: run `--watch` in a background terminal. Code changes from agent waves are picked up automatically between waves. If agents are also writing docs or notes, you'll need a manual `/graphify --update` after those waves.
|
|
1380
|
+
|
|
1381
|
+
---
|
|
1382
|
+
|
|
1383
|
+
## For git commit hook
|
|
1384
|
+
|
|
1385
|
+
Install a post-commit hook that auto-rebuilds the graph after every commit. No background process needed - triggers once per commit, works with any editor.
|
|
1386
|
+
|
|
1387
|
+
```bash
|
|
1388
|
+
graphify hook install # install
|
|
1389
|
+
graphify hook uninstall # remove
|
|
1390
|
+
graphify hook status # check
|
|
1391
|
+
```
|
|
1392
|
+
|
|
1393
|
+
After every `git commit`, the hook detects which code files changed (via `git diff HEAD~1`), re-runs AST extraction on those files, and rebuilds `graph.json` and `GRAPH_REPORT.md`. Doc/image changes are ignored by the hook - run `/graphify --update` manually for those.
|
|
1394
|
+
|
|
1395
|
+
If a post-commit hook already exists, graphify appends to it rather than replacing it.
|
|
1396
|
+
|
|
1397
|
+
---
|
|
1398
|
+
|
|
1399
|
+
## For native CLAUDE.md integration
|
|
1400
|
+
|
|
1401
|
+
Run once per project to make graphify always-on in Claude Code sessions:
|
|
1402
|
+
|
|
1403
|
+
```bash
|
|
1404
|
+
graphify claude install
|
|
1405
|
+
```
|
|
1406
|
+
|
|
1407
|
+
This writes a `## graphify` section to the local `CLAUDE.md` that instructs Claude to check the graph before answering codebase questions and rebuild it after code changes. No manual `/graphify` needed in future sessions.
|
|
1408
|
+
|
|
1409
|
+
```bash
|
|
1410
|
+
graphify claude uninstall # remove the section
|
|
1411
|
+
```
|
|
1412
|
+
|
|
1413
|
+
---
|
|
1414
|
+
|
|
1415
|
+
## Troubleshooting
|
|
1416
|
+
|
|
1417
|
+
### PowerShell 5.1: Vertical scrolling stops working
|
|
1418
|
+
|
|
1419
|
+
If vertical scrolling breaks in PowerShell after running graphify, this is caused by ANSI escape sequences from the `graspologic` library. Graphify v0.3.10+ suppresses this output, but if you still see the issue:
|
|
1420
|
+
|
|
1421
|
+
1. **Upgrade graphify**: `pip install --upgrade graphifyy`
|
|
1422
|
+
2. **Use Windows Terminal** instead of the legacy PowerShell console — Windows Terminal handles ANSI codes correctly
|
|
1423
|
+
3. **Reset your terminal**: close and reopen PowerShell
|
|
1424
|
+
4. **Skip graspologic**: uninstall it (`pip uninstall graspologic`) and graphify will fall back to NetworkX's built-in Louvain algorithm, which produces no ANSI output
|
|
1425
|
+
|
|
1426
|
+
---
|
|
1427
|
+
|
|
1428
|
+
## Honesty Rules
|
|
1429
|
+
|
|
1430
|
+
- Never invent an edge. If unsure, use AMBIGUOUS.
|
|
1431
|
+
- Never skip the corpus check warning.
|
|
1432
|
+
- Always show token cost in the report.
|
|
1433
|
+
- Never hide cohesion scores behind symbols - show the raw number.
|
|
1434
|
+
- Never run HTML viz on a graph with more than 5,000 nodes without warning the user.
|