@laitszkin/apollo-toolkit 3.11.2 → 3.11.4
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/CHANGELOG.md +32 -0
- 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/scripts/__pycache__/docs_to_voice.cpython-312.pyc +0 -0
- package/generate-spec/SKILL.md +18 -16
- package/generate-spec/agents/openai.yaml +4 -1
- package/generate-spec/scripts/__pycache__/create-specscpython-312.pyc +0 -0
- package/init-project-html/SKILL.md +68 -89
- package/init-project-html/agents/openai.yaml +7 -18
- package/init-project-html/lib/atlas/assets/architecture.css +710 -107
- package/init-project-html/lib/atlas/assets/viewer.client.js +10 -2
- package/init-project-html/lib/atlas/layout.js +225 -55
- package/init-project-html/lib/atlas/render.js +64 -11
- package/katex/scripts/__pycache__/render_katex.cpython-312.pyc +0 -0
- package/open-github-issue/scripts/__pycache__/open_github_issue.cpython-312.pyc +0 -0
- package/package.json +1 -1
- 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/scripts/__pycache__/review_threads.cpython-312.pyc +0 -0
- package/spec-to-project-html/SKILL.md +38 -58
- package/spec-to-project-html/agents/openai.yaml +7 -14
- package/text-to-short-video/scripts/__pycache__/enforce_video_aspect_ratio.cpython-312.pyc +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: spec-to-project-html
|
|
3
3
|
description: >-
|
|
4
|
-
Sync the project HTML architecture atlas to active planning specs by driving `apltk architecture --spec <spec_dir>`. The CLI writes overlay YAML under `<spec_dir>/architecture_diff/atlas/` and re-renders only the affected proposed-after HTML pages — macro SVG and per-sub-module internal-dataflow diagrams stay zoomable
|
|
4
|
+
Sync the project HTML architecture atlas to active planning specs by driving `apltk architecture --spec <spec_dir>`. The CLI writes overlay YAML under `<spec_dir>/architecture_diff/atlas/` and re-renders only the affected proposed-after HTML pages — macro SVG and per-sub-module internal-dataflow diagrams stay zoomable like the base atlas — so `apltk architecture diff` pairs before/after by path under `docs/plans/**/architecture_diff/`. Preserve the two-layer rule and the responsibility split: **subagents only** — each subagent reads ONE affected feature and declares EVERY intra-feature overlay change; the main agent **waits until all subagents finish**, then aggregates outbound summaries and declares **only** cross-feature edges. **Exact CLI spelling:** always `apltk architecture --help`. Ground every declaration in repo evidence; mark `TBD` when code is missing.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Spec To Project HTML
|
|
8
8
|
|
|
9
9
|
## Dependencies
|
|
10
10
|
|
|
11
|
-
- Required: **`init-project-html`** — its `SKILL.md` is the rulebook
|
|
11
|
+
- Required: **`init-project-html`** — its `SKILL.md` is the semantic rulebook; **`apltk architecture --help`** is the verb/flag source of truth. Reuse the same CLI here with `--spec`.
|
|
12
12
|
- Conditional: **`recover-missing-plan`** if a spec pointer is missing.
|
|
13
13
|
- Conditional: **`generate-spec`** / **`implement-specs*`** terminology for requirement IDs.
|
|
14
14
|
- Optional: **`review-spec-related-changes`** when verifying diagram updates against specs.
|
|
@@ -17,26 +17,26 @@ description: >-
|
|
|
17
17
|
## Non-negotiables
|
|
18
18
|
|
|
19
19
|
- **MUST** read specs in order unless the user directs otherwise: `spec.md` → `design.md` → `contract.md` → coordination notes.
|
|
20
|
-
- **MUST** declare every change through the CLI with `--spec <spec_dir
|
|
20
|
+
- **MUST** declare every change through the CLI with `--spec <spec_dir>` (exact verbs/flags: **`apltk architecture --help`**). The CLI writes overlay YAML to `<spec_dir>/architecture_diff/atlas/` and re-renders only the affected proposed-after HTML pages there. **MUST NOT** hand-edit `architecture_diff/**/*.html` — the renderer owns those files.
|
|
21
21
|
- **MUST** obey the semantic rules from `init-project-html/SKILL.md`:
|
|
22
|
-
- Sub-module pages stay self-only — express cross-boundary interactions via
|
|
23
|
-
- Feature pages stay lightweight —
|
|
24
|
-
- **MUST** reconcile
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
- **MUST NOT** drop modules that are still present in code just because the spec omits them — keep them, or rewrite
|
|
30
|
-
- **MUST** scope reads to the **affected feature modules**
|
|
31
|
-
-
|
|
32
|
-
- **
|
|
33
|
-
- **Forbidden
|
|
22
|
+
- Sub-module pages stay self-only — express cross-boundary interactions via **edges** (cross-feature or intra-feature), never as sub-module page prose.
|
|
23
|
+
- Feature pages stay lightweight — cross-sub-module choreography belongs in **edges**, not in `dataflow` prose that pretends to cross features.
|
|
24
|
+
- **MUST** reconcile deltas through the CLI families described in **`--help`**:
|
|
25
|
+
- Structural changes → `feature` / `submodule` (**add** / **set** / **remove** as appropriate).
|
|
26
|
+
- Per-sub-module rows → `function`, `variable`, `dataflow`, `error` (**add** / **remove** / **reorder** for dataflow where supported).
|
|
27
|
+
- Seams → `edge` **add** / **remove** (prefer stable **`--id`** when you may remove the same edge later).
|
|
28
|
+
- **`submodule remove`** / **`feature remove`** in spec mode populate removal manifests so `diff` can show **removed** pages; renames are usually **remove old slug + add new slug** so the viewer shows remove + add rather than a silent overwrite.
|
|
29
|
+
- **MUST NOT** drop modules that are still present in code just because the spec omits them — keep them, or rewrite role/purpose to flag “out of spec scope”.
|
|
30
|
+
- **MUST** scope reads to the **affected feature modules** from the spec/design diff (plus any feature owning the other end of a cross-feature edge into an affected one). **Subagents own intra-feature overlay writes; the main agent owns cross-feature seams — after all subagents finish:**
|
|
31
|
+
- Dispatch **one write-capable subagent per affected feature**. Each applies every intra-feature overlay mutation via `apltk architecture ... --spec <spec_dir>` (exact flags: **`--help`**). Each returns **ONLY** a structured summary: sub-module change list, outbound boundary changes (cross-feature edges to add/change/remove), and any `planned` / `gap` markers.
|
|
32
|
+
- **MUST** wait until **every** dispatched subagent has completed before running any cross-feature **`edge`** mutation, overlay-wide **`meta`** that stitches multiple features, or shared **`actor`** that exists only for cross-feature context.
|
|
33
|
+
- **Forbidden:** loading every affected feature’s source into the main agent before delegating — that explodes context and produces contradictory overlays.
|
|
34
34
|
- **MUST** run `apltk architecture validate --spec <spec_dir>` after the final mutation. Resolve every reported error before reporting completion.
|
|
35
35
|
|
|
36
36
|
## Standards (summary)
|
|
37
37
|
|
|
38
38
|
- **Evidence**: cite the spec passage (design subsystem entry) alongside the code path; record the citation in `meta.summary` or in sub-module purposes when relevant.
|
|
39
|
-
- **Execution**: locate the plan set → list affected feature modules →
|
|
39
|
+
- **Execution**: locate the plan set → list affected feature modules → subagent fan-out → **all complete** → cross-feature edges → `render --spec` if batched → `validate --spec` → `diff` check → handover.
|
|
40
40
|
- **Quality**: macro overlay still shows every cross-feature data-row the spec requires; sub-module declarations stay self-only; `apltk architecture diff` opens cleanly with no orphan pages; no dangling edges.
|
|
41
41
|
- **Output**: touches only `<spec_dir>/architecture_diff/atlas/**` (overlay state) and `<spec_dir>/architecture_diff/**/*.html` (renderer output). Base `resources/project-architecture/` is **NEVER** mutated.
|
|
42
42
|
|
|
@@ -44,8 +44,8 @@ description: >-
|
|
|
44
44
|
|
|
45
45
|
Open the proposed-after viewer (`apltk architecture diff`) and verify both criteria on the overlay pages before reporting completion:
|
|
46
46
|
|
|
47
|
-
1. **The macro overlay clearly shows the proposed-after feature × sub-module relationships**, including data flow (
|
|
48
|
-
2. **Each touched sub-module
|
|
47
|
+
1. **The macro overlay clearly shows the proposed-after feature × sub-module relationships**, including data flow (**`data-row`**), interaction logic (**`call`** + **`return`**), error handling and rollback (**`failure`**). Any new / changed / removed cross-boundary path the spec implies **MUST** exist as an edge mutation in the overlay — not as sub-module prose.
|
|
48
|
+
2. **Each touched sub-module’s internal overlay diagram clearly shows the function-level interactions inside it**, including function references and variable reads/writes on `dataflow` steps. Declare `function` / `variable` before referencing them so `validate --spec` passes.
|
|
49
49
|
|
|
50
50
|
## Workflow
|
|
51
51
|
|
|
@@ -55,69 +55,49 @@ User-pointed path wins; otherwise use the batch `coordination.md` or `recover-mi
|
|
|
55
55
|
|
|
56
56
|
### 2) List the affected feature modules (no function bodies yet)
|
|
57
57
|
|
|
58
|
-
Derive from the spec/design diff which feature modules change: new sub-modules, edge changes, variable changes, error changes, retired sub-modules… **Also** include any feature owning the other end of a cross-feature edge that is being changed (even if that feature
|
|
58
|
+
Derive from the spec/design diff which feature modules change: new sub-modules, edge changes, variable changes, error changes, retired sub-modules… **Also** include any feature owning the other end of a cross-feature edge that is being changed (even if that feature’s own spec is untouched). Record only `slug + change-kind`; do not enter function bodies yet.
|
|
59
59
|
|
|
60
|
-
### 3)
|
|
60
|
+
### 3) Subagents patch features; orchestrator patches cross-feature seams **after** all workers finish
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
Dispatch one **write-capable subagent per affected feature**, plus the main agent for the macro seams. Each subagent owns every intra-feature overlay write and reports outbound boundaries upward:
|
|
62
|
+
Dispatch one **write-capable subagent per affected feature**. Each subagent owns every intra-feature overlay write and reports outbound boundaries upward. Use **`apltk architecture --help`** for exact `add|set|remove|reorder` spelling.
|
|
65
63
|
|
|
66
64
|
> **Feature `<slug>` subagent contract (overlay)**
|
|
67
|
-
> - Read this feature
|
|
68
|
-
> - Apply every intra-feature overlay mutation
|
|
69
|
-
>
|
|
70
|
-
>
|
|
71
|
-
> - Intra-feature `edge add|remove` for every changed function-call / return / data-row / failure / rollback edge between the feature's own sub-modules.
|
|
72
|
-
> - Run `apltk architecture validate --spec <spec_dir>` (scoped check) before returning.
|
|
73
|
-
> - **Return ONLY**: (i) the sub-module change list (slug + change-kind + new kind/role when relevant), (ii) outbound boundary changes (cross-feature edges added / changed / removed, with the other-end `feature/sub` and the suggested `--kind` / `--label`), (iii) any `planned` / `gap` flags so the main agent can mirror them in `meta.summary` if needed.
|
|
65
|
+
> - Read this feature’s affected sub-modules and the cited spec passages / requirement IDs.
|
|
66
|
+
> - Apply every intra-feature overlay mutation with `--spec <spec_dir>`: structural (`feature` / `submodule`), rows (`function`, `variable`, `dataflow`, `error`), and intra-feature **`edge`** changes (including failure / rollback between this feature’s own sub-modules). Order `dataflow` so **variable state** reads end-to-end.
|
|
67
|
+
> - Run `apltk architecture validate --spec <spec_dir>` before returning.
|
|
68
|
+
> - **Return ONLY**: (i) sub-module change list, (ii) outbound boundary changes (cross-feature edges add/change/remove with endpoints and suggested kind/label), (iii) any `planned` / `gap` flags for `meta.summary`.
|
|
74
69
|
|
|
75
|
-
|
|
70
|
+
**After every subagent has completed**, the main agent declares **only** cross-feature seams, then renders and validates:
|
|
76
71
|
|
|
77
72
|
```bash
|
|
78
|
-
#
|
|
73
|
+
# exact flags per edge: see --help
|
|
79
74
|
apltk architecture edge add --spec <spec_dir> --from <featA>/<subA> --to <featB>/<subB> --kind call|return|data-row|failure --label "..." --no-render
|
|
80
75
|
apltk architecture edge remove --spec <spec_dir> --id <stable_id> --no-render
|
|
81
76
|
apltk architecture render --spec <spec_dir>
|
|
82
77
|
apltk architecture validate --spec <spec_dir>
|
|
83
78
|
```
|
|
84
79
|
|
|
85
|
-
- **Pause →** Do
|
|
86
|
-
- The main agent **MUST NOT** re-declare a subagent
|
|
87
|
-
|
|
88
|
-
#### 3B) Without subagents — feature-by-feature read-declare loop
|
|
89
|
-
|
|
90
|
-
Process the step-2 list one feature at a time. Per feature:
|
|
91
|
-
|
|
92
|
-
1. **Deep-read** this feature's affected sub-modules.
|
|
93
|
-
2. **Run CLI verbs immediately** with `--spec ...`: `submodule add|set|remove`, `function add|remove`, `variable add|remove`, `dataflow add|remove|reorder`, `error add|remove`, intra-feature `edge add|remove`.
|
|
94
|
-
3. **Cross-feature edges**: if the target feature has not been overlaid yet, add the edge anyway — the CLI accepts edges into features that exist in the base atlas without re-declaring them in the overlay.
|
|
95
|
-
4. **Drop function-level memory** of this feature; keep only cluster id + edge notes.
|
|
96
|
-
5. Move to the next feature.
|
|
97
|
-
|
|
98
|
-
Final pass after every feature is patched:
|
|
99
|
-
|
|
100
|
-
- `apltk architecture render --spec <spec_dir>` (if you used `--no-render`).
|
|
101
|
-
- `apltk architecture validate --spec <spec_dir>`.
|
|
80
|
+
- **Pause →** Do `planned` / `gap` markers read consistently across affected sub-modules?
|
|
81
|
+
- The main agent **MUST NOT** re-declare a subagent’s intra-feature components, and **MUST NOT** open source files for any feature it delegated.
|
|
102
82
|
|
|
103
|
-
- **Pause →**
|
|
83
|
+
- **Pause →** Does `apltk architecture diff` pair every changed page correctly? If a page shows as add + remove instead of modified, you renamed a slug somewhere — re-check.
|
|
104
84
|
|
|
105
85
|
### 4) Traceability (suggested)
|
|
106
86
|
|
|
107
|
-
Use `feature-trace` (or
|
|
87
|
+
Use `feature-trace` (or `meta.summary` for spec-only changes) to map spec IDs to implementation status: `met` / `partial` / `planned` / `gap`.
|
|
108
88
|
|
|
109
89
|
### 5) Report
|
|
110
90
|
|
|
111
|
-
List touched
|
|
91
|
+
List overlay files touched (or verb families used), the diff counts (`modified` / `added` / `removed`) from `apltk architecture diff`, confirmation that **all subagents finished before cross-feature wiring**, unresolved spec-vs-code gaps, and any follow-ups.
|
|
112
92
|
|
|
113
93
|
## Sample hints
|
|
114
94
|
|
|
115
|
-
- **Batch merge**:
|
|
116
|
-
- **Spec shrinks scope**: prefer `submodule set --role "deprecated: ..."` so reviewers see
|
|
117
|
-
- **Design-only change**: still review edges —
|
|
95
|
+
- **Batch merge**: each member spec’s `--spec <member_dir>` writes its own overlay; `diff` lists each spec’s section in the paginated viewer.
|
|
96
|
+
- **Spec shrinks scope**: prefer `submodule set --role "deprecated: ..."` before `submodule remove` so reviewers see intent.
|
|
97
|
+
- **Design-only change**: still review edges — order shifts surface as edge mutations; `validate --spec` catches dangling references.
|
|
118
98
|
|
|
119
99
|
## References
|
|
120
100
|
|
|
121
|
-
- `init-project-html/SKILL.md` —
|
|
122
|
-
- `init-project-html/references/TEMPLATE_SPEC.md` —
|
|
123
|
-
-
|
|
101
|
+
- `init-project-html/SKILL.md` — semantic contracts and acceptance criteria.
|
|
102
|
+
- `init-project-html/references/TEMPLATE_SPEC.md` — schema cheat sheet (fields/enums), not a command list.
|
|
103
|
+
- **`apltk architecture --help`** — live CLI reference.
|
|
@@ -2,17 +2,10 @@ interface:
|
|
|
2
2
|
display_name: "spec-to-project-html"
|
|
3
3
|
short_description: "Sync the project HTML architecture atlas with active planning specs via `apltk architecture --spec`"
|
|
4
4
|
default_prompt: >-
|
|
5
|
-
Use $spec-to-project-html
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
`
|
|
12
|
-
`function add|remove --feature X --submodule Y --name fn --in "..." --out "..." --side pure|io|write|tx|lock|network --purpose "..."`,
|
|
13
|
-
`variable add|remove --feature X --submodule Y --name v --type T --scope call|tx|persist|instance|loop --purpose "..."`,
|
|
14
|
-
`dataflow add|remove|reorder --feature X --submodule Y --step "..." [--fn <declared-fn>] [--reads "v1,v2"] [--writes "v3,v4"] [--at N]` (or `--from i --to j` for reorder; every `--fn` / `--reads` / `--writes` value MUST reference a function/variable declared in the merged state for the same sub-module or `validate --spec` fails),
|
|
15
|
-
`error add|remove --feature X --submodule Y --name ErrCode --when "..." --means "..."`,
|
|
16
|
-
`edge add|remove --from <feature>[/sub] --to <feature>[/sub] --kind call|return|data-row|failure --label "..." [--id <stable>]`.
|
|
17
|
-
Removals: `submodule remove` / `feature remove` writes `_removed.yaml`; the renderer emits `_removed.txt` and `apltk architecture diff` classifies the missing pages as `removed`. Rename = remove old slug + add new slug. After the final mutation run `apltk architecture validate --spec <spec_dir>` (must return OK) and `apltk architecture diff` to verify pairing.
|
|
18
|
-
Each sub-module page stays self-only — express any cross-boundary interaction as an edge via `edge add`, NEVER as sub-module page prose. For `planned` / `gap` items the spec mandates but code does not yet implement, surface the marker in the relevant field (e.g. `--role "planned: TOTP service"`, `--purpose "gap: not wired"`). Anchor every declaration to a concrete spec passage + code path. Report the read strategy used (3A or 3B), the resulting diff counts (`modified` / `added` / `removed`), and any unresolved spec-vs-code gaps.
|
|
5
|
+
Use $spec-to-project-html. Read docs/plans (spec → design → contract). Every overlay mutation: `apltk architecture --spec <spec_dir> …`. **Exact commands: `apltk architecture --help`** — do not trust long command lists in docs.
|
|
6
|
+
CLI writes `<spec_dir>/architecture_diff/atlas/*.yaml` + affected HTML under `<spec_dir>/architecture_diff/`. Base `resources/project-architecture/` is read-only here. NEVER hand-edit `architecture_diff/**`.
|
|
7
|
+
**`apltk architecture diff`** builds a paginated viewer: scans all `docs/plans/**/architecture_diff/`, pairs overlay paths with base atlas HTML by relative path, labels modified/added/removed — use it to verify the architecture delta before hand-off.
|
|
8
|
+
**Subagents only:** dispatch ONE write-capable subagent per AFFECTED feature; each applies ALL intra-feature overlay mutations (`submodule`/`function`/`variable`/`dataflow`/`error`/`edge` within that feature). Each returns ONLY change summary + outbound boundary deltas for OTHER features.
|
|
9
|
+
**HARD GATE:** main agent MUST wait until ALL subagents finish before ANY cross-feature `edge add|remove`, overlay `meta` that stitches multiple features, or shared `actor` for cross-feature context. Then `render --spec`, `validate --spec`.
|
|
10
|
+
Sub-module pages stay self-only — cross-boundary = `edge`. For removals/renames in overlay, follow SKILL.md (`submodule remove` / remove+add pattern) so `diff` classifies correctly.
|
|
11
|
+
After work: `validate --spec` MUST be OK; run `diff` and report modified/added/removed counts. Semantic rules: $init-project-html SKILL.md.
|