Communitygithub.com

grahama1970/align

基於回合制的上下文對齊,在執行前使用。當人類、專案代理、WebGPT、scillm、ask、dogpile、memory 或 project-knowledge 對任務可能持有不同的事實時使用;特別是在模糊的設計、資訊圖表、產品工作流程、高風險實作、計劃反覆、專案資訊圖表或多重審查工作之前。

align 是什麼?

Align 技能是一種預執行閘道,旨在透過結構化的回合制流程,在執行任何實質工作之前,使來自不同來源(例如人類、專案代理、WebGPT、scillm、ask、dogpile、memory 和 project-knowledge)的上下文達到一致。它能生成一個 `alignment_lock.json` 檔案,記錄已商定的目標、非目標、來源上下文、參與者事實、假設、風險、輸出形狀和驗收標準。所有這些都必須滿足,鎖定狀態才會變為 `ready_for_execution: true`,以確保後續技能基於一致的理解進行操作。 此技能支援多個平台,包括 CLI 腳本和與 `$ask`、`$scillm` 和 `$dogpile` 等技能的整合。它透過一個詳細的回合循環運作,包括廣播對齊摘要、收集參與者的事實和問題、將問題分類為阻塞性和非阻塞性、將其分配給適當的參與者以獲取答案,以及迭代更新摘要,直到所有阻塞性問題都得到解決。此外,Align 還包含用於離線和即時端到端測試的健康檢查腳本,以驗證其與真實系統的整合,確保在實際使用中的可靠性。

相容平台✓Claude Code~Codex CLI~Cursor✓Antigravity✓Gemini CLI✓OpenCode
npx skills add https://github.com/grahama1970/agent-skills/tree/main/skills/align

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

align 是做什麼的?

使用 $align 在行動前平衡上下文。此技能適用於以下情況: 人類、專案代理、WebGPT、$scillm、$ask、$dogpile、$memory 或 $project-knowledge 可能各自知道不同的事實。它會產生一個 alignment_lock.json,後續技能可以從中執行。

請勿使用 $align 來實作、呈現、重構或審查最終工作。它是一個 預執行閘道。在對齊鎖定顯示 ready_for_execution: true 之前,不應開始任何程式碼、資訊圖表、儀表板、計劃反覆階段或專案資訊圖表呈現。

核心規則

僅當所有阻塞性問題都得到回答並且鎖定記錄了以下內容時,對齊才算完成:

  • 已商定的目標
  • 已商定的非目標
  • 來源上下文
  • 參與者事實
  • 剩餘的假設與風險
  • 輸出形狀
  • 驗收標準
  • 明確的準備就緒/未準備就緒決策

如果仍存在分歧,則將鎖定保持為 ready_for_execution: false。

參與者

僅使用與任務相關的參與者:

參與者角色
human意圖、偏好、領域細微差別、驗收標準
project_agent本地儲存庫狀態、約束條件、可執行的下一步
project_knowledge持久的專案歷史與交接記錄
memory先前的經驗教訓與已解決的類似問題
scillm透過 localhost LLM 代理進行的直接模型評審
ask帶有成果物的 Ask/oracle/deep-review 執行環境;擁有 WebGPT 路由
dogpile當本地上下文不足時進行新的外部研究
webgpt瀏覽器/會話可見的上下文與面向人類的判斷

WebGPT 呼叫必須通過 $ask webgpt 路由;$ask 已擁有 WebGPT oracle 後端,並使用 surf webgpt.submit --no-activate 針對使用者已認證的 ChatGPT 分頁。$align 不會直接呼叫 surf。請勿通過 $scillm 發送 WebGPT 請求;$scillm 用於直接模型呼叫,例如 gpt-5.5、Gemini、Claude 或 OpenCode Go。當人類提供分頁 ID 時,請保留它。 僅在對齊因缺少外部/當前知識而受阻時使用 $dogpile。對於 $project-knowledge 或 $memory 已回答的事實,請勿使用它。

