@jaimevalasek/aioson 1.7.2 → 1.8.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/CHANGELOG.md +35 -0
- package/README.md +153 -10
- package/docs/en/cli-reference.md +56 -1
- package/docs/en/i18n.md +18 -18
- package/docs/en/schemas/index.json +10 -0
- package/docs/en/schemas/parallel-assign.schema.json +9 -0
- package/docs/en/schemas/parallel-doctor.schema.json +36 -0
- package/docs/en/schemas/parallel-guard.schema.json +63 -0
- package/docs/en/schemas/parallel-merge.schema.json +84 -0
- package/docs/en/schemas/parallel-status.schema.json +91 -1
- package/docs/integrations/apps-publish-marketplace.md +94 -0
- package/docs/pt/README.md +9 -0
- package/docs/pt/agentes.md +324 -3
- package/docs/pt/clientes-ai.md +7 -3
- package/docs/pt/comandos-cli.md +160 -13
- package/docs/pt/compress-agents.md +304 -0
- package/docs/pt/design-docs-governance.md +59 -0
- package/docs/pt/feature-archive.md +191 -0
- package/docs/pt/genome-3.0-spec.md +115 -4
- package/docs/pt/genome-distribution.md +232 -0
- package/docs/pt/inicio-rapido.md +1 -0
- package/docs/pt/motor-hardening.md +492 -0
- package/docs/pt/runner-system.md +113 -0
- package/package.json +2 -1
- package/src/agent-manifests.js +66 -0
- package/src/agents.js +27 -7
- package/src/autonomy-policy.js +139 -0
- package/src/brain-query.js +161 -0
- package/src/cli.js +1377 -1099
- package/src/commands/agents.js +102 -7
- package/src/commands/artifact-validate.js +33 -4
- package/src/commands/auth.js +272 -0
- package/src/commands/brain-query.js +44 -0
- package/src/commands/briefing.js +344 -0
- package/src/commands/commit-prepare.js +547 -0
- package/src/commands/compress-agents.js +416 -0
- package/src/commands/context-health.js +4 -2
- package/src/commands/context-trim.js +17 -11
- package/src/commands/design-hybrid-options.js +3 -3
- package/src/commands/devlog-process.js +6 -4
- package/src/commands/dossier.js +423 -0
- package/src/commands/feature-archive.js +513 -0
- package/src/commands/feature-close.js +123 -18
- package/src/commands/gate-approve.js +198 -0
- package/src/commands/gate-check.js +24 -5
- package/src/commands/genome-doctor.js +166 -9
- package/src/commands/git-guard.js +170 -0
- package/src/commands/harness.js +121 -0
- package/src/commands/implementation-plan.js +47 -20
- package/src/commands/init.js +6 -2
- package/src/commands/install.js +6 -2
- package/src/commands/live.js +497 -56
- package/src/commands/locale-apply.js +9 -6
- package/src/commands/locale-diff.js +11 -112
- package/src/commands/mcp-doctor.js +2 -1
- package/src/commands/mcp-init.js +4 -10
- package/src/commands/memory.js +234 -0
- package/src/commands/parallel-assign.js +107 -27
- package/src/commands/parallel-doctor.js +416 -3
- package/src/commands/parallel-guard.js +241 -0
- package/src/commands/parallel-init.js +66 -4
- package/src/commands/parallel-merge.js +299 -0
- package/src/commands/parallel-status.js +147 -3
- package/src/commands/preflight.js +63 -4
- package/src/commands/qa-init.js +10 -5
- package/src/commands/revision.js +235 -0
- package/src/commands/scaffold-complete.js +188 -0
- package/src/commands/security-audit.js +275 -0
- package/src/commands/security-scan.js +376 -0
- package/src/commands/self-implement-loop.js +46 -2
- package/src/commands/setup-context.js +11 -10
- package/src/commands/squad-agent-create.js +51 -9
- package/src/commands/squad-investigate.js +53 -0
- package/src/commands/squad-plan.js +33 -1
- package/src/commands/squad-scaffold.js +4 -3
- package/src/commands/squad-score.js +71 -14
- package/src/commands/squad-status.js +22 -1
- package/src/commands/squad-validate.js +93 -2
- package/src/commands/store-genome.js +304 -0
- package/src/commands/store-skill.js +247 -0
- package/src/commands/store-squad.js +431 -0
- package/src/commands/store-system.js +392 -0
- package/src/commands/tool-capabilities.js +63 -0
- package/src/commands/update.js +3 -3
- package/src/commands/verify-gate.js +40 -0
- package/src/commands/workflow-execute.js +644 -155
- package/src/commands/workflow-harden.js +231 -0
- package/src/commands/workflow-heal.js +136 -0
- package/src/commands/workflow-next.js +460 -22
- package/src/commands/workflow-status.js +328 -138
- package/src/commands/workspace.js +144 -0
- package/src/constants.js +42 -75
- package/src/context-memory.js +133 -4
- package/src/context-writer.js +2 -1
- package/src/context.js +32 -2
- package/src/doctor.js +46 -6
- package/src/dossier/codemap-store.js +267 -0
- package/src/dossier/dossier-bootstrap.js +222 -0
- package/src/dossier/dossier-compact.js +159 -0
- package/src/dossier/lock.js +128 -0
- package/src/dossier/revision-store.js +313 -0
- package/src/dossier/schema.js +155 -0
- package/src/dossier/store.js +400 -0
- package/src/execution-gateway.js +3 -0
- package/src/friction-scanner.js +202 -0
- package/src/genome-schema.js +24 -1
- package/src/genomes.js +33 -0
- package/src/handoff-contract.js +363 -0
- package/src/handoff-validator.js +45 -0
- package/src/harness/circuit-breaker.js +135 -0
- package/src/i18n/messages/en.js +317 -22
- package/src/i18n/messages/es.js +259 -18
- package/src/i18n/messages/fr.js +260 -18
- package/src/i18n/messages/pt-BR.js +313 -22
- package/src/install-profile.js +0 -16
- package/src/installer.js +70 -6
- package/src/lib/git-commit-guard.js +691 -0
- package/src/lib/security/artifact-reader.js +167 -0
- package/src/lib/security/exit-codes.js +51 -0
- package/src/lib/security/findings-writer.js +176 -0
- package/src/lib/security/runtime-events.js +77 -0
- package/src/lib/security/secrets-regex.js +115 -0
- package/src/lib/store/security-scan.js +173 -0
- package/src/lib/terminal-checkbox.js +130 -0
- package/src/lib/tmux-launcher.js +163 -0
- package/src/lib/tool-capabilities.js +102 -0
- package/src/locales.js +12 -8
- package/src/parallel-workspace.js +756 -0
- package/src/parser.js +8 -1
- package/src/path-guard.js +47 -0
- package/src/preflight-engine.js +237 -26
- package/src/self-healing.js +142 -0
- package/src/session-handoff.js +111 -1
- package/src/squad/squad-scaffold.js +183 -19
- package/src/test-briefing.js +226 -0
- package/src/updater.js +1 -1
- package/src/utils.js +3 -0
- package/src/workflow-gates.js +185 -0
- package/template/.aioson/agents/analyst.md +76 -130
- package/template/.aioson/agents/architect.md +53 -86
- package/template/.aioson/agents/committer.md +161 -0
- package/template/.aioson/agents/cypher.md +252 -0
- package/template/.aioson/agents/dev.md +112 -628
- package/template/.aioson/agents/deyvin.md +33 -236
- package/template/.aioson/agents/discover.md +235 -0
- package/template/.aioson/agents/discovery-design-doc.md +17 -252
- package/template/.aioson/agents/genome.md +76 -26
- package/template/.aioson/agents/manifests/analyst.manifest.json +26 -0
- package/template/.aioson/agents/manifests/architect.manifest.json +23 -0
- package/template/.aioson/agents/manifests/committer.manifest.json +23 -0
- package/template/.aioson/agents/manifests/dev.manifest.json +37 -0
- package/template/.aioson/agents/manifests/orchestrator.manifest.json +30 -0
- package/template/.aioson/agents/manifests/pentester.manifest.json +39 -0
- package/template/.aioson/agents/manifests/pm.manifest.json +26 -0
- package/template/.aioson/agents/manifests/product.manifest.json +23 -0
- package/template/.aioson/agents/manifests/qa.manifest.json +25 -0
- package/template/.aioson/agents/manifests/setup.manifest.json +20 -0
- package/template/.aioson/agents/manifests/ux-ui.manifest.json +24 -0
- package/template/.aioson/agents/neo.md +5 -7
- package/template/.aioson/agents/orache.md +2 -6
- package/template/.aioson/agents/orchestrator.md +81 -182
- package/template/.aioson/agents/pentester.md +235 -0
- package/template/.aioson/agents/pm.md +40 -104
- package/template/.aioson/agents/product.md +99 -344
- package/template/.aioson/agents/profiler-enricher.md +57 -6
- package/template/.aioson/agents/profiler-forge.md +17 -7
- package/template/.aioson/agents/profiler-researcher.md +29 -6
- package/template/.aioson/agents/qa.md +168 -514
- package/template/.aioson/agents/setup.md +52 -278
- package/template/.aioson/agents/sheldon.md +122 -754
- package/template/.aioson/agents/site-forge.md +111 -1583
- package/template/.aioson/agents/squad.md +139 -2010
- package/template/.aioson/agents/tester.md +10 -0
- package/template/.aioson/agents/ux-ui.md +104 -812
- package/template/.aioson/agents/validator.md +69 -0
- package/template/.aioson/brains/scripts/query.js +5 -1
- package/template/.aioson/config/autonomy-protocol.json +43 -0
- package/template/.aioson/config.md +43 -15
- package/template/.aioson/constitution.md +36 -33
- package/template/.aioson/context/design-doc.md +136 -0
- package/template/.aioson/context/project-map.md +57 -0
- package/template/.aioson/design-docs/code-reuse.md +48 -0
- package/template/.aioson/design-docs/componentization.md +47 -0
- package/template/.aioson/design-docs/file-size.md +52 -0
- package/template/.aioson/design-docs/folder-structure.md +51 -0
- package/template/.aioson/design-docs/naming.md +54 -0
- package/template/.aioson/docs/LAYERS.md +12 -2
- package/template/.aioson/docs/dev/execution-discipline.md +106 -0
- package/template/.aioson/docs/dev/stack-conventions.md +83 -0
- package/template/.aioson/docs/deyvin/continuity-recovery.md +57 -0
- package/template/.aioson/docs/deyvin/debugging-escalation.md +30 -0
- package/template/.aioson/docs/deyvin/pair-execution.md +44 -0
- package/template/.aioson/docs/deyvin/runtime-handoffs.md +36 -0
- package/template/.aioson/docs/product/conversation-playbook.md +116 -0
- package/template/.aioson/docs/product/prd-contract.md +107 -0
- package/template/.aioson/docs/product/quality-lens.md +57 -0
- package/template/.aioson/docs/product/research-loop.md +65 -0
- package/template/.aioson/docs/sheldon/enrichment-paths.md +134 -0
- package/template/.aioson/docs/sheldon/quality-lens.md +57 -0
- package/template/.aioson/docs/sheldon/research-loop.md +56 -0
- package/template/.aioson/docs/sheldon/web-intelligence.md +75 -0
- package/template/.aioson/docs/site-forge-build.md +195 -0
- package/template/.aioson/docs/site-forge-extraction.md +135 -0
- package/template/.aioson/docs/site-forge-qa.md +155 -0
- package/template/.aioson/docs/site-forge-recon.md +434 -0
- package/template/.aioson/docs/site-forge-transform.md +249 -0
- package/template/.aioson/docs/squad/content-output.md +91 -0
- package/template/.aioson/docs/squad/creation-flow.md +135 -0
- package/template/.aioson/docs/squad/domain-classification.md +117 -0
- package/template/.aioson/docs/squad/genome-bindings.md +47 -0
- package/template/.aioson/docs/squad/package-contract.md +234 -0
- package/template/.aioson/docs/squad/quality-lens.md +56 -0
- package/template/.aioson/docs/squad/research-loop.md +59 -0
- package/template/.aioson/docs/squad/session-operations.md +117 -0
- package/template/.aioson/docs/squad/workflow-quality.md +165 -0
- package/template/.aioson/docs/ux-ui/accessibility-audit.md +55 -0
- package/template/.aioson/docs/ux-ui/audit-mode.md +86 -0
- package/template/.aioson/docs/ux-ui/component-map.md +35 -0
- package/template/.aioson/docs/ux-ui/design-execution.md +111 -0
- package/template/.aioson/docs/ux-ui/design-gate.md +27 -0
- package/template/.aioson/docs/ux-ui/research-mode.md +39 -0
- package/template/.aioson/docs/ux-ui/site-delivery.md +156 -0
- package/template/.aioson/docs/ux-ui/token-contract.md +57 -0
- package/template/.aioson/genomes/copywriting.meta.json +48 -0
- package/template/.aioson/git-guard.json +11 -0
- package/template/.aioson/mcp/servers.md +0 -1
- package/template/.aioson/rules/agent-language-policy.md +93 -0
- package/template/.aioson/rules/aioson-context-boundary.md +63 -0
- package/template/.aioson/rules/canonical-path-contract.md +47 -0
- package/template/.aioson/rules/data-format-convention.md +24 -86
- package/template/.aioson/rules/disk-first-artifacts.md +44 -0
- package/template/.aioson/rules/output-brevity.md +44 -0
- package/template/.aioson/rules/prd-section-ownership.md +49 -0
- package/template/.aioson/rules/security-baseline.md +139 -0
- package/template/.aioson/rules/spec-level-ownership.md +61 -0
- package/template/.aioson/rules/squad-driver-pattern.md +81 -0
- package/template/.aioson/schemas/squad-blueprint.schema.json +24 -0
- package/template/.aioson/schemas/squad-manifest.schema.json +44 -0
- package/template/.aioson/skills/process/aioson-spec-driven/references/pm.md +30 -0
- package/template/.aioson/skills/process/secure-tdd/SKILL.md +97 -0
- package/template/.aioson/skills/process/secure-tdd/references/nextjs.md +81 -0
- package/template/.aioson/skills/process/secure-tdd/references/node-express.md +91 -0
- package/template/.aioson/skills/process/secure-tdd/references/planned-stacks.md +33 -0
- package/template/.aioson/skills/static/harness-validate/SKILL.md +46 -0
- package/template/.aioson/skills/static/web-research-cache.md +3 -0
- package/template/.aioson/tasks/squad-create.md +35 -8
- package/template/.aioson/tasks/squad-design.md +50 -2
- package/template/.aioson/tasks/squad-investigate.md +14 -1
- package/template/.claude/commands/aioson/agent/committer.md +5 -0
- package/template/.claude/commands/aioson/agent/copywriter.md +5 -0
- package/template/.claude/commands/aioson/agent/cypher.md +5 -0
- package/template/.claude/commands/aioson/agent/pair.md +5 -0
- package/template/.claude/commands/aioson/agent/validator.md +5 -0
- package/template/.gemini/commands/aios-analyst.toml +6 -3
- package/template/.gemini/commands/aios-architect.toml +7 -6
- package/template/.gemini/commands/aios-committer.toml +7 -0
- package/template/.gemini/commands/aios-copywriter.toml +7 -0
- package/template/.gemini/commands/aios-cypher.toml +7 -0
- package/template/.gemini/commands/aios-dev.toml +8 -7
- package/template/.gemini/commands/aios-deyvin.toml +6 -5
- package/template/.gemini/commands/aios-discovery-design-doc.toml +6 -3
- package/template/.gemini/commands/aios-genome.toml +7 -0
- package/template/.gemini/commands/aios-neo.toml +5 -3
- package/template/.gemini/commands/aios-orache.toml +7 -0
- package/template/.gemini/commands/aios-orchestrator.toml +8 -7
- package/template/.gemini/commands/aios-pair.toml +6 -5
- package/template/.gemini/commands/aios-pm.toml +8 -7
- package/template/.gemini/commands/aios-product.toml +5 -3
- package/template/.gemini/commands/aios-qa.toml +6 -5
- package/template/.gemini/commands/aios-setup.toml +5 -2
- package/template/.gemini/commands/aios-sheldon.toml +7 -0
- package/template/.gemini/commands/aios-site-forge.toml +7 -0
- package/template/.gemini/commands/aios-squad.toml +7 -0
- package/template/.gemini/commands/aios-tester.toml +6 -5
- package/template/.gemini/commands/aios-ux-ui.toml +8 -7
- package/template/.gemini/commands/aios-validator.toml +7 -0
- package/template/AGENTS.md +12 -1
- package/template/CLAUDE.md +5 -1
- package/template/.aioson/locales/en/agents/analyst.md +0 -244
- package/template/.aioson/locales/en/agents/architect.md +0 -245
- package/template/.aioson/locales/en/agents/dev.md +0 -397
- package/template/.aioson/locales/en/agents/deyvin.md +0 -137
- package/template/.aioson/locales/en/agents/discovery-design-doc.md +0 -27
- package/template/.aioson/locales/en/agents/genome.md +0 -212
- package/template/.aioson/locales/en/agents/neo.md +0 -8
- package/template/.aioson/locales/en/agents/orache.md +0 -6
- package/template/.aioson/locales/en/agents/orchestrator.md +0 -189
- package/template/.aioson/locales/en/agents/pair.md +0 -5
- package/template/.aioson/locales/en/agents/pm.md +0 -84
- package/template/.aioson/locales/en/agents/product.md +0 -378
- package/template/.aioson/locales/en/agents/profiler-enricher.md +0 -5
- package/template/.aioson/locales/en/agents/profiler-forge.md +0 -5
- package/template/.aioson/locales/en/agents/profiler-researcher.md +0 -5
- package/template/.aioson/locales/en/agents/qa.md +0 -270
- package/template/.aioson/locales/en/agents/setup.md +0 -421
- package/template/.aioson/locales/en/agents/sheldon.md +0 -455
- package/template/.aioson/locales/en/agents/squad.md +0 -449
- package/template/.aioson/locales/en/agents/tester.md +0 -6
- package/template/.aioson/locales/en/agents/ux-ui.md +0 -668
- package/template/.aioson/locales/es/agents/analyst.md +0 -225
- package/template/.aioson/locales/es/agents/architect.md +0 -245
- package/template/.aioson/locales/es/agents/dev.md +0 -370
- package/template/.aioson/locales/es/agents/deyvin.md +0 -99
- package/template/.aioson/locales/es/agents/discovery-design-doc.md +0 -21
- package/template/.aioson/locales/es/agents/genome.md +0 -104
- package/template/.aioson/locales/es/agents/neo.md +0 -50
- package/template/.aioson/locales/es/agents/orache.md +0 -105
- package/template/.aioson/locales/es/agents/orchestrator.md +0 -194
- package/template/.aioson/locales/es/agents/pair.md +0 -7
- package/template/.aioson/locales/es/agents/pm.md +0 -90
- package/template/.aioson/locales/es/agents/product.md +0 -372
- package/template/.aioson/locales/es/agents/profiler-enricher.md +0 -7
- package/template/.aioson/locales/es/agents/profiler-forge.md +0 -7
- package/template/.aioson/locales/es/agents/profiler-researcher.md +0 -7
- package/template/.aioson/locales/es/agents/qa.md +0 -198
- package/template/.aioson/locales/es/agents/setup.md +0 -405
- package/template/.aioson/locales/es/agents/sheldon.md +0 -309
- package/template/.aioson/locales/es/agents/squad.md +0 -532
- package/template/.aioson/locales/es/agents/tester.md +0 -9
- package/template/.aioson/locales/es/agents/ux-ui.md +0 -212
- package/template/.aioson/locales/fr/agents/analyst.md +0 -225
- package/template/.aioson/locales/fr/agents/architect.md +0 -245
- package/template/.aioson/locales/fr/agents/dev.md +0 -370
- package/template/.aioson/locales/fr/agents/deyvin.md +0 -99
- package/template/.aioson/locales/fr/agents/discovery-design-doc.md +0 -21
- package/template/.aioson/locales/fr/agents/genome.md +0 -104
- package/template/.aioson/locales/fr/agents/neo.md +0 -50
- package/template/.aioson/locales/fr/agents/orache.md +0 -106
- package/template/.aioson/locales/fr/agents/orchestrator.md +0 -194
- package/template/.aioson/locales/fr/agents/pair.md +0 -7
- package/template/.aioson/locales/fr/agents/pm.md +0 -90
- package/template/.aioson/locales/fr/agents/product.md +0 -372
- package/template/.aioson/locales/fr/agents/profiler-enricher.md +0 -7
- package/template/.aioson/locales/fr/agents/profiler-forge.md +0 -7
- package/template/.aioson/locales/fr/agents/profiler-researcher.md +0 -7
- package/template/.aioson/locales/fr/agents/qa.md +0 -198
- package/template/.aioson/locales/fr/agents/setup.md +0 -405
- package/template/.aioson/locales/fr/agents/sheldon.md +0 -309
- package/template/.aioson/locales/fr/agents/squad.md +0 -532
- package/template/.aioson/locales/fr/agents/tester.md +0 -9
- package/template/.aioson/locales/fr/agents/ux-ui.md +0 -212
- package/template/.aioson/locales/pt-BR/agents/analyst.md +0 -319
- package/template/.aioson/locales/pt-BR/agents/architect.md +0 -284
- package/template/.aioson/locales/pt-BR/agents/dev.md +0 -483
- package/template/.aioson/locales/pt-BR/agents/deyvin.md +0 -184
- package/template/.aioson/locales/pt-BR/agents/discovery-design-doc.md +0 -198
- package/template/.aioson/locales/pt-BR/agents/genome.md +0 -297
- package/template/.aioson/locales/pt-BR/agents/neo.md +0 -208
- package/template/.aioson/locales/pt-BR/agents/orache.md +0 -137
- package/template/.aioson/locales/pt-BR/agents/orchestrator.md +0 -324
- package/template/.aioson/locales/pt-BR/agents/pair.md +0 -5
- package/template/.aioson/locales/pt-BR/agents/pm.md +0 -182
- package/template/.aioson/locales/pt-BR/agents/product.md +0 -466
- package/template/.aioson/locales/pt-BR/agents/profiler-enricher.md +0 -5
- package/template/.aioson/locales/pt-BR/agents/profiler-forge.md +0 -5
- package/template/.aioson/locales/pt-BR/agents/profiler-researcher.md +0 -5
- package/template/.aioson/locales/pt-BR/agents/qa.md +0 -300
- package/template/.aioson/locales/pt-BR/agents/setup.md +0 -533
- package/template/.aioson/locales/pt-BR/agents/sheldon.md +0 -323
- package/template/.aioson/locales/pt-BR/agents/squad.md +0 -1330
- package/template/.aioson/locales/pt-BR/agents/tester.md +0 -449
- package/template/.aioson/locales/pt-BR/agents/ux-ui.md +0 -669
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "site-forge Phase 1 — Reconnaissance and Phase 1.5 — Deep Animation & Video Extraction"
|
|
3
|
+
agents: [site-forge]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# site-forge: Phase 1 — Reconnaissance
|
|
7
|
+
|
|
8
|
+
**Goal:** Capture raw information about the site. All modes run this phase.
|
|
9
|
+
|
|
10
|
+
## 1.1 Multi-viewport screenshots
|
|
11
|
+
|
|
12
|
+
Navigate to URL and capture at three widths: Desktop 1440px, Tablet 768px, Mobile 390px.
|
|
13
|
+
|
|
14
|
+
Save to `docs/research/<hostname>/screenshots/desktop.png`, `tablet.png`, `mobile.png`.
|
|
15
|
+
|
|
16
|
+
**Bot protection:** If page renders blank, shows CAPTCHA, or redirects to a challenge:
|
|
17
|
+
> "This site has bot protection. Please provide session cookies or a local HAR capture to continue."
|
|
18
|
+
|
|
19
|
+
## 1.2 Deep asset inventory (CRITICAL — do not skip steps)
|
|
20
|
+
|
|
21
|
+
**Step A — Trigger lazy loads before extraction:**
|
|
22
|
+
|
|
23
|
+
```javascript
|
|
24
|
+
await page.evaluate(() => {
|
|
25
|
+
return new Promise(resolve => {
|
|
26
|
+
let totalHeight = 0;
|
|
27
|
+
const distance = 300;
|
|
28
|
+
const timer = setInterval(() => {
|
|
29
|
+
window.scrollBy(0, distance);
|
|
30
|
+
totalHeight += distance;
|
|
31
|
+
if (totalHeight >= document.body.scrollHeight) {
|
|
32
|
+
clearInterval(timer);
|
|
33
|
+
window.scrollTo(0, 0);
|
|
34
|
+
resolve();
|
|
35
|
+
}
|
|
36
|
+
}, 100);
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Wait 1 second after scroll for lazy-loaded content.
|
|
42
|
+
|
|
43
|
+
**Step B — Collect all image URLs:**
|
|
44
|
+
|
|
45
|
+
```javascript
|
|
46
|
+
const allAssets = new Set();
|
|
47
|
+
|
|
48
|
+
// img tags — including srcset variants
|
|
49
|
+
document.querySelectorAll('img').forEach(img => {
|
|
50
|
+
if (img.src) allAssets.add(img.src);
|
|
51
|
+
if (img.srcset) {
|
|
52
|
+
img.srcset.split(',').forEach(s => {
|
|
53
|
+
const url = s.trim().split(' ')[0];
|
|
54
|
+
if (url) allAssets.add(new URL(url, window.location.href).href);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
if (img.dataset.src) allAssets.add(new URL(img.dataset.src, window.location.href).href);
|
|
58
|
+
if (img.dataset.srcset) {
|
|
59
|
+
img.dataset.srcset.split(',').forEach(s => {
|
|
60
|
+
const url = s.trim().split(' ')[0];
|
|
61
|
+
if (url) allAssets.add(new URL(url, window.location.href).href);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
// picture source elements
|
|
67
|
+
document.querySelectorAll('picture source').forEach(s => {
|
|
68
|
+
if (s.srcset) {
|
|
69
|
+
s.srcset.split(',').forEach(src => {
|
|
70
|
+
const url = src.trim().split(' ')[0];
|
|
71
|
+
if (url) allAssets.add(new URL(url, window.location.href).href);
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
// CSS background-image on ALL elements
|
|
77
|
+
document.querySelectorAll('*').forEach(el => {
|
|
78
|
+
const bg = window.getComputedStyle(el).backgroundImage;
|
|
79
|
+
if (bg && bg !== 'none') {
|
|
80
|
+
const matches = bg.match(/url\(["']?([^"')]+)["']?\)/g) || [];
|
|
81
|
+
matches.forEach(m => {
|
|
82
|
+
const url = m.replace(/url\(["']?|["']?\)/g, '').trim();
|
|
83
|
+
if (url && !url.startsWith('data:')) allAssets.add(new URL(url, window.location.href).href);
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
// video elements (poster + source)
|
|
89
|
+
document.querySelectorAll('video').forEach(v => {
|
|
90
|
+
if (v.poster) allAssets.add(v.poster);
|
|
91
|
+
if (v.src && v.src !== window.location.href) allAssets.add(v.src);
|
|
92
|
+
v.querySelectorAll('source').forEach(s => { if (s.src) allAssets.add(s.src); });
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
// SVG use references
|
|
96
|
+
document.querySelectorAll('use').forEach(u => {
|
|
97
|
+
const href = u.getAttribute('href') || u.getAttribute('xlink:href');
|
|
98
|
+
if (href && !href.startsWith('#'))
|
|
99
|
+
allAssets.add(new URL(href.split('#')[0], window.location.href).href);
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
// inline style background-image
|
|
103
|
+
document.querySelectorAll('[style]').forEach(el => {
|
|
104
|
+
const style = el.getAttribute('style') || '';
|
|
105
|
+
const matches = style.match(/url\(["']?([^"')]+)["']?\)/g) || [];
|
|
106
|
+
matches.forEach(m => {
|
|
107
|
+
const url = m.replace(/url\(["']?|["']?\)/g, '').trim();
|
|
108
|
+
if (url && !url.startsWith('data:')) allAssets.add(new URL(url, window.location.href).href);
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
// og:image and twitter:image meta
|
|
113
|
+
document.querySelectorAll('meta[property="og:image"], meta[name="twitter:image"]').forEach(m => {
|
|
114
|
+
const content = m.getAttribute('content');
|
|
115
|
+
if (content) allAssets.add(new URL(content, window.location.href).href);
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
return {
|
|
119
|
+
images: [...allAssets].filter(url => url.startsWith('http')),
|
|
120
|
+
fonts: [...document.querySelectorAll('link[rel=stylesheet]')]
|
|
121
|
+
.map(l => l.href)
|
|
122
|
+
.filter(h => h.includes('fonts') || h.includes('typekit') || h.includes('adobe'))
|
|
123
|
+
};
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Download all collected images to `public/images/<hostname>/`. Skip images > 2MB unless structural (hero, logo, background). Preserve original filenames; sanitize paths.
|
|
127
|
+
|
|
128
|
+
**Download is mandatory in Modes A, B, C, E.** Skip in Mode D — record URLs only.
|
|
129
|
+
|
|
130
|
+
**Copyright notice after Phase 1:**
|
|
131
|
+
> "As imagens foram baixadas para `public/images/<hostname>/` como referência.
|
|
132
|
+
> São arquivos temporários — substitua-os pelos seus próprios assets antes de publicar."
|
|
133
|
+
|
|
134
|
+
## 1.3 Font discovery
|
|
135
|
+
|
|
136
|
+
Extract from `<link>` tags and `getComputedStyle()` on heading, body, and code elements: font families, weights loaded, where each is applied.
|
|
137
|
+
|
|
138
|
+
## 1.4 Internal link crawl
|
|
139
|
+
|
|
140
|
+
```javascript
|
|
141
|
+
const hostname = window.location.hostname;
|
|
142
|
+
const links = [...document.querySelectorAll('a[href]')]
|
|
143
|
+
.map(a => a.href)
|
|
144
|
+
.filter(href => {
|
|
145
|
+
try { return new URL(href).hostname === hostname; } catch { return false; }
|
|
146
|
+
});
|
|
147
|
+
return [...new Set(links)];
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Default crawl depth:
|
|
151
|
+
- Mode B, D: up to 5 internal links
|
|
152
|
+
- Mode A, C: up to 10 internal links
|
|
153
|
+
- Mode E: up to 5 internal links
|
|
154
|
+
|
|
155
|
+
Per crawled sub-page: screenshots, asset inventory, note layout differences.
|
|
156
|
+
|
|
157
|
+
Save `docs/research/<hostname>/crawl-manifest.json`:
|
|
158
|
+
```json
|
|
159
|
+
{
|
|
160
|
+
"mainUrl": "<url>",
|
|
161
|
+
"crawledUrls": ["<url1>", "<url2>"],
|
|
162
|
+
"assetsPerPage": { "<url>": ["<asset-path>"] }
|
|
163
|
+
}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Skip sub-page crawl: `--no-crawl` flag.
|
|
167
|
+
|
|
168
|
+
## 1.5 Interaction sweep (CRITICAL — complete before Phase 2)
|
|
169
|
+
|
|
170
|
+
1. Slow scroll top→bottom: observe sticky headers, scroll-driven animations, parallax, lazy loads
|
|
171
|
+
2. Click all interactive elements: tabs, dropdowns, modals, accordions, carousels
|
|
172
|
+
3. Hover suspect elements: nav items, cards, buttons, tooltips
|
|
173
|
+
4. Resize to 768px then 390px: observe nav collapses, layout reflows
|
|
174
|
+
|
|
175
|
+
Document per section: triggers, what animates, sticky positions, viewport changes.
|
|
176
|
+
|
|
177
|
+
## 1.6 Page topology
|
|
178
|
+
|
|
179
|
+
Map all sections top→bottom:
|
|
180
|
+
```
|
|
181
|
+
1. Header — sticky nav, logo left, links right, CTA button
|
|
182
|
+
2. Hero — full-viewport, headline + subtitle + 2 CTAs, background gradient
|
|
183
|
+
3. Features — 3-column card grid, icon + title + body each
|
|
184
|
+
...
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
**Output:** `docs/research/<hostname>/reconnaissance.json`
|
|
188
|
+
```json
|
|
189
|
+
{
|
|
190
|
+
"url": "https://example.com",
|
|
191
|
+
"hostname": "example.com",
|
|
192
|
+
"screenshotsTaken": ["desktop", "tablet", "mobile"],
|
|
193
|
+
"fonts": [{ "family": "Inter", "weights": [400, 500, 600], "usedFor": "body" }],
|
|
194
|
+
"assetsDownloaded": ["hero.webp", "logo.svg"],
|
|
195
|
+
"crawledPages": [],
|
|
196
|
+
"interactionModel": {
|
|
197
|
+
"header": "scroll-driven shrink at 50px",
|
|
198
|
+
"featureTabs": "click-switch content"
|
|
199
|
+
},
|
|
200
|
+
"pageTopology": ["Header", "Hero", "Features", "Pricing", "Footer"],
|
|
201
|
+
"breakpoints": { "tablet": 768, "mobile": 390 }
|
|
202
|
+
}
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
**Exit criterion:** Screenshots at all viewports. Assets inventoried from all sources. Lazy loads triggered before extraction. Interaction model documented. Page topology complete.
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
# site-forge: Phase 1.5 — Deep Animation & Video Extraction
|
|
210
|
+
|
|
211
|
+
**Goal:** Extract animation machinery — CSS keyframes, JS libraries, video assets, scroll-triggered mutations.
|
|
212
|
+
|
|
213
|
+
Skip only if `--no-deep` flag is set.
|
|
214
|
+
|
|
215
|
+
## 1.5.1 Animation library detection
|
|
216
|
+
|
|
217
|
+
Run immediately after Phase 1.1. Result determines Phase 4.4 implementation strategy.
|
|
218
|
+
|
|
219
|
+
```javascript
|
|
220
|
+
return {
|
|
221
|
+
gsap: typeof window.gsap !== 'undefined',
|
|
222
|
+
scrollTrigger: typeof window.ScrollTrigger !== 'undefined',
|
|
223
|
+
framerMotion: !!document.querySelector('[data-framer-component-type]'),
|
|
224
|
+
aos: typeof window.AOS !== 'undefined',
|
|
225
|
+
lottie: typeof window.lottie !== 'undefined',
|
|
226
|
+
threejs: typeof window.THREE !== 'undefined',
|
|
227
|
+
swiper: typeof window.Swiper !== 'undefined',
|
|
228
|
+
motionOne: typeof window.animate !== 'undefined' && !!window.animate?.toString?.().includes('motion'),
|
|
229
|
+
};
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
Save to `docs/research/<hostname>/animations-raw.json` under key `jsLibraries`.
|
|
233
|
+
|
|
234
|
+
## 1.5.2 CSS animation rules extraction
|
|
235
|
+
|
|
236
|
+
```javascript
|
|
237
|
+
const animationRules = [];
|
|
238
|
+
const keyframes = [];
|
|
239
|
+
const scrollLinked = [];
|
|
240
|
+
|
|
241
|
+
for (const sheet of document.styleSheets) {
|
|
242
|
+
try {
|
|
243
|
+
for (const rule of sheet.cssRules) {
|
|
244
|
+
const text = rule.cssText;
|
|
245
|
+
|
|
246
|
+
if (rule instanceof CSSKeyframesRule) {
|
|
247
|
+
keyframes.push({ name: rule.name, cssText: text, keyCount: rule.cssRules.length });
|
|
248
|
+
continue;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
if (
|
|
252
|
+
text.includes('animation') || text.includes('transition') ||
|
|
253
|
+
text.includes('transform') || text.includes('will-change') ||
|
|
254
|
+
text.includes('scroll-timeline') || text.includes('animation-timeline') ||
|
|
255
|
+
text.includes('view-timeline')
|
|
256
|
+
) {
|
|
257
|
+
animationRules.push({
|
|
258
|
+
selector: rule.selectorText || rule.cssText.split('{')[0].trim(),
|
|
259
|
+
cssText: text,
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
if (
|
|
264
|
+
text.includes('scroll-timeline') || text.includes('animation-timeline') ||
|
|
265
|
+
text.includes('view-timeline') || text.includes('scroll()')
|
|
266
|
+
) {
|
|
267
|
+
scrollLinked.push({
|
|
268
|
+
selector: rule.selectorText || rule.cssText.split('{')[0].trim(),
|
|
269
|
+
cssText: text,
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
} catch { /* Cross-origin stylesheets — skip silently */ }
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
return { animationRules, keyframes, scrollLinked };
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
Save to `animations-raw.json` under keys `animationRules`, `keyframes`, `scrollLinked`.
|
|
280
|
+
|
|
281
|
+
Also extract computed animation properties on visible elements:
|
|
282
|
+
|
|
283
|
+
```javascript
|
|
284
|
+
const animated = [];
|
|
285
|
+
document.querySelectorAll('*').forEach(el => {
|
|
286
|
+
const s = window.getComputedStyle(el);
|
|
287
|
+
if (
|
|
288
|
+
s.animationName !== 'none' || s.transition !== 'all 0s ease 0s' ||
|
|
289
|
+
s.transform !== 'none' || s.willChange !== 'auto'
|
|
290
|
+
) {
|
|
291
|
+
animated.push({
|
|
292
|
+
selector: el.tagName + (el.id ? '#' + el.id : '') + (el.className ? '.' + [...el.classList].join('.') : ''),
|
|
293
|
+
animationName: s.animationName,
|
|
294
|
+
animationDuration: s.animationDuration,
|
|
295
|
+
animationTimingFunction: s.animationTimingFunction,
|
|
296
|
+
transition: s.transition,
|
|
297
|
+
transform: s.transform,
|
|
298
|
+
willChange: s.willChange,
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
return animated;
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
Save to `animations-raw.json` under key `activeAnimations`.
|
|
306
|
+
|
|
307
|
+
## 1.5.3 Video extraction and download
|
|
308
|
+
|
|
309
|
+
```javascript
|
|
310
|
+
return [...document.querySelectorAll('video')].map(v => ({
|
|
311
|
+
sources: [...v.querySelectorAll('source')].map(s => ({ src: s.src, type: s.type })),
|
|
312
|
+
src: v.src || null,
|
|
313
|
+
poster: v.poster || null,
|
|
314
|
+
autoplay: v.autoplay,
|
|
315
|
+
muted: v.muted,
|
|
316
|
+
loop: v.loop,
|
|
317
|
+
playsInline: v.playsInline,
|
|
318
|
+
width: v.offsetWidth,
|
|
319
|
+
height: v.offsetHeight,
|
|
320
|
+
role: v.closest('section')?.id || v.closest('[class]')?.className || 'unknown',
|
|
321
|
+
}));
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
Save to `docs/research/<hostname>/videos.json`.
|
|
325
|
+
|
|
326
|
+
**Download in Modes A, B, C, E:**
|
|
327
|
+
- `public/videos/<hostname>/<role>.<ext>`
|
|
328
|
+
- Skip files > 10MB — note as `skipped: true`
|
|
329
|
+
- Prefer `video/webm` or `video/mp4`
|
|
330
|
+
- Always download poster alongside video
|
|
331
|
+
|
|
332
|
+
**Skip in Mode D** — record URLs only.
|
|
333
|
+
|
|
334
|
+
**Copyright notice (display once):**
|
|
335
|
+
> "Os vídeos foram baixados para `public/videos/<hostname>/` como referência. Substitua-os pelos seus próprios vídeos antes de publicar."
|
|
336
|
+
|
|
337
|
+
## 1.5.4 Scroll recording with DOM mutation tracking
|
|
338
|
+
|
|
339
|
+
**Step A — Attach MutationObserver BEFORE scrolling:**
|
|
340
|
+
|
|
341
|
+
```javascript
|
|
342
|
+
const mutations = [];
|
|
343
|
+
const mo = new MutationObserver(entries => {
|
|
344
|
+
for (const m of entries) {
|
|
345
|
+
if (m.type === 'attributes' && (m.attributeName === 'class' || m.attributeName === 'style')) {
|
|
346
|
+
const el = m.target;
|
|
347
|
+
mutations.push({
|
|
348
|
+
scrollY: window.scrollY,
|
|
349
|
+
element: el.tagName + (el.id ? '#' + el.id : '') +
|
|
350
|
+
(el.className && typeof el.className === 'string'
|
|
351
|
+
? '.' + el.className.trim().replace(/\s+/g, '.') : ''),
|
|
352
|
+
attribute: m.attributeName,
|
|
353
|
+
from: m.oldValue,
|
|
354
|
+
to: el.getAttribute(m.attributeName),
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
});
|
|
359
|
+
mo.observe(document.body, {
|
|
360
|
+
subtree: true, attributes: true,
|
|
361
|
+
attributeFilter: ['class', 'style'], attributeOldValue: true,
|
|
362
|
+
});
|
|
363
|
+
window.__sfMutations = mutations;
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
**Step B — Scroll to 8 checkpoints, wait 600ms, screenshot each:**
|
|
367
|
+
|
|
368
|
+
| Checkpoint | Scroll % | Purpose |
|
|
369
|
+
|---|---|---|
|
|
370
|
+
| `scroll-00pct` | 0% | Initial state |
|
|
371
|
+
| `scroll-12pct` | 12% | Nav solidifies |
|
|
372
|
+
| `scroll-25pct` | 25% | First section entry |
|
|
373
|
+
| `scroll-37pct` | 37% | Second section |
|
|
374
|
+
| `scroll-50pct` | 50% | Mid-page |
|
|
375
|
+
| `scroll-62pct` | 62% | Third section |
|
|
376
|
+
| `scroll-75pct` | 75% | Fourth section |
|
|
377
|
+
| `scroll-100pct` | 100% | Footer |
|
|
378
|
+
|
|
379
|
+
Save to `docs/research/<hostname>/scroll-recording/`.
|
|
380
|
+
|
|
381
|
+
**Step C — Collect mutations:**
|
|
382
|
+
```javascript
|
|
383
|
+
return window.__sfMutations;
|
|
384
|
+
```
|
|
385
|
+
Save to `docs/research/<hostname>/dom-mutations.json`.
|
|
386
|
+
|
|
387
|
+
**Step D — Analyze mutation patterns:**
|
|
388
|
+
|
|
389
|
+
Group by scroll position range and element. Append to `docs/research/<hostname>/interaction-spec.md`:
|
|
390
|
+
|
|
391
|
+
```markdown
|
|
392
|
+
## Scroll-triggered: <element-selector>
|
|
393
|
+
- **Trigger:** scrollY ≈ <N>px (≈ <pct>% of page height)
|
|
394
|
+
- **Change:** class `<from>` → `<to>` (or style `<property>: <from>` → `<to>`)
|
|
395
|
+
- **Effect type:** [REVEAL | HIDE | STATE-CHANGE | PARALLAX | STICKY]
|
|
396
|
+
- **Implementation note:** <inferred mechanism>
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
## 1.5.5 Parallax detection
|
|
400
|
+
|
|
401
|
+
```javascript
|
|
402
|
+
const targets = document.querySelectorAll('[class*="parallax"], [data-parallax], [style*="transform"]');
|
|
403
|
+
const results = [];
|
|
404
|
+
for (const el of targets) {
|
|
405
|
+
const s = window.getComputedStyle(el);
|
|
406
|
+
results.push({
|
|
407
|
+
selector: el.className,
|
|
408
|
+
transformAtCurrentScroll: s.transform,
|
|
409
|
+
backgroundAttachment: s.backgroundAttachment,
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
return results;
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
- `backgroundAttachment: fixed` → CSS parallax (implement with `background-attachment: fixed`)
|
|
416
|
+
- `transform` changes between scroll positions → JS parallax (scroll listener + `translate3d`)
|
|
417
|
+
|
|
418
|
+
Save to `animations-raw.json` under key `parallax`.
|
|
419
|
+
|
|
420
|
+
## 1.5.6 Phase 1.5 output files
|
|
421
|
+
|
|
422
|
+
```
|
|
423
|
+
docs/research/<hostname>/
|
|
424
|
+
├── animations-raw.json ← jsLibraries, keyframes, animationRules, scrollLinked, activeAnimations, parallax
|
|
425
|
+
├── videos.json ← video elements and sources
|
|
426
|
+
├── dom-mutations.json ← class/style changes keyed by scrollY
|
|
427
|
+
└── scroll-recording/
|
|
428
|
+
├── scroll-00pct.png … scroll-100pct.png
|
|
429
|
+
|
|
430
|
+
public/videos/<hostname>/
|
|
431
|
+
└── [downloaded video assets]
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
**Exit criterion:** `animations-raw.json` populated with `jsLibraries`, `keyframes`, `activeAnimations`. `videos.json` written. `dom-mutations.json` written. Scroll screenshots saved. `interaction-spec.md` updated with scroll-triggered entries.
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "site-forge Phase 3A — Transform Layer (Modes A/C), Phase 3B — Skill Forge (Modes B/D/E), Phase 3E — Blend Layer (Mode E)"
|
|
3
|
+
agents: [site-forge]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# site-forge: Phase 3A — Transform Layer (Modes A, C only)
|
|
7
|
+
|
|
8
|
+
**Goal:** Map extracted structure to the existing skill's components and tokens.
|
|
9
|
+
|
|
10
|
+
## 3A.1 Load the skill
|
|
11
|
+
|
|
12
|
+
Read from `.aioson/installed-skills/<skill>/` or `.aioson/skills/design/<skill>/`:
|
|
13
|
+
1. `SKILL.md` — identity, pillars, activation rules
|
|
14
|
+
2. `references/design-tokens.md` — all CSS variables
|
|
15
|
+
3. `references/components.md` — available components and variants
|
|
16
|
+
4. `references/patterns.md` — page layout patterns
|
|
17
|
+
5. `references/motion.md` — animation tokens and conventions
|
|
18
|
+
6. `references/websites.md` — landing page patterns (if present)
|
|
19
|
+
|
|
20
|
+
## 3A.2 Build the component map
|
|
21
|
+
|
|
22
|
+
Create `docs/research/<hostname>/component-map.md`:
|
|
23
|
+
|
|
24
|
+
```markdown
|
|
25
|
+
# Component Map — <hostname> → <skill-name>
|
|
26
|
+
|
|
27
|
+
## Mappings
|
|
28
|
+
|
|
29
|
+
| Extracted element | Skill component | Key tokens to apply |
|
|
30
|
+
|---|---|---|
|
|
31
|
+
| Hero container | Hero pattern (from patterns.md) | --max-width, --space-XX |
|
|
32
|
+
| Feature card grid | Card grid pattern | gap: --space-XX |
|
|
33
|
+
| Primary CTA button | Button primary | bg: --accent, radius: --radius-md |
|
|
34
|
+
| Ghost/outline button | Button ghost | border: 1px solid --border |
|
|
35
|
+
| H1 display heading | Display heading | font: --font-display, size: --text-5xl |
|
|
36
|
+
| Body paragraph | Body text | font: --font-body, size: --text-base |
|
|
37
|
+
| Muted caption | Muted text | color: --text-muted |
|
|
38
|
+
| Sticky nav | Header pattern | bg: --bg-surface, shadow: --shadow-sm on scroll |
|
|
39
|
+
| Card hover | Card component | transform: translateY(var(--hover-lift)) |
|
|
40
|
+
| Scroll interaction timing | — | var(--transition-base) |
|
|
41
|
+
|
|
42
|
+
## Deviations (skill component not available)
|
|
43
|
+
|
|
44
|
+
| Extracted element | Fallback approach | Reason |
|
|
45
|
+
|---|---|---|
|
|
46
|
+
|
|
47
|
+
## Assets preserved
|
|
48
|
+
|
|
49
|
+
| Original source | Local path | Action required before publishing |
|
|
50
|
+
|---|---|---|
|
|
51
|
+
| hero image | public/images/<hostname>/hero.webp | Replace with project asset |
|
|
52
|
+
| logo | public/images/<hostname>/logo.svg | Replace with project logo |
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Mode C (content-first):** Add a "Content slot" column mapping each skill component to its extracted text and image asset.
|
|
56
|
+
|
|
57
|
+
## 3A.3 Universal token substitution rules
|
|
58
|
+
|
|
59
|
+
Apply everywhere during Phase 4:
|
|
60
|
+
```
|
|
61
|
+
background-color: <hex> → var(--bg-surface) | var(--bg-elevated) | var(--accent)
|
|
62
|
+
color: <hex> → var(--text-primary) | var(--text-muted) | var(--accent)
|
|
63
|
+
padding: <px> → var(--space-XX) — pick nearest from spacing scale
|
|
64
|
+
margin: <px> → var(--space-XX)
|
|
65
|
+
animation-duration: <ms> → var(--transition-fast) | var(--transition-base) | var(--transition-slow)
|
|
66
|
+
font-size: <px> → var(--text-XX) — pick nearest from type scale
|
|
67
|
+
font-family: <name> → var(--font-display) | var(--font-body) | var(--font-mono)
|
|
68
|
+
border-radius: <px> → var(--radius-sm) | var(--radius-md) | var(--radius-lg)
|
|
69
|
+
box-shadow: <value> → var(--shadow-sm) | var(--shadow-md) | var(--shadow-lg)
|
|
70
|
+
transition: <value> → var(--transition-fast) | var(--transition-base) | var(--transition-slow)
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
If a token name doesn't exist in the skill, use closest equivalent from `design-tokens.md`. Never hardcode values.
|
|
74
|
+
|
|
75
|
+
## 3A.4 Interaction preservation rule
|
|
76
|
+
|
|
77
|
+
Keep the trigger mechanism. Keep the effect type. Replace only easing/duration with skill motion tokens.
|
|
78
|
+
|
|
79
|
+
**Exit criterion:** Every extracted component has a mapping row. Every interaction has a motion token assigned.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
# site-forge: Phase 3B — Design Extraction + Skill Forge (Modes B, D, E)
|
|
84
|
+
|
|
85
|
+
**Goal:** Extract the site's design system from raw aesthetics and forge a new AIOSON skill.
|
|
86
|
+
|
|
87
|
+
## 3B.1 Color system extraction
|
|
88
|
+
|
|
89
|
+
From `aesthetics-raw.json`, organize into semantic groups:
|
|
90
|
+
```
|
|
91
|
+
Background: --bg-base, --bg-surface, --bg-elevated, --bg-inverse
|
|
92
|
+
Text: --text-primary, --text-muted, --text-inverse
|
|
93
|
+
Brand: --accent, --accent-hover, --border
|
|
94
|
+
Semantic: --success, --warning, --error, --info (if present)
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Consolidate near-duplicate colors (within 10% perceptual distance) into a single token.
|
|
98
|
+
|
|
99
|
+
## 3B.2 Typography system extraction
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
Font families: --font-display (h1/h2), --font-body (p), --font-mono (code, if detected)
|
|
103
|
+
|
|
104
|
+
Type scale (map observed px to named scale):
|
|
105
|
+
--text-xs … --text-5xl (xs=smallest, 5xl=h1.fontSize)
|
|
106
|
+
|
|
107
|
+
Weight scale (include only weights in use):
|
|
108
|
+
--font-normal (400), --font-medium (500), --font-semibold (600), --font-bold (700)
|
|
109
|
+
|
|
110
|
+
Line heights:
|
|
111
|
+
--leading-tight, --leading-normal, --leading-relaxed
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## 3B.3 Spacing system extraction
|
|
115
|
+
|
|
116
|
+
Collect all observed padding/gap values → find GCD or most common divisor (typically 4px or 8px) → base unit:
|
|
117
|
+
```
|
|
118
|
+
--space-1 … --space-24 (1× to 24× base unit)
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## 3B.4 Visual primitives
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
Border radius: --radius-none, --radius-sm, --radius-md, --radius-lg, --radius-full
|
|
125
|
+
Shadows: --shadow-sm, --shadow-md, --shadow-lg, --shadow-xl
|
|
126
|
+
Motion: --transition-fast, --transition-base, --transition-slow, --ease-default, --ease-spring
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## 3B.5 Visual identity synthesis
|
|
130
|
+
|
|
131
|
+
Define 3 design pillars from extracted values. Examples:
|
|
132
|
+
- "Minimal contrast" + "Typographic hierarchy" + "Generous whitespace"
|
|
133
|
+
- "Deep darkness" + "Glowing accents" + "Crisp borders"
|
|
134
|
+
|
|
135
|
+
Also: Theme (`light | dark | system`), Personality (1-sentence description).
|
|
136
|
+
|
|
137
|
+
## 3B.6 Pick reference skill structure
|
|
138
|
+
|
|
139
|
+
List skills in `.aioson/skills/design/`. Choose closest visual match. Read its directory listing.
|
|
140
|
+
**Use only the FILE STRUCTURE as template — do not copy any tokens or design values.**
|
|
141
|
+
|
|
142
|
+
## 3B.7 Forge the skill
|
|
143
|
+
|
|
144
|
+
Create `.aioson/installed-skills/<hostname>/` with:
|
|
145
|
+
|
|
146
|
+
**`SKILL.md`:**
|
|
147
|
+
```markdown
|
|
148
|
+
# <hostname> Design System
|
|
149
|
+
|
|
150
|
+
> Extracted from <url> on <date>. Visual clone skill — adapt tokens before using in unrelated projects.
|
|
151
|
+
|
|
152
|
+
## Identity
|
|
153
|
+
**Theme:** <light|dark|system>
|
|
154
|
+
**Personality:** <1-sentence>
|
|
155
|
+
|
|
156
|
+
## Design pillars
|
|
157
|
+
1. <pillar 1>
|
|
158
|
+
2. <pillar 2>
|
|
159
|
+
3. <pillar 3>
|
|
160
|
+
|
|
161
|
+
## When to use
|
|
162
|
+
Activate when building projects that need to visually match or be inspired by <hostname>'s aesthetic.
|
|
163
|
+
|
|
164
|
+
## Activation
|
|
165
|
+
Load `references/design-tokens.md` before writing any component.
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
**`references/design-tokens.md`:** Full `:root {}` block with all tokens from 3B.1–3B.4.
|
|
169
|
+
|
|
170
|
+
**`references/components.md`:** Component variants derived from Phase 2.2 inventory. DOM structure, props, variants, token usage per component.
|
|
171
|
+
|
|
172
|
+
**`references/patterns.md`:** Page layout patterns from Phase 2.1 section specs. Hero, Feature grid, Card layout, Nav, Footer.
|
|
173
|
+
|
|
174
|
+
**`references/motion.md`:** Animation tokens + interaction patterns from Phase 2.3 and 1.5:
|
|
175
|
+
- `jsLibraries` detected
|
|
176
|
+
- All `@keyframes` from `animations-raw.json` — copy verbatim as "Extracted Keyframes" section
|
|
177
|
+
- `parallax` entries — technique (CSS fixed vs JS transform)
|
|
178
|
+
- `scrollLinked` CSS rules
|
|
179
|
+
- Scroll-trigger thresholds from `dom-mutations.json` as table: element → scrollY trigger → effect
|
|
180
|
+
|
|
181
|
+
**`references/websites.md`:** This site's landing page structure as reusable pattern. Full page topology and section connections.
|
|
182
|
+
|
|
183
|
+
**`.skill-meta.json`:**
|
|
184
|
+
```json
|
|
185
|
+
{
|
|
186
|
+
"id": "<hostname>",
|
|
187
|
+
"name": "<hostname> Design System",
|
|
188
|
+
"source": "<url>",
|
|
189
|
+
"extractedAt": "<ISO date>",
|
|
190
|
+
"theme": "<light|dark|system>",
|
|
191
|
+
"baseUnit": "<Npx>",
|
|
192
|
+
"referenceSkill": "<chosen template skill id>",
|
|
193
|
+
"type": "extracted"
|
|
194
|
+
}
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
**Exit criterion (Modes B, D):** All skill files written. `design-tokens.md` has full `:root {}` block. Component and pattern references derived from site's inventory.
|
|
198
|
+
|
|
199
|
+
**Mode D exits here.** Output path to forged skill and run observability.
|
|
200
|
+
|
|
201
|
+
**Mode B and E:** Proceed to Phase 4 (Mode B uses forged skill; Mode E uses blend layer from 3E).
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
# site-forge: Phase 3E — Blend Layer (Mode E only)
|
|
206
|
+
|
|
207
|
+
**Goal:** Merge extracted site tokens with existing skill tokens at the configured ratio.
|
|
208
|
+
|
|
209
|
+
## 3E.1 Define the blend map
|
|
210
|
+
|
|
211
|
+
Load both token sets:
|
|
212
|
+
- Site: `docs/research/<hostname>/aesthetics-raw.json` + Phase 3B extraction
|
|
213
|
+
- Skill: named skill's `references/design-tokens.md`
|
|
214
|
+
|
|
215
|
+
Default blend: 50% site / 50% skill. Use user-specified ratio if provided.
|
|
216
|
+
|
|
217
|
+
## 3E.2 Blend rules per category
|
|
218
|
+
|
|
219
|
+
Create `docs/research/<hostname>/blend-map.md`:
|
|
220
|
+
|
|
221
|
+
```markdown
|
|
222
|
+
# Blend Map — <hostname> × <skill-name> — <ratio>% site / <100-ratio>% skill
|
|
223
|
+
|
|
224
|
+
## Color tokens
|
|
225
|
+
| Token | Site value | Skill value | Blended result | Source |
|
|
226
|
+
|---|---|---|---|---|
|
|
227
|
+
| --bg-base | #1a1a1a | #0f0f0f | #141414 | averaged |
|
|
228
|
+
| --accent | #e63946 | #7c3aed | #e63946 | site (brand identity) |
|
|
229
|
+
|
|
230
|
+
## Typography tokens
|
|
231
|
+
| Token | Site value | Skill value | Blended result | Source |
|
|
232
|
+
|
|
233
|
+
## Blend decisions
|
|
234
|
+
- Primary font family: [site | skill | averaged] — reason
|
|
235
|
+
- Accent color: [site | skill | averaged] — reason
|
|
236
|
+
- Border radius style: [site | skill | averaged] — reason
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
**Blend rules:**
|
|
240
|
+
- Colors: average HSL for neutrals; prefer site source for accent/brand colors.
|
|
241
|
+
- Typography: ratio ≥ 50% site → use site display font; always blend body font toward skill for readability.
|
|
242
|
+
- Spacing: use scale from whichever source matches the ratio.
|
|
243
|
+
- Motion: use easing/duration from whichever source matches the ratio.
|
|
244
|
+
|
|
245
|
+
## 3E.3 Write blended token file
|
|
246
|
+
|
|
247
|
+
Write `docs/research/<hostname>/blended-tokens.css` with all resolved `:root` values.
|
|
248
|
+
|
|
249
|
+
**Exit criterion:** `blend-map.md` complete. `blended-tokens.css` ready. Proceed to Phase 4.
|