@laitszkin/apollo-toolkit 2.12.3 → 2.12.5

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 CHANGED
@@ -58,6 +58,16 @@ This repository enables users to install and run a curated set of reusable agent
58
58
  - Users can prepare and publish versioned releases with changelog and tag workflows.
59
59
  - Users can generate long-form videos by orchestrating storyboard, voice, and Remotion-based production steps.
60
60
 
61
+ ## Common Commands
62
+
63
+ - `npm test` - 執行 Node 測試套件。
64
+ - `node bin/apollo-toolkit.js` - 直接從倉庫啟動 Apollo Toolkit CLI。
65
+ - `node bin/apollo-toolkit.js codex openclaw trae` - 以非互動方式將技能安裝到指定目標。
66
+ - `python3 scripts/validate_skill_frontmatter.py` - 驗證所有頂層技能 `SKILL.md` 的 frontmatter。
67
+ - `python3 scripts/validate_openai_agent_config.py` - 驗證所有技能 `agents/openai.yaml` 設定。
68
+ - `./scripts/install_skills.sh codex` - 用本地安裝腳本把技能安裝到 Codex 目錄。
69
+ - `./scripts/install_skills.sh all` - 用本地安裝腳本同步安裝到所有支援目標。
70
+
61
71
  ## Core Project Purpose
62
72
 
63
73
  - Provide a curated set of reusable agent skills that can be installed into Codex/OpenClaw/Trae skill directories.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,23 @@ All notable changes to this repository are documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [v2.12.5] - 2026-04-01
8
+
9
+ ### Changed
10
+ - Update `maintain-project-constraints` so generated `AGENTS.md` templates must include a factual `Common Commands` section grounded in repository-owned command entry points such as CLIs, package scripts, and task runners.
11
+ - Refresh the Apollo Toolkit root `AGENTS.md` guidance with repository-specific common commands for the local CLI, validation scripts, tests, and install flows.
12
+
13
+ ## [v2.12.4] - 2026-04-01
14
+
15
+ ### Added
16
+ - Add a bundled macOS `PDFKit` extraction helper for `weekly-financial-event-report` so marked-event PDFs can still be parsed locally when the usual PDF tooling is unavailable.
17
+
18
+ ### Changed
19
+ - Expand `weekly-financial-event-report` to prefer the `pdf` skill for extraction, fall back to the local PDFKit helper on macOS, and call `document-vision-reader` when visual highlights are not recoverable from extracted text alone.
20
+ - Rework `align-project-documents` around category-based, newcomer-friendly documentation selection with a reusable template grounded in Diataxis and common open source doc types.
21
+ - Tighten `commit-and-push` and `version-release` so clean-worktree submit/release requests must inspect existing local and remote state instead of fabricating a new submission result.
22
+ - Strengthen `production-sim-debug` to record the active artifact root immediately and check startup admission signals before concluding a run had no opportunities.
23
+
7
24
  ## [v2.12.3] - 2026-03-30
8
25
 
9
26
  ### Changed
@@ -16,12 +16,12 @@ description: Read and understand a software project, then generate or align proj
16
16
 
17
17
  - Evidence: Treat source code, configuration, scripts, and tests as the source of truth.
18
18
  - Execution: Discover project facts before choosing generate mode or align mode.
19
- - Quality: Keep every non-trivial claim traceable and remove stale documentation instead of appending around it.
20
- - Output: Write concise, operator-friendly docs with runnable commands and clear section structure.
19
+ - Quality: Keep every non-trivial claim traceable, choose document categories based on actual content, and remove stale documentation instead of appending around it.
20
+ - Output: Write newcomer-friendly docs with descriptive headings, runnable commands, and clear reader guidance.
21
21
 
22
22
  ## Goal
23
23
 
24
- Produce accurate, code-grounded project documentation. Prefer evidence from source code, configs, scripts, and tests over assumptions.
24
+ Produce accurate, code-grounded project documentation that remains readable for people who do not yet understand the project, its domain, or the development workflow. Prefer evidence from source code, configs, scripts, and tests over assumptions.
25
25
 
26
26
  ## Workflow
27
27
 
@@ -31,24 +31,58 @@ Produce accurate, code-grounded project documentation. Prefer evidence from sour
31
31
  - Inspect main runtime paths (API/server, worker, frontend, CLI, jobs) and dependency boundaries.
32
32
  - Build a factual map: startup commands, environment variables, request/data flow, major modules, external integrations, and observability points.
33
33
  - Record concrete evidence with file paths for every important claim.