執行路由

                         +-----------------------+
                         |    $align init        |
                         | 目標、輸出、來源       |
                         +-----------+-----------+
                                     |
                                     v
                   +-----------------+-----------------+
                   |     第 N 輪:對齊摘要            |
                   | 參與者陳述事實、差距、            |
                   | 矛盾與問題                       |
                   +-----------------+-----------------+
                                     |
                   +-----------------+-----------------+
                   | 編譯回合提取問題                  |
                   | 問題[阻塞性/非阻塞性]:           |
                   +-----------------+-----------------+
                                     |
                  是否有未解決的阻塞性問題?
                         | 是                         | 否
                         v                             v
        +----------------+----------------+    +-------+--------+
        | 將每個問題路由給負責人          |    | lock --ready   |
        | 人類/專案/記憶/審查者           |    | 寫入鎖定       |
        +----------------+----------------+    +----------------+
                         |
                         v
        +----------------+----------------+
        | add-response / answer-question  |
        | 更新摘要,回合遞增              |
        +----------------+----------------+
                         |
                         v
                    第 N+1 輪

審查者路由是回合的可選輸入:

                                +----------------+
                                | 第 N 輪摘要     |
                                +-------+--------+
                                        |
          +-----------------------------+-----------------------------+
          |                             |                             |
          v                             v                             v
+--------------------+       +--------------------+       +--------------------+
| WebGPT 通過 $ask   |       | $scillm 直接       |       | $ask 審查/oracle    |
| prepare-review     |       | prepare-review     |       | prepare-review     |
| --reviewer webgpt  |       | --reviewer scillm  |       | --reviewer ask     |
+---------+----------+       +---------+----------+       +---------+----------+
          |                            |                            |
          v                            v                            v
skills/ask/run.sh ask webgpt    round-N-scillm-request.json   round-N-ask-request.md
--webgpt-tab-id <id>            model: gpt-5.5               skills/ask/run.sh ask
          |                     reasoning_effort: high       --deep-review
          v                     可選角色提示                    |
 $ask -> surf webgpt.submit            |                      v
 --no-activate                         v
          |                  POST localhost:4001/v1/chat/completions
          v
 已認證的 ChatGPT 分頁

外部/當前研究:
  prepare-review --reviewer dogpile -> round-N-dogpile-request.md
  僅在缺少外部事實導致對齊受阻時使用。

回合循環

每個回合遵循相同的順序:

  1. 將當前對齊摘要廣播給選定的參與者。
  2. 每個參與者陳述他們認為任務是什麼。
  3. 每個參與者列出他們知道而其他人可能不知道的事實。
  4. 每個參與者列出假設、矛盾和問題。
  5. 將問題合併為阻塞性和非阻塞性集合。
  6. 將問題路由給能夠回答的一方。
  7. 更新摘要。
  8. 僅在阻塞性問題解決或達到最大回合數時停止。

如果達到最大回合數時仍有阻塞性問題未解決,則以 ready_for_execution: false 停止,並提出人類所需的最小決策。

CLI

WebGPT 分頁綁定 (CLI 對等)

偏好從已註冊的工作目錄使用零旗標 $ask webgpt。/ask 會自動組合 $browser-oracle。init 和 prepare-review 會將綁定提示持久化儲存在 .align/state.json 中,並在生成的 round-*-webgpt-ask-command.sh 上發出相同的旗標。

旗標使用時機
(無)cwd 具有向上搜尋註冊 + 綁定 — 首選
--browser-oracle-from <dir>覆蓋向上搜尋根目錄(monorepo 子目錄)
--webgpt-project <name>明確專案;跳過 yaml 向上搜尋
--webgpt-tab-id <id>一次性覆蓋;跳過向上搜尋
--webgpt-url <url>透過對話 URL 解析;跳過向上搜尋

解析順序(與 $ask / $surf 相同):--webgpt-tab-id → --webgpt-url → $browser-oracle 向上搜尋 → --webgpt-project → 一個 chatgpt.com 分頁(失敗時關閉)。

設定:$browser-oracle register + bind + doctor --from <dir>。請參閱 $browser-oracle 和 $ask SKILL.md 中的 WebGPT 分頁綁定 部分。

從擁有任務的儲存庫或專案根目錄執行:

