aw-ecc 1.4.31 → 1.4.47
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/.claude-plugin/plugin.json +1 -1
- package/.codex/hooks/aw-post-tool-use.sh +8 -2
- package/.codex/hooks/aw-session-start.sh +11 -4
- package/.codex/hooks/aw-stop.sh +8 -2
- package/.codex/hooks/aw-user-prompt-submit.sh +10 -2
- package/.codex/hooks.json +8 -8
- package/.cursor/INSTALL.md +7 -5
- package/.cursor/hooks/adapter.js +41 -4
- package/.cursor/hooks/after-agent-response.js +62 -0
- package/.cursor/hooks/before-submit-prompt.js +7 -1
- package/.cursor/hooks/post-tool-use-failure.js +21 -0
- package/.cursor/hooks/post-tool-use.js +39 -0
- package/.cursor/hooks/shared/aw-phase-definitions.js +53 -0
- package/.cursor/hooks/shared/aw-phase-runner.js +3 -1
- package/.cursor/hooks/subagent-start.js +22 -4
- package/.cursor/hooks/subagent-stop.js +18 -1
- package/.cursor/hooks.json +23 -2
- package/.opencode/package.json +1 -1
- package/AGENTS.md +3 -3
- package/README.md +5 -5
- package/commands/adk.md +52 -0
- package/commands/build.md +22 -9
- package/commands/deploy.md +12 -0
- package/commands/execute.md +9 -0
- package/commands/feature.md +333 -0
- package/commands/investigate.md +18 -5
- package/commands/plan.md +23 -9
- package/commands/publish.md +65 -0
- package/commands/review.md +12 -0
- package/commands/ship.md +12 -0
- package/commands/test.md +12 -0
- package/commands/verify.md +9 -0
- package/hooks/hooks.json +36 -0
- package/manifests/install-components.json +8 -0
- package/manifests/install-modules.json +83 -0
- package/manifests/install-profiles.json +7 -0
- package/package.json +1 -1
- package/scripts/ci/validate-rules.js +51 -0
- package/scripts/cursor-aw-home/hooks.json +23 -2
- package/scripts/cursor-aw-hooks/adapter.js +41 -4
- package/scripts/cursor-aw-hooks/before-submit-prompt.js +7 -1
- package/scripts/hooks/aw-usage-commit-created.js +32 -0
- package/scripts/hooks/aw-usage-post-tool-use-failure.js +56 -0
- package/scripts/hooks/aw-usage-post-tool-use.js +242 -0
- package/scripts/hooks/aw-usage-prompt-submit.js +112 -0
- package/scripts/hooks/aw-usage-session-start.js +48 -0
- package/scripts/hooks/aw-usage-stop.js +182 -0
- package/scripts/hooks/aw-usage-telemetry-send.js +84 -0
- package/scripts/hooks/cost-tracker.js +3 -23
- package/scripts/hooks/shared/aw-phase-definitions.js +53 -0
- package/scripts/hooks/shared/aw-phase-runner.js +3 -1
- package/scripts/lib/aw-hook-contract.js +2 -2
- package/scripts/lib/aw-pricing.js +306 -0
- package/scripts/lib/aw-usage-telemetry.js +472 -0
- package/scripts/lib/codex-hook-config.js +8 -8
- package/scripts/lib/cursor-hook-config.js +25 -10
- package/scripts/lib/install-targets/codex-home.js +7 -0
- package/scripts/lib/install-targets/cursor-project.js +3 -0
- package/scripts/lib/install-targets/helpers.js +20 -3
- package/skills/aw-adk/SKILL.md +317 -0
- package/skills/aw-adk/agents/analyzer.md +113 -0
- package/skills/aw-adk/agents/comparator.md +113 -0
- package/skills/aw-adk/agents/grader.md +115 -0
- package/skills/aw-adk/assets/eval_review.html +76 -0
- package/skills/aw-adk/eval-viewer/generate_review.py +164 -0
- package/skills/aw-adk/eval-viewer/viewer.html +181 -0
- package/skills/aw-adk/evals/eval-colocated-placement.md +84 -0
- package/skills/aw-adk/evals/eval-create-agent.md +90 -0
- package/skills/aw-adk/evals/eval-create-command.md +98 -0
- package/skills/aw-adk/evals/eval-create-eval.md +89 -0
- package/skills/aw-adk/evals/eval-create-rule.md +99 -0
- package/skills/aw-adk/evals/eval-create-skill.md +97 -0
- package/skills/aw-adk/evals/eval-delete-agent.md +79 -0
- package/skills/aw-adk/evals/eval-delete-command.md +89 -0
- package/skills/aw-adk/evals/eval-delete-rule.md +86 -0
- package/skills/aw-adk/evals/eval-delete-skill.md +90 -0
- package/skills/aw-adk/evals/eval-meta-eval-coverage.md +78 -0
- package/skills/aw-adk/evals/eval-meta-eval-determinism.md +81 -0
- package/skills/aw-adk/evals/eval-meta-eval-false-pass.md +81 -0
- package/skills/aw-adk/evals/eval-score-accuracy.md +95 -0
- package/skills/aw-adk/evals/eval-type-redirect.md +68 -0
- package/skills/aw-adk/evals/evals.json +96 -0
- package/skills/aw-adk/references/artifact-wiring.md +162 -0
- package/skills/aw-adk/references/cross-ide-mapping.md +71 -0
- package/skills/aw-adk/references/eval-placement-guide.md +183 -0
- package/skills/aw-adk/references/external-resources.md +75 -0
- package/skills/aw-adk/references/getting-started.md +66 -0
- package/skills/aw-adk/references/registry-structure.md +152 -0
- package/skills/aw-adk/references/rubric-agent.md +36 -0
- package/skills/aw-adk/references/rubric-command.md +36 -0
- package/skills/aw-adk/references/rubric-eval.md +36 -0
- package/skills/aw-adk/references/rubric-meta-eval.md +132 -0
- package/skills/aw-adk/references/rubric-rule.md +36 -0
- package/skills/aw-adk/references/rubric-skill.md +36 -0
- package/skills/aw-adk/references/schemas.md +222 -0
- package/skills/aw-adk/references/template-agent.md +251 -0
- package/skills/aw-adk/references/template-command.md +279 -0
- package/skills/aw-adk/references/template-eval.md +176 -0
- package/skills/aw-adk/references/template-rule.md +119 -0
- package/skills/aw-adk/references/template-skill.md +123 -0
- package/skills/aw-adk/references/type-classifier.md +98 -0
- package/skills/aw-adk/references/writing-good-agents.md +227 -0
- package/skills/aw-adk/references/writing-good-commands.md +258 -0
- package/skills/aw-adk/references/writing-good-evals.md +271 -0
- package/skills/aw-adk/references/writing-good-rules.md +214 -0
- package/skills/aw-adk/references/writing-good-skills.md +159 -0
- package/skills/aw-adk/scripts/aggregate-benchmark.py +190 -0
- package/skills/aw-adk/scripts/lint-artifact.sh +211 -0
- package/skills/aw-adk/scripts/score-artifact.sh +179 -0
- package/skills/aw-adk/scripts/trigger-eval.py +192 -0
- package/skills/aw-build/SKILL.md +19 -2
- package/skills/aw-deploy/SKILL.md +65 -3
- package/skills/aw-design/SKILL.md +156 -0
- package/skills/aw-design/references/highrise-tokens.md +394 -0
- package/skills/aw-design/references/micro-interactions.md +76 -0
- package/skills/aw-design/references/prompt-template.md +160 -0
- package/skills/aw-design/references/quality-checklist.md +70 -0
- package/skills/aw-design/references/self-review.md +497 -0
- package/skills/aw-design/references/stitch-workflow.md +127 -0
- package/skills/aw-feature/SKILL.md +293 -0
- package/skills/aw-investigate/SKILL.md +17 -0
- package/skills/aw-plan/SKILL.md +34 -3
- package/skills/aw-publish/SKILL.md +300 -0
- package/skills/aw-publish/evals/eval-confirmation-gate.md +60 -0
- package/skills/aw-publish/evals/eval-intent-detection.md +111 -0
- package/skills/aw-publish/evals/eval-push-modes.md +67 -0
- package/skills/aw-publish/evals/eval-rules-push.md +60 -0
- package/skills/aw-publish/evals/evals.json +29 -0
- package/skills/aw-publish/references/push-modes.md +38 -0
- package/skills/aw-review/SKILL.md +88 -9
- package/skills/aw-rules-review/SKILL.md +124 -0
- package/skills/aw-rules-review/agents/openai.yaml +3 -0
- package/skills/aw-rules-review/scripts/generate-review-template.mjs +323 -0
- package/skills/aw-ship/SKILL.md +16 -0
- package/skills/aw-spec/SKILL.md +15 -0
- package/skills/aw-tasks/SKILL.md +15 -0
- package/skills/aw-test/SKILL.md +16 -0
- package/skills/aw-yolo/SKILL.md +4 -0
- package/skills/diagnose/SKILL.md +121 -0
- package/skills/diagnose/scripts/hitl-loop.template.sh +41 -0
- package/skills/finish-only-when-green/SKILL.md +265 -0
- package/skills/grill-me/SKILL.md +24 -0
- package/skills/grill-with-docs/SKILL.md +92 -0
- package/skills/grill-with-docs/adr-format.md +47 -0
- package/skills/grill-with-docs/context-format.md +67 -0
- package/skills/improve-codebase-architecture/SKILL.md +75 -0
- package/skills/improve-codebase-architecture/deepening.md +37 -0
- package/skills/improve-codebase-architecture/interface-design.md +44 -0
- package/skills/improve-codebase-architecture/language.md +53 -0
- package/skills/local-ghl-setup-from-screenshot/SKILL.md +538 -0
- package/skills/tdd/SKILL.md +115 -0
- package/skills/tdd/deep-modules.md +33 -0
- package/skills/tdd/interface-design.md +31 -0
- package/skills/tdd/mocking.md +59 -0
- package/skills/tdd/refactoring.md +10 -0
- package/skills/tdd/tests.md +61 -0
- package/skills/to-issues/SKILL.md +62 -0
- package/skills/to-prd/SKILL.md +75 -0
- package/skills/using-aw-skills/SKILL.md +170 -237
- package/skills/using-aw-skills/hooks/session-start.sh +11 -41
- package/skills/zoom-out/SKILL.md +24 -0
- package/.cursor/rules/common-agents.md +0 -53
- package/.cursor/rules/common-aw-routing.md +0 -43
- package/.cursor/rules/common-coding-style.md +0 -52
- package/.cursor/rules/common-development-workflow.md +0 -33
- package/.cursor/rules/common-git-workflow.md +0 -28
- package/.cursor/rules/common-hooks.md +0 -34
- package/.cursor/rules/common-patterns.md +0 -35
- package/.cursor/rules/common-performance.md +0 -59
- package/.cursor/rules/common-security.md +0 -33
- package/.cursor/rules/common-testing.md +0 -33
- package/.cursor/skills/api-and-interface-design/SKILL.md +0 -75
- package/.cursor/skills/article-writing/SKILL.md +0 -85
- package/.cursor/skills/aw-brainstorm/SKILL.md +0 -115
- package/.cursor/skills/aw-build/SKILL.md +0 -152
- package/.cursor/skills/aw-build/evals/build-stage-cases.json +0 -28
- package/.cursor/skills/aw-debug/SKILL.md +0 -49
- package/.cursor/skills/aw-deploy/SKILL.md +0 -101
- package/.cursor/skills/aw-deploy/evals/deploy-stage-cases.json +0 -32
- package/.cursor/skills/aw-execute/SKILL.md +0 -47
- package/.cursor/skills/aw-execute/references/mode-code.md +0 -47
- package/.cursor/skills/aw-execute/references/mode-docs.md +0 -28
- package/.cursor/skills/aw-execute/references/mode-infra.md +0 -44
- package/.cursor/skills/aw-execute/references/mode-migration.md +0 -58
- package/.cursor/skills/aw-execute/references/worker-implementer.md +0 -26
- package/.cursor/skills/aw-execute/references/worker-parallel-worker.md +0 -23
- package/.cursor/skills/aw-execute/references/worker-quality-reviewer.md +0 -23
- package/.cursor/skills/aw-execute/references/worker-spec-reviewer.md +0 -23
- package/.cursor/skills/aw-execute/scripts/build-worker-bundle.js +0 -229
- package/.cursor/skills/aw-finish/SKILL.md +0 -111
- package/.cursor/skills/aw-investigate/SKILL.md +0 -109
- package/.cursor/skills/aw-plan/SKILL.md +0 -368
- package/.cursor/skills/aw-prepare/SKILL.md +0 -118
- package/.cursor/skills/aw-review/SKILL.md +0 -118
- package/.cursor/skills/aw-ship/SKILL.md +0 -115
- package/.cursor/skills/aw-spec/SKILL.md +0 -104
- package/.cursor/skills/aw-tasks/SKILL.md +0 -138
- package/.cursor/skills/aw-test/SKILL.md +0 -118
- package/.cursor/skills/aw-verify/SKILL.md +0 -51
- package/.cursor/skills/aw-yolo/SKILL.md +0 -111
- package/.cursor/skills/browser-testing-with-devtools/SKILL.md +0 -81
- package/.cursor/skills/bun-runtime/SKILL.md +0 -84
- package/.cursor/skills/ci-cd-and-automation/SKILL.md +0 -71
- package/.cursor/skills/code-simplification/SKILL.md +0 -74
- package/.cursor/skills/content-engine/SKILL.md +0 -88
- package/.cursor/skills/context-engineering/SKILL.md +0 -74
- package/.cursor/skills/deprecation-and-migration/SKILL.md +0 -75
- package/.cursor/skills/documentation-and-adrs/SKILL.md +0 -75
- package/.cursor/skills/documentation-lookup/SKILL.md +0 -90
- package/.cursor/skills/frontend-slides/SKILL.md +0 -184
- package/.cursor/skills/frontend-slides/STYLE_PRESETS.md +0 -330
- package/.cursor/skills/frontend-ui-engineering/SKILL.md +0 -68
- package/.cursor/skills/git-workflow-and-versioning/SKILL.md +0 -75
- package/.cursor/skills/idea-refine/SKILL.md +0 -84
- package/.cursor/skills/incremental-implementation/SKILL.md +0 -75
- package/.cursor/skills/investor-materials/SKILL.md +0 -96
- package/.cursor/skills/investor-outreach/SKILL.md +0 -76
- package/.cursor/skills/market-research/SKILL.md +0 -75
- package/.cursor/skills/mcp-server-patterns/SKILL.md +0 -67
- package/.cursor/skills/nextjs-turbopack/SKILL.md +0 -44
- package/.cursor/skills/performance-optimization/SKILL.md +0 -77
- package/.cursor/skills/security-and-hardening/SKILL.md +0 -70
- package/.cursor/skills/using-aw-skills/SKILL.md +0 -290
- package/.cursor/skills/using-aw-skills/evals/skill-trigger-cases.tsv +0 -25
- package/.cursor/skills/using-aw-skills/evals/test-skill-triggers.sh +0 -171
- package/.cursor/skills/using-aw-skills/hooks/hooks.json +0 -9
- package/.cursor/skills/using-aw-skills/hooks/session-start.sh +0 -67
- package/.cursor/skills/using-platform-skills/SKILL.md +0 -163
- package/.cursor/skills/using-platform-skills/evals/platform-selection-cases.json +0 -52
- /package/.cursor/rules/{golang-coding-style.md → golang-coding-style.mdc} +0 -0
- /package/.cursor/rules/{golang-hooks.md → golang-hooks.mdc} +0 -0
- /package/.cursor/rules/{golang-patterns.md → golang-patterns.mdc} +0 -0
- /package/.cursor/rules/{golang-security.md → golang-security.mdc} +0 -0
- /package/.cursor/rules/{golang-testing.md → golang-testing.mdc} +0 -0
- /package/.cursor/rules/{kotlin-coding-style.md → kotlin-coding-style.mdc} +0 -0
- /package/.cursor/rules/{kotlin-hooks.md → kotlin-hooks.mdc} +0 -0
- /package/.cursor/rules/{kotlin-patterns.md → kotlin-patterns.mdc} +0 -0
- /package/.cursor/rules/{kotlin-security.md → kotlin-security.mdc} +0 -0
- /package/.cursor/rules/{kotlin-testing.md → kotlin-testing.mdc} +0 -0
- /package/.cursor/rules/{php-coding-style.md → php-coding-style.mdc} +0 -0
- /package/.cursor/rules/{php-hooks.md → php-hooks.mdc} +0 -0
- /package/.cursor/rules/{php-patterns.md → php-patterns.mdc} +0 -0
- /package/.cursor/rules/{php-security.md → php-security.mdc} +0 -0
- /package/.cursor/rules/{php-testing.md → php-testing.mdc} +0 -0
- /package/.cursor/rules/{python-coding-style.md → python-coding-style.mdc} +0 -0
- /package/.cursor/rules/{python-hooks.md → python-hooks.mdc} +0 -0
- /package/.cursor/rules/{python-patterns.md → python-patterns.mdc} +0 -0
- /package/.cursor/rules/{python-security.md → python-security.mdc} +0 -0
- /package/.cursor/rules/{python-testing.md → python-testing.mdc} +0 -0
- /package/.cursor/rules/{swift-coding-style.md → swift-coding-style.mdc} +0 -0
- /package/.cursor/rules/{swift-hooks.md → swift-hooks.mdc} +0 -0
- /package/.cursor/rules/{swift-patterns.md → swift-patterns.mdc} +0 -0
- /package/.cursor/rules/{swift-security.md → swift-security.mdc} +0 -0
- /package/.cursor/rules/{swift-testing.md → swift-testing.mdc} +0 -0
- /package/.cursor/rules/{typescript-coding-style.md → typescript-coding-style.mdc} +0 -0
- /package/.cursor/rules/{typescript-hooks.md → typescript-hooks.mdc} +0 -0
- /package/.cursor/rules/{typescript-patterns.md → typescript-patterns.mdc} +0 -0
- /package/.cursor/rules/{typescript-security.md → typescript-security.mdc} +0 -0
- /package/.cursor/rules/{typescript-testing.md → typescript-testing.mdc} +0 -0
|
@@ -0,0 +1,538 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: local-ghl-setup-from-screenshot
|
|
3
|
+
description: Identifies a GHL app page from a screenshot and guides product/design team through full local setup — from repo clone to gcloud CLI to running dev server. Invoke when user shares a screenshot and wants to run it locally, or mentions local setup / dev environment. Handhold users through the setup process and always provide them workarounds for common issues. Their and your end goal is to get the page running locally as quickly as possible.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Local Setup from Screenshot
|
|
7
|
+
|
|
8
|
+
You are an autonomous setup agent for the GoHighLevel (GHL) platform. A product or design team member will share a screenshot of a GHL app page. Your job is to identify which project it belongs to, then **execute every setup step yourself** — cloning repos, installing tools, configuring Module Federation, and starting dev servers.
|
|
9
|
+
|
|
10
|
+
**You DO things. You do NOT just list commands.**
|
|
11
|
+
|
|
12
|
+
Run every command via terminal. Install missing tools automatically. Debug failures yourself. Only ask the user when you genuinely cannot proceed (e.g., browser-based Google OAuth, missing SSH keys, tokens you don't have).
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Step 1: Get the Screenshot
|
|
17
|
+
|
|
18
|
+
If the user has already shared a screenshot, proceed to Step 2.
|
|
19
|
+
|
|
20
|
+
Otherwise, ask:
|
|
21
|
+
|
|
22
|
+
> Share a screenshot of the GHL page you want to work on. If you can include the browser URL bar, that helps me identify the exact page faster.
|
|
23
|
+
|
|
24
|
+
If the first screenshot does not show a visible URL bar, immediately ask:
|
|
25
|
+
|
|
26
|
+
> Please share an updated **full-screen screenshot** with the browser URL bar visible, or paste the page URL here.
|
|
27
|
+
|
|
28
|
+
Wait for the screenshot before continuing.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Step 2: Identify the Project and Micro-App
|
|
33
|
+
|
|
34
|
+
Analyze the screenshot using these signals in order of reliability:
|
|
35
|
+
|
|
36
|
+
If the screenshot does **not** include a visible URL bar/path, ask the user before proceeding:
|
|
37
|
+
|
|
38
|
+
> I can continue, but identification is much more reliable with the URL.
|
|
39
|
+
> Please share either:
|
|
40
|
+
> 1) an updated **full-screen screenshot** with the browser URL bar visible, or
|
|
41
|
+
> 2) the current page URL as text.
|
|
42
|
+
>
|
|
43
|
+
> Once I have that, I'll map it to the exact project/app and continue setup.
|
|
44
|
+
|
|
45
|
+
### Signal A — URL Bar (highest confidence)
|
|
46
|
+
|
|
47
|
+
| URL Path Pattern | Project | Micro-App Folder |
|
|
48
|
+
|-----------------|---------|-----------------|
|
|
49
|
+
| `/v2/location/{id}/contacts` | ghl-crm-frontend | `apps/contacts` or `apps/contacts-highrise` |
|
|
50
|
+
| `/v2/location/{id}/conversations` | ghl-crm-frontend | `apps/conversations` |
|
|
51
|
+
| `/v2/location/{id}/opportunities` | ghl-crm-frontend | `apps/opportunities` |
|
|
52
|
+
| `/v2/location/{id}/calendars` | ghl-crm-frontend | `apps/calendar` |
|
|
53
|
+
| `/v2/location/{id}/payments` | ghl-crm-frontend | `apps/payments` |
|
|
54
|
+
| `/v2/location/{id}/funnels` | ghl-crm-frontend | `apps/funnels` |
|
|
55
|
+
| `/v2/location/{id}/email` | ghl-crm-frontend | `apps/email-builder` |
|
|
56
|
+
| `/v2/location/{id}/automation` | ghl-crm-frontend | `apps/automation` |
|
|
57
|
+
| `/v2/location/{id}/workflows` | ghl-crm-frontend | `apps/workflows` |
|
|
58
|
+
| `/v2/location/{id}/reputation` | ghl-crm-frontend | `apps/reputation` |
|
|
59
|
+
| `/v2/location/{id}/social-planner` | ghl-crm-frontend | `apps/social-planner` |
|
|
60
|
+
| `/v2/location/{id}/memberships` | ghl-crm-frontend | `apps/memberships` |
|
|
61
|
+
| `/v2/location/{id}/invoices` | ghl-crm-frontend | `apps/invoices` |
|
|
62
|
+
| `/v2/location/{id}/proposals` | ghl-crm-frontend | `apps/proposals` |
|
|
63
|
+
| `/v2/location/{id}/certificates` | ghl-crm-frontend | `apps/certificates` |
|
|
64
|
+
| `/v2/location/{id}/ai-agents` | ghl-crm-frontend | `apps/ai-employee-v2` or `apps/voice-ai` |
|
|
65
|
+
| `/v2/location/{id}/dashboard` | spm-ts | Shell app (no micro-app) |
|
|
66
|
+
| `/v2/settings/...` or agency routes | spm-ts | Shell app |
|
|
67
|
+
|
|
68
|
+
**Routing note**: All `/v2/location/{id}/...` routes are served by spm-ts (the shell), which loads micro-frontends from ghl-crm-frontend via Module Federation. To change page **content**, you need ghl-crm-frontend. To change the **sidebar, top nav, or settings shell**, you need spm-ts.
|
|
69
|
+
|
|
70
|
+
### Signal B — Navigation Sidebar (medium confidence)
|
|
71
|
+
|
|
72
|
+
| Sidebar Item | Micro-App |
|
|
73
|
+
|-------------|-----------|
|
|
74
|
+
| Dashboard | spm-ts shell |
|
|
75
|
+
| Conversations | conversations |
|
|
76
|
+
| Calendars | calendar |
|
|
77
|
+
| Contacts | contacts / contacts-highrise |
|
|
78
|
+
| Opportunities / Pipelines | opportunities |
|
|
79
|
+
| Payments | payments |
|
|
80
|
+
| Marketing / Email | email-builder |
|
|
81
|
+
| Automation / Workflows | automation or workflows |
|
|
82
|
+
| Sites / Funnels | funnels |
|
|
83
|
+
| Memberships | memberships |
|
|
84
|
+
| Reputation | reputation |
|
|
85
|
+
| Social Planner | social-planner |
|
|
86
|
+
| Certificates | certificates |
|
|
87
|
+
| AI Agents | ai-employee-v2 or voice-ai |
|
|
88
|
+
|
|
89
|
+
### Signal C — Visual Patterns (lower confidence)
|
|
90
|
+
|
|
91
|
+
| What You See | Micro-App |
|
|
92
|
+
|-------------|-----------|
|
|
93
|
+
| Chat thread with message bubbles | conversations |
|
|
94
|
+
| Contact list / CRM table | contacts |
|
|
95
|
+
| Kanban board with deal cards | opportunities |
|
|
96
|
+
| Calendar grid / booking widget | calendar |
|
|
97
|
+
| Email drag-and-drop builder | email-builder |
|
|
98
|
+
| Funnel / website page builder | funnels |
|
|
99
|
+
| Workflow diagram with nodes | automation or workflows |
|
|
100
|
+
| Star ratings / review management | reputation |
|
|
101
|
+
| Social media post scheduler | social-planner |
|
|
102
|
+
| Course / membership editor | memberships |
|
|
103
|
+
| Invoice / proposal document | invoices or proposals |
|
|
104
|
+
| Badge / certificate designer | certificates |
|
|
105
|
+
| Voice AI agent config / call logs | voice-ai or ai-employee-v2 |
|
|
106
|
+
|
|
107
|
+
### Signal D — Component Library
|
|
108
|
+
|
|
109
|
+
If you see Storybook, a docs site, or isolated components outside a full app, the project is **ghl-ui**.
|
|
110
|
+
|
|
111
|
+
### Present Your Finding
|
|
112
|
+
|
|
113
|
+
Tell the user what you identified:
|
|
114
|
+
|
|
115
|
+
> I identified this as the **{micro-app}** page, which lives in `ghl-crm-frontend/apps/{app-folder}/`.
|
|
116
|
+
> Confidence: **{High/Medium/Low}** — {reason, e.g., "I can see the URL ends with /contacts"}.
|
|
117
|
+
> Does this look right?
|
|
118
|
+
|
|
119
|
+
Wait for confirmation. If the user corrects you, update and continue.
|
|
120
|
+
|
|
121
|
+
If confidence is **Low**, do this before Step 3:
|
|
122
|
+
|
|
123
|
+
> I'm not fully confident from the screenshot alone. I can proceed in one of two ways:
|
|
124
|
+
> 1) You confirm the page/app, then I clone only the minimum required repos.
|
|
125
|
+
> 2) I clone a common superset (`spm-ts`, `ghl-crm-frontend`, `ai-frontend`) to reduce mis-detection risk.
|
|
126
|
+
>
|
|
127
|
+
> Which option do you want?
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Step 3: Determine Repos Needed
|
|
132
|
+
|
|
133
|
+
| Scenario | Repos to Clone |
|
|
134
|
+
|----------|---------------|
|
|
135
|
+
| Micro-app page (most common) | **spm-ts** + **ghl-crm-frontend** + **ai-frontend** |
|
|
136
|
+
| Shell only (sidebar, nav, settings) | **spm-ts** only |
|
|
137
|
+
| UI components (Storybook) | **ghl-ui** only |
|
|
138
|
+
| Backend APIs | **ai-backend** only |
|
|
139
|
+
|
|
140
|
+
Tell the user briefly what you're about to set up and why (e.g., "You need both repos — spm-ts is the shell that hosts the page, ghl-crm-frontend has the actual page code.").
|
|
141
|
+
|
|
142
|
+
Then proceed to Step 4 immediately — no need to wait.
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Step 4: Install Prerequisites
|
|
147
|
+
|
|
148
|
+
**Check each tool and install if missing. Don't ask — just do it.**
|
|
149
|
+
|
|
150
|
+
Run these checks in sequence:
|
|
151
|
+
|
|
152
|
+
> OS note: Commands below are macOS-first. For Windows/Linux, use equivalent package managers and commands (e.g., `winget`/Chocolatey on Windows, `apt`/`dnf` on Linux), but keep the same step order and outcomes.
|
|
153
|
+
|
|
154
|
+
### 4a. Homebrew
|
|
155
|
+
```bash
|
|
156
|
+
which brew
|
|
157
|
+
```
|
|
158
|
+
If missing, install it:
|
|
159
|
+
```bash
|
|
160
|
+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### 4b. Volta (Node version manager)
|
|
164
|
+
```bash
|
|
165
|
+
volta --version
|
|
166
|
+
```
|
|
167
|
+
If missing:
|
|
168
|
+
```bash
|
|
169
|
+
curl https://get.volta.sh | bash
|
|
170
|
+
```
|
|
171
|
+
Then reload the shell: `source ~/.zshrc` or `source ~/.bashrc`
|
|
172
|
+
|
|
173
|
+
### 4c. Node.js
|
|
174
|
+
```bash
|
|
175
|
+
node --version
|
|
176
|
+
```
|
|
177
|
+
Volta auto-manages Node versions per project. If no Node at all: `volta install node@20`
|
|
178
|
+
|
|
179
|
+
### 4d. Yarn
|
|
180
|
+
```bash
|
|
181
|
+
yarn --version
|
|
182
|
+
```
|
|
183
|
+
If missing: `volta install yarn`
|
|
184
|
+
|
|
185
|
+
### 4e. Google Cloud CLI
|
|
186
|
+
```bash
|
|
187
|
+
gcloud --version
|
|
188
|
+
```
|
|
189
|
+
If missing:
|
|
190
|
+
```bash
|
|
191
|
+
brew install --cask google-cloud-sdk
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### 4f. Google Cloud Authentication
|
|
195
|
+
```bash
|
|
196
|
+
gcloud auth list
|
|
197
|
+
```
|
|
198
|
+
If no active account, **ask the user**:
|
|
199
|
+
|
|
200
|
+
> I need you to authenticate with Google Cloud. Please run this in your terminal and complete the browser login:
|
|
201
|
+
> ```
|
|
202
|
+
> gcloud auth login
|
|
203
|
+
> gcloud config set project highlevel-staging
|
|
204
|
+
> ```
|
|
205
|
+
> Let me know when you're done.
|
|
206
|
+
|
|
207
|
+
This is a browser-based OAuth flow you cannot do for them. Wait for confirmation.
|
|
208
|
+
|
|
209
|
+
### 4g. macOS Native Image Libraries (spm-ts only)
|
|
210
|
+
```bash
|
|
211
|
+
brew install libpng pkg-config libimagequant autoconf automake libtool gifsicle optipng jpeg-turbo
|
|
212
|
+
```
|
|
213
|
+
Already-installed packages are skipped automatically.
|
|
214
|
+
|
|
215
|
+
### 4h. GitHub CLI (primary auth for cloning)
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
gh --version
|
|
219
|
+
```
|
|
220
|
+
If missing, install: `brew install gh`
|
|
221
|
+
|
|
222
|
+
**Check auth:**
|
|
223
|
+
```bash
|
|
224
|
+
gh auth status
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
If not logged in, **ask the user**:
|
|
228
|
+
|
|
229
|
+
> I need you to authenticate with GitHub. Please run this in your terminal and complete the browser login:
|
|
230
|
+
> ```
|
|
231
|
+
> gh auth login
|
|
232
|
+
> ```
|
|
233
|
+
> (Choose: GitHub.com → HTTPS → Yes to authenticate Git → Login with a web browser.)
|
|
234
|
+
> Let me know when you're done.
|
|
235
|
+
|
|
236
|
+
This is a browser-based OAuth flow you cannot do for them. Once authenticated, use `gh repo clone` for all clones — no SSH keys or Personal Access Tokens needed.
|
|
237
|
+
|
|
238
|
+
**Fallback** (only if `gh` can't be used): Check SSH with `ssh -T git@github.com`, or use HTTPS with `git clone` (user needs PAT for private repos).
|
|
239
|
+
|
|
240
|
+
Report a summary when done:
|
|
241
|
+
|
|
242
|
+
> Prerequisites ready. Volta, Node 20, Yarn, gcloud CLI, and macOS libs are all installed. Moving on to cloning repos.
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## Step 5: Clone, Configure, and Install
|
|
247
|
+
|
|
248
|
+
### 5a. Choose a workspace directory
|
|
249
|
+
|
|
250
|
+
Ask the user where they want the repos:
|
|
251
|
+
|
|
252
|
+
> Where should I clone the repos? Default is `~/Desktop/Workspace`. Press enter to accept or tell me a different path.
|
|
253
|
+
|
|
254
|
+
Use their answer or the default.
|
|
255
|
+
|
|
256
|
+
### 5b. Clone repos
|
|
257
|
+
|
|
258
|
+
For each needed repo, **skip if it already exists** in `{workspace_dir}` (e.g. `ls {workspace_dir}/spm-ts`). If the directory exists and is a git repo, move on — don't re-clone.
|
|
259
|
+
|
|
260
|
+
**Clone flow (run per repo in the list from Step 3):**
|
|
261
|
+
|
|
262
|
+
1. Build a repo list first (examples):
|
|
263
|
+
- Micro-app: `spm-ts`, `ghl-crm-frontend`, `ai-frontend`
|
|
264
|
+
- Shell-only: `spm-ts`
|
|
265
|
+
- UI components: `ghl-ui`
|
|
266
|
+
- Backend APIs: `ai-backend`
|
|
267
|
+
2. For each `{repo}`:
|
|
268
|
+
- **Skip if exists**:
|
|
269
|
+
```bash
|
|
270
|
+
[ -d "{workspace_dir}/{repo}/.git" ] && echo "skip {repo}" && continue
|
|
271
|
+
```
|
|
272
|
+
- **Prefer gh**:
|
|
273
|
+
```bash
|
|
274
|
+
cd {workspace_dir}
|
|
275
|
+
gh repo clone GoHighLevel/{repo}
|
|
276
|
+
```
|
|
277
|
+
- **If gh fails**:
|
|
278
|
+
- Fallback A (SSH): `git clone git@github.com:GoHighLevel/{repo}.git`
|
|
279
|
+
- Fallback B (HTTPS): `git clone https://github.com/GoHighLevel/{repo}.git` (user needs PAT for private repos)
|
|
280
|
+
3. If clone still fails: user likely lacks GoHighLevel org/repo access. Ask them to verify access at github.com/orgs/GoHighLevel.
|
|
281
|
+
|
|
282
|
+
**Post-clone sanity check (run once):**
|
|
283
|
+
|
|
284
|
+
```bash
|
|
285
|
+
gh auth status
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
For each cloned repo:
|
|
289
|
+
|
|
290
|
+
```bash
|
|
291
|
+
cd {workspace_dir}/{repo}
|
|
292
|
+
git remote -v
|
|
293
|
+
[ -d .git ] && echo "{repo} clone OK"
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
### 5c. Authenticate with GCP Artifact Registry
|
|
297
|
+
|
|
298
|
+
```bash
|
|
299
|
+
cd {workspace_dir}/spm-ts
|
|
300
|
+
yarn ar-login
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
If `yarn ar-login` is not recognized, run:
|
|
304
|
+
```bash
|
|
305
|
+
npx google-artifactregistry-auth
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
### 5d. Install dependencies
|
|
309
|
+
|
|
310
|
+
**spm-ts:**
|
|
311
|
+
```bash
|
|
312
|
+
cd {workspace_dir}/spm-ts
|
|
313
|
+
yarn install
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
**ghl-crm-frontend:**
|
|
317
|
+
```bash
|
|
318
|
+
cd {workspace_dir}/ghl-crm-frontend
|
|
319
|
+
yarn install
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
If `yarn install` fails:
|
|
323
|
+
- **401 Unauthorized** → re-run `yarn ar-login` then retry
|
|
324
|
+
- **node-gyp / native module error** → verify Step 4g brew packages installed, retry
|
|
325
|
+
- **ENOMEM or timeout** → `yarn cache clean` then retry
|
|
326
|
+
|
|
327
|
+
### 5e. ai-backend (only if needed)
|
|
328
|
+
|
|
329
|
+
```bash
|
|
330
|
+
cd {workspace_dir}/ai-backend
|
|
331
|
+
cp .npmrc.template .npmrc
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
The `.npmrc` needs a BullMQ Pro token. Check if it's already present. If there is a placeholder like `PLATFORM_RATELIMIT_BULLMQ_PRO_NPM_PACKAGE_TOKEN`, ask the user to provide the token securely (never hardcode or guess token values).
|
|
335
|
+
|
|
336
|
+
```bash
|
|
337
|
+
yarn ar-login
|
|
338
|
+
yarn install
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
### 5f. ghl-ui (only if needed)
|
|
342
|
+
|
|
343
|
+
```bash
|
|
344
|
+
cd {workspace_dir}/ghl-ui
|
|
345
|
+
yarn sync
|
|
346
|
+
yarn build
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
## Step 6: Wire Module Federation (Micro-App Scenario Only)
|
|
352
|
+
|
|
353
|
+
**This is the critical step most people miss.** By default, spm-ts loads micro-apps from the staging CDN — not localhost. You must connect the shell to your local micro-app dev server.
|
|
354
|
+
|
|
355
|
+
### 6a. Find the micro-app's dev port
|
|
356
|
+
|
|
357
|
+
Read app config files to find the dev port (webpack, rsbuild, or vite):
|
|
358
|
+
|
|
359
|
+
```bash
|
|
360
|
+
rg -n "devServer|port|getPublicPath|server\\s*:\\s*\\{|moduleFederation|remoteEntry" "{workspace_dir}/ghl-crm-frontend/apps/{app-name}" --glob "webpack.config.js" --glob "webpack.config.ts" --glob "rsbuild.config.ts" --glob "vite.config.ts"
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
Look for one of:
|
|
364
|
+
- `devServer.port` (webpack)
|
|
365
|
+
- `server.port` (vite/rsbuild)
|
|
366
|
+
- `getPublicPath()` / `remoteEntry` URL port
|
|
367
|
+
|
|
368
|
+
Common ports:
|
|
369
|
+
- contacts-highrise: 3010
|
|
370
|
+
- labs / voiceAiApp: 3002
|
|
371
|
+
- Other apps: check whichever config file exists (`webpack.config.*`, `rsbuild.config.ts`, `vite.config.ts`)
|
|
372
|
+
|
|
373
|
+
### 6b. Find and uncomment the localhost override in spm-ts
|
|
374
|
+
|
|
375
|
+
The overrides live in one of two files:
|
|
376
|
+
|
|
377
|
+
**Check `async-remoteApps.ts` first:**
|
|
378
|
+
```bash
|
|
379
|
+
rg -n "{app-config-key}" "{workspace_dir}/spm-ts/src/config/async-remoteApps.ts"
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
**Then check `runtimeRemoteApps.ts`:**
|
|
383
|
+
```bash
|
|
384
|
+
rg -n "{app-config-key}" "{workspace_dir}/spm-ts/src/config/runtimeRemoteApps.ts"
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
Look for a commented-out line like:
|
|
388
|
+
```typescript
|
|
389
|
+
// config.contactsApp = 'http://localhost:3010/remoteEntry.js'
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
### 6c. Uncomment the localhost line
|
|
393
|
+
|
|
394
|
+
Edit the file to uncomment the matching localhost override. Make sure the port matches what you found in 6a.
|
|
395
|
+
|
|
396
|
+
For example, change:
|
|
397
|
+
```typescript
|
|
398
|
+
// config.contactsApp = 'http://localhost:3010/remoteEntry.js'
|
|
399
|
+
```
|
|
400
|
+
to:
|
|
401
|
+
```typescript
|
|
402
|
+
config.contactsApp = 'http://localhost:3010/remoteEntry.js'
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
If no commented override exists for this app, add one inside the `if (process.env.NODE_ENV === 'development')` block:
|
|
406
|
+
```typescript
|
|
407
|
+
config.{appConfigKey} = 'http://localhost:{port}/remoteEntry.js'
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
To find the correct `appConfigKey`, check how other apps are named in the same file.
|
|
411
|
+
|
|
412
|
+
Tell the user:
|
|
413
|
+
|
|
414
|
+
> I've connected spm-ts to load {app-name} from your local dev server at localhost:{port} instead of the staging CDN. Your local changes will now show up in the shell.
|
|
415
|
+
|
|
416
|
+
### 6d. Complex MFA Overrides (Performance AI / Voice AI only)
|
|
417
|
+
If the identified page is **Performance AI**, **Voice AI**, or **Evals**, you must find and uncomment **two** localhost overrides in `spm-ts` config files:
|
|
418
|
+
1. The legacy MFA: port `3002` (usually `config.voiceAiApp`)
|
|
419
|
+
2. The new MFA: port `3014` (usually `config.performanceAiApp` or similar)
|
|
420
|
+
|
|
421
|
+
Both must point to localhost for the full page to render correctly.
|
|
422
|
+
|
|
423
|
+
---
|
|
424
|
+
|
|
425
|
+
## Step 7: Start Dev Servers
|
|
426
|
+
|
|
427
|
+
### Complex MFA Scenario (Performance AI / Voice AI)
|
|
428
|
+
If the identified page is Performance AI, Voice AI, or Evals, you must start a multi-frontend stack.
|
|
429
|
+
|
|
430
|
+
**First, ask the user about the backend:**
|
|
431
|
+
> "I am setting up the multi-frontend stack for Performance AI. Do you also need the local `ai-backend` running on port 5120, or should I let the UI connect to the staging backend?"
|
|
432
|
+
|
|
433
|
+
**Then, kill stale ports safely:**
|
|
434
|
+
`for p in 8080 3002 3014 5120; do lsof -ti tcp:$p | xargs kill -9 2>/dev/null; done`
|
|
435
|
+
|
|
436
|
+
**Finally, start these terminals simultaneously:**
|
|
437
|
+
|
|
438
|
+
**Terminal 1 — spm-ts (Shell):**
|
|
439
|
+
```bash
|
|
440
|
+
cd {workspace_dir}/spm-ts
|
|
441
|
+
yarn dev
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
**Terminal 2 — ai-frontend (New MFA):**
|
|
445
|
+
```bash
|
|
446
|
+
cd {workspace_dir}/ai-frontend/apps/performance-ai
|
|
447
|
+
npm run dev
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
**Terminal 3 — ghl-crm-frontend (Legacy MFA):**
|
|
451
|
+
```bash
|
|
452
|
+
cd {workspace_dir}/ghl-crm-frontend/apps/voice-ai
|
|
453
|
+
npm run dev
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
**Terminal 4 — ai-backend *(ONLY if user requested local backend)*:**
|
|
457
|
+
```bash
|
|
458
|
+
cd {workspace_dir}/ai-backend
|
|
459
|
+
npm run start:dev -- performance-ai
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
*(Note: If the user explicitly asks to test the "MFA" or "AI One" branch, append `git checkout ai-one-ms-mfa &&` before the start commands).*
|
|
463
|
+
|
|
464
|
+
### Micro-app scenario (most common)
|
|
465
|
+
|
|
466
|
+
You need **two terminals running simultaneously**.
|
|
467
|
+
|
|
468
|
+
**Terminal 1 — Start the micro-app first:**
|
|
469
|
+
```bash
|
|
470
|
+
cd {workspace_dir}/ghl-crm-frontend/apps/{app-name}
|
|
471
|
+
yarn dev
|
|
472
|
+
```
|
|
473
|
+
Wait for it to compile. You should see "Compiled successfully" or "webpack compiled" and it will show the local URL (e.g., `http://localhost:3010`).
|
|
474
|
+
|
|
475
|
+
**Terminal 2 — Start the shell:**
|
|
476
|
+
```bash
|
|
477
|
+
cd {workspace_dir}/spm-ts
|
|
478
|
+
yarn dev
|
|
479
|
+
```
|
|
480
|
+
Wait for "ready in" or "Compiled successfully". The shell runs on `http://localhost:8080`.
|
|
481
|
+
|
|
482
|
+
### Shell-only scenario
|
|
483
|
+
```bash
|
|
484
|
+
cd {workspace_dir}/spm-ts
|
|
485
|
+
yarn dev
|
|
486
|
+
```
|
|
487
|
+
Open `http://localhost:8080`.
|
|
488
|
+
|
|
489
|
+
### ghl-ui scenario
|
|
490
|
+
```bash
|
|
491
|
+
cd {workspace_dir}/ghl-ui/packages/highrise
|
|
492
|
+
yarn storybook
|
|
493
|
+
```
|
|
494
|
+
Open `http://localhost:6006`.
|
|
495
|
+
|
|
496
|
+
### ai-backend scenario
|
|
497
|
+
```bash
|
|
498
|
+
cd {workspace_dir}/ai-backend
|
|
499
|
+
yarn start:dev {service-name}
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
---
|
|
503
|
+
|
|
504
|
+
## Step 8: Verify
|
|
505
|
+
|
|
506
|
+
Once both servers are running:
|
|
507
|
+
|
|
508
|
+
1. Open `http://localhost:8080` in the browser
|
|
509
|
+
2. Navigate to the same page from the screenshot (use the URL path identified in Step 2)
|
|
510
|
+
3. Confirm the page loads and matches the screenshot layout
|
|
511
|
+
4. Make a small test change in the micro-app code (e.g., change a heading text) and verify it hot-reloads in the browser
|
|
512
|
+
|
|
513
|
+
Tell the user:
|
|
514
|
+
|
|
515
|
+
> Your local setup is complete. Here's what's running:
|
|
516
|
+
>
|
|
517
|
+
> - **Shell**: `http://localhost:8080` (spm-ts)
|
|
518
|
+
> - **{App name}**: `http://localhost:{port}` (ghl-crm-frontend/apps/{app-name})
|
|
519
|
+
> - **Your page**: `http://localhost:8080/v2/location/{id}/{route}`
|
|
520
|
+
>
|
|
521
|
+
> Make changes in `ghl-crm-frontend/apps/{app-name}/src/` and they'll hot-reload in the browser.
|
|
522
|
+
|
|
523
|
+
---
|
|
524
|
+
|
|
525
|
+
## Troubleshooting
|
|
526
|
+
|
|
527
|
+
| Problem | Fix |
|
|
528
|
+
|---------|-----|
|
|
529
|
+
| `yarn install` → 401 Unauthorized | `gcloud auth login` → `yarn ar-login` → retry |
|
|
530
|
+
| `yarn install` → node-gyp build error | `brew install libpng pkg-config libimagequant autoconf automake libtool gifsicle optipng jpeg-turbo` → retry |
|
|
531
|
+
| Port 8080 already in use | `lsof -i :8080` → kill the process, or `yarn dev --port 8081` |
|
|
532
|
+
| Blank page at localhost:8080 | Check both terminals are running. Check browser console for errors. Hard refresh with Cmd+Shift+R. |
|
|
533
|
+
| Micro-app changes not showing | Verify Step 6 — the localhost override must be uncommented in spm-ts config. Restart spm-ts after editing config. |
|
|
534
|
+
| `gh repo clone` or `git clone` fails | Prefer `gh auth login` then retry `gh repo clone`. Fallback: SSH (`git clone git@...`) or HTTPS with PAT. Verify org access at github.com/orgs/GoHighLevel. |
|
|
535
|
+
| Repo already exists / "already exists and is not an empty directory" | Skip clone. Use existing `{workspace_dir}/{repo}`. Run `yarn install` if `node_modules` is missing. |
|
|
536
|
+
| Volta not picking up Node version | `volta install node@20` → retry |
|
|
537
|
+
| `cross-env: command not found` | Delete `node_modules` → `yarn install` again |
|
|
538
|
+
| `optipng-bin` / `gifsicle` build failure | Reinstall native libs: `brew reinstall libpng gifsicle optipng` → retry |
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tdd
|
|
3
|
+
description: Companion guidance for behavior-first tests, tracer-bullet implementation, and red-green-refactor loops. Use with `tdd-workflow` when a behavior-changing build slice needs deeper testing judgement.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Test-Driven Development
|
|
7
|
+
|
|
8
|
+
This is a companion to the canonical AW `tdd-workflow` skill. `tdd-workflow` owns the required RED -> GREEN -> REFACTOR contract; this skill adds judgement about behavior-focused tests, tracer-bullet sequencing, mocking, and refactor opportunities.
|
|
9
|
+
|
|
10
|
+
## When To Use
|
|
11
|
+
|
|
12
|
+
Use this with `tdd-workflow` for behavior-changing build slices, bug fixes with a known repro, or refactors that need fail-first proof through a public interface.
|
|
13
|
+
|
|
14
|
+
## Philosophy
|
|
15
|
+
|
|
16
|
+
**Core principle**: Tests should verify behavior through public interfaces, not implementation details. Code can change entirely; tests shouldn't.
|
|
17
|
+
|
|
18
|
+
**Good tests** are integration-style: they exercise real code paths through public APIs. They describe _what_ the system does, not _how_ it does it. A good test reads like a specification - "user can checkout with valid cart" tells you exactly what capability exists. These tests survive refactors because they don't care about internal structure.
|
|
19
|
+
|
|
20
|
+
**Bad tests** are coupled to implementation. They mock internal collaborators, test private methods, or verify through external means (like querying a database directly instead of using the interface). The warning sign: your test breaks when you refactor, but behavior hasn't changed. If you rename an internal function and tests fail, those tests were testing implementation, not behavior.
|
|
21
|
+
|
|
22
|
+
See [tests.md](tests.md) for examples and [mocking.md](mocking.md) for mocking guidelines.
|
|
23
|
+
|
|
24
|
+
## Anti-Pattern: Horizontal Slices
|
|
25
|
+
|
|
26
|
+
**DO NOT write all tests first, then all implementation.** This is "horizontal slicing" - treating RED as "write all tests" and GREEN as "write all code."
|
|
27
|
+
|
|
28
|
+
This produces **crap tests**:
|
|
29
|
+
|
|
30
|
+
- Tests written in bulk test _imagined_ behavior, not _actual_ behavior
|
|
31
|
+
- You end up testing the _shape_ of things (data structures, function signatures) rather than user-facing behavior
|
|
32
|
+
- Tests become insensitive to real changes - they pass when behavior breaks, fail when behavior is fine
|
|
33
|
+
- You outrun your headlights, committing to test structure before understanding the implementation
|
|
34
|
+
|
|
35
|
+
**Correct approach**: Vertical slices via tracer bullets. One test → one implementation → repeat. Each test responds to what you learned from the previous cycle. Because you just wrote the code, you know exactly what behavior matters and how to verify it.
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
WRONG (horizontal):
|
|
39
|
+
RED: test1, test2, test3, test4, test5
|
|
40
|
+
GREEN: impl1, impl2, impl3, impl4, impl5
|
|
41
|
+
|
|
42
|
+
RIGHT (vertical):
|
|
43
|
+
RED→GREEN: test1→impl1
|
|
44
|
+
RED→GREEN: test2→impl2
|
|
45
|
+
RED→GREEN: test3→impl3
|
|
46
|
+
...
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Workflow
|
|
50
|
+
|
|
51
|
+
### 1. Planning
|
|
52
|
+
|
|
53
|
+
When exploring the codebase, use the project's domain glossary so that test names and interface vocabulary match the project's language, and respect ADRs in the area you're touching.
|
|
54
|
+
|
|
55
|
+
Before writing any code, make sure the approved AW artifact or the current user request makes these clear:
|
|
56
|
+
|
|
57
|
+
- [ ] What interface changes are needed
|
|
58
|
+
- [ ] Which behaviors need test-first proof
|
|
59
|
+
- [ ] Identify opportunities for [deep modules](deep-modules.md) (small interface, deep implementation)
|
|
60
|
+
- [ ] Design interfaces for [testability](interface-design.md)
|
|
61
|
+
- [ ] List the behaviors to test (not implementation steps)
|
|
62
|
+
- [ ] Whether the current approval already covers the slice
|
|
63
|
+
|
|
64
|
+
Ask a follow-up only when the approved plan or current request does not answer these questions. Do not block an already-approved `/aw:build` slice merely to re-ask for approval.
|
|
65
|
+
|
|
66
|
+
**You can't test everything.** Confirm with the user exactly which behaviors matter most. Focus testing effort on critical paths and complex logic, not every possible edge case.
|
|
67
|
+
|
|
68
|
+
### 2. Tracer Bullet
|
|
69
|
+
|
|
70
|
+
Write ONE test that confirms ONE thing about the system:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
RED: Write test for first behavior → test fails
|
|
74
|
+
GREEN: Write minimal code to pass → test passes
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
This is your tracer bullet - proves the path works end-to-end.
|
|
78
|
+
|
|
79
|
+
### 3. Incremental Loop
|
|
80
|
+
|
|
81
|
+
For each remaining behavior:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
RED: Write next test → fails
|
|
85
|
+
GREEN: Minimal code to pass → passes
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Rules:
|
|
89
|
+
|
|
90
|
+
- One test at a time
|
|
91
|
+
- Only enough code to pass current test
|
|
92
|
+
- Don't anticipate future tests
|
|
93
|
+
- Keep tests focused on observable behavior
|
|
94
|
+
|
|
95
|
+
### 4. Refactor
|
|
96
|
+
|
|
97
|
+
After all tests pass, look for [refactor candidates](refactoring.md):
|
|
98
|
+
|
|
99
|
+
- [ ] Extract duplication
|
|
100
|
+
- [ ] Deepen modules (move complexity behind simple interfaces)
|
|
101
|
+
- [ ] Apply SOLID principles where natural
|
|
102
|
+
- [ ] Consider what new code reveals about existing code
|
|
103
|
+
- [ ] Run tests after each refactor step
|
|
104
|
+
|
|
105
|
+
**Never refactor while RED.** Get to GREEN first.
|
|
106
|
+
|
|
107
|
+
## Checklist Per Cycle
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
[ ] Test describes behavior, not implementation
|
|
111
|
+
[ ] Test uses public interface only
|
|
112
|
+
[ ] Test would survive internal refactor
|
|
113
|
+
[ ] Code is minimal for this test
|
|
114
|
+
[ ] No speculative features added
|
|
115
|
+
```
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Deep Modules
|
|
2
|
+
|
|
3
|
+
From "A Philosophy of Software Design":
|
|
4
|
+
|
|
5
|
+
**Deep module** = small interface + lots of implementation
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
┌─────────────────────┐
|
|
9
|
+
│ Small Interface │ ← Few methods, simple params
|
|
10
|
+
├─────────────────────┤
|
|
11
|
+
│ │
|
|
12
|
+
│ │
|
|
13
|
+
│ Deep Implementation│ ← Complex logic hidden
|
|
14
|
+
│ │
|
|
15
|
+
│ │
|
|
16
|
+
└─────────────────────┘
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**Shallow module** = large interface + little implementation (avoid)
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
┌─────────────────────────────────┐
|
|
23
|
+
│ Large Interface │ ← Many methods, complex params
|
|
24
|
+
├─────────────────────────────────┤
|
|
25
|
+
│ Thin Implementation │ ← Just passes through
|
|
26
|
+
└─────────────────────────────────┘
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
When designing interfaces, ask:
|
|
30
|
+
|
|
31
|
+
- Can I reduce the number of methods?
|
|
32
|
+
- Can I simplify the parameters?
|
|
33
|
+
- Can I hide more complexity inside?
|