34
-
35
- ### 2) Decide documentation mode
34
+ - Identify likely readers and their knowledge gaps: new developer, operator, support teammate, product stakeholder, or mixed audience.
35
+ - Identify the actual reader tasks: understand the project, run locally, configure credentials, operate a workflow, debug failures, or change code safely.
36
+
37
+ ### 2) Classify documentation by content, not by fixed headings
38
+
39
+ - Start from the repository's real content and the readers' jobs to be done.
40
+ - Choose only the categories that are supported by evidence and useful to the target audience.
41
+ - Use open source documentation conventions as the classification baseline instead of inventing project-local categories first.
42
+ - Prefer the Diataxis content families for content classification: tutorial, how-to, reference, and explanation.
43
+ - Map those content families onto common open source document types when appropriate: `README`, `CONTRIBUTING`, `SECURITY`, `CODE_OF_CONDUCT`, troubleshooting guides, glossary, and release/change documents.
44
+ - Prefer descriptive, task-led headings such as `本地啟動 API 服務`, `設定 GitHub OAuth 憑證`, or `匯入任務卡住時如何排查`.
45
+ - Do not force a fixed chapter list when the project does not need it.
46
+ - Use `references/templates/category-based-project-docs-template.md` as the primary selection guide.
47
+
48
+ Useful content categories include:
49
+
50
+ - README or docs index for orientation
51
+ - tutorial or getting-started guide for first success
52
+ - how-to or runbook guides for real tasks
53
+ - reference docs for configuration, commands, endpoints, and limits
54
+ - explanation docs for architecture, concepts, and tradeoffs
55
+ - CONTRIBUTING for contribution workflow
56
+ - SECURITY for vulnerability reporting and support policy
57
+ - CODE_OF_CONDUCT for community expectations
58
+ - glossary, FAQ, decisions, or release notes when repository evidence shows they are needed
59
+
60
+ ### 3) Decide documentation mode
36
61
 
37
62
  - **Generate mode**: no usable docs exist, or user asks to create docs from scratch.
38
63
  - **Align mode**: existing docs exist and must be checked against implementation.
39
64
 
40
- ### 3) Generate mode output
65
+ ### 4) Generate mode output
66
+
67
+ Create or update a minimal document set chosen from the content categories above. Do not require every project to have the same headings or files.
68
+
69
+ At minimum, ensure the final output answers the questions that matter for the repository's real readers:
41
70
 
42
- Create or update documentation with at least these sections:
71
+ 1. What is this project for?
72
+ 2. Who usually needs this document?
73
+ 3. How do I complete the most common task safely?
74
+ 4. What must I prepare before I start?
75
+ 5. What result should I expect if things are working?
76
+ 6. What usually goes wrong and how do I verify it?
77
+ 7. Where in the repository is the source of truth?
43
78
 
44
- 1. Project Overview
45
- 2. Quick Start / Local Run
46
- 3. Usage Guide (common workflows and commands)
47
- 4. Technical Architecture (components, boundaries, data flow)
48
- 5. Configuration and Environment Variables
49
- 6. Debugging Playbook (symptom -> checks -> likely root cause -> fix path)
50
- 7. Testing and Validation
51
- 8. Deployment or Runtime Notes (if applicable)
79
+ Recommended output pattern:
80
+
81
+ - A short root `README.md` or equivalent entry document for orientation.
82
+ - One or more focused documents grouped by standard documentation type.
83
+ - Optional runbooks for task-heavy or failure-heavy workflows.
84
+ - Optional glossary/FAQ material only when the project actually contains domain complexity or repeated team confusion.
85
+ - Separate contributor or community-governance docs only when the repository exposes those collaboration workflows.
52
86
 
53
87
  Writing rules:
54
88
 
@@ -56,8 +90,12 @@ Writing rules:
56
90
  - Use concrete commands and paths from the repository.
57
91
  - Keep examples executable when possible.
58
92
  - Call out unknowns explicitly instead of guessing.
93
+ - Explain why a file, service, command, or environment matters before telling the reader to use it.
94
+ - Assume the reader may not understand local jargon, deployment assumptions, or the project's business terms.
95
+ - Prefer task-oriented section titles over generic labels.
96
+ - Keep different documentation intents separate: tutorials teach, how-to guides solve tasks, reference catalogs facts, and explanation pages provide understanding.
59
97
 
60
- ### 4) Align mode output
98
+ ### 5) Align mode output
61
99
 
62
100
  When docs already exist:
63
101
 
@@ -70,6 +108,7 @@ When docs already exist:
70
108
  - **Ambiguous**
71
109
  4. Update docs to match real behavior.
72
110
  5. Add a short "Documentation Delta" summary listing major corrections.
111
+ 6. Rewrite headings that are too generic or template-like so they reflect the real task or concept being documented.
73
112
 
74
113
  Alignment checklist:
75
114
 
@@ -79,6 +118,18 @@ Alignment checklist:
79
118
  - Config keys and env vars match code usage.
80
119
  - Debug instructions reference real logs, metrics, and breakpoints.
81
120
  - Test commands and expected outputs are current.
121
+ - Headings match actual content categories instead of forcing one universal structure.
122
+ - Newcomers can infer what each document is for before reading the full content.
123
+ - Document placement follows recognizable open source conventions whenever the repository scope justifies them.
124
+
125
+ ### 6) Newcomer-readability rules
126
+
127
+ - Start each document by making the reader's situation explicit: who this is for, what they are trying to do, and when they should use this document.
128
+ - When describing a task, include prerequisites, exact steps, expected signals, and common failure recovery.
129
+ - When describing architecture, explain responsibilities and boundaries in plain language before diving into paths or modules.
130
+ - When describing configuration or credentials, explain why each key or service exists and what breaks if it is missing.
131
+ - When describing debugging, structure content around observable symptoms and verification paths, not abstract subsystem names.
132
+ - If the repository contains specialist domain language, add a glossary or inline definitions instead of assuming prior knowledge.
82
133
 
83
134
  ## Quality Gate (must pass before finishing)
84
135
 
@@ -86,9 +137,23 @@ Alignment checklist:
86
137
  - Ensure usage and debug steps are reproducible from current code.
87
138
  - Ensure architecture description reflects actual module boundaries.
88
139
  - Ensure outdated statements are removed, not only appended.