skills/align/run.sh init \
  --goal "建立一個清晰的計劃反覆資訊圖表請求" \
  --output-shape "源自來源的故事板和網頁資訊圖表請求" \
  --participant human \
  --participant project_agent \
  --participant project_knowledge \
  --participant scillm \
  --participant ask \
  --participant dogpile \
  --participant webgpt
# 偏好從已註冊目錄使用零旗標,或持久化向上搜尋根目錄:
#   --browser-oracle-from skills/oc-subagent/personas/mathematics
# 舊版明確覆蓋:
#   --webgpt-tab-id 837343529

記錄參與者回應:

skills/align/run.sh add-response \
  --participant project_agent \
  --round 1 \
  --text "任務:在呈現前協調工作流程。事實:先前的視覺化失敗,因為沒有核准的故事板。問題[阻塞性]:應該用哪個確切的範例專案來錨定視覺化?"

編譯回合:

skills/align/run.sh compile-round --round 1

僅在阻塞性問題解決後鎖定:

skills/align/run.sh lock --ready --approved-by human

審查者請求生成

prepare-review 為審查者建立可重播的請求成果物。它本身不會呼叫審查者。

skills/align/run.sh prepare-review --round 1 --reviewer scillm
skills/align/run.sh prepare-review --round 1 --reviewer ask
skills/align/run.sh prepare-review --round 1 --reviewer dogpile
skills/align/run.sh prepare-review --round 1 --reviewer webgpt --browser-oracle-from skills/oc-subagent/personas/mathematics
# 或:--webgpt-tab-id 837343529

當審查需要人類已認證的 ChatGPT 瀏覽器會話或瀏覽器可見的上下文時,請使用 WebGPT。當審查應該是直接的、可重播的模型呼叫時,請使用 $scillm,例如使用角色/系統提示進行 GPT-5.5 高推理:

skills/align/run.sh prepare-review \
  --round 1 \
  --reviewer scillm \
  --scillm-model gpt-5.5 \
  --reasoning-effort high \
  --persona-prompt "你是一位持懷疑態度的產品對齊審查者。專注於不匹配的假設和缺失的驗收標準。"

prepare-review 之後的建議呼叫:

# scillm 直接審查
.align/reviews/round-001-scillm-command.sh

# ask 深度審查或 WebGPT oracle
skills/ask/run.sh ask "審查位於 .align/reviews/round-001-ask-request.md 的對齊請求" \
  --deep-review --deep-review-target .align/reviews/round-001-ask-request.md

skills/ask/run.sh ask webgpt "審查位於 .align/reviews/round-001-webgpt-request.md 的對齊請求" \
  --browser-oracle-from skills/oc-subagent/personas/mathematics --oracle-iterations 1

# 僅在對齊因缺少外部事實而受阻時使用 dogpile 研究
skills/dogpile/run.sh search "解鎖此對齊所需的事實" \
  --context-file ".align/reviews/round-001-dogpile-request.md"

使用 add-response 儲存產生的審查者文字。審查者收據是對齊的輸入;它們本身不是執行核准。

即時組合健全性檢查

sanity.sh 是本機快速檢查。它證明回合循環、阻塞性問題閘道、審查者請求生成和鎖定結構,無需花費外部配額。

sanity-live.sh 是在聲明 $align 作為組合技能準備就緒之前所需的真實世界端到端閘道。它是選擇性加入的,因為它會呼叫即時下游系統:

  • 透過真實的 memory 技能執行 $memory recall --brief
  • 透過 $align add-response 攝取專案代理回應
  • 使用生成的對齊請求作為上下文執行 $dogpile search
  • 針對已認證的瀏覽器支援的 WebGPT 路徑執行 $ask webgpt
  • 僅在這些收據驗證後建立最終的 alignment_lock.json

僅當本機工作站具有 memory、dogpile 憑證/搜尋功能、Chrome 和已認證的 ChatGPT 會話時執行:

ALIGN_LIVE_E2E=1 skills/align/sanity-live.sh

可選控制項:

