Logo Speq Planning

Speq Planning

Tổ chức
exasol-labs
speq-planning

Quy trình soạn kế hoạch dành cho planner-agent: các phần spec cần cập nhật, ánh xạ kiểm thử, plan.md, decision-log.md, gắn thẻ chuyên gia và chế độ chỉnh sửa.

Tổng quan

Nhà phát hànhexasol-labs
Kho mãspeq-skill
Tên kỹ năngspeq-planning
Sao
54
Bản fork
6
Tệp đi kèm
1
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 1 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được exasol-labs công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Speq Planning trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/exasol-labs/speq-skill/tree/main/.claude/skills/speq-planning
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/exasol-labs/speq-skill.git /tmp/speq-skill
mkdir -p .claude/skills
cp -r /tmp/speq-skill/.claude/skills/speq-planning .claude/skills/speq-planning
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Speq Planning trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Speq Planning ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Speq Planning với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Plan Authoring

Guiding Principles

  • BDD (Gherkin syntax): scenarios use GIVEN/WHEN/THEN; integration tests by default, unit tests only for isolated pure computation
  • RFC 2119 keywords: THEN steps use MUST, MUST NOT, SHALL, SHALL NOT, SHOULD, SHOULD NOT, MAY (uppercase)

Rules

  • Read-only investigation: planning reads existing code, tests, specs, and docs. It never builds the software, runs a test suite, starts Docker or an e2e run, or launches the software. Plan the commands to run; do not run them.
  • Short Background: ## Background is a concise summary of the context every scenario shares, 3-5 one-line bullets at most. It never encodes features, behavior, or requirements; each of those is a scenario (or a step in one). When a change adds behavior, add or change a scenario, not a Background line. When you rewrite a Background that has grown past this, cut it down in the same DELTA:CHANGED block.
  • Architecture by delta: never edit specs/architecture.md; /speq-record merges the delta. When the plan changes no architecture, write no delta.
  • Proof is tests and manual runs: speq commands (speq plan validate, speq feature get) check the plan, not the product, so never list them as test or manual evidence.
  • One copy: never embed spec content in plan.md or decision-log.md; reference the delta files. Write each artifact once, then change it with Edit, and do not re-read a file you wrote this run.
  • Specs describe the software, not its tests: a spec delta states features, behavior, and constraints of the software. Never encode e2e tests, test suites, Docker setups, or the test environment as scenarios or Background; they say how to verify the software, not what it does. specs/mission.md encodes how to test (suites, commands, environment), so reference it from the plan's Verification section.
  • Local notes: notes/planning.md is local scratch. It is never committed and never evidence.

Workflow

0. Read Budget

Context is re-sent on every turn, so every byte you read costs again on each later call. Find before you read:

  • Run speq feature list to see which feature is described where. Then read only the needed lines (Read with offset and limit, or speq feature get '<domain>/<feature>/<scenario>').
  • Do not read a file over about 8 KB whole. Read long docs (testing.md, architecture.md) by heading.
  • Do not read a file twice. Write what you need to notes/planning.md the first time (create it now, append as you go, and consult it instead of re-reading).
  • This applies to cat and sed in Bash too. Never Read a tool-output file the harness saved for you in full. Use offset and limit, or search it.
  • For a branch diff, run git diff --stat first, then git diff -- <path> for the files that matter.
  • Quote only the lines of an external spec that the plan cites.
  • A project hook (.speq/plan-hook.md or .speq/plan-pr-hook.md) can require specific reads. The hook wins.

1. Discover Existing Specs