140
+ - Ensure document categories and headings are chosen because they fit the content, not because the template listed them.
141
+ - Ensure a newcomer can identify the correct next step from the document without already knowing the codebase.
142
+ - Ensure the chosen document types align with common open source practice so contributors can find information where they expect it.
89
143
 
90
144
  ## Output Style
91
145
 
92
- - Write concise, operator-friendly documentation.
93
- - Use headings, short bullets, and runnable command snippets.
146
+ - Write concise but high-context documentation for humans, not placeholder-driven template output.
147
+ - Use headings, short bullets, tables, and runnable command snippets when they improve scanning.
94
148
  - Prefer direct language and avoid speculative wording.
149
+ - Make headings descriptive enough that a reader can skim the table of contents and know which page or section to open.
150
+
151
+ ## Reference Template
152
+
153
+ - `references/templates/category-based-project-docs-template.md`: category-based template and reusable section blocks for newcomer-friendly project documentation.
154
+
155
+ ## External Documentation Basis
156
+
157
+ - Diataxis: use the tutorial / how-to / reference / explanation model as the primary content classification.
158
+ - The Good Docs Project: use common open source template types such as README, quickstart, tutorial, how-to, troubleshooting, glossary, and style-oriented guidance as practical packaging patterns.
159
+ - GitHub open source guidance: treat `README`, `CONTRIBUTING`, license, code of conduct, and security policy as common repository-level documents when the project has contributor-facing community workflows.
@@ -0,0 +1,170 @@
1
+ # Category-Based Project Documentation Template
2
+
3
+ Use this template as a selection guide, not a mandatory outline. Start by classifying the repository's real content and the readers' likely questions, then choose only the document categories and section blocks that are actually supported by evidence.
4
+
5
+ Base the classification on common open source documentation practice:
6
+
7
+ - Use the Diataxis content families when deciding what kind of content you are writing: tutorial, how-to, reference, and explanation.
8
+ - Use common open source repository documents when deciding where the content should live: `README`, `CONTRIBUTING`, `SECURITY`, `CODE_OF_CONDUCT`, troubleshooting guides, glossary, and release notes when applicable.
9
+ - Use The Good Docs Project templates as a practical guide for selecting content types that teams repeatedly need in real projects.
10
+
11
+ ## 1. Start With Reader And Content Classification
12
+
13
+ Before writing, identify:
14
+
15
+ | Classification | Questions to answer | Example answers |
16
+ | --- | --- | --- |
17
+ | Primary readers | Who needs this document first? | New developer, operator, support teammate, PM, founder |
18
+ | Reader background | What might they not know yet? | No repo context, no local setup experience, no domain knowledge |
19
+ | Main job to be done | What is the reader trying to accomplish? | Run locally, change a feature, deploy, debug an incident |
20
+ | Evidence sources | Which files prove the behavior? | `README.md`, `package.json`, `src/server.ts`, `.github/workflows/deploy.yml` |
21
+ | Documentation risk | What would go wrong if this is undocumented? | Broken onboarding, misconfigured secrets, incorrect production operation |
22
+
23
+ Write the document around the real questions above. Do not force a category or section when the repository does not support it.
24
+
25
+ ## 2. Choose The Right Document Categories
26
+
27
+ Select one or more categories below. Keep the titles content-led and specific. Prefer titles such as `本地啟動後端服務`, `設定 Stripe 測試金鑰`, or `訂單同步失敗時如何排查`, instead of generic headings that hide the real task.
28
+
29
+ | Open source documentation type | Diataxis family | Use when the repository contains... | Main reader need | Suggested output path |
30
+ | --- | --- | --- | --- |
31
+ | README / docs index | Mixed entrypoint | Clear project purpose, user value, repo scope, key links | "What is this project and where do I start?" | `README.md`, `docs/README.md` |
32
+ | Tutorial / getting started | Tutorial | A first-run path that teaches by doing | "Help me complete my first successful run." | `docs/getting-started.md`, `docs/tutorials/*.md` |
33
+ | How-to / runbook / operations guide | How-to | Repeated workflows, CLI commands, dashboards, jobs, support actions | "How do I perform this real task?" | `docs/how-to/*.md`, `docs/runbooks/*.md`, `docs/operations.md` |
34
+ | Reference / configuration catalog | Reference | Env vars, config files, commands, endpoints, state tables, limits | "What options, inputs, or values exist?" | `docs/configuration.md`, `docs/reference/*.md` |
35
+ | Explanation / architecture / concepts | Explanation | Module boundaries, data flow, ownership, state transitions, tradeoffs | "How is this built and why is it shaped this way?" | `docs/architecture.md`, `docs/concepts/*.md` |
36
+ | Troubleshooting | How-to + reference | Known symptoms, causes, checks, recovery actions | "What should I check when it breaks?" | `docs/troubleshooting.md`, `docs/runbooks/*.md` |
37
+ | CONTRIBUTING | How-to + explanation | Contribution flow, local validation, review expectations | "How do I contribute safely?" | `CONTRIBUTING.md`, `docs/developer-guide.md` |
38
+ | SECURITY | How-to + reference | Vulnerability reporting process, supported versions, security boundaries | "How should I report a security issue?" | `SECURITY.md` |
39
+ | CODE_OF_CONDUCT | Community governance | Community expectations and reporting path | "How does this project expect people to behave?" | `CODE_OF_CONDUCT.md` |
40
+ | Glossary / terminology | Reference | Business rules, lifecycle states, project vocabulary, permissions | "What do these terms mean?" | `docs/glossary.md`, `docs/terminology.md` |
41
+ | FAQ / decisions / release notes | Explanation + reference | Repeated questions, key tradeoffs, notable changes | "Why was this choice made?" / "What changed?" | `docs/faq.md`, `docs/decisions/*.md`, `CHANGELOG.md` |
42
+
43
+ ### Selection Rules
44
+
45
+ - Start by asking which Diataxis family the content belongs to.
46
+ - Then choose the most conventional open source document type that readers would expect to find.
47
+ - Do not merge tutorial, how-to, reference, and explanation into one page unless the repository is genuinely small enough that separation would hurt readability.
48
+ - Keep community-governance documents such as `CONTRIBUTING`, `SECURITY`, and `CODE_OF_CONDUCT` separate from product usage docs.
49
+ - When a document mixes content types, decide which type is primary and move the rest behind links.
50
+
51
+ ## 3. Section Blocks You Can Reuse Inside Any Document
52
+
53
+ Use only the blocks that help the target reader. Rename each heading to match the specific content.
54
+
55
+ ### A. Reader Context Block
56
+
57
+ Use when the reader may not understand the project or task yet.
58
+
59
+ - Who should read this:
60
+ - What they are probably trying to do:
61
+ - What they need to know first:
62
+ - What success looks like after reading:
63
+
64
+ ### B. Before You Start Block
65
+
66
+ Use for setup, operations, deployments, or debugging.
67
+
68
+ - Required tools or accounts:
69
+ - Required permissions or credentials:
70
+ - Files, services, or environments involved:
71
+ - Safe test or sandbox alternatives:
72
+
73
+ ### C. Exact Steps Block
74
+
75
+ Use for any task-oriented content.
76
+
77
+ 1. State the action in plain language.
78
+ 2. Give the exact command, UI path, or file path.
79
+ 3. Explain what result should appear.
80
+ 4. Explain what to do if the result does not appear.
81
+
82
+ ### D. Expected Signals Block
83
+
84
+ Use when readers need to confirm they are on the right path.
85
+
86
+ - Success logs, UI states, API responses, artifacts, or screenshots:
87
+ - Expected side effects:
88
+ - How long the step usually takes:
89
+
90
+ ### E. Failure And Recovery Block
91
+
92
+ Use when the workflow can fail or confuse newcomers.
93
+
94
+ - Common mistake:
95
+ - Symptom:
96
+ - Likely cause:
97
+ - How to verify:
98
+ - How to fix:
99
+
100
+ ### F. Code Navigation Block
101
+
102
+ Use for architecture or developer-facing docs.
103
+
104
+ - Entry point:
105
+ - Main modules and responsibilities:
106
+ - Important data models:
107
+ - External integration touchpoints:
108
+ - Highest-risk files to review before editing:
109
+
110
+ ### G. Decision And Limitation Block
111
+
112
+ Use when the code or operations include tradeoffs.
113
+
114
+ - Current limitation:
115
+ - Why it exists:
116
+ - When it matters:
117
+ - Safe workaround:
118
+ - Evidence:
119
+
120
+ ## 4. Newcomer-Friendly Writing Rules
121
+
122
+ Every non-trivial document should help a reader who does not yet know the project. Prefer explaining:
123
+
124
+ - what this part of the system is for
125
+ - why the reader would need it
126
+ - what they must prepare beforehand
127
+ - what exact action they should take
128
+ - what result they should expect
129
+ - what usually goes wrong
130
+ - where in the repository the truth lives
131
+
132
+ Avoid:
133
+
134
+ - headings that only repeat template words without conveying meaning
135
+ - assuming the reader already knows internal jargon
136
+ - mentioning files, services, or commands without saying why they matter
137
+ - mixing future plans with current behavior
138
+
139
+ ## 5. Evidence Checklist
140
+
141
+ Before finishing, confirm:
142
+
143
+ - every important instruction maps to code, config, scripts, tests, or current deployment files
144
+ - every command is current and runnable, or explicitly marked as needing manual confirmation
145
+ - each document category exists because the repository actually needs it
146
+ - each heading is descriptive of the real content, not just copied from a template
147
+ - unknowns are labeled clearly instead of guessed
148
+
149
+ ## 6. Example Of Category Selection
150
+
151
+ Example classification:
152
+
153
+ - Readers: new developer and part-time operator
154
+ - Main needs: local startup, environment configuration, order sync debugging
155
+ - Repository evidence: API server, worker process, queue config, deploy workflow, sync failure logs
156
+
157
+ Reasonable outputs:
158
+
159
+ - `README.md`: project overview and links
160
+ - `docs/getting-started.md`: tutorial-style first successful run
161
+ - `docs/configuration.md`: reference-style env vars and third-party credentials
162
+ - `docs/architecture.md`: explanation of API, worker, queue, and database boundaries
163
+ - `docs/runbooks/order-sync-failures.md`: how-to troubleshooting for order sync issues
164
+ - `CONTRIBUTING.md`: contribution flow, local checks, and review expectations if external contributors are expected
165
+
166
+ Not needed unless evidence supports them:
167
+
168
+ - `docs/glossary.md`
169
+ - `docs/faq.md`
170
+ - separate feature catalog for every route/page
@@ -15,7 +15,7 @@ description: "Guide the agent to submit local changes with commit and push only
15
15
  ## Standards
