@laitszkin/apollo-toolkit 2.12.3 → 2.12.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 +11 -0
- package/align-project-documents/SKILL.md +83 -18
- package/align-project-documents/references/templates/category-based-project-docs-template.md +170 -0
- package/commit-and-push/SKILL.md +3 -1
- package/package.json +1 -1
- package/production-sim-debug/SKILL.md +2 -0
- package/version-release/SKILL.md +4 -1
- package/weekly-financial-event-report/SKILL.md +14 -6
- package/weekly-financial-event-report/scripts/extract_pdf_text_pdfkit.swift +71 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,17 @@ All notable changes to this repository are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [v2.12.4] - 2026-04-01
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- 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.
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- 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.
|
|
14
|
+
- Rework `align-project-documents` around category-based, newcomer-friendly documentation selection with a reusable template grounded in Diataxis and common open source doc types.
|
|
15
|
+
- 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.
|
|
16
|
+
- Strengthen `production-sim-debug` to record the active artifact root immediately and check startup admission signals before concluding a run had no opportunities.
|
|
17
|
+
|
|
7
18
|
## [v2.12.3] - 2026-03-30
|
|
8
19
|
|
|
9
20
|
### 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
|
|
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
|
-
|
|
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
|
-
###
|
|
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
|
-
|
|
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
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|
-
###
|
|
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,
|
|
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
|
package/commit-and-push/SKILL.md
CHANGED
|
@@ -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.
|
package/package.json
CHANGED
|
@@ -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
|
package/version-release/SKILL.md
CHANGED
|
@@ -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
|
|
11
|
-
- Conditional:
|
|
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
|
|
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
|
-
-
|
|
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
|
+
}
|