ALIGN_LIVE_E2E=1 \
ALIGN_WEBGPT_TAB_ID=837343529 \
ALIGN_LIVE_OUTPUT_ROOT=/mnt/storage12tb/skills/align/live-e2e \
skills/align/sanity-live.sh

如果未提供 ALIGN_WEBGPT_TAB_ID 或 ALIGN_WEBGPT_PROJECT,即時檢查會將 --webgpt-create-tab 傳遞給 $ask;這仍然需要有效的本機 Chrome/WebGPT 設定。證明成果物預設位於 /mnt/storage12tb/skills/align/live-e2e/<timestamp>/report.json。跳過的即時檢查不建立就緒狀態。

成果物佈局

.align/
  alignment_state.json
  alignment_brief.md
  alignment_lock.json
  rounds/
    round-001/
      participant-human.md
      participant-project_agent.md
      participant-scillm.md
      round_summary.md
      questions.json
  reviews/
    round-001-scillm-request.json
    round-001-scillm-command.sh
    round-001-ask-request.md
    round-001-dogpile-request.md
    round-001-webgpt-request.md
    round-001-webgpt-ask-command.sh

/mnt/storage12tb/skills/align/live-e2e/<timestamp>/
  report.json
  memory.stdout
  dogpile.stdout
  webgpt.stdout
  ask-runs/<ask_id>/

停止條件

僅在以下情況將 ready_for_execution 設定為 true:

  • 沒有未解決的阻塞性問題
  • 已商定的目標和非目標明確
  • 輸出形狀具體
  • 驗收標準可測試或可審查
  • 來源上下文已命名
  • 人類或委派的擁有者已核准鎖定

在以下情況將 ready_for_execution 設定為 false:

  • 仍有阻塞性問題
  • WebGPT、$scillm、$ask 或專案知識與摘要矛盾
  • 輸出形狀仍然抽象
  • 某個參與者揭露了缺失的來源證據
  • 請求的下一步會產生收據,而不是解決實際任務

常見錯誤

  • 請勿使用 $align 作為 $interview 的替代品;當缺失的資訊純粹是人類偏好或驗收標準時,請使用 interview。
  • 請勿使用 $align 作為 $review-code、$review-plan 或 $plan-iterate 的替代品;對齊發生在這些技能之前。
  • 請勿手動總結 WebGPT 或 $ask。使用它們的實際執行環境並儲存成果物路徑或審查者文字。
  • 不要因為審查者通過就聲稱對齊鎖定完成。專案代理必須合併結果並清除阻塞性問題。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

grahama1970/acceptance-contract

Turn a client brief, zip bundle, directory, or single requirements file into a typed acceptance-contract bundle with extracted requirements, acceptance checks, open questions, an immutable-goal draft, and a create-report-backed decision report. Use when users say acceptance contract, brief to requirements, freeze the goal, create immutable goal, amend immutable goal, build a Battle requirements bundle, or extract requirements from this bundle.

grahama1970/agent-ecosystem

Canonical map and shared contracts for the agent-governance ecosystem: the pi.receipt_envelope.v1 boundary envelope, the component graph, and the rules for which component owns which schema. Use when wiring a skill or extension into the shared receipt world, when asking how shame, triage-error, tau, ask, project-watchdog, ops-herdr, ponytail, and Memory fit together, or when validating an envelope.

grahama1970/agentic-evals

Agentic evaluation of skills using multi-trial fixtures, deterministic command assertions, trajectory checks, safety constraints, and evidence-backed readiness scoring. Use when users ask for agentic evals, multi-trial skill evaluation, skill trajectory validation, or readiness scoring for a skill workflow.

grahama1970/agent-inbox

File-based inter-agent messaging with headless dispatch. Check inbox, send bugs/requests to other projects, automatically spawn headless agents to fix bugs, and track progress via task-monitor.

grahama1970/agents-registry