16
16
 
17
17
  - Evidence: Inspect git state and classify the change set before deciding which quality gates apply, then compare the actual pending diff against root `CHANGELOG.md` `Unreleased` before committing.
18
- - Execution: Run the required quality-gate skills when applicable, and treat every conditional gate whose scenario is met as blocking before submission; hand the repository to `submission-readiness-check` for changelog/docs/plan finalization, preserve staging intent, honor any explicit user-specified target branch, then commit and push without release steps; run dependent git mutations sequentially and verify the remote branch actually contains the new local `HEAD` before reporting success.
18
+ - Execution: Run the required quality-gate skills when applicable, and treat every conditional gate whose scenario is met as blocking before submission; hand the repository to `submission-readiness-check` for changelog/docs/plan finalization, preserve staging intent, honor any explicit user-specified target branch, and when the worktree is already clean inspect local `HEAD`, upstream state, and the most recent relevant commit before deciding the request is a no-op; then commit and push without release steps; run dependent git mutations sequentially and verify the remote branch actually contains the new local `HEAD` before reporting success.
19
19
  - Quality: Re-run relevant validation for runtime changes, preserve unrelated local work safely when branch switching or post-push local sync is required, and do not bypass blocking readiness findings such as missing/stale `Unreleased` bullets or unsynchronized project docs.
