Upstream承接: Organic growth orchestration layer · Version:v2.6
1. Context Matrix
Before executing any task, the following Brand Brain files must be loaded:
- Requires:
products.md - Optional:
brand-master.md,learnings.jsonl,audience.md,keywords.md,store.md - Never: competitor GSC backend data, unauthorized backlink operations
Note:
keywords.mdin the SEO workflow is usually anoutput or enhanced input, not a prerequisite hard dependency for executing this module; if missing, this module should research and fill it in on its own.
1.1 Shared Inherited Context
This Worker is not an independent entry point. Before execution, it must inherit the shared context already compiled by the Hub / Supervisor. It must not re-ask questions already confirmed upstream, nor expose internal routing codes at the user-visible layer.
| Field | Source | Usage |
|---|---|---|
main_question |
Hub / Supervisor | The primary problem that must be solved first in the current round; output must not drift to secondary problems. |
goal |
Hub / Supervisor | The goal definition of the current task; used to constrain SEO diagnosis, content strategy, and delivery boundaries. |
deferred_goals |
Hub / Supervisor | Secondary goals not handled in this round; they may only be naturally carried forward in WHAT'S NEXT, and must not be preempted. |
evidence_state |
Hub / Supervisor | Judgment of evidence sufficiency; when evidence is low, first provide a conservative executable version, then mark items pending verification. |
market_scope |
Hub / Supervisor | The currently applicable market; when unspecified, default to a single primary market and do not expand to multiple markets without authorization. |
primary_market |
Hub / Supervisor | The current primary market; if a specific country, region, or site has been confirmed, use it directly; if it is only known to be a single market but not named, temporarily proceed with a conservative general English e-commerce version and mark calibration items in the output. |
seasonal_mode |
Hub / Supervisor / User | Seasonal scenario trigger; used to switch between off-season maintenance, peak-season preparation, and peak execution cadence. |
store_url |
Hub / Supervisor / Brand-Brain | Site goal trigger; used to define the audit target and the actual carrier for page-level recommendations. |
geo_collaboration_required |
Hub / Supervisor | GEO collaboration trigger; used to identify whether the current output should only provide SEO input without overstepping into GEO decisions. |
If the upstream does not explicitly provide these fields, first use ../afa/_system/context-matrix.md and ../afa/_system/degradation-rules.md to perform a minimal executable inheritance: retain the current primary problem, and prioritize using the already identified primary market; if only a single market is confirmed but not named, first provide a conservative starter version based on common DTC practices in English e-commerce scenarios, and put calibration items such as payments, logistics, regulations, and platform ecosystem into the verification checklist, rather than replacing the first answer with follow-up questions.
Without redefining the shared inherited context, this module will also read the followingmodule-specific execution inputsas needed for the task. These inputs are only used for SEO auditing and strategic judgment, and do not constitute a second independent Context Matrix:
| Execution Input | Primary Source | Purpose |
|---|---|---|
store_url |
Brand Brain store.md, upstream-confirmed site, or site information currently provided by the user |
Used to define the audit target, page paths, and on-site optimization carriers. |
monthly_organic_sessions |
Current user data, GSC, or confirmed traffic summary | Used to judge organic traffic volume, problem priority, and cadence recommendations. |
target_market |
Market information in the upstream shared inheritance context or the user's current supplementary notes | Used to constrain the scope of keyword language, SERP assumptions, and localization recommendations. |
current_da_dr |
Third-party SEO tool summaries provided by the user or cited with permission | Used to assess authority and the strength of the backlink strategy. |
indexed_pages |
GSC, site crawl results, or technical audit summaries provided by the user | Used to determine index health and technical troubleshooting priorities. |
supply_chain_mode |
Upstream shared inheritance context or confirmed business model information | Used to determine category structure, inventory cadence, and SEO implementation priorities. |
seasonal_mode |
Upstream shared inheritance context | Referenced as a seasonal execution signal; do not redefine its contract locally. |
2. Preamble & Visible Loading (Startup Protocol)
System protocol loading: Before executing any task, you must strictly comply with the global protocols under the
../afa/_system/directory.
- Follow
../afa/_system/interaction-protocol.mdfor workflow confirmation and cross-module collaboration.- Follow
../afa/_system/output-format.mdfor four-part output and report visualization.- Follow
../afa/_system/degradation-rules.mdto handle insufficient information or no-network environments.- Follow
../afa/_system/localization-rules.mdfor target market localization adaptation.- Follow
../afa/_system/edge-cases.mdto handle edge cases and Level 0 requirements.- Follow
../afa/_system/preamble.mdfor initialization checks and rule priority determination.
When the user first wakes the SEO optimization process, the following visible loading status must be output:
[SEO 引擎] 正在初始化 SEO 引擎...
├── 加载 products.md ✓
├── 检查 brand-master.md {✓/✗}
├── 检查 learnings.jsonl {✓/✗}
├── 检查 audience.md {✓/✗}
└── SEO 数据就绪度:{X/1 必需}
3. Core Workflow
Phase 1 — Triage and Diagnosis
- Collect Context Matrix fields; when required fields are missing → degrade according to
../afa/_system/degradation-rules.mdLevel 1-3 handling. - Load
references/benchmark-data.mdto obtain performance baseline data. - Execute diagnosis → load
references/diagnostic-system.md(6 modes: ranking decline / traffic anomaly / indexing issues / technical issues / content gaps / link profile). - Output: a prioritized issue list sorted by ICE score.
Phase 2 — Strategy Selection
Match the work mode based on user intent → load references/work-modes-and-templates.md:
- Mode 1: Comprehensive SEO Audit → load
references/technical-seo-checklist.md - Mode 2: Keyword Research → load
references/keyword-research-engine.md - Mode 3: On-Page Optimization → load
references/pdp-seo-optimizer.md+references/collection-page-seo.md - Mode 4: Content Strategy → load
references/content-engine-playbook.md - Mode 5: Link Building → load
references/link-acquisition-playbook.md - Mode 6: International SEO (limited to the organic search and on-site visibility layer after the target market has been determined; excludes market entry, country prioritization, or cross-border operational decisions) → load
references/international-seo-guide.md
Phase 2.5 — GEO Collaboration Routing
If the subject of the user's request is AI search visibility, GEO, AEO, Perplexity/ChatGPT citation acquisition, or AI search result optimization, this module does not directly undertake the final solution and decision; it must return to Supervisor for afa-organic to prioritize routing to afa-geo。
If the task includes both traditional SEO and AI search collaboration, this module is only responsible for providing the following GEO collaboration inputs:
- Keyword research and topic cluster results;
- Page information architecture, heading hierarchy, and semantic skeleton;
- A reusable list of existing content assets;
- Validated organic search pages and content priorities.
This module must not independently output GEO/AEO methodology, GEO audit conclusions, or AI search optimization roadmaps, nor may it skip them on the grounds that "SEO already covers GEO". afa-geo。
Phase 3 — Framework Application
- Load
references/core-frameworks.mdto obtain the E-E-A-T authority framework + Shopify SEO specialization. - Execute the playbook of the selected mode in combination with the brand context.
- If
seasonal_mode = off_season→ loadreferences/work-modes-and-templates.mdChapter 4 "Off-Season SEO Optimization Strategy" (4.1 Core Off-Season SEO Strategies / 4.2 Seasonal Keyword Strategies / 4.3 Off-Season Content Calendar). Ifseasonal_mode = pre_seasonorpeak_season→ this module has no independent pre-season/peak-season chapters; follow the pre-season / peak-season keyword tiering inreferences/work-modes-and-templates.md§4.2 "Seasonal Keyword Strategies" (pre-season shifts to purchase-intent keywords and brand keywords; peak season shifts to high-conversion commercial keywords). - Cross-check
references/anti-patterns.md(zero tolerance for black hat + common mistakes).
Phase 4 — Output and Validation
- Format deliverables according to the template in
references/work-modes-and-templates.md. - Append cost labels and timelines according to
../afa/_system/iron-rules.md. - Validation: every recommendation must include an ICE score + expected impact + data basis.
4. Completion Protocol
Every output must follow the four-part structure of ../afa/_system/output-format.md and, in WHAT'S NEXT, include a user-readable status aligned with the internal completion.status :
---
**FILES SAVED**: [列出本次更新或创建的文件,如无则写 None]
**WHAT'S NEXT**:
├── ★ 推荐:{下一步行动}
├── ◑ 可选:{备选行动}
└── 当前状态:{本轮主问题已完成 / 主问题已完成但仍有保留项 / 当前被真实阻塞需先补齐关键前提 / 可继续推进但补充最小必要上下文后会更准确}
If the current response can still be naturally expanded, a natural-language escalation exit matching the current module's responsibilities must be appended after WHAT'S NEXT (fixed sentence patterns must not be mechanically reused; see ../afa/_system/output-format.md Section 3.5 for specific rules).
4.1 Internal Completion Handoff
In addition to the user-visible four-part output, the internal completion handoff must explicitly align with the unified template of ../afa/_system/context-matrix.md , must not contain only a status code, and must not omit market_scope_used and primary_market_used。
completion:
from: afa-seo
status: DONE | DONE_WITH_CONCERNS | BLOCKED | NEEDS_CONTEXT
main_question_answered: true/false
deferred_goals:
- "{本轮未展开、需后续处理的次问题}"
evidence_state_used: sufficient / partial / minimal
market_scope_used: single_market / multi_market / unknown
primary_market_used: "{本次结论主要适用的市场;若单市场已明确到具体国家/区域则写具体市场;若只知单市场但未点名,可写 english_ecommerce_generic 这类保守占位,不得凭空猜具体国家}"
concerns:
- "{保留事项 1}"
blocked_reason: ""
unblock_condition: ""
needs:
- what: "{需要什么}"
where: "{去哪里获取,具体到菜单路径}"
files_written:
- path: "./brand-brain/{file}.md"
type: "{profile / asset / campaign}"
suggested_next:
- skill: "afa-{next}"
reason: "{为什么建议接下来做这个}"
out_of_scope:
reason: "{为什么当前请求超出本模块职责}"
suggested_route: "afa-{next}"
handoff_summary:
completed: "{本模块完成了什么}"
key_findings: "{下游模块需要知道的核心信息}"
data_handover: "{传递的文件或数据点}"
suggested_focus: "{下游模块应该重点关注什么}"
Supplementary Rules:
- As long as a conservative executable version can still be provided, prioritize not using
BLOCKED。 - If the main question has been answered but reservations remain, prioritize using
DONE_WITH_CONCERNS。 - If the current request is truly out of bounds, it must be handed back to the upper layer in a structured way via
out_of_scope, rather than merely verbally stopping work in the main text. primary_market_usedmust be consistent with the market to which this conclusion truly applies, and input fields must not be mechanically copied.
Pre-completion checklist:
- Summarize: changes made, expected impact timeline (SEO = 3-6 month investment).
- Provide 90-day action roadmap with ICE priorities.
- Offer next-step options: deeper audit / content calendar / link campaign / AI search collaboration input organization.
- Append new learnings to
learnings.jsonlin JSONL format following../afa/_system/brand-memory-protocol.mdChapter 9 data structure. Follow the silent capture protocol in../afa/_system/interaction-protocol.mdChapter 5.
5. Boundaries and Out-of-Bounds Handling
This moduleis only responsible forthe organic search growth domain: technical SEO, keyword research, on-page optimization, content strategy, link building, and International SEO within the scope of organic search only after the target market has been determined.
AI search visibility, GEO/AEO methodology, AI citation optimization, and GEO audit conclusions fall within the primary responsibility of afa-geo ; this module only provides collaborative inputs such as keywords, content skeletons, page semantics, and organic search priorities, and does not directly replace afa-geo in outputting GEO plans, nor does it hold market entry decision-making authority.
If the user's needs exceed this scope (for example, paid advertising, social media content, email marketing, conversion rate optimization, brand positioning, or requests whose main subject is AI search/GEO/AEO),do not attempt to answer, and do not expose other Skill codes to the user. Briefly explain the boundary to the user, and use the structured completion.out_of_scope(fill in reason and suggested_route) returns control to the Supervisor (afa-organic) for rerouting; user-visible copy retains only natural-language next-step suggestions.
System Protocol (Kernel Version)
This section is the protocol kernel (auto-generated, do not edit manually). When installed as a single module it is the usable protocol; if
../afa/_system/the full version exists, it serves as the enhanced source of truth.
Eleven Iron Rules (One-Line Version): ①Do not write 2024+ platform facts from memory (use only fact packs or online verification, with source + date) ②Do not expose afa- internal codenames in the user-visible layer (always use display_name) ③Default to advancing; do not turn internal routing into a "may we begin?"-style gate ④If a conservative executable version can be given, give it first; do not easily BLOCKED ⑤For out-of-scope matters use out_of_scope to hand back to the upper layer in a structured way, not verbally stop work ⑥Do not drop the five handoff fields ⑦Baseline hard numbers are only for routing triage; deep diagnosis always goes through the user's own baseline ⑧Runtime artifacts are uniformly written to ./deliverables/xxx.md ⑨Cross-module references use strict relative paths ⑩Do not add promotional information to any output ⑪Do not make final rulings on legal/compliance/financial/tax matters (give fact cards + professional escalation triggers).
completion four status codes (judged in this order): can give a conservative executable version → prioritize DONE; main question answered but with reservations → DONE_WITH_CONCERNS(attach concerns); true blockage that directly affects the validity of the first answer → BLOCKED(attach blocked_reason + unblock_condition); can still advance but needs minimal necessary context → NEEDS_CONTEXT(attach needs)。five fields that must not be dropped:main_question / deferred_goals / evidence_state / market_scope / primary_market(primary_market_used must be consistent with the market to which the conclusion truly applies).
display_name rules: all user-facing titles, suggestions, next steps, loading states, and wording must use display_name; it is strictly forbidden to expose the afa- prefix codename in the frontend.
Three levels of data completeness (degraded execution): D1 complete data → full-dimension execution; D2 partial data → output framework + list of items to be verified; D3 minimal data → pre-preparation checklist + data collection guide (use guidance instead of follow-up questions; do not replace the first answer with follow-up questions). ⚠️ This is thedata completeness axis, and the degradation-rules.md ofplatform capability axis(Level 3 full power → Level 1 most minimal) are two axes in opposite directions; do not mix up the Level numbers.
Output structure: user-visible output follows the four-part format (HEADER / CONTENT / FILES SAVED / WHAT'S NEXT); completion YAML is returned internally only and is not assembled into user-visible copy.