Generate and query the centralized agent identity registry. Scans .pi/agents/*/AGENTS.md, parses frontmatter, outputs agents-registry.json and optionally syncs to /memory for semantic search.

grahama1970/agent-status

Artifact-driven status surfaces for long-running project-agent work. Maintains status.json, events.jsonl, proof manifests, and a stale-aware STATUS.html so humans can tell where the agent is, what passed, what is still unproven, and what decision or action is next — without dashboard theater.

grahama1970/analytics

Flexible data science analytics for any dataset. Auto-discovers schema, recommends charts, exports to create-figure. Works with JSONL, JSON, CSV from any source.

grahama1970/analyze-chatterbox-emotions

Evaluate generated Chatterbox voice files as voice-quality artifacts: affect match, arousal/valence proxies, pause placement, intelligibility inputs, clipping, loudness, and discontinuity flags. Use when reviewing Chatterbox emotional tags, pauses, Turbo/base affect delivery, Persona Dream utterance renders, or whether generated speech matches an intended product-facing affect.

grahama1970/analyze-elf

Reverse-engineer features from ELF binaries. Extracts CLI commands, state machines, protocols, Zod schemas, and data models. Automatically generates a /create-walkthrough prosecution brief with Mermaid diagrams. Uses /treesitter for AST analysis of bundled JS/TS source.

grahama1970/animation-vocabulary

Reverse-lookup glossary that turns a vague description of a web animation or motion effect into its exact term ("the bouncy thing when a popover opens" → Pop in; "the iOS rubber-band scroll" → Rubber-banding). Use when the user asks "what's it called when…", or describes a motion effect without knowing its name and wants the right word to prompt an AI or designer with. For naming an effect, not designing or building one.

grahama1970/anonymize-data

Anonymize supported CSV, JSON, UTF-8 text, and SQLite files using an explicit policy through the oai-trial project. Use for anonymize data, pseudonymize exports, redact policy literals, or discover and explicitly approve fuzzy name aliases. The skill is a thin CLI/Docker interface, not another engine.

grahama1970/anvil

Heavy-duty "No-Vibes" debugging and hardening orchestrator. Use this for complex, stubborn bugs where `review-code` has failed, or for "Red Teaming" (hardening) a codebase. Runs multiple agents in parallel (Thunderdome) using git worktree isolation.

grahama1970/apple-design

Apple's approach to interface design and fluid, physical motion, translated for the web. Use when building or reviewing gesture-driven UI, spring animations, drag/swipe/sheet interactions, momentum and interruptible transitions, translucent materials and depth, typography (optical sizing, tracking, leading), reduced-motion, or the design foundations (feedback, spatial consistency, restraint) behind Apple-style interfaces.

grahama1970/argue

Multi-persona structured debate orchestrator. Personas research via /dogpile, consult colleagues via /ask, and argue toward nuanced synthesis on complex questions.

grahama1970/arxiv

Search arXiv for papers and extract knowledge into memory. Use `search` to find papers, `learn` to extract knowledge.

grahama1970/ask

Use when the user asks to query project memory, ask an oracle, use supported browser-backed reviewers, run Tau roundtable/single-handler workflows, ask Pi-native subagents from within Pi, run persona/deep-review workflows, generate image prompts, check OS/project health through composed skills, or run an ask DAG. This skill is the executable /ask runtime; do not replace it with an informal subagent, plain web search, or hand-written review; inside Pi, explicit Pi-native subagent targets are routed through the pi-subagents tool as an Ask target type.

grahama1970/assess

Step back and critically reassess project state. Use when asked to "assess", "step back", "fresh eyes", "check alignment", "sanity check", "health check", "prune documentation", or "evaluate what's working". Offers documentation pruning and doc-code alignment analysis. Offer to run after major changes (don't auto-run).

grahama1970/assistant

Shared GPT + classifier inference gateway for persona monitor tasks. Routes validation and classification through a 4-tier cascade: heuristic → classifier → local GPT → scillm.

grahama1970/assistant-lab

Self-improvement workbench for /assistant. All the tools needed to diagnose, train, evaluate, and promote models in a continuous loop. The "warm pond" where /assistant evolves its own inference stack.

grahama1970/batch-quality

Pre-flight validation and quality gates for batch LLM operations. ACTUALLY tests samples through LLM before burning tokens. Uses SPARTA contracts for DuckDB validation queries. Integrates with task-monitor for enforced quality gates.

相關技能