@namewta/speculo 2.0.6 → 2.1.0
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/README.md +3 -0
- package/THIRD-PARTY-NOTICES.md +4 -0
- package/dist/src/agent-skills.d.ts +5 -0
- package/dist/src/agent-skills.js +10 -7
- package/dist/src/agent-skills.js.map +1 -1
- package/dist/src/cli.js +17 -4
- package/dist/src/cli.js.map +1 -1
- package/dist/src/coordination.d.ts +3 -3
- package/dist/src/coordination.js +21 -4
- package/dist/src/coordination.js.map +1 -1
- package/dist/src/doctor.js +8 -1
- package/dist/src/doctor.js.map +1 -1
- package/dist/src/external-files.d.ts +4 -2
- package/dist/src/external-files.js +4 -4
- package/dist/src/external-files.js.map +1 -1
- package/dist/src/hub-catalog.d.ts +11 -0
- package/dist/src/hub-catalog.js +91 -0
- package/dist/src/hub-catalog.js.map +1 -0
- package/dist/src/hub-resources.json +1 -0
- package/dist/src/hub-skills.d.ts +53 -0
- package/dist/src/hub-skills.js +157 -0
- package/dist/src/hub-skills.js.map +1 -0
- package/dist/src/index.d.ts +6 -0
- package/dist/src/index.js +48 -47
- package/dist/src/index.js.map +1 -1
- package/dist/src/install-ui.d.ts +16 -0
- package/dist/src/install-ui.js +67 -11
- package/dist/src/install-ui.js.map +1 -1
- package/dist/src/manifest.d.ts +2 -0
- package/dist/src/manifest.js +2 -0
- package/dist/src/manifest.js.map +1 -1
- package/dist/src/refresh.d.ts +1 -0
- package/dist/src/refresh.js +13 -10
- package/dist/src/refresh.js.map +1 -1
- package/dist/src/retained-workflows.d.ts +10 -0
- package/dist/src/retained-workflows.js +25 -0
- package/dist/src/retained-workflows.js.map +1 -0
- package/dist/src/runtime-entry.d.ts +1 -0
- package/dist/src/runtime-entry.js +1 -0
- package/dist/src/runtime-entry.js.map +1 -1
- package/dist/src/skill-trees.d.ts +27 -0
- package/dist/src/skill-trees.js +118 -0
- package/dist/src/skill-trees.js.map +1 -0
- package/dist/src/transaction.d.ts +3 -14
- package/dist/src/transaction.js +20 -36
- package/dist/src/transaction.js.map +1 -1
- package/dist/src/workflow-install.d.ts +15 -0
- package/dist/src/workflow-install.js +104 -0
- package/dist/src/workflow-install.js.map +1 -0
- package/package.json +4 -2
- package/skills-hub/automation/grok-bot-team-steward/CHEATSHEET.md +17 -0
- package/skills-hub/automation/grok-bot-team-steward/INSTALL.md +23 -0
- package/skills-hub/automation/grok-bot-team-steward/LICENSE +21 -0
- package/skills-hub/automation/grok-bot-team-steward/README.md +9 -0
- package/skills-hub/automation/grok-bot-team-steward/SKILL.md +52 -0
- package/skills-hub/automation/grok-bot-team-steward/agents/openai.yaml +4 -0
- package/skills-hub/automation/grok-bot-team-steward/references/00-hard-rules.md +50 -0
- package/skills-hub/automation/grok-bot-team-steward/references/01-snapshot-schema.md +84 -0
- package/skills-hub/automation/grok-bot-team-steward/references/02-export-protocol.md +57 -0
- package/skills-hub/automation/grok-bot-team-steward/references/03-restore-protocol.md +64 -0
- package/skills-hub/automation/grok-bot-team-steward/references/04-inventory.md +37 -0
- package/skills-hub/automation/grok-bot-team-steward/references/05-conversations.md +71 -0
- package/skills-hub/automation/grok-bot-team-steward/references/06-sanitizer.md +39 -0
- package/skills-hub/automation/grok-bot-team-steward/references/07-prompts.md +87 -0
- package/skills-hub/automation/grok-bot-team-steward/references/08-verification.md +30 -0
- package/skills-hub/automation/grok-bot-team-steward/references/09-sources.md +31 -0
- package/skills-hub/automation/grok-bot-team-steward/scripts/scrub.sh +17 -0
- package/skills-hub/automation/grok-bot-team-steward/scripts/snapshot-name.sh +18 -0
- package/skills-hub/automation/grok-bot-team-steward/scripts/validate-snapshot.sh +62 -0
- package/skills-hub/automation/grok-bot-team-steward/steward/ACTIVATE.md +58 -0
- package/skills-hub/automation/grok-bot-team-steward/steward/SETUP-INSTRUCTIONS.md +33 -0
- package/skills-hub/automation/grok-bot-team-steward/steward/STEWARD-PROFILE.md +28 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/CHANGELOG.md +3 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/CHARTER.md +27 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/DROP-LIST.md +10 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/GAPS.md +6 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/INIT.md +14 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/MANIFEST.md +30 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/MANIFEST.yaml +20 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/ORG.md +15 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/README.md +8 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/RESTORE.md +13 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/ROSTER.md +11 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/bots/_SLUG/GAPS.md +7 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/bots/_SLUG/MEMORY.md +9 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/bots/_SLUG/PROFILE.md +27 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/bots/_SLUG/agent-spec.md +9 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/bots/_SLUG/conversations/INDEX.md +5 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/bots/_SLUG/conversations/main.md +9 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/bots/_SLUG/routines.md +5 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/bots/_SLUG/skills.md +5 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/connectors.md +7 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/meta/COMPLETED.md +6 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/meta/CREATED.md +6 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/meta/RESTORE-NOTES.md +13 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/meta/SANITIZER.md +7 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/meta/SOURCE.md +8 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/rooms/_ROOM.md +8 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/routines/_ROUTINE.md +12 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/shared/shared-memory.md +5 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/shared/workspace-map.md +5 -0
- package/skills-hub/automation/grok-bot-team-steward/templates/snapshot/skills/_SKILL/SKILL.md +18 -0
- package/skills-hub/automation/herdr/SKILL.md +246 -0
- package/skills-hub/automation/orca/SKILL.md +328 -0
- package/skills-hub/coding/gitea-repo/LICENSE +21 -0
- package/skills-hub/coding/gitea-repo/SKILL.md +50 -0
- package/skills-hub/coding/gitea-repo/agents/openai.yaml +4 -0
- package/skills-hub/coding/gitea-repo/references/auth-and-scopes.md +58 -0
- package/skills-hub/coding/gitea-repo/references/endpoint-map.md +80 -0
- package/skills-hub/coding/gitea-repo/references/pagination-and-errors.md +34 -0
- package/skills-hub/coding/gitea-repo/scripts/gitea_api.py +814 -0
- package/skills-hub/coding/github-repo-steward/LICENSE +21 -0
- package/skills-hub/coding/github-repo-steward/SKILL.md +48 -0
- package/skills-hub/coding/github-repo-steward/agents/openai.yaml +4 -0
- package/skills-hub/coding/github-repo-steward/references/00-auth-and-tokens.md +73 -0
- package/skills-hub/coding/github-repo-steward/references/01-inventory.md +55 -0
- package/skills-hub/coding/github-repo-steward/references/02-lifecycle.md +57 -0
- package/skills-hub/coding/github-repo-steward/references/03-stars.md +42 -0
- package/skills-hub/coding/github-repo-steward/references/04-hygiene.md +40 -0
- package/skills-hub/coding/github-repo-steward/references/05-sources.md +42 -0
- package/skills-hub/coding/github-repo-steward/scripts/inventory.sh +64 -0
- package/skills-hub/coding/vscode-fullstack/LICENSE +21 -0
- package/skills-hub/coding/vscode-fullstack/SKILL.md +47 -0
- package/skills-hub/coding/vscode-fullstack/agents/openai.yaml +4 -0
- package/skills-hub/coding/vscode-fullstack/references/extensions-and-settings.md +181 -0
- package/skills-hub/coding/vscode-fullstack/references/profiles-and-validation.md +62 -0
- package/skills-hub/coding/vscode-fullstack/references/runtime-reuse.md +52 -0
- package/skills-hub/design/photo-retouch/LICENSE +21 -0
- package/skills-hub/design/photo-retouch/SKILL.md +50 -0
- package/skills-hub/design/photo-retouch/agents/openai.yaml +4 -0
- package/skills-hub/design/photo-retouch/references/basic-retouch.md +58 -0
- package/skills-hub/design/photo-retouch/references/formal-portrait.md +57 -0
- package/skills-hub/design/photo-retouch/references/object-and-canvas.md +82 -0
- package/skills-hub/design/photo-retouch/references/product-photo.md +41 -0
- package/skills-hub/design/photo-retouch/references/repair-and-look.md +61 -0
- package/skills-hub/design/photo-retouch/references/social-effects.md +55 -0
- package/skills-hub/design/photo-retouch/references/travel-creative.md +79 -0
- package/skills-hub/system/clash-client-profile/LICENSE +21 -0
- package/skills-hub/system/clash-client-profile/SKILL.md +79 -0
- package/skills-hub/system/clash-client-profile/agents/openai.yaml +4 -0
- package/skills-hub/system/clash-client-profile/references/acceptance.md +81 -0
- package/skills-hub/system/clash-client-profile/references/browser-privacy.md +35 -0
- package/skills-hub/system/clash-client-profile/references/clash-verge.md +40 -0
- package/skills-hub/system/clash-client-profile/references/dns-workflow.md +147 -0
- package/skills-hub/system/clash-client-profile/references/flclash.md +24 -0
- package/skills-hub/system/clash-client-profile/references/network-performance.md +25 -0
- package/skills-hub/system/clash-client-profile/references/platform-dns.md +109 -0
- package/skills-hub/system/clash-client-profile/references/sources.md +46 -0
- package/skills-hub/system/clash-client-profile/references/troubleshooting.md +82 -0
- package/skills-hub/system/clash-client-profile/scripts/dns_guard.py +650 -0
- package/skills-hub/system/clash-client-profile/scripts/proxy_doctor.py +213 -0
- package/skills-hub/system/clash-client-profile/scripts/render_rules.py +34 -0
- package/skills-hub/system/clash-client-profile/templates/ai-rules.yaml +18 -0
- package/skills-hub/system/clash-client-profile/templates/dns-request.example.json +9 -0
- package/skills-hub/system/clash-client-profile/templates/dns.yaml +8 -0
- package/skills-hub/system/linux-dev-disk-cleanup/LICENSE +21 -0
- package/skills-hub/system/linux-dev-disk-cleanup/SKILL.md +42 -0
- package/skills-hub/system/linux-dev-disk-cleanup/agents/openai.yaml +4 -0
- package/skills-hub/system/linux-dev-disk-cleanup/references/linux-cleanup-workflow.md +145 -0
- package/skills-hub/system/optimize-codex-config/LICENSE +21 -0
- package/skills-hub/system/optimize-codex-config/SKILL.md +101 -0
- package/skills-hub/system/optimize-codex-config/agents/openai.yaml +4 -0
- package/skills-hub/system/optimize-codex-config/assets/capabilities.example.json +22 -0
- package/skills-hub/system/optimize-codex-config/references/cli.md +35 -0
- package/skills-hub/system/optimize-codex-config/references/configuration-contract.md +33 -0
- package/skills-hub/system/optimize-codex-config/references/optimization-method.md +38 -0
- package/skills-hub/system/optimize-codex-config/references/privacy.md +41 -0
- package/skills-hub/system/optimize-codex-config/references/sources.md +24 -0
- package/skills-hub/system/optimize-codex-config/references/statusline.md +31 -0
- package/skills-hub/system/optimize-codex-config/references/transactions.md +32 -0
- package/skills-hub/system/optimize-codex-config/references/troubleshooting.md +95 -0
- package/skills-hub/system/optimize-codex-config/scripts/adapters/claude.mjs +24 -0
- package/skills-hub/system/optimize-codex-config/scripts/adapters/codex.mjs +10 -0
- package/skills-hub/system/optimize-codex-config/scripts/ai-cli-config.mjs +67 -0
- package/skills-hub/system/optimize-codex-config/scripts/audit-codex-config.mjs +762 -0
- package/skills-hub/system/optimize-codex-config/scripts/lib/document.mjs +166 -0
- package/skills-hub/system/optimize-codex-config/scripts/lib/inspect.mjs +211 -0
- package/skills-hub/system/optimize-codex-config/scripts/lib/io.mjs +104 -0
- package/skills-hub/system/optimize-codex-config/scripts/lib/plan.mjs +79 -0
- package/skills-hub/system/optimize-codex-config/scripts/lib/transaction.mjs +205 -0
- package/skills-hub/system/optimize-codex-config/scripts/lib/writers.mjs +46 -0
- package/skills-hub/system/optimize-codex-config/scripts/statusline/claude-statusline.mjs +94 -0
- package/skills-hub/system/optimize-codex-config/scripts/vendor/THIRD-PARTY-NOTICES.txt +250 -0
- package/skills-hub/system/optimize-codex-config/scripts/vendor/build-package-lock.json +488 -0
- package/skills-hub/system/optimize-codex-config/scripts/vendor/manifest.json +14 -0
- package/skills-hub/system/optimize-codex-config/scripts/vendor/parsers.mjs +16 -0
- package/skills-hub/system/proxy-region-locale/LICENSE +21 -0
- package/skills-hub/system/proxy-region-locale/SKILL.md +42 -0
- package/skills-hub/system/proxy-region-locale/agents/openai.yaml +4 -0
- package/skills-hub/system/proxy-region-locale/references/linux.md +35 -0
- package/skills-hub/system/proxy-region-locale/references/macos.md +31 -0
- package/skills-hub/system/proxy-region-locale/references/windows.md +45 -0
- package/skills-hub/system/system-health-audit/LICENSE +21 -0
- package/skills-hub/system/system-health-audit/SKILL.md +41 -0
- package/skills-hub/system/system-health-audit/agents/openai.yaml +4 -0
- package/skills-hub/system/system-health-audit/references/platforms.md +37 -0
- package/skills-hub/system/system-health-audit/scripts/system_audit.py +41 -0
- package/skills-hub/system/windows-dev-disk-cleanup/LICENSE +21 -0
- package/skills-hub/system/windows-dev-disk-cleanup/SKILL.md +40 -0
- package/skills-hub/system/windows-dev-disk-cleanup/agents/openai.yaml +4 -0
- package/skills-hub/system/windows-dev-disk-cleanup/references/windows-cleanup-workflow.md +121 -0
- package/skills-hub/writing/.gitkeep +0 -0
- package/skills-hub/writing/job-application/LICENSE +21 -0
- package/skills-hub/writing/job-application/SKILL.md +160 -0
- package/skills-hub/writing/job-application/agents/openai.yaml +4 -0
- package/skills-hub/writing/job-application/assets/resume.css +10 -0
- package/skills-hub/writing/job-application/config.example.json +9 -0
- package/skills-hub/writing/job-application/references/company-research.md +7 -0
- package/skills-hub/writing/job-application/references/corpus-schema.md +33 -0
- package/skills-hub/writing/job-application/references/honesty-gate.md +29 -0
- package/skills-hub/writing/job-application/references/improvement-plan.md +15 -0
- package/skills-hub/writing/job-application/references/ingest-protocol.md +18 -0
- package/skills-hub/writing/job-application/references/interview-speech.md +16 -0
- package/skills-hub/writing/job-application/references/jd-parse.md +18 -0
- package/skills-hub/writing/job-application/references/persist-paths.md +34 -0
- package/skills-hub/writing/job-application/references/question-bank.md +19 -0
- package/skills-hub/writing/job-application/references/rendering.md +9 -0
- package/skills-hub/writing/job-application/references/resume-playbook.md +30 -0
- package/skills-hub/writing/job-application/scripts/README.md +12 -0
- package/skills-hub/writing/job-application/scripts/ingest_kb.py +188 -0
- package/skills-hub/writing/job-application/scripts/render_resume.py +144 -0
- package/skills-hub/writing/job-application/scripts/validate_claims.py +52 -0
- package/skills-hub/writing/job-application/scripts/write_config.py +72 -0
- package/skills-hub/writing/job-application/templates/application-index.md +10 -0
- package/skills-hub/writing/job-application/templates/brief.md +16 -0
- package/skills-hub/writing/job-application/templates/changelog.md +6 -0
- package/skills-hub/writing/job-application/templates/company-research.md +15 -0
- package/skills-hub/writing/job-application/templates/corpus.md +11 -0
- package/skills-hub/writing/job-application/templates/evidence-map.md +5 -0
- package/skills-hub/writing/job-application/templates/framings.md +6 -0
- package/skills-hub/writing/job-application/templates/improvement-plan.md +16 -0
- package/skills-hub/writing/job-application/templates/ingest-log.md +4 -0
- package/skills-hub/writing/job-application/templates/known-gaps.md +4 -0
- package/skills-hub/writing/job-application/templates/match-report.md +21 -0
- package/skills-hub/writing/job-application/templates/methodology-cache.md +10 -0
- package/skills-hub/writing/job-application/templates/persist-index.md +11 -0
- package/skills-hub/writing/job-application/templates/profile.md +21 -0
- package/skills-hub/writing/job-application/templates/questions.md +22 -0
- package/skills-hub/writing/job-application/templates/resume-original.md +10 -0
- package/skills-hub/writing/job-application/templates/resume-tailored.md +21 -0
- package/skills-hub/writing/job-application/templates/sources-index.md +6 -0
- package/skills-hub/writing/job-application/templates/speech.md +19 -0
- package/skills-hub/writing/job-application/templates/stories.md +9 -0
- package/skills-hub/writing/job-application/templates/story-bank.md +11 -0
- package/skills-hub/writing/job-application/templates/strengths.md +4 -0
- package/skills-hub/writing/job-application/templates/style-memory.md +7 -0
- package/skills-hub/writing/ste-zh/LICENSE +21 -0
- package/skills-hub/writing/ste-zh/NOTICE.md +9 -0
- package/skills-hub/writing/ste-zh/SKILL.md +130 -0
- package/skills-hub/writing/ste-zh/agents/openai.yaml +6 -0
- package/skills-hub/writing/ste-zh/examples/zh-report.md +23 -0
- package/skills-hub/writing/ste-zh/references/english-modes.md +13 -0
- package/skills-hub/writing/ste-zh/references/terminology.md +13 -0
- package/skills-hub/writing/ste-zh/references/zh-rules.md +29 -0
- package/template/.speculo/refresh-contract.json +2 -0
- package/template/canonical/canonical-specdev-goal-plan.md +33 -25
- package/template/canonical/canonical-specdev-grill-with-docs.md +214 -206
- package/template/canonical/canonical-specdev-spec.md +214 -206
- package/template/canonical/canonical-specdev-tickets.md +214 -206
- package/template/canonical/canonical-specdev-wayfinder.md +214 -206
- package/template/lib/speculo-runtime.mjs +183 -8
- package/template/references/coordination/coordination-contract.md +11 -3
- package/template/references/coordination/modes/cli.md +2 -2
- package/template/references/coordination/modes/herdr.md +9 -9
- package/template/references/coordination/modes/orca.md +11 -11
- package/template/references/coordination/project-facts.schema.json +1 -0
- package/template/workflows/specdev/specdev-i-init-setup/SKILL.md +7 -6
- package/template/workflows/specdev/specdev-i-init-setup/references/first-setup.md +30 -1
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Render a tailored Markdown resume to HTML, and DOCX/PDF when libraries exist."""
|
|
3
|
+
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
import argparse
|
|
7
|
+
import html
|
|
8
|
+
import json
|
|
9
|
+
import re
|
|
10
|
+
import sys
|
|
11
|
+
from pathlib import Path
|
|
12
|
+
|
|
13
|
+
CLAIM_COMMENT = re.compile(r"<!--\s*claim:C-\d+\s*-->", re.IGNORECASE)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def md_to_blocks(text: str) -> list[tuple[str, str]]:
|
|
17
|
+
blocks: list[tuple[str, str]] = []
|
|
18
|
+
paragraph: list[str] = []
|
|
19
|
+
|
|
20
|
+
def flush() -> None:
|
|
21
|
+
if paragraph:
|
|
22
|
+
blocks.append(("p", " ".join(paragraph).strip()))
|
|
23
|
+
paragraph.clear()
|
|
24
|
+
|
|
25
|
+
for raw in text.splitlines():
|
|
26
|
+
line = CLAIM_COMMENT.sub("", raw).rstrip()
|
|
27
|
+
if not line.strip() or line.strip().startswith("<!--"):
|
|
28
|
+
flush()
|
|
29
|
+
continue
|
|
30
|
+
if line.startswith("### "):
|
|
31
|
+
flush()
|
|
32
|
+
blocks.append(("h3", line[4:].strip()))
|
|
33
|
+
elif line.startswith("## "):
|
|
34
|
+
flush()
|
|
35
|
+
blocks.append(("h2", line[3:].strip()))
|
|
36
|
+
elif line.startswith("# "):
|
|
37
|
+
flush()
|
|
38
|
+
blocks.append(("h1", line[2:].strip()))
|
|
39
|
+
elif line.startswith("- "):
|
|
40
|
+
flush()
|
|
41
|
+
blocks.append(("li", line[2:].strip()))
|
|
42
|
+
else:
|
|
43
|
+
paragraph.append(line.strip())
|
|
44
|
+
flush()
|
|
45
|
+
return blocks
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def to_html(blocks: list[tuple[str, str]], css: str) -> str:
|
|
49
|
+
parts = [
|
|
50
|
+
"<!DOCTYPE html>",
|
|
51
|
+
'<html lang="zh">',
|
|
52
|
+
"<head>",
|
|
53
|
+
'<meta charset="utf-8">',
|
|
54
|
+
"<title>Resume</title>",
|
|
55
|
+
f"<style>\n{css}\n</style>",
|
|
56
|
+
"</head>",
|
|
57
|
+
"<body>",
|
|
58
|
+
'<main class="sheet">',
|
|
59
|
+
]
|
|
60
|
+
list_open = False
|
|
61
|
+
for kind, content in blocks:
|
|
62
|
+
safe = html.escape(content)
|
|
63
|
+
if kind != "li" and list_open:
|
|
64
|
+
parts.append("</ul>")
|
|
65
|
+
list_open = False
|
|
66
|
+
if kind == "li":
|
|
67
|
+
if not list_open:
|
|
68
|
+
parts.append("<ul>")
|
|
69
|
+
list_open = True
|
|
70
|
+
parts.append(f"<li>{safe}</li>")
|
|
71
|
+
elif kind in {"h1", "h2", "h3", "p"}:
|
|
72
|
+
parts.append(f"<{kind}>{safe}</{kind}>")
|
|
73
|
+
if list_open:
|
|
74
|
+
parts.append("</ul>")
|
|
75
|
+
parts.extend(["</main>", "</body>", "</html>", ""])
|
|
76
|
+
return "\n".join(parts)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def try_docx(blocks: list[tuple[str, str]], dest: Path) -> str:
|
|
80
|
+
try:
|
|
81
|
+
from docx import Document
|
|
82
|
+
except ImportError:
|
|
83
|
+
return "skipped: python-docx not installed"
|
|
84
|
+
doc = Document()
|
|
85
|
+
for kind, content in blocks:
|
|
86
|
+
if kind == "h1":
|
|
87
|
+
doc.add_heading(content, level=0)
|
|
88
|
+
elif kind == "h2":
|
|
89
|
+
doc.add_heading(content, level=1)
|
|
90
|
+
elif kind == "h3":
|
|
91
|
+
doc.add_heading(content, level=2)
|
|
92
|
+
elif kind == "li":
|
|
93
|
+
doc.add_paragraph(content, style="List Bullet")
|
|
94
|
+
else:
|
|
95
|
+
doc.add_paragraph(content)
|
|
96
|
+
doc.save(dest)
|
|
97
|
+
return "written"
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
def try_pdf(html_path: Path, dest: Path) -> str:
|
|
101
|
+
try:
|
|
102
|
+
from weasyprint import HTML
|
|
103
|
+
except ImportError:
|
|
104
|
+
return "skipped: weasyprint not installed"
|
|
105
|
+
HTML(filename=str(html_path)).write_pdf(str(dest))
|
|
106
|
+
return "written"
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
def main() -> None:
|
|
110
|
+
parser = argparse.ArgumentParser(description=__doc__)
|
|
111
|
+
parser.add_argument("--md", required=True)
|
|
112
|
+
parser.add_argument("--css", required=True)
|
|
113
|
+
parser.add_argument("--out-dir", required=True)
|
|
114
|
+
args = parser.parse_args()
|
|
115
|
+
|
|
116
|
+
md_path = Path(args.md)
|
|
117
|
+
css_path = Path(args.css)
|
|
118
|
+
out_dir = Path(args.out_dir)
|
|
119
|
+
if not md_path.is_file():
|
|
120
|
+
print(f"missing markdown: {md_path}", file=sys.stderr)
|
|
121
|
+
raise SystemExit(2)
|
|
122
|
+
css = css_path.read_text(encoding="utf-8") if css_path.is_file() else "body{font-family:sans-serif}"
|
|
123
|
+
out_dir.mkdir(parents=True, exist_ok=True)
|
|
124
|
+
blocks = md_to_blocks(md_path.read_text(encoding="utf-8"))
|
|
125
|
+
html_path = out_dir / "resume-tailored.html"
|
|
126
|
+
html_path.write_text(to_html(blocks, css), encoding="utf-8")
|
|
127
|
+
docx_status = try_docx(blocks, out_dir / "resume-tailored.docx")
|
|
128
|
+
pdf_status = try_pdf(html_path, out_dir / "resume-tailored.pdf")
|
|
129
|
+
status = {
|
|
130
|
+
"html": "written",
|
|
131
|
+
"docx": docx_status,
|
|
132
|
+
"pdf": pdf_status,
|
|
133
|
+
}
|
|
134
|
+
(out_dir / "render-status.json").write_text(
|
|
135
|
+
json.dumps(status, ensure_ascii=False, indent=2) + "\n",
|
|
136
|
+
encoding="utf-8",
|
|
137
|
+
)
|
|
138
|
+
print(json.dumps(status, ensure_ascii=False))
|
|
139
|
+
if docx_status != "written" and pdf_status != "written":
|
|
140
|
+
raise SystemExit(3)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
if __name__ == "__main__":
|
|
144
|
+
main()
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Fail if tailored text cites a claim id missing from the evidence map."""
|
|
3
|
+
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
import argparse
|
|
7
|
+
import re
|
|
8
|
+
import sys
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
|
|
11
|
+
CLAIM_RE = re.compile(r"claim:(C-\d+)", re.IGNORECASE)
|
|
12
|
+
ID_RE = re.compile(r"\b(C-\d+)\b")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def known_ids(evidence_text: str) -> set[str]:
|
|
16
|
+
return {match.group(1).upper() for match in ID_RE.finditer(evidence_text)}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def main() -> None:
|
|
20
|
+
parser = argparse.ArgumentParser(description=__doc__)
|
|
21
|
+
parser.add_argument("--evidence", required=True)
|
|
22
|
+
parser.add_argument("--files", nargs="+", required=True)
|
|
23
|
+
args = parser.parse_args()
|
|
24
|
+
|
|
25
|
+
evidence = Path(args.evidence)
|
|
26
|
+
if not evidence.is_file():
|
|
27
|
+
print(f"missing evidence map: {evidence}", file=sys.stderr)
|
|
28
|
+
raise SystemExit(2)
|
|
29
|
+
allowed = known_ids(evidence.read_text(encoding="utf-8"))
|
|
30
|
+
orphans: list[str] = []
|
|
31
|
+
used = 0
|
|
32
|
+
for raw in args.files:
|
|
33
|
+
path = Path(raw)
|
|
34
|
+
if not path.is_file():
|
|
35
|
+
print(f"missing file: {path}", file=sys.stderr)
|
|
36
|
+
raise SystemExit(2)
|
|
37
|
+
text = path.read_text(encoding="utf-8")
|
|
38
|
+
for match in CLAIM_RE.finditer(text):
|
|
39
|
+
used += 1
|
|
40
|
+
claim = match.group(1).upper()
|
|
41
|
+
if claim not in allowed:
|
|
42
|
+
orphans.append(f"{path}: {claim}")
|
|
43
|
+
if orphans:
|
|
44
|
+
print("orphan claims:", file=sys.stderr)
|
|
45
|
+
for item in orphans:
|
|
46
|
+
print(f" {item}", file=sys.stderr)
|
|
47
|
+
raise SystemExit(1)
|
|
48
|
+
print(f"ok claims={used} evidence_ids={len(allowed)}")
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
if __name__ == "__main__":
|
|
52
|
+
main()
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Write job-application path pointer JSON into the skill dir and persist_root."""
|
|
3
|
+
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
import argparse
|
|
7
|
+
import json
|
|
8
|
+
import sys
|
|
9
|
+
from datetime import datetime, timezone
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def die(message: str, code: int = 2) -> None:
|
|
14
|
+
print(message, file=sys.stderr)
|
|
15
|
+
raise SystemExit(code)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def abs_dir(raw: str, label: str, must_exist: bool) -> Path:
|
|
19
|
+
path = Path(raw).expanduser().resolve()
|
|
20
|
+
if path.exists() and not path.is_dir():
|
|
21
|
+
die(f"{label} is not a directory: {path}")
|
|
22
|
+
if must_exist and not path.is_dir():
|
|
23
|
+
die(f"{label} does not exist: {path}")
|
|
24
|
+
return path
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def inside(child: Path, parent: Path) -> bool:
|
|
28
|
+
try:
|
|
29
|
+
child.resolve().relative_to(parent.resolve())
|
|
30
|
+
return True
|
|
31
|
+
except ValueError:
|
|
32
|
+
return False
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def main() -> None:
|
|
36
|
+
parser = argparse.ArgumentParser(description=__doc__)
|
|
37
|
+
parser.add_argument("--skill-dir", required=True)
|
|
38
|
+
parser.add_argument("--persist-root", required=True)
|
|
39
|
+
parser.add_argument("--kb-root", required=True)
|
|
40
|
+
parser.add_argument("--locale", default="zh")
|
|
41
|
+
parser.add_argument("--page-budget", type=int, default=2)
|
|
42
|
+
args = parser.parse_args()
|
|
43
|
+
|
|
44
|
+
skill_dir = abs_dir(args.skill_dir, "skill-dir", must_exist=True)
|
|
45
|
+
if not (skill_dir / "SKILL.md").is_file():
|
|
46
|
+
die(f"skill-dir has no SKILL.md: {skill_dir}")
|
|
47
|
+
kb_root = abs_dir(args.kb_root, "kb-root", must_exist=True)
|
|
48
|
+
persist_root = abs_dir(args.persist_root, "persist-root", must_exist=False)
|
|
49
|
+
if inside(persist_root, skill_dir):
|
|
50
|
+
die("persist-root must not live inside the skill directory")
|
|
51
|
+
if args.page_budget < 1 or args.page_budget > 4:
|
|
52
|
+
die("page-budget must be 1..4")
|
|
53
|
+
|
|
54
|
+
persist_root.mkdir(parents=True, exist_ok=True)
|
|
55
|
+
payload = {
|
|
56
|
+
"schema_version": 1,
|
|
57
|
+
"skill": "job-application",
|
|
58
|
+
"persist_root": str(persist_root),
|
|
59
|
+
"kb_root": str(kb_root),
|
|
60
|
+
"locale": args.locale,
|
|
61
|
+
"page_budget": args.page_budget,
|
|
62
|
+
"updated_at": datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%S.000Z"),
|
|
63
|
+
}
|
|
64
|
+
text = json.dumps(payload, ensure_ascii=False, indent=2) + "\n"
|
|
65
|
+
targets = [skill_dir / "config.json", persist_root / "config.json"]
|
|
66
|
+
for target in targets:
|
|
67
|
+
target.write_text(text, encoding="utf-8")
|
|
68
|
+
print(target)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
if __name__ == "__main__":
|
|
72
|
+
main()
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ting'an Wang
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# 来源与权利
|
|
2
|
+
|
|
3
|
+
本技能是 wta-skills-hub 的独立写作技能。它不是 ASD-STE100 官方文件,也不构成合规认证。
|
|
4
|
+
|
|
5
|
+
- 中文汇报规则改编自 [dualface/ste-zh](https://github.com/dualface/ste-zh)(MIT,Copyright (c) 2026 dualface)。规则编号 R1–R25 沿用该项目的自定编号,不对应 ASD-STE100 原文条号。
|
|
6
|
+
- 英文模式吸收公开 skill 的工作方式:strict / STE-flavored(danyuchn/asd-ste100-skill)、80% pragmatic(JAICHANGPARK/ASD-STE100,受 Karpathy 公开建议启发)、意义优先于用词(nuelcyoung/asd-ste100)。只吸收模式,不复制这些仓库的词典或检查器。
|
|
7
|
+
- 受控中文的包装动词与长定语检查点参考 mzopedia/simplified-technical-chinese 的公开方法(规范 CC BY 4.0)。本技能不收录其词表。
|
|
8
|
+
- ASD-STE100 与 Simplified Technical English 的权利属于 ASD(Aerospace, Security and Defence Industries Association of Europe)。现行公开版本为 Issue 9(2025-01-15):Part 1 为 53 条写作规则、9 节;Part 2 为约 900 个核准词。原文免费申请:https://www.asd-ste100.org/ 。本技能不收录标准原文,也不收录核准词表。
|
|
9
|
+
- 通过本技能或任何 linter 不等于 STEMG 认可的合规。最终文本由人签字。
|