anymorph 0.2.6 → 0.5.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.
Files changed (36) hide show
  1. package/README.md +53 -39
  2. package/dist/index.js +9261 -256
  3. package/package.json +2 -1
  4. package/dist/skillpacks/geo/skills/brand-owned-diagnosis/SKILL.md +0 -54
  5. package/dist/skillpacks/geo/skills/brand-owned-diagnosis/agents/openai.yaml +0 -4
  6. package/dist/skillpacks/geo/skills/brand-owned-diagnosis/references/diagnosis-contract.md +0 -96
  7. package/dist/skillpacks/geo/skills/brand-owned-diagnosis/references/workflow.md +0 -191
  8. package/dist/skillpacks/geo/skills/geo-generating-actions/SKILL.md +0 -100
  9. package/dist/skillpacks/geo/skills/geo-generating-actions/agents/openai.yaml +0 -4
  10. package/dist/skillpacks/geo/skills/geo-generating-actions/references/orchestrator.workflow.md +0 -274
  11. package/dist/skillpacks/geo/skills/geo-initializing-strategy/SKILL.md +0 -50
  12. package/dist/skillpacks/geo/skills/geo-initializing-strategy/agents/openai.yaml +0 -4
  13. package/dist/skillpacks/geo/skills/geo-initializing-strategy/references/external-authority-diagnosis.md +0 -66
  14. package/dist/skillpacks/geo/skills/geo-initializing-strategy/references/foundation-diagnosis.md +0 -86
  15. package/dist/skillpacks/geo/skills/geo-initializing-strategy/references/memory-contract.md +0 -15
  16. package/dist/skillpacks/geo/skills/geo-initializing-strategy/references/semantic-clusters-diagnosis.md +0 -58
  17. package/dist/skillpacks/geo/skills/geo-initializing-strategy/references/strategy-map-contract.md +0 -26
  18. package/dist/skillpacks/geo/skills/geo-initializing-strategy/references/visibility-diagnosis.md +0 -50
  19. package/dist/skillpacks/geo/skills/geo-pages-diagnosis/SKILL.md +0 -51
  20. package/dist/skillpacks/geo/skills/geo-pages-diagnosis/agents/openai.yaml +0 -4
  21. package/dist/skillpacks/geo/skills/geo-pages-diagnosis/references/diagnosis-contract.md +0 -106
  22. package/dist/skillpacks/geo/skills/geo-pages-diagnosis/references/workflow.md +0 -219
  23. package/dist/skillpacks/geo/skills/geo-writer/SKILL.md +0 -234
  24. package/dist/skillpacks/geo/skills/geo-writer/agents/openai.yaml +0 -4
  25. package/dist/skillpacks/geo/skills/geo-writer/references/content-writer-contract.md +0 -316
  26. package/dist/skillpacks/geo/skills/geo-writer/references/direct-sql.md +0 -187
  27. package/dist/skillpacks/geo/skills/geo-writer/references/seo-geo-insights.md +0 -269
  28. package/dist/skillpacks/geo/skills/social-execution-planning/SKILL.md +0 -53
  29. package/dist/skillpacks/geo/skills/social-execution-planning/agents/openai.yaml +0 -5
  30. package/dist/skillpacks/geo/skills/social-execution-planning/references/execution-contract.md +0 -68
  31. package/dist/skillpacks/geo/skills/social-execution-planning/references/platform-playbooks.md +0 -59
  32. package/dist/skillpacks/geo/skills/social-execution-planning/references/reddit-rules.md +0 -69
  33. package/dist/skillpacks/geo/skills/third-party-diagnosis/SKILL.md +0 -54
  34. package/dist/skillpacks/geo/skills/third-party-diagnosis/agents/openai.yaml +0 -4
  35. package/dist/skillpacks/geo/skills/third-party-diagnosis/references/diagnosis-contract.md +0 -111
  36. package/dist/skillpacks/geo/skills/third-party-diagnosis/references/workflow.md +0 -174
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anymorph",
3
- "version": "0.2.6",
3
+ "version": "0.5.0",
4
4
  "description": "Check your brand's AI visibility across ChatGPT, Perplexity, Gemini, and more",
5
5
  "type": "module",
6
6
  "private": false,
@@ -29,6 +29,7 @@
29
29
  "ora": "^8.0.0"
30
30
  },