20
20
  - Output: Produce a concise Conventional Commit, push it to the intended branch, and report any temporary stash/restore or local branch sync that was required.
21
21
 
@@ -36,6 +36,7 @@ Load only when needed:
36
36
  - Run `git status -sb`, `git diff --stat`, and `git diff --cached --stat`.
37
37
  - Check staged files with `git diff --cached --name-only`.
38
38
  - Inventory repository planning artifacts and project docs, not only staged files, to detect repo specs and non-standard documentation layouts.
39
+ - If the worktree is already clean, inspect `git log -1 --stat`, local `HEAD`, and the configured upstream state before concluding there is nothing to submit; use that evidence to determine whether the requested work was already committed and pushed, committed but not pushed, or never landed.
39
40
  2. Classify changes
40
41
  - `code-affecting`: runtime code, tests, build scripts, CI logic, or behavior-changing config.
41
42
  - `docs-only`: content updates only (for example README, docs, comments).
@@ -78,6 +79,7 @@ Load only when needed:
78
79
  - Never skip `review-change-set` for code-affecting changes, and do not continue past review while confirmed findings remain unresolved.
79
80
  - Never downgrade `discover-edge-cases` or `harden-app-security` to optional follow-up when the change risk says they apply.
80
81
  - Never claim the repository is ready to commit while root `CHANGELOG.md` `Unreleased` is missing the current change or still describes superseded work.
82
+ - Never fabricate a commit/push result when the worktree is already clean; either identify the exact existing commit/upstream state that satisfies the user's request or say that no matching new submission exists.
81
83
  - If release/version/tag work is requested, use `version-release` instead.
82
84
  - If a new branch is required, follow `references/branch-naming.md`.
83
85
  - A pushed implementation can still leave an active spec set behind; commit completion and spec archival are separate decisions.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: maintain-project-constraints
3
- description: Automatically create and maintain AGENTS.md so it stays aligned with the current repository architecture, core business flow, project purpose, and coding conventions. Use when AGENTS.md is missing or may be outdated after code changes.
3
+ description: Automatically create and maintain AGENTS.md so it stays aligned with the current repository architecture, core business flow, common commands, project purpose, and coding conventions. Use when AGENTS.md is missing or may be outdated after code changes.
4
4
  ---
5
5
 
6
6
  # Maintain Project Constraints
@@ -17,7 +17,7 @@ description: Automatically create and maintain AGENTS.md so it stays aligned wit
17
17
  - Evidence: Infer repository architecture, business flow, and conventions from current code and docs rather than assumptions.
18
18
  - Execution: Create or align `AGENTS.md` only after building a concrete inventory of implemented capabilities.
19
19
  - Quality: Keep every statement traceable, remove stale guidance, and ensure `Core business flow` stays exhaustive and concrete.
20
- - Output: Maintain a concise root-level `AGENTS.md` with the required sections and repository-specific wording.
20
+ - Output: Maintain a concise root-level `AGENTS.md` with the required sections, repository-specific wording, and a factual `Common Commands` section when the repository exposes stable command entry points.
21
21
 
22
22
  ## Goal
23
23
 
@@ -38,9 +38,18 @@ After completing any code modification task, proactively run this skill to verif
38
38
 
39
39
  - Project architecture
40
40
  - Core business flow
41
+ - Common commands
41
42
  - Core project purpose
42
43
  - Code style and coding conventions
43
44
 
45
+ For the `Common Commands` section, always use this format:
46
+
47
+ 1. Include only commands that are real, current, and useful in this repository.
48
+ 2. Prefer repository-owned entry points such as package scripts, CLIs, `bin/` programs, `scripts/`, `Makefile`, `justfile`, or other documented task runners.
49
+ 3. For each command, explain when to use it in one short phrase instead of listing bare commands with no context.
50
+ 4. Prioritize commands that help an agent inspect, validate, build, test, or operate repository-specific workflows.
51
+ 5. Do not invent commands, aliases, flags, or task names that are not traceable to the repository.
52
+
44
53
  For the `Core business flow` section, always use this format:
45
54
 
46
55
  1. One short sentence that summarizes what the repository currently enables.
@@ -51,6 +60,13 @@ Example:
51
60
 