The orchestrator already ran speq domain list and speq feature list, named the features that relate to the request (per /speq-cli's absence check), ran the ADR digest (/speq-cli), and named specs/architecture.md if present. It passed the calls and their output as this brief's ## Existing Context section. Treat that as the baseline. Do not re-run the same queries. Re-query only for gaps it does not answer:

bash
speq feature get <domain>/<feature>   # a specific feature's full spec, if Existing Context only named it

Existing Context names specs/architecture.md, the current architecture that step 2a changes. Read it once by heading (list the headings, then read the sections the plan touches), and keep what you need in notes/planning.md. Step 2a copies only the sections a delta changes.

Check the plan against every accepted ADR in the ADR digest from Existing Context, per /speq-adr-rules rule 5. Read the full fragment of any ADR the plan touches. Build the digest only if Existing Context lacks it.

Before you author a NEW feature spec or state that no spec covers a behavior, run /speq-cli's absence check.

2. Author Spec Deltas

For each feature in scope:

specs/<domain>/<feature>/spec.md exists?
├─ Yes → DELTA markers (/speq-plan's references/delta-template.md)
└─ No  → Full spec (/speq-plan's references/feature-template.md)

Output: specs/_plans/<plan-name>/<domain>/<feature>/spec.md

Prose drift check: after drafting a scenario delta for an existing feature, check that feature's ## Background and # Feature: <name> description, reusing what you read the first time; never re-read per scenario (read once with speq feature get <domain>/<feature> if you have not). When the scenario change makes either inaccurate, author a DELTA:CHANGED block for that section too, per /speq-plan's references/delta-template.md.

2a. Author Architecture Delta

Decide whether the plan changes the architecture: a component, boundary, interface, data flow, constraint, or external dependency. If it does, write specs/_plans/<plan-name>/architecture.md per /speq-plan's references/architecture-delta-template.md. Copy each changed section from specs/architecture.md, edit it, and set the BASE hash with git hash-object specs/architecture.md.

  • If specs/architecture.md is absent, write no delta. State Architecture: no change: specs/architecture.md absent in the decision log entry.

3. Test Mapping and Verification

Every scenario requires two forms of external proof. No claims, only evidence.

Integration tests (mandatory per scenario):

  • Map each new or changed scenario to an integration test (file path + test name)
  • List the existing tests that the change or the new tests make redundant, for removal under plan.md's Dead Code Removal
  • One test per scenario by default; combine only when scenarios share setup and assertions
  • Unit tests only for pure computation with no I/O

Manual invocation (mandatory per feature):

  • Concrete commands that invoke the built software
  • Expected observable output per command

4. Generate plan.md

Draft per feature. Populate plan.md per /speq-plan's references/plan-template.md:

  1. Context: per the template's Context section. Decisions go in decision-log.md (step 5)
  2. Features: table referencing spec delta files, immediately followed by an Impact entry describing user/operator-facing consequences (breaking changes called out, or "None")
  3. Tasks: work breakdown in implementation order
  4. Parallelization: knowledge clusters, per the rules below
  5. Verification: Scenario Coverage + Manual Testing + Checklist (from specs/mission.md)

Parallelization groups are knowledge clusters. Group tasks vertically: one spec delta plus the code area it governs. Never group by layer. Layer slices (fixtures, then module, then CLI, then tests) make each layer's agent re-derive the same mental model; a vertical slice orients one agent once. Each group row declares a Knowledge column: the group's spec delta path(s) plus the source and test files they govern. The implement orchestrator hands this entry to the group's agent as its orientation pointer. Two facts govern the grouping:

  1. Tasks that share a spec delta or a source module default into one group.
  2. Overlapping Knowledge entries across groups are a consolidation signal, not a parallelism opportunity.

If two clusters would contend on one shared file, split the module per feature (often the better design; check it against /speq-design-philosophy) or declare a dependency and sequence the clusters. Parallelism is a side effect, not the goal.

5. Generate decision-log.md

Create specs/_plans/<plan-name>/decision-log.md from /speq-plan's references/decision-log-plan-template.md.

What to capture:

  • Interview section: when decision-log.md already has it, keep it unchanged and do not copy it elsewhere
  • Design Decisions section: log a choice only when a reviewer or implementer cannot infer it from the deltas and tasks: a plausible alternative you rejected, or a constraint that is not obvious. Expect 0 to 3 entries. Never log naming, file placement, task order, or anything the deltas already state. Alternatives and Consequences are optional. For a new abstraction or module boundary, justify it in the entry's Rationale against /speq-design-philosophy's Quick Diagnostic (deep vs. shallow, dependency direction)
  • Architecture field: an entry with Promotes to ADR: yes whose Rationale names /speq-adr-rules rule-2 criterion 1, 2, or 3 needs an - **Architecture:** <§ Section[, § Section] | no change: <reason>> line. Every named section needs a block in the architecture delta
  • Review Findings section: leave empty; populated in Revision Mode only for fixes that changed a design decision

Promotion gate. Apply /speq-adr-rules to every Design Decisions and Review Findings entry. Default Promotes to ADR: no. For yes, name the rule-2 criterion and the ADR digest result in Rationale. A promoted entry's Decision and Rationale are short and state facts, not history: the recorder derives the ADR from them (/speq-adr-rules rule 7a). A [plan-review] entry almost always stays no.

6. Expert-Task Tagging

Tag tasks that require deep reasoning with [expert] at the end of the task line:

markdown
- [ ] 2.1 Add CLI flag parsing
- [ ] 2.2 Implement lock-free queue for concurrent spec writes [expert]
- [ ] 2.3 Write integration tests for flag combinations
- [ ] 2.4 Refactor validator to preserve ordering invariants across plugins [expert]

Use [expert] only when the task genuinely needs it:

  • Concurrency / ordering / race conditions
  • Cross-file refactors with behavioral dependencies
  • Novel algorithms or non-obvious correctness
  • Security-sensitive code paths

Do not tag as expert:

  • Standard CRUD, CLI flag plumbing, test fixtures
  • Copy-paste from existing patterns
  • Documentation or config changes

Over-tagging wastes tokens; under-tagging risks defects. If any task in a parallelization group carries the tag, the orchestrator routes the whole group to implementer-expert-agent; all-untagged groups go to implementer-agent. One tag prices its entire group at the expert model, so tag sparingly. Most tasks stay untagged.

7. Validate Plan

Before returning:

bash
speq plan validate <plan-name>

Fix any failures. Common fixes:

  • Close unclosed delta markers with <!-- /CHANGED -->, <!-- /NEW -->, <!-- /REMOVED -->
  • Uppercase RFC 2119 keywords
  • Fix step formatting (bold keywords: *GIVEN*, *WHEN*, *THEN*, *AND*)

8. Finalize Planning Hand-off Note

You started specs/_plans/<plan-name>/notes/planning.md in step 0 and appended to it while exploring. Before you return to the orchestrator, make sure it is a plain list, not a narrative:

  • Files and symbols you checked
  • Lookups you ran (speq CLI calls, Serena queries), each with its target

Do not write: why, invariants as prose, conventions commentary, or decisions. Those already live in decision-log.md. This note is a map of what you checked, not a story about it. A map stays true even after a later revision changes a decision; a story does not.

A revision-mode respawn (below) reads this note first, before it re-reads plan.md, decision-log.md, or spec deltas, and before it re-explores the codebase.

9. Pre-Return Self-Check

Before you return to the orchestrator, check your own plan.md, decision-log.md, and spec deltas once, against your own writes in this run.

This is prevention, not the review gate. plan-reviewer still runs next at full strength.

Check your artifacts against /speq-plan-review's five non-Prose axes (Intent Fidelity, Feasibility, Requirement Quality, Task Breakdown, Design Depth) and its finding tags (load /speq-plan-review if they are not in context). Align prose with /speq-writing-guardrails. Fix anything the reviewer would flag.

Revision Mode

Only if the orchestrator respawns you with the path to a feedback file (plan-reviewer findings or PR comments): read notes/planning.md first, then /speq-planning's references/revision-mode.md and follow it.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Speq Planning làm được gì?

Quy trình soạn kế hoạch dành cho planner-agent: các phần spec cần cập nhật, ánh xạ kiểm thử, plan.md, decision-log.md, gắn thẻ chuyên gia và chế độ chỉnh sửa.

Vì sao nên dùng Speq Planning trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Speq Planning là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Speq Planning trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/exasol-labs/speq-skill/tree/main/.claude/skills/speq-planning. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Speq Planning?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Speq Planning với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Speq Planning với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Speq Planning có miễn phí không?

Có. Kỹ năng này được exasol-labs phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