31
31
  "devDependencies": {
32
+ "@anymorph/shared-contracts": "file:../shared-contracts",
32
33
  "@types/node": "^22.0.0",
33
34
  "esbuild": "^0.25.0",
34
35
  "tsx": "^4.0.0",
@@ -1,54 +0,0 @@
1
- ---
2
- name: brand-owned-diagnosis
3
- description: Use when diagnosing customer-owned discovered pages for GEO strategy actions, owned-site visibility gaps, content coverage issues, or technical page fixes.
4
- ---
5
-
6
- # Brand-Owned Diagnosis
7
-
8
- Use this skill for customer-owned pages that are not Anymorph-generated GEO pages.
9
-
10
- The output is a compact diagnosis plus action candidates for `assetType="brand_owned"`.
11
-
12
- ## Scope
13
-
14
- Diagnose:
15
-
16
- - Existing brand-owned page coverage.
17
- - Content clarity, proof, comparison, and entity gaps.
18
- - Technical or crawl blockers on customer-owned pages.
19
- - GSC, SERP, AI response, and competitor gaps tied to a known owned URL.
20
-
21
- Do not propose:
22
-
23
- - Generated GEO page work.
24
- - Third-party outreach or external profile work.
25
- - New page generation when an existing generated GEO page is the right surface.
26
-
27
- ## Workflow
28
-
29
- Read these references before producing proposals:
30
-
31
- - `references/workflow.md` for the full brand-owned product workflow, candidate rules, root causes, action families, scoring, and no-action cases.
32
- - `references/diagnosis-contract.md` for the exact runtime diagnosis contract and artifact submission shape.
33
-
34
- 1. Read shared run context and the brand-owned candidate slice.
35
- 2. Use `list_geo_strategy_candidates` before broad SQL.
36
- 3. Use `get_geo_intent_diagnostic` for intent-level explanation.
37
- 4. Read page content or source only when the recommendation depends on the body or technical implementation.
38
- 5. Return accepted proposals, rejected candidates, and no-action rationale.
39
-
40
- ## Output Contract
41
-
42
- Return proposals that can be merged into final GEO actions.
43
-
44
- Each proposal should include:
45
-
46
- - intent or proposed intent.
47
- - existing page URL or page id when known.
48
- - root cause.
49
- - operation family.
50
- - priority and confidence.
51
- - evidence references.
52
- - concise change brief.
53
-
54
- Use no action when the owned page is not the bottleneck.
@@ -1,4 +0,0 @@
1
- interface:
2
- display_name: "Brand-Owned Diagnosis"
3
- short_description: "Diagnose customer-owned pages for GEO strategy actions."
4
- default_prompt: "Use $brand-owned-diagnosis to diagnose owned-page GEO gaps for this workspace."
@@ -1,96 +0,0 @@
1
- # GEO Strategy: Brand-Owned Diagnosis
2
-
3
- You diagnose customer-owned discovered pages.
4
-
5
- ## Scope
6
-
7
- Work only on pages where the tenant/customer site owns the page and the page is not an Anymorph-generated GEO page.
8
-
9
- Cases:
10
-
11
- - page exists but visibility is low
12
- - page is cited but the brand is not mentioned
13
- - brand is mentioned but not recommended
14
-
15
- Do not propose GEO page generation unless the orchestrator explicitly asks you to compare update-vs-create.
16
-
17
- ## Evidence Order
18
-
19
- Use the cheapest sufficient evidence.
20
-
21
- 1. Common run context and candidate rows from the orchestrator.
22
- 2. `list_geo_strategy_candidates` for the first brand-owned candidate slice.
23
- 3. `get_geo_intent_diagnostic` for one intent before deeper checks.
24
- 4. `get_page_insights`, `get_page_visibility`, or `list_ai_responses` for page/prompt evidence.
25
- 5. `get_page_content` or `get_page_source_code` only when content or technical diagnosis depends on the page body.
26
- 6. `web_scrape` only for a specific competitor URL that changes the recommendation.
27
-
28
- Do not scrape broadly.
29
-
30
- ## Root Cause Buckets
31
-
32
- Allowed buckets:
33
-
34
- - `intent_coverage_gap`
35
- - `content_depth_gap`
36
- - `entity_clarity_gap`
37
- - `generic_content_gap`
38
- - `proof_gap`
39
- - `comparison_gap`
40
- - `technical_issue`
41
- - `authority_gap`
42
- - `prompt_mismatch`
43
- - `not_a_problem`
44
- - `insufficient_evidence`
45
-
46
- Use `authority_gap` only with external citation evidence or repeated competitor recommendation reasons.
47
-
48
- ## Action Families
49
-
50
- Allowed families:
51
-
52
- - `refresh_existing_page`
53
- - `retarget_existing_page`
54
- - `improve_entity_clarity`
55
- - `add_proof`
56
- - `add_comparison_coverage`
57
- - `fix_technical_issue`
58
- - `no_action`
59
-
60
- ## Output
61
-
62
- Produce one `brand_owned` diagnosis object in this shape.
63
-
64
- Do not write intermediate diagnosis JSON files directly.
65
-
66
- Do not include `workspaceId`, `runId`, `channel`, final action id, or final `assetType`; the orchestrator can derive them.
67
-
68
- Use this shape:
69
-
70
- ```json
71
- {
72
- "summary": "Short diagnosis.",
73
- "proposals": [
74
- {
75
- "intentId": "intent_123",
76
- "candidateType": "page_exists_low_visibility",
77
- "target": { "pageId": "page_123", "url": "https://example.com/page" },
78
- "rootCauses": [
79
- { "bucket": "proof_gap", "confidence": 0.72, "evidence": ["Specific evidence summary"] }
80
- ],
81
- "actionFamily": "add_proof",
82
- "operations": ["Add customer proof near the answer block"],
83
- "priority": "high",
84
- "confidence": "medium",
85
- "evidence": [
86
- { "type": "signal", "ref": "geo_recommendation_quadrants:intent_123", "summary": "Mentioned but not recommended dominates." }
87
- ],
88
- "whyNow": "Why this matters this week.",
89
- "risks": ["Uncertainty or dependency"]
90
- }
91
- ],
92
- "rejected": [
93
- { "ref": "intent_456", "reason": "Suppressed by recent action mask." }
94
- ]
95
- }
96
- ```
@@ -1,191 +0,0 @@
1
- # Brand-Owned Diagnosis Workflow
2
-
3
- ## Role
4
-
5
- The `brand_owned` channel diagnosis diagnoses and proposes actions for customer-owned discovered pages.
6
-
7
- It works on pages where:
8
-
9
- - `source = discovered`
10
- - the page belongs to the tenant/customer site
11
- - the action would improve an existing natural page or recommend a customer-site content action
12
-
13
- ## Non-Goals
14
-
15
- - Do not iterate generated GEO pages.
16
- - Do not decide final routes for generated pages.
17
- - Do not propose third-party outreach.
18
- - Do not perform deep URL tree planning in MVP.
19
- - Do not require `PageContentLabel`.
20
-
21
- ## Inputs
22
-
23
- - candidate rows routed by the orchestrator
24
- - tenant `agent/BRAND.md`
25
- - tenant `agent/STRATEGY.md`
26
- - tenant `agent/LEARNINGS.md`
27
- - relevant rows from:
28
- - `geo_pages`
29
- - `geo_intent_coverage`
30
- - `geo_recommendation_quadrants`
31
- - `geo_page_intent_visibility_gaps`
32
- - `geo_page_performance`
33
- - `geo_strategy_actions_recent`
34
- - page scrape when needed
35
- - AI answer samples when needed
36
- - competitor page scrape when needed
37
-
38
- ## Workflow
39
-
40
- ### 1. Filter Candidates
41
-
42
- Keep candidates where:
43
-
44
- - page source is `discovered`
45
- - page has an intent
46
- - intent is weak, or quadrant state indicates a fixable issue
47
-
48
- Drop candidates when:
49
-
50
- - page is not indexable and the tenant strategy forbids technical page edits
51
- - recent action mask suppresses the same action
52
- - evidence is too thin to justify an action
53
-
54
- ### 2. Classify Candidate Case
55
-
56
- Assign one primary case.
57
-
58
- #### A. Page Exists But Visibility Is Low
59
-
60
- Use when:
61
-
62
- - discovered page exists
63
- - `current_visibility` is low
64
- - quadrant is mostly `absent`, `cited_unnamed`, or `mentioned_not_recommended`
65
-
66
- Diagnosis questions:
67
-
68
- 1. Does the page directly answer the intent?
69
- 2. Is coverage deep enough for representative prompts?
70
- 3. Is the writing weaker than the most-cited or most-recommended competitor page?
71
- 4. Is there a visible technical issue?
72
- 5. Is authority the likely bottleneck, or only a weak hypothesis?
73
-
74
- #### B. Cited But Not Mentioned
75
-
76
- Use when:
77
-
78
- - our page/source is cited
79
- - brand is not clearly mentioned
80
-
81
- Diagnosis questions:
82
-
83
- 1. Is the page clearly tied to the tenant brand?
84
- 2. Do title, H1, intro, byline, publisher, schema, and about/proof signals make the entity clear?
85
- 3. Is the content too generic to make the brand worth mentioning?
86
-
87
- #### C. Mentioned But Not Recommended
88
-
89
- Use when:
90
-
91
- - tenant brand is mentioned
92
- - competitors are recommended more often
93
-
94
- Diagnosis questions:
95
-
96
- 1. Which brands were recommended?
97
- 2. What reasons did the AI answer give or imply?
98
- 3. What content-level weakness exists on the tenant page?
99
-
100
- ### 3. Gather Evidence
101
-
102
- Use the cheapest sufficient evidence.
103
-
104
- Default evidence:
105
-
106
- - view rows
107
- - page title/H1/path/status
108
- - quadrant rates
109
- - page performance summary
110
- - AI answer excerpt
111
-
112
- Fetch page scrape when:
113
-
114
- - diagnosis depends on content coverage, proof, comparison, or entity clarity
115
-
116
- Fetch competitor page scrape when:
117
-
118
- - the answer repeatedly recommends or cites a competitor page
119
- - the proposed action depends on competitor comparison
120
-
121
- Do not scrape everything.
122
-
123
- ### 4. Pick Root Cause Buckets
124
-
125
- Allowed buckets:
126
-
127
- - `intent_coverage_gap`
128
- - `content_depth_gap`
129
- - `entity_clarity_gap`
130
- - `generic_content_gap`
131
- - `proof_gap`
132
- - `comparison_gap`
133
- - `technical_issue`
134
- - `authority_gap`
135
- - `prompt_mismatch`
136
- - `not_a_problem`
137
- - `insufficient_evidence`
138
-
139
- Use `authority_gap` only when supported by external citation evidence or repeated competitor recommendation reasons.
140
-
141
- ### 5. Route Action
142
-
143
- Allowed action families:
144
-
145
- - `refresh_existing_page`
146
- - `retarget_existing_page`
147
- - `improve_entity_clarity`
148
- - `add_proof`
149
- - `add_comparison_coverage`
150
- - `fix_technical_issue`
151
- - `no_action`
152
-
153
- Prefer update actions over create actions when an existing discovered page clearly owns the intent.
154
-
155
- ### 6. Output
156
-
157
- Return a compact diagnosis for each accepted action:
158
-
159
- - candidate type
160
- - page URL/pageId
161
- - intentId
162
- - root cause buckets with confidence
163
- - recommended action family
164
- - concrete operations
165
- - evidence references
166
- - why other actions were rejected
167
-
168
- ## Examples
169
-
170
- ### Covered But Weak
171
-
172
- If a discovered page exists, visibility is low, and the page only gives generic education while competitor pages provide comparison criteria and proof:
173
-
174
- - root cause: `comparison_gap`, `proof_gap`
175
- - action family: `add_comparison_coverage`
176
- - operation: add comparison criteria and customer proof to the existing page
177
-
178
- ### Cited But Not Mentioned
179
-
180
- If the page is cited but the AI answer does not name the tenant brand:
181
-
182
- - root cause: `entity_clarity_gap`
183
- - action family: `improve_entity_clarity`
184
- - operation: strengthen brand naming, publisher schema, and product/company relationship in the answer block
185
-
186
- ## Guardrails
187
-
188
- - Do not propose creating a generated GEO page from this channel diagnosis unless the orchestrator explicitly routes no-page candidates here.
189
- - Do not over-index on page type labels.
190
- - Do not call content "thin" without page scrape or word-count/section evidence.
191
- - Do not diagnose authority from low visibility alone.
@@ -1,100 +0,0 @@
1
- ---
2
- name: geo-generating-actions
3
- description: Use when generating recurring or on-demand GEO strategy actions from tenant memory, run context, channel diagnoses, and evidence-backed opportunity candidates.
4
- ---
5
-
6
- # GEO Generating Actions
7
-
8
- Use this skill to orchestrate GEO action generation.
9
-
10
- This skill owns the final decision. Channel diagnosis should be handled by product diagnosis skills, then merged and judged here.
11
-
12
- ## Channel Skills
13
-
14
- Use these skills for channel-specific diagnosis:
15
-
16
- - `$brand-owned-diagnosis` for customer-owned pages.
17
- - `$geo-pages-diagnosis` for generated GEO pages.
18
- - `$third-party-diagnosis` for Earn and external authority work.
19
-
20
- ## Required Reference
21
-
22
- Read `references/orchestrator.workflow.md` before final action selection. It contains the full production workflow: context construction, channel invocation order, proposal merge rules, conflict resolution, no-action discipline, and final artifact contract.
23
-
24
- ## Workflow
25
-
26
- 1. Read host-created run files and stable tenant memory.
27
- 2. Build one compact shared run context.
28
- 3. Invoke or apply the three channel diagnosis skills.
29
- 4. Read channel outputs and reject weak, duplicate, or conflicting proposals.
30
- 5. Prefer no action over low-evidence action.
31
- 6. In local CLI mode, write `agent/runs/{runId}/actions.json` directly.
32
- 7. Write rationale and status files only under the current run path.
33
- 8. Update durable tenant memory only when the run changes stable strategy or repeated learnings.
34
-
35
- ## Local CLI Mode
36
-
37
- When running inside a tenant repo, this skill expects a prepared run directory.
38
- Do not invent a `runId` or create fake input files.
39
-
40
- Use the CLI to prepare the same filesystem contract that remote runners use.
41
-
42
- ```bash
43
- anymorph --version
44
- anymorph status
45
- anymorph geo init --repo .
46
- anymorph geo doctor --repo .
47
- anymorph geo prepare <workspace-domain-or-id> --repo .
48
- ```
49
-
50
- `geo init` installs the bundled skills and local memory scaffold. It does not
51
- create a strategy run. `geo prepare` fetches the workspace run package from the
52
- backend and creates the run files.
53
-
54
- `geo prepare` creates:
55
-
56
- - `agent/runs/{runId}/manifest.json`
57
- - `agent/runs/{runId}/context.json`
58
- - `agent/runs/{runId}/intents.json`
59
- - `agent/runs/{runId}/crawl_logs.json`
60
- - `agent/runs/{runId}/status.json`
61
-
62
- `intents.json` comes from `signals.intents` in the backend prepare response.
63
- It is the same source used by the remote GEO strategy runner.
64
-
65
- Inspect prepared intents when needed:
66
-
67
- ```bash
68
- anymorph geo intents {runId} --repo .
69
- ```
70
-
71
- Then run this skill against that `runId`. Use MCP tools only to enrich the
72
- prepared context or inspect deeper evidence. Do not use MCP calls to replace
73
- the run package.
74
-
75
- For local CLI runs, there is no remote runtime artifact submission tool. The
76
- final artifact contract is the filesystem contract:
77
-
78
- - write `agent/runs/{runId}/actions.json`
79
- - write `agent/runs/{runId}/rationale.md`
80
- - update `agent/runs/{runId}/status.json`
81
-
82
- After writing artifacts, validate them with:
83
-
84
- ```bash
85
- anymorph geo validate {runId} --repo .
86
- ```
87
-
88
- Only use runtime artifact tools when the host environment explicitly provides
89
- them. In ordinary local tenant repo work, the filesystem artifacts above are the
90
- source of truth.
91
-
92
- ## Final Decision Rules
93
-
94
- - Emit at most 20 actions.
95
- - Use only `create` or `update` operations.
96
- - Use `brand_owned` only for customer-owned discovered pages.
97
- - Use `geo_page` only for generated or managed GEO page work.
98
- - Use `third_party` only for off-page Earn work.
99
- - Every action must include either an existing `intentId` or a non-null `proposedIntent`.
100
- - Third-party actions must name the exact domain and, when known, the exact publish surface.
@@ -1,4 +0,0 @@
1
- interface:
2
- display_name: "GEO Generating Actions"
3
- short_description: "Generate final GEO strategy actions from channel diagnoses."
4
- default_prompt: "Use $geo-generating-actions to generate final GEO strategy actions for this workspace."