52
61
  ```markdown
53
62
 
63
+ ## Common Commands
64
+
65
+ - `npm test` — run the repository's automated test suite.
66
+ - `python3 scripts/validate_skill_frontmatter.py` — validate every top-level `SKILL.md` frontmatter block.
67
+ - `python3 scripts/validate_openai_agent_config.py` — validate every `agents/openai.yaml` interface config.
68
+ - `./scripts/install_skills.sh codex` — install the current toolkit into the local Codex skills directory.
69
+
54
70
  ## Core Business Flow
55
71
 
56
72
  This project enables users to manage and run reusable automation workflows.
@@ -69,11 +85,13 @@ This project enables users to manage and run reusable automation workflows.
69
85
  - Read the repository before writing:
70
86
  - root docs (`README`, contribution docs, design docs)
71
87
  - key source directories and entry points
88
+ - repository command surfaces such as `package.json`, `bin/`, `scripts/`, `Makefile`, `justfile`, or equivalent task runners
72
89
  - user-facing features such as commands, routes, workflows, tasks, or installable modules
73
90
  - representative modules that show coding patterns
74
91
  - test directories and tooling/config files
75
92
  - Infer architecture and conventions from real code, not assumptions.
76
93
  - Build a concrete inventory of all currently implemented capabilities before drafting `Core business flow`.
94
+ - Build a separate inventory of stable, repository-specific commands before drafting `Common Commands`.
77
95
 
78
96
  ### 2) Create AGENTS.md when missing
79
97
 
@@ -81,7 +99,9 @@ When `AGENTS.md` is absent:
81
99
 
82
100
  - Create a new root-level `AGENTS.md`.
83
101
  - Document architecture, business flow, purpose, and coding conventions from observed facts.
102
+ - Document the repository's common commands from observed command entry points and docs.
84
103
  - Write `Core business flow` as one summary sentence followed by unordered bullets that cover every current capability found in the repository.
104
+ - Write `Common commands` as short bullets in the style of ``- `command` — when to use it.``.
85
105
  - Keep language specific to this repository; avoid generic boilerplate.
86
106
 
87
107
  ### 3) Align AGENTS.md when drift is detected
@@ -91,12 +111,15 @@ When `AGENTS.md` exists but is outdated:
91
111
  - Re-read changed or high-impact modules.
92
112
  - Update only sections that no longer match reality.
93
113
  - Expand or trim the `Core business flow` bullet list so it still covers all currently implemented capabilities.
114
+ - Expand, trim, or replace the `Common Commands` list whenever command entry points or recommended workflows have changed.
94
115
  - Preserve correct existing content and structure where possible.
95
116
 
96
117
  ### 4) Quality checks before finishing
97
118
 
98
119
  - Ensure every statement in `AGENTS.md` is traceable to current repository files.
99
120
  - Remove stale paths, renamed components, and obsolete workflows.
121
+ - Remove stale commands, flags, or task names that no longer exist.
122
+ - Verify every command in `Common Commands` is either documented in repository docs or directly supported by the current codebase.
100
123
  - Verify the `Core business flow` section includes a one-sentence summary plus unordered bullets for all currently existing capabilities; do not leave major functions unlisted.
101
124
  - Keep instructions concise, concrete, and operational for future agents.
102
125
 
@@ -106,4 +129,5 @@ When `AGENTS.md` exists but is outdated:
106
129
  - Prefer repository terms already used in code/docs.
107
130
  - Do not include speculative architecture claims.
108
131
  - In `Core business flow`, prefer many short bullets over a few vague bullets; when the product grows, add more bullets so the list remains exhaustive.
132
+ - In `Common Commands`, prefer the smallest useful set of high-signal commands over an exhaustive dump of every helper script.
109
133
  - Keep the document focused on how agents should understand and operate in this project.
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: "Maintain Project Constraints"
3
- short_description: "Automatically create and maintain AGENTS.md so it stays aligned with the current repository architecture, core business flow, project purpose, and coding conventions. Use when AGENTS.md is missing or may be outdated after code changes."
4
- default_prompt: "Use $maintain-project-constraints to automatically create and maintain AGENTS.md so it stays aligned with the current repository architecture, core business flow, project purpose, and coding conventions. Use when AGENTS.md is missing or may be outdated after code changes."
3
+ short_description: "Automatically create and maintain AGENTS.md so it stays aligned with the current repository architecture, core business flow, common commands, project purpose, and coding conventions. Use when AGENTS.md is missing or may be outdated after code changes."
4
+ default_prompt: "Use $maintain-project-constraints to automatically create and maintain AGENTS.md so it stays aligned with the current repository architecture, core business flow, common commands, project purpose, and coding conventions. Use when AGENTS.md is missing or may be outdated after code changes."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@laitszkin/apollo-toolkit",
3
- "version": "2.12.3",
3
+ "version": "2.12.5",
4
4
  "description": "Apollo Toolkit npm installer for managed skill copying across Codex, OpenClaw, and Trae.",
5
5
  "license": "MIT",
6
6
  "author": "LaiTszKin",
@@ -41,6 +41,7 @@ Use this skill to debug simulation workflows where the repository exposes a prod
41
41
 
42
42
  - Use the same production/local simulation script the repository already treats as canonical.
43
43
  - Prefer a bounded run window with a stable run name and output directory.
44
+ - As soon as the harness prints the active run name or output directory, record it and treat that path as the canonical artifact root for the rest of the investigation.
44
45
  - Before launch, read the script or wrapper that enforces the run duration and confirm the real control surface, such as the exact env var name, CLI flag, shutdown helper, and artifact path conventions.
45
46
  - Do not assume a generic `RUNTIME_SECS`-style variable is wired correctly; verify the actual variable names and stop path from code or scripts first.
46
47
  - Save and inspect the exact artifacts produced by that run:
@@ -56,6 +57,7 @@ Use this skill to debug simulation workflows where the repository exposes a prod
56
57
 
57
58
  - Confirm that you are reading the correct database and log files for the active run.
58
59
  - Verify that the event tables you expect are actually the ones written by the runtime.
60
+ - When the run appears "too clean" or fully zeroed, inspect startup selection counters first, such as candidate pool size, listener/tracked-position counts, or the repository's equivalent admission signals, before concluding there were simply no opportunities.
59
61
  - Check whether missing results come from:
60
62
  - no candidate selection
61
63
  - no worker completion
@@ -15,7 +15,7 @@ description: "Guide the agent to prepare and publish a versioned release (versio
15
15
  ## Standards
16
16
 
17
17
  - Evidence: Inspect the active change set, current version files, existing tag format, existing remote tags/releases, and root `CHANGELOG.md` `Unreleased` content before touching version files, tags, or release metadata.
18
- - Execution: Use this workflow only for explicit release intent, run the required quality gates when applicable, and treat every conditional gate whose scenario is met as blocking before versioning or publication; hand the repository to `submission-readiness-check` before versioning work, then cut the release directly from `CHANGELOG.md` `Unreleased`, update versions and docs, commit, tag, push, and publish the GitHub release; run git mutations sequentially and verify both the branch tip and release tag exist remotely before publishing the GitHub release.
18
+ - Execution: Use this workflow only for explicit release intent, run the required quality gates when applicable, and treat every conditional gate whose scenario is met as blocking before versioning or publication; hand the repository to `submission-readiness-check` before versioning work, and if the worktree is already clean inspect the current version, local/remote tag state, and existing GitHub release state before deciding whether the request is already satisfied; then cut the release directly from `CHANGELOG.md` `Unreleased`, update versions and docs, commit, tag, push, and publish the GitHub release with actual release tooling rather than PR-surrogate directives; run git mutations sequentially and verify both the branch tip and release tag exist remotely before publishing the GitHub release.
19
19
  - Quality: Never guess versions, align user-facing docs with actual code, do not bypass readiness blockers from `submission-readiness-check`, do not reconstruct release notes from `git diff` when curated changelog content already exists, and do not report release success until the commit, tag, and GitHub release all exist for the same version.
20
20
  - Output: Produce a versioned release commit and tag, publish a matching GitHub release, and keep changelog plus relevant repository documentation synchronized.
21
21
 
@@ -67,6 +67,7 @@ Load only when needed:
67
67
  - Read existing version files (for example `project.toml`, `package.json`, or repo-specific version files).
68
68
  - Infer existing tag format (`vX.Y.Z` or `X.Y.Z`) from repository tags.
69
69
  - Inspect existing local and remote tags plus any existing GitHub Release for the target version before creating new release metadata, so duplicate or conflicting releases are caught early.
70
+ - If the requested version tag and matching published GitHub release already exist and point at the intended commit, report that the release is already complete instead of creating duplicate metadata.
70
71
  - If the user provides the target version, use it directly.
71
72
  - If it is missing, ask the user for the target version or semver bump type.
72
73
  - Provide recommendations only when explicitly requested.
@@ -96,6 +97,7 @@ Load only when needed:
96
97
  - Use the release notes from the new `CHANGELOG.md` entry unless the repository has a stronger established release-note source.
97
98
  - If the repository has publish automation triggered by `release.published`, ensure the GitHub release is actually published rather than left as a draft.
98
99
  - Prefer `gh release create <tag>` or the repository's existing release tool when available.
100
+ - Do not use PR-opening tools, PR directives, or placeholder URLs as a substitute for actual release publication.
99
101
  - Confirm the GitHub release URL and any triggered publish workflow status in the final report.
100
102
  - Never stop after the release commit or tag alone; creating the matching GitHub release is part of done criteria unless the user explicitly says to skip release publication.
101
103
 
@@ -106,5 +108,6 @@ Load only when needed:
106
108
  - Never skip `review-change-set` for code-affecting releases, and do not continue to versioning work while confirmed review findings remain unresolved.
107
109
  - Never downgrade `discover-edge-cases` or `harden-app-security` to optional follow-up when the release risk says they apply.
108
110
  - Never claim a release is complete without checking the actual release version, creating the matching tag, and publishing the matching GitHub release.
111
+ - Never treat a PR creation step, release-page URL guess, or tag-only push as evidence that the GitHub release exists.
109
112
  - If tests are required by repository conventions, run them before commit.
110
113
  - If a new branch is required, follow `references/branch-naming.md`.
@@ -7,15 +7,15 @@ description: Read a user-specified PDF that marks the week's key financial event
7
7
 
8
8
  ## Dependencies
9
9
 
10
- - Required: `pdf` to read the source PDF and render the final report.
11
- - Conditional: none.
10
+ - Required: `pdf` to render the final report.
11
+ - Conditional: `document-vision-reader` when the source PDF's highlighted markers are visible in layout but not recoverable from machine-readable text alone.
12
12
  - Optional: none.
13
- - Fallback: If `pdf` is unavailable, stop and report the missing dependency instead of improvising another PDF workflow.
13
+ - Fallback: If source-PDF extraction through `pdf` is unavailable or fails on macOS, use the bundled `scripts/extract_pdf_text_pdfkit.swift` helper before giving up; only stop when neither `pdf` nor the local PDFKit fallback can recover the marked events, or when final PDF rendering itself cannot be completed.
14
14
 
15
15
  ## Standards
16
16
 
17
17
  - Evidence: Research only events explicitly marked in the source PDF plus clearly material breaking developments, and verify claims with current authoritative sources.
18
- - Execution: Read the PDF first, lock the research window, research each marked event, then hand the final briefing to `pdf` for rendering and QA with deterministic table-safe layout rules when needed.
18
+ - Execution: Read the PDF first, prefer `pdf` for extraction but fall back to the bundled macOS PDFKit extractor when local PDF tooling is missing, lock the research window, research each marked event, then hand the final briefing to `pdf` for rendering and QA with deterministic table-safe layout rules when needed.
19
19
  - Quality: Keep the report concise, Chinese-compatible, explicit about source-versus-breaking events, conflicts, uncertainty, PDF font safety, and long-text table legibility.
20
20
  - Output: Save only the final standardized PDF under the month folder using the financial-event-report naming scheme.
21
21
 
@@ -66,14 +66,22 @@ Do not guess any input that materially changes the research window or report sco
66
66
 
67
67
  ### 1) Read the source PDF and extract the marked events
68
68
 
69
- - Use the `pdf` skill to open and extract the source PDF.
69
+ - Prefer the `pdf` skill to open and extract the source PDF.
70
+ - If `pdf` extraction is unavailable or fails because the current machine lacks local PDF tooling, and the host is macOS, run:
71
+
72
+ ```bash
73
+ swift scripts/extract_pdf_text_pdfkit.swift /absolute/path/to/source.pdf
74
+ ```
75
+
76
+ - The bundled extractor prints page-delimited text directly from PDFKit so the agent can still build the source-event table without adding Python PDF packages ad hoc.
70
77
  - Identify the document's explicit markers, such as highlights, comments, callouts, boxed sections, bookmarks, or clearly labeled weekly key-event sections.
71
78
  - Build a source-event table before searching. For each marked event capture:
72
79
  - page number
73
80
  - event label in the source PDF
74
81
  - date or date range if present
75
82
  - short note about why the source document highlighted it
76
- - If the PDF does not expose machine-readable annotations, fall back to clearly visible marked sections or headings.
83
+ - If the PDF does not expose machine-readable annotations, fall back to clearly visible marked sections or headings from the extracted page text.
84
+ - If the page text alone is insufficient because the document uses visual highlights or layout callouts without recoverable text markers, use `document-vision-reader` on screenshots of the relevant PDF pages before deciding the events are ambiguous.
77
85
  - If the document still does not make the marked events unambiguous, stop and report the ambiguity rather than inventing events.
78
86
 
79
87
  ### 2) Lock the research window
@@ -0,0 +1,71 @@
1
+ #!/usr/bin/env swift
2
+
3
+ import Foundation
4
+ import PDFKit
5
+
6
+ struct Arguments {
7
+ let pdfPath: String
8
+ }
9
+
10
+ enum ExtractionError: Error, CustomStringConvertible {
11
+ case missingPath
12
+ case unsupportedPlatform
13
+ case unreadablePDF(String)
14
+
15
+ var description: String {
16
+ switch self {
17
+ case .missingPath:
18
+ return "Usage: swift scripts/extract_pdf_text_pdfkit.swift /absolute/path/to/source.pdf"
19
+ case .unsupportedPlatform:
20
+ return "PDFKit extraction is only supported on macOS."
21
+ case .unreadablePDF(let path):
22
+ return "Unable to open PDF at \(path)"
23
+ }
24
+ }
25
+ }
26
+
27
+ func parseArguments() throws -> Arguments {
28
+ let args = Array(CommandLine.arguments.dropFirst())
29
+ guard let pdfPath = args.first, !pdfPath.isEmpty else {
30
+ throw ExtractionError.missingPath
31
+ }
32
+ return Arguments(pdfPath: pdfPath)
33
+ }
34
+
35
+ func main() throws {
36
+ #if !os(macOS)
37
+ throw ExtractionError.unsupportedPlatform
38
+ #else
39
+ let arguments = try parseArguments()
40
+ let pdfURL = URL(fileURLWithPath: arguments.pdfPath)
41
+
42
+ guard let document = PDFDocument(url: pdfURL) else {
43
+ throw ExtractionError.unreadablePDF(arguments.pdfPath)
44
+ }
45
+
46
+ print("PDF_PATH=\(arguments.pdfPath)")
47
+ print("PAGE_COUNT=\(document.pageCount)")
48
+
49
+ for pageIndex in 0..<document.pageCount {
50
+ guard let page = document.page(at: pageIndex) else {
51
+ continue
52
+ }
53
+ let text = page.string?
54
+ .replacingOccurrences(of: "\u{000C}", with: "\n")
55
+ .trimmingCharacters(in: .whitespacesAndNewlines) ?? ""
56
+ print("=== PAGE \(pageIndex + 1) ===")
57
+ if text.isEmpty {
58
+ print("[NO_TEXT_EXTRACTED]")
59
+ } else {
60
+ print(text)
61
+ }
62
+ }
63
+ #endif
64
+ }
65
+
66
+ do {
67
+ try main()
68
+ } catch {
69
+ fputs("\(error)\n", stderr)
70
+ exit(1)
71
+ }