@laitszkin/apollo-toolkit 3.11.6 → 3.11.8
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/AGENTS.md +1 -0
- package/CHANGELOG.md +30 -0
- package/README.md +1 -2
- package/analyse-app-logs/scripts/__pycache__/filter_logs_by_time.cpython-312.pyc +0 -0
- package/analyse-app-logs/scripts/__pycache__/log_cli_utils.cpython-312.pyc +0 -0
- package/analyse-app-logs/scripts/__pycache__/search_logs.cpython-312.pyc +0 -0
- package/docs-to-voice/SKILL.md +3 -30
- package/docs-to-voice/scripts/__pycache__/docs_to_voice.cpython-312.pyc +0 -0
- package/generate-spec/SKILL.md +51 -130
- package/generate-spec/scripts/__pycache__/create-specscpython-312.pyc +0 -0
- package/init-project-html/SKILL.md +3 -25
- package/init-project-html/lib/atlas/cli.js +897 -43
- package/init-project-html/scripts/architecture.js +4 -25
- package/katex/scripts/__pycache__/render_katex.cpython-312.pyc +0 -0
- package/lib/cli.js +166 -20
- package/lib/tool-runner.js +418 -2
- package/open-github-issue/SKILL.md +7 -98
- package/open-github-issue/scripts/__pycache__/open_github_issue.cpython-312.pyc +0 -0
- package/optimise-skill/SKILL.md +36 -0
- package/optimise-skill/agents/openai.yaml +4 -0
- package/optimise-skill/references/definition.md +38 -0
- package/optimise-skill/references/example_skill.md +36 -0
- package/package.json +1 -1
- package/read-github-issue/SKILL.md +6 -46
- package/read-github-issue/scripts/__pycache__/find_issues.cpython-312.pyc +0 -0
- package/read-github-issue/scripts/__pycache__/read_issue.cpython-312.pyc +0 -0
- package/resolve-review-comments/SKILL.md +4 -26
- package/resolve-review-comments/scripts/__pycache__/review_threads.cpython-312.pyc +0 -0
- package/scripts/validate_openai_agent_config.py +16 -1
- package/scripts/validate_skill_frontmatter.py +16 -1
- package/spec-to-project-html/SKILL.md +2 -14
- package/text-to-short-video/scripts/__pycache__/enforce_video_aspect_ratio.cpython-312.pyc +0 -0
- package/update-project-html/SKILL.md +3 -19
- package/weekly-financial-event-report/scripts/extract_pdf_text_pdfkit.swift +32 -4
- package/maintain-skill-catalog/README.md +0 -18
- package/maintain-skill-catalog/SKILL.md +0 -72
- package/maintain-skill-catalog/agents/openai.yaml +0 -4
package/AGENTS.md
CHANGED
|
@@ -38,6 +38,7 @@ This repository enables users to install and run a curated set of reusable agent
|
|
|
38
38
|
- Users can run a shared submission-readiness pass that synchronizes changelog, project docs, `AGENTS.md`, and completed plan archives before commit, push, PR creation, or release.
|
|
39
39
|
- Users can learn new or improved skills from recent Codex conversation history.
|
|
40
40
|
- Users can audit and maintain the skill catalog itself, including dependency classification and shared-skill extraction decisions.
|
|
41
|
+
- Users can optimize existing agent skills by deriving the intended deliverable, tightening acceptance criteria, and rewriting `SKILL.md` into a leaner structure backed by extracted references.
|
|
41
42
|
- Users can implement approved spec planning sets directly in the current checkout and commit them to the active branch.
|
|
42
43
|
- Users can implement approved spec planning sets inside isolated git worktrees and keep the parent checkout clean.
|
|
43
44
|
- Users can coordinate approved multi-spec implementation batches by assigning each spec directory to an independent worktree-backed subagent with bounded concurrency.
|
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,36 @@ All notable changes to this repository are documented in this file.
|
|
|
10
10
|
|
|
11
11
|
### Fixed
|
|
12
12
|
|
|
13
|
+
## [v3.11.8] - 2026-05-12
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- `apltk` now provides task-oriented top-level help for bundled tools, and `apltk architecture --help` can route to action-specific help pages for the atlas CLI.
|
|
18
|
+
- `optimise-skill` now ships a dedicated `references/definition.md` reference so the target skill output structure has a separate canonical definition.
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- Refresh the atlas-related planning docs and command guidance (`generate-spec`, `init-project-html`, `spec-to-project-html`, `update-project-html`) to rely on `apltk architecture --help` as the authoritative command tree and to better explain batch overlays plus subagent responsibilities.
|
|
23
|
+
- Expand the bundled CLI help system so `apltk tools <tool> --help` shows curated purpose / use-when / examples before native script help, and align the validator / helper scripts with that layered help flow.
|
|
24
|
+
- Refresh multiple shipped skills (`docs-to-voice`, `open-github-issue`, `read-github-issue`, `resolve-review-comments`, `optimise-skill`) and retire the standalone `maintain-skill-catalog` skill while keeping the validator commands available as bundled `apltk` tools.
|
|
25
|
+
- Remove brittle text-level workflow assertions from the test suite so repository tests focus on executable CLI and rendering behavior instead of exact prompt wording.
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- Keep the public skill inventory and bundled tool metadata consistent after removing `maintain-skill-catalog`, so validator commands no longer reference a deleted skill owner.
|
|
30
|
+
|
|
31
|
+
## [v3.11.7] - 2026-05-12
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
|
|
35
|
+
- Add `optimise-skill`, a new catalog skill that reads a target skill and its supporting files, derives the intended deliverable and acceptance criteria, and rewrites the skill into a tighter `goal / acceptance criteria / workflow / examples / references` structure for higher-signal agent execution.
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
|
|
39
|
+
- Catalog docs now include `optimise-skill`, and its bundled example reference path is normalized to match the shipped file name.
|
|
40
|
+
|
|
41
|
+
### Fixed
|
|
42
|
+
|
|
13
43
|
## [v3.11.6] - 2026-05-12
|
|
14
44
|
|
|
15
45
|
### Added
|
package/README.md
CHANGED
|
@@ -35,12 +35,12 @@ A curated skill catalog for Codex, OpenClaw, Trae, Agents, and Claude Code with
|
|
|
35
35
|
- learning-error-book
|
|
36
36
|
- marginfi-development
|
|
37
37
|
- maintain-project-constraints
|
|
38
|
-
- maintain-skill-catalog
|
|
39
38
|
- novel-to-short-video
|
|
40
39
|
- open-github-issue
|
|
41
40
|
- open-source-pr-workflow
|
|
42
41
|
- openai-text-to-image-storyboard
|
|
43
42
|
- openclaw-configuration
|
|
43
|
+
- optimise-skill
|
|
44
44
|
- recover-missing-plan
|
|
45
45
|
- record-spending
|
|
46
46
|
- resolve-review-comments
|
|
@@ -209,7 +209,6 @@ Compatibility note:
|
|
|
209
209
|
- `generate-spec` is a local skill used by `develop-new-features` and `enhance-existing-features`, and it can produce either a single spec set under `docs/plans/{YYYY-MM-DD}/{change_name}/` or a coordinated parallel batch under `docs/plans/{YYYY-MM-DD}/{batch_name}/{change_name}/` with shared `coordination.md`.
|
|
210
210
|
- `implement-specs-with-subagents` coordinates one `implement-specs-with-worktree` subagent per spec directory for approved multi-spec batches.
|
|
211
211
|
- `recover-missing-plan` is a local skill used by `enhance-existing-features` and `ship-github-issue-fix` when a referenced `docs/plans/...` spec set is missing or archived.
|
|
212
|
-
- `maintain-skill-catalog` can conditionally use `find-skills`, but its install source is not verified in this repository, so it is intentionally omitted from the table.
|
|
213
212
|
- `read-github-issue` uses GitHub CLI (`gh`) directly for remote issue discovery and inspection, so it does not add any extra skill dependency.
|
|
214
213
|
- `review-spec-related-changes` is a local skill that depends on `review-change-set`, `discover-edge-cases`, and `discover-security-issues` for secondary code-practice checks after business-goal completion is reviewed against the governing specs; it prefers running each secondary skill in its own read-only subagent in parallel.
|
|
215
214
|
- `update-project-html` is a local skill that depends on `init-project-html` for semantic rules and on the `apltk architecture` CLI to refresh the base atlas after code changes; for spec overlay diagrams use `spec-to-project-html` instead.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/docs-to-voice/SKILL.md
CHANGED
|
@@ -44,41 +44,14 @@ description: Convert text and document content into audio files and sentence-lev
|
|
|
44
44
|
6. Return completion details.
|
|
45
45
|
- Report absolute output audio path.
|
|
46
46
|
|
|
47
|
-
##
|
|
47
|
+
## CLI reference
|
|
48
48
|
|
|
49
|
-
`apltk docs-to-voice` flags
|
|
50
|
-
|
|
51
|
-
- `--project-dir` (required)
|
|
52
|
-
- `--project-name` (optional)
|
|
53
|
-
- `--text` or `--input-file` (exactly one required)
|
|
54
|
-
- `--env-file` (optional, default: `skill_dir/.env`)
|
|
55
|
-
- `--mode` (`say|api`, optional)
|
|
56
|
-
- `--voice` (optional, say mode)
|
|
57
|
-
- `--rate` (optional, say mode)
|
|
58
|
-
- `--speech-rate` (optional, post-process speed multiplier)
|
|
59
|
-
- `--api-endpoint` (optional, api mode)
|
|
60
|
-
- `--api-model` (optional, api mode)
|
|
61
|
-
- `--api-voice` (optional, api mode)
|
|
62
|
-
- `--max-chars` (optional, auto chunking threshold for long text)
|
|
63
|
-
- `--output-name` (optional)
|
|
64
|
-
- `--no-auto-prosody` (optional, say mode)
|
|
65
|
-
- `--force` (optional)
|
|
66
|
-
|
|
67
|
-
Environment variables:
|
|
68
|
-
|
|
69
|
-
- `DOCS_TO_VOICE_MODE`
|
|
70
|
-
- `DOCS_TO_VOICE_VOICE`
|
|
71
|
-
- `DOCS_TO_VOICE_API_ENDPOINT`
|
|
72
|
-
- `DOCS_TO_VOICE_API_MODEL`
|
|
73
|
-
- `DOCS_TO_VOICE_API_VOICE`
|
|
74
|
-
- `DOCS_TO_VOICE_MAX_CHARS`
|
|
75
|
-
- `DOCS_TO_VOICE_SPEECH_RATE`
|
|
76
|
-
- `DASHSCOPE_API_KEY`
|
|
49
|
+
Use `apltk docs-to-voice --help` as the live command reference for required inputs, mode-specific flags, environment variables, examples, and expected output paths.
|
|
77
50
|
|
|
78
51
|
## Troubleshooting
|
|
79
52
|
|
|
80
53
|
- `say` mode: confirm `command -v say` and `command -v python3`.
|
|
81
54
|
- `api` mode: confirm `command -v python3` and valid `DASHSCOPE_API_KEY`.
|
|
82
55
|
- Long-text chunk merge (especially AIFF output): recommend `command -v ffmpeg`.
|
|
83
|
-
- If output exists, use
|
|
56
|
+
- If output exists, use the overwrite or rename options shown in `apltk docs-to-voice --help`.
|
|
84
57
|
- `scripts/docs_to_voice.sh` is kept as a compatibility wrapper for existing workflows, but prefer `apltk docs-to-voice`.
|
|
Binary file
|
package/generate-spec/SKILL.md
CHANGED
|
@@ -1,135 +1,56 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: generate-spec
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
`apltk architecture --spec <spec_dir> …`: single specs write under `<spec_dir>/architecture_diff/`,
|
|
8
|
-
while batch member paths resolve to the shared batch-root `architecture_diff/` beside
|
|
9
|
-
`coordination.md`; `apltk architecture diff` renders the before/after viewer. Use for
|
|
10
|
-
drafting/refreshing specs or restructuring batches, not execution. Reject vague `tasks.md`
|
|
11
|
-
rows and split scope beyond 3 modules.
|
|
4
|
+
Create or refresh approval-gated planning docs under `docs/plans/...` with
|
|
5
|
+
`apltk create-specs`, `test-case-strategy`, and optional batch coordination or
|
|
6
|
+
preparation files. Use for drafting or restructuring specs, not implementation.
|
|
12
7
|
---
|
|
13
8
|
|
|
14
|
-
#
|
|
15
|
-
|
|
16
|
-
##
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
##
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
WORKSPACE_ROOT=<target_project_root>
|
|
63
|
-
apltk create-specs "<feature_name>" --change-name <kebab-case> --output-dir "$WORKSPACE_ROOT/docs/plans"
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
Multi-spec parallel batch: add `--batch-name <kebab-case>` and `--with-coordination`. **Only** if parallel safety needs prior shared work: add `--with-preparation`.
|
|
67
|
-
|
|
68
|
-
Always materialize: `spec.md`, `tasks.md`, `checklist.md`, `contract.md`, `design.md` from `references/templates/`. Add `coordination.md` / `preparation.md` at batch root only when flags require. Save under `docs/plans/{YYYY-MM-DD}/...`. After generation, fill in place **without** stripping section headings unless truly N/A (document inline); drop unused repeatable blocks (extra component or dependency stubs). Run a **template-drift pass** before approval: required fields covered, placeholders removed or justified.
|
|
69
|
-
- **Pause →** List the **module names** (≤3) this spec set will touch; if more, where is my **split plan**?
|
|
70
|
-
- **Pause →** For every shared file two specs might touch, where is the **named** resolution in `coordination.md` or why is `preparation.md` required instead?
|
|
71
|
-
- **Pause →** Did I run `apltk create-specs` from the **skill** context so template paths resolve correctly?
|
|
72
|
-
|
|
73
|
-
### 3) Author content (fill templates)
|
|
74
|
-
|
|
75
|
-
- **`spec.md`**: Concrete scope; BDD (`GIVEN` / `WHEN` / `THEN` / `AND` / `Requirements`); testable requirements; boundaries, auth, failure, idempotency/concurrency/integrity where relevant; doc references; `3-5` clarification questions or `None`.
|
|
76
|
-
- **`tasks.md`**: `## **Task N: [Title]**` with Purpose, Requirements, Scope, Out of scope; atomic `- N [ ]` triple (path · change · verify). **Derive sequencing and decomposition from** **`spec.md` + `design.md` + `contract.md`**; **`tasks.md` stays the only enumerated runnable checklist**. Optionally cite **`INT-###` / `EXT-###`** on rows an anchor constrains—and **keep design/contract coarser**, never a second copy of checklist lines. Integrate `test-case-strategy` for drift checks where needed.
|
|
77
|
-
- **`contract.md`**: Cite-backed **external facts / limits / failure semantics / security**, plus **`EXT-###`** integration **anchors** (typically fewer rows than **`tasks.md` items)—**constraints and anti-hallucination context**, **not** a parallel implementation runbook (`TBD` instead of guesses; **`Dependencies` → None** when genuinely no externals).
|
|
78
|
-
- **`design.md`**: **High-level architectural context for composing `tasks.md`**—baseline/target shape, boundaries, modules, **`INT-###`** coarse coupling/order hints (`task` granularity lives only in **`tasks.md`**). No file-level chores; batches defer ownership grids to **`coordination.md`**; **`preparation.md`** assumed done—don't replay prep execution here.
|
|
79
|
-
- **`coordination.md`** (batch root, parallel only): **Business Goals** (outcome, member specs, parallel readiness, exclusions, blockers → `preparation.md` or list); **Design Principles** (baseline, shared invariants, compat, cleanup—high level); **Spec Boundaries** → **Ownership Map** (allowed/forbidden touchpoints per spec) and **Collisions & Integration** (shared-file rules, freeze owners, merge order, checkpoints, re-coordination trigger)—**every** collision candidate **MUST** have a named resolution.
|
|
80
|
-
- **`preparation.md`** (batch root, only if required): Preparation Goal (why, no core business logic, dependents, start condition); **Task P[N]** like `tasks.md` (atomic triple items); **Validation**; **Handoff** (assumptions, must-not-change, if prep changes later). Strip duplicate prep from member specs.
|
|
81
|
-
- **`checklist.md`**: `- [ ]` adapted to scope; map behaviors to requirement/test IDs via `test-case-strategy`; behavior lines `[CL-xx]: … — R?.? → [Test IDs] — Result: …`; property-based logic **required** unless `N/A` + reason; honest execution/completion records—**no** checking unused examples or unchosen options.
|
|
82
|
-
- **Pause →** Pick one **random** `tasks.md` checkbox: does it still fail the triple rule (target, change, verify)—if yes, rewrite now?
|
|
83
|
-
- **Pause →** Does every **R** requirement ID I care about appear in `tasks.md` or `checklist.md` with a test or explicit `N/A`?
|
|
84
|
-
- **Pause →** Do **`design.md` / `contract.md`** stay **coarser than `tasks.md`** (no mirrored checkbox choreography / file paths)—yet still constrain ordering and forbidden hallucinations?
|
|
85
|
-
- **Pause →** For parallel batches, does `design.md` **avoid** duplicating batch ownership grids already locked in **`coordination.md`**?
|
|
86
|
-
|
|
87
|
-
### 3.5) Architecture overlay + diff viewer (only when the proposal touches the architecture surface)
|
|
88
|
-
|
|
89
|
-
When the spec changes a feature module, sub-module, edge, variable row, function I/O row, internal dataflow, or error row:
|
|
90
|
-
|
|
91
|
-
**Completion standard:** the overlay is not complete until every intended cross-feature **edge**, every feature-to-feature dependency or call/return relationship, and every sub-module-to-sub-module relationship inside the affected scope has been declared precisely through the CLI. It is **not** acceptable to leave relationship structure implied only by prose in `spec.md` / `design.md`; the architecture diff must explicitly express the real proposed-after topology.
|
|
92
|
-
|
|
93
|
-
1. **Discover commands:** run **`apltk architecture --help`** in the target workspace; use that output for every `add` / `set` / `remove` / `reorder` spelling and required flag. Do not copy long command tables from skills — they go stale.
|
|
94
|
-
2. **Declare proposed-after state** with `apltk architecture --spec <spec_dir> …` for each mutation (pass `--no-render` while batching if you prefer a single render at the end). In a batch, keep using the member spec path; the CLI resolves writes to the batch-root `architecture_diff/` beside `coordination.md`.
|
|
95
|
-
3. **`apltk architecture render --spec <spec_dir>`** — emits/updates only the HTML files touched by this overlay plus assets. In a batch, this updates the shared batch-root render.
|
|
96
|
-
4. **`apltk architecture validate --spec <spec_dir>`** — **MUST** return OK before the spec is approval-ready (resolve dangling edges, unknown enums, bad dataflow references). In a batch, this validates the shared batch-root overlay.
|
|
97
|
-
5. **`apltk architecture diff`** — **MUST** run before hand-off when atlas changed; confirm the paginated viewer shows sensible **modified** / **added** / **removed** counts and that each interesting path pairs correctly (base `resources/project-architecture/…` vs the spec or batch-root `architecture_diff/…`). Use this pass to verify that the rendered graph actually contains the full intended relationship set: all relevant feature-level seams, all required sub-module seams, and no missing edge that the design prose depends on. A page appearing as **remove + add** instead of **modified** usually means a **slug rename** was split wrong — fix with intentional remove+add or a single coherent mutation sequence.
|
|
98
|
-
|
|
99
|
-
**Where files land:** single-spec plans write overlay YAML under `<spec_dir>/architecture_diff/atlas/` and rendered proposed-after HTML under `<spec_dir>/architecture_diff/`. Batch plans write both under the batch root beside `coordination.md`, even when the CLI call uses a member spec path. Cross-feature edges whose far endpoint exists only in the **base** atlas still resolve when merged — but you **must** `validate` to catch mistakes.
|
|
100
|
-
|
|
101
|
-
**Subagent coordination:** if multiple features are drafted in parallel, **do not** declare cross-feature **`edge`** (or overlay **`meta` / `actor`** used only to stitch features) until **all** feature workers report done — see `init-project-html/SKILL.md` Rule 3 and `spec-to-project-html`.
|
|
102
|
-
|
|
103
|
-
**Do not hand-edit** any file under `architecture_diff/`.
|
|
104
|
-
|
|
105
|
-
- **Pause →** Did I touch any file under `architecture_diff/` by hand? Revert and re-run the CLI verb instead.
|
|
106
|
-
- **Pause →** Does `apltk architecture validate --spec <spec_dir>` return OK?
|
|
107
|
-
- **Pause →** Does `apltk architecture diff` pair the spec’s pages correctly?
|
|
108
|
-
- **Pause →** Have I explicitly declared every intended edge, feature-to-feature relationship, and sub-module relationship in the CLI output, or am I still relying on prose to imply missing structure?
|
|
109
|
-
|
|
110
|
-
### 4) Clarifications and approval
|
|
111
|
-
|
|
112
|
-
On answers: update clarification/approval section in `checklist.md` first, then any of `spec.md`, `tasks.md`, `checklist.md`, `contract.md`, `design.md`; **MUST** obtain approval again after material edits. **MUST NOT** touch product code pre-approval.
|
|
113
|
-
- **Pause →** Am I about to “just fix a small bug” in product code before explicit approval—**why is that not a hard stop**?
|
|
114
|
-
- **Pause →** After the last edit, does the user still owe an **explicit** approval token, or did I assume silence means yes?
|
|
115
|
-
|
|
116
|
-
### 5) Backfill after implementation
|
|
117
|
-
|
|
118
|
-
When implementation exists: mark `tasks.md`; sync `checklist.md` outcomes/`N/A`; fix `contract.md` / `design.md` if reality diverged; update `coordination.md` / `preparation.md` if ownership or prep status changed. Checklist complete **only** for work actually done or decisions actually taken; separate rows for divergent flows; remove stale placeholders.
|
|
119
|
-
- **Pause →** For each checked item, what **evidence** (commit, test log) would a reviewer use to agree it is true?
|
|
120
|
-
- **Pause →** Did implementation reality change **shared** ownership or prep assumptions—if so, which batch file records that?
|
|
121
|
-
|
|
122
|
-
## Sample hints
|
|
123
|
-
|
|
124
|
-
- **`tasks.md` line — bad**: `- [ ] Add tests` → **reject** (no path, change, verifier).
|
|
125
|
-
- **`tasks.md` line — ok (with ledger wiring)**:
|
|
126
|
-
`- [ ] 2 src/api/handlers/oauth.rs — implement handler path for POST /oauth/token satisfying INT-003, INT-004 · EXT-001 client config loaded from env per contract · Verify: cargo test oauth::handlers::token_exchange`
|
|
127
|
-
- **Batch scaffold** (three member specs): `WORKSPACE_ROOT=... apltk create-specs "OAuth batch" --change-name oauth-api --batch-name oauth-may-batch --with-coordination --output-dir "$WORKSPACE_ROOT/docs/plans"` (then repeat or use generator rules for additional `change-name` dirs as your tooling permits).
|
|
128
|
-
- **`checklist.md` behavior row sketch**: `[CL-01]: invalid token rejected — R2.1 → TU-Scope-01,TU-Scope-02 — Result: pending`
|
|
129
|
-
- **Split-trigger**: change touches `src/auth/*`, `src/cli/*`, `src/db/*`, `infra/terraform/*` (four modules) ⇒ **minimum two spec sets**, not one.
|
|
130
|
-
|
|
131
|
-
## References
|
|
132
|
-
|
|
133
|
-
- `test-case-strategy`: test design and drift checks
|
|
134
|
-
- `scripts/create-specs` / `apltk create-specs`: generator
|
|
135
|
-
- `references/templates/spec.md`, `tasks.md`, `checklist.md`, `contract.md`, `design.md`, `coordination.md`, `preparation.md`: binding templates
|
|
9
|
+
# 生成規格
|
|
10
|
+
|
|
11
|
+
## 目標
|
|
12
|
+
將用戶需求轉化為明確、有清晰完成條件的規格文檔。
|
|
13
|
+
|
|
14
|
+
## 驗收條件
|
|
15
|
+
- 已經產出了嚴格遵循模板格式的規格文檔。
|
|
16
|
+
- 為規格文檔當中的需求制定了明確的驗收條件及測試策略
|
|
17
|
+
|
|
18
|
+
## 工作流程
|
|
19
|
+
1. 理解用戶需求並閱讀代碼庫
|
|
20
|
+
分析用戶需求,並在代碼庫之中搜索、列出可能相關的內容。完成搜索之後,深入閱讀相關代碼,識別變更範圍。
|
|
21
|
+
如果外部環境存在subagents功能,建議通過調度subagents來完成深入閱讀代碼庫的任務。
|
|
22
|
+
|
|
23
|
+
2. 拆分用戶需求及設計業務架構
|
|
24
|
+
將用戶需求轉化、拆分為明確、存在邊界的工程需求。結合現有代碼,設計業務架構。在設計的過程中,你需要考慮包括但不限於以下設計事項:
|
|
25
|
+
- 錯誤處理
|
|
26
|
+
- 測試策略
|
|
27
|
+
- 模塊之間的呼叫、回傳
|
|
28
|
+
- 資料流
|
|
29
|
+
在這個階段,如果用戶有任何不清晰的需求,且該需求會影響你的設計方案,你需要紀錄並在稍後填入規格文檔,等待用戶的回答。
|
|
30
|
+
|
|
31
|
+
3. 將整個設計方案拆分成可執行任務
|
|
32
|
+
將上一步之中你構思的完整設計方案拆分為精確到函式或檔案級別的任務。你必須確保每一個任務都是可以直接執行,且沒有歧義的。以此確保執行設計方案的開發者不會偏離設計方案。
|
|
33
|
+
|
|
34
|
+
4. 制定驗收條件
|
|
35
|
+
為任務制定基於測試的驗收條件,確保每一個任務在完成之後都能夠被驗證。
|
|
36
|
+
同時,為需求制定驗收條件,確保用戶需求能夠被測試清晰地驗收、檢驗成果。
|
|
37
|
+
|
|
38
|
+
5. 使用 `apltk` cli工具協助完成規格文檔
|
|
39
|
+
使用cli工具,產生規格文檔的模板。將你的完整計劃填入到模板之中,並通過cli工具生成完整架構圖讓用戶審閱。
|
|
40
|
+
如果該規格文檔設計超過三個模塊,則需要創建規格批次。
|
|
41
|
+
|
|
42
|
+
## 範例
|
|
43
|
+
- "製作一個網頁德州撲克小遊戲" -> "拆分成多個模塊:遊戲本體邏輯、前端頁面渲染、前端頁面交互邏輯;制定單元測試、整合測試等策略,並製作一份單一的規格文檔指導實作工作。"
|
|
44
|
+
- "提升現有系統的性能" -> "識別目前代碼庫之中拖累性能的代碼。製作規格批次文檔,將代碼庫的全量優化拆分為以三個模塊為一組的優化。對於必須改動業務邏輯才可以做到的性能提升,填寫clarification questions,並等待用戶回答之後更新規格文檔。"
|
|
45
|
+
|
|
46
|
+
## 參考資料
|
|
47
|
+
- `scripts/create-specs` - `apltk create-specs` 背後使用的模板產生器。
|
|
48
|
+
- `references/templates/spec.md` - `spec.md` 的綁定模板。
|
|
49
|
+
- `references/templates/tasks.md` - `tasks.md` 的綁定模板。
|
|
50
|
+
- `references/templates/checklist.md` - `checklist.md` 的綁定模板。
|
|
51
|
+
- `references/templates/contract.md` - `contract.md` 的綁定模板。
|
|
52
|
+
- `references/templates/design.md` - `design.md` 的綁定模板。
|
|
53
|
+
- `references/templates/coordination.md` - batch root 的 coordination 模板。
|
|
54
|
+
- `references/templates/preparation.md` - batch root 的前置工作模板。
|
|
55
|
+
- `references/TEMPLATE_SPEC.md` - `apltk` cli工具相關格式指引。
|
|
56
|
+
- `test-case-strategy/SKILL.md` - 測試策略選擇技能。
|
|
Binary file
|
|
@@ -80,21 +80,9 @@ The atlas is only complete when both of the following are demonstrably true on t
|
|
|
80
80
|
|
|
81
81
|
`apltk architecture validate` **MUST** return OK before reporting completion.
|
|
82
82
|
|
|
83
|
-
##
|
|
83
|
+
## CLI reference
|
|
84
84
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
**Typical global flags** (confirm in `--help`): `--project <root>`, `--spec <spec_dir>` (overlay under `<spec_dir>/architecture_diff/` — see `spec-to-project-html`), `--no-render`, `--no-open`, `--out` (for `diff`). Pass `--no-render` while batching mutations, then **`render`** once before `validate` if you batched.
|
|
88
|
-
|
|
89
|
-
**Groupings — what each family is for:**
|
|
90
|
-
|
|
91
|
-
| Family | Purpose | Key constraints |
|
|
92
|
-
| --- | --- | --- |
|
|
93
|
-
| **`open` / `diff` / `render` / `validate` / `undo` / `help`** | View, regenerate, check, revert, discover verbs | **`validate`** before “done”. **`diff`** after spec overlays to compare base vs proposed-after under `docs/plans/**/architecture_diff/`. |
|
|
94
|
-
| **`meta` / `actor`** | Macro title, summary, optional top-level actors | Summary is the right place for scanned roots and omissions. |
|
|
95
|
-
| **`feature` / `submodule`** | Feature modules and their sub-modules | **Remove** cascades references; in spec overlay mode, rename is usually **remove + add** so `diff` classifies correctly. |
|
|
96
|
-
| **`function` / `variable` / `dataflow` / `error`** | Tables + ordered internal flow + local errors | Declare symbols **before** referencing them from `dataflow`. Use **`remove`** (see `--help`) to delete mistaken rows or steps. |
|
|
97
|
-
| **`edge`** | Cross- **or** intra-feature seams | **`kind`** ∈ `call` \| `return` \| `data-row` \| `failure`. Intra-feature endpoints land in the feature file; cross-feature endpoints land in the index. Prefer stable **`--id`** on edges you may remove later in spec mode. |
|
|
85
|
+
Run **`apltk architecture --help`** and the deeper `apltk architecture <verb> [subverb] --help` pages for the authoritative command tree, required flags, examples, and expected results. This skill keeps only the semantic rules, acceptance criteria, and subagent coordination rules so the documentation does not drift when the CLI evolves.
|
|
98
86
|
|
|
99
87
|
**Cross-feature work timing:** only after **all** feature subagents have returned (Rule 3).
|
|
100
88
|
|
|
@@ -119,17 +107,7 @@ Dispatch one **write-capable** subagent per feature. Hand each subagent: its fea
|
|
|
119
107
|
> - Run **`apltk architecture validate`** before returning (same project root; use **`--help`** for project/spec flags).
|
|
120
108
|
> - **Return ONLY**: (i) sub-module list (slug + kind + one-line role), (ii) outbound boundaries to *other* features’ sub-modules (direction + edge kind + suggested label). No source dumps.
|
|
121
109
|
|
|
122
|
-
**Orchestrator — after every subagent has completed:**
|
|
123
|
-
|
|
124
|
-
```bash
|
|
125
|
-
apltk architecture meta set --title "..." --summary "..." --no-render
|
|
126
|
-
# only when an actor is shared across multiple features:
|
|
127
|
-
apltk architecture actor add --id <id> --label "..." --no-render
|
|
128
|
-
# one edge per cross-feature interaction reported by the subagents:
|
|
129
|
-
apltk architecture edge add --from <featA>/<subA> --to <featB>/<subB> --kind call|return|data-row|failure --label "..." --no-render
|
|
130
|
-
apltk architecture render
|
|
131
|
-
apltk architecture validate
|
|
132
|
-
```
|
|
110
|
+
**Orchestrator — after every subagent has completed:** declare only the cross-feature `apltk architecture` mutations reported by the workers, then render and validate once.
|
|
133
111
|
|
|
134
112
|
The main agent **MUST NOT** re-declare a subagent’s intra-feature components, and **MUST NOT** open source files for any feature it delegated.
|
|
135
113
|
|