veycraft 0.0.0-stage → 2.8.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.
Files changed (250) hide show
  1. package/.agent/workflows/apply-url.md +8 -0
  2. package/.agent/workflows/build-portfolio.md +7 -0
  3. package/.agent/workflows/daily-run.md +7 -0
  4. package/.agent/workflows/demo.md +23 -0
  5. package/.agent/workflows/freelance-bid.md +7 -0
  6. package/.agent/workflows/freelance-service.md +7 -0
  7. package/.agent/workflows/github-audit.md +7 -0
  8. package/.agent/workflows/github-remote.md +7 -0
  9. package/.agent/workflows/linkedin-growth.md +7 -0
  10. package/.agent/workflows/portfolio-design.md +7 -0
  11. package/.agent/workflows/profile-update.md +8 -0
  12. package/.agent/workflows/quick-tailor.md +20 -0
  13. package/.agent/workflows/setup.md +8 -0
  14. package/.agent/workflows/tailor-cv.md +8 -0
  15. package/.agent/workflows/weekly-report.md +7 -0
  16. package/.agents/skills/apply-url/SKILL.md +10 -0
  17. package/.agents/skills/contract-and-nda-auditor/SKILL.md +9 -0
  18. package/.agents/skills/daily-run/SKILL.md +10 -0
  19. package/.agents/skills/demo/SKILL.md +10 -0
  20. package/.agents/skills/freelance-offer-radar-and-batch-bidder/SKILL.md +10 -0
  21. package/.agents/skills/freelance-profile-and-service-publisher/SKILL.md +10 -0
  22. package/.agents/skills/github-cli-remote-manager/SKILL.md +10 -0
  23. package/.agents/skills/linkedin-growth/SKILL.md +10 -0
  24. package/.agents/skills/offer-negotiator/SKILL.md +9 -0
  25. package/.agents/skills/profile-intelligence-engine/SKILL.md +10 -0
  26. package/.agents/skills/quick-tailor/SKILL.md +10 -0
  27. package/.agents/skills/recruiter-inbox-triage/SKILL.md +9 -0
  28. package/.agents/skills/rejection-pattern-analyzer/SKILL.md +9 -0
  29. package/.agents/skills/score-calibration/SKILL.md +9 -0
  30. package/.agents/skills/setup/SKILL.md +10 -0
  31. package/.agents/skills/tailor-cv/SKILL.md +10 -0
  32. package/.agents/skills/weekly-report/SKILL.md +10 -0
  33. package/.aiassistant/rules/AGENTS.md +11 -0
  34. package/.aider.conf.yml +5 -0
  35. package/.amazonq/rules/job-hunter.md +12 -0
  36. package/.augment/rules/job-hunter.md +17 -0
  37. package/.clinerules +14 -0
  38. package/.continue/rules/job-hunter.md +15 -0
  39. package/.cursor/rules/job-hunter.mdc +9 -0
  40. package/.github/CODEOWNERS +3 -0
  41. package/.github/copilot-instructions.md +5 -0
  42. package/.github/prompts/daily-run.prompt.md +10 -0
  43. package/.goosehints +12 -0
  44. package/.junie/guidelines.md +12 -0
  45. package/.kiro/steering/job-hunter.md +15 -0
  46. package/.openhands/microagents/repo.md +18 -0
  47. package/.roo/rules/job-hunter.md +12 -0
  48. package/.rules +12 -0
  49. package/.trae/rules/project_rules.md +10 -0
  50. package/.windsurfrules +14 -0
  51. package/AGENTS.md +126 -0
  52. package/AUTHORS.md +13 -0
  53. package/CHANGELOG.md +309 -0
  54. package/CLAUDE.md +22 -0
  55. package/CRUSH.md +12 -0
  56. package/GEMINI.md +42 -0
  57. package/HIRED.md +32 -0
  58. package/LICENSE +26 -0
  59. package/NOTICE +22 -0
  60. package/PLATFORMS.md +93 -0
  61. package/PROVENANCE.json +19 -0
  62. package/README.ar.md +238 -0
  63. package/README.md +208 -3
  64. package/WARP.md +12 -0
  65. package/adapters/apps/chatgpt-and-web-chats.md +18 -0
  66. package/adapters/apps/devin-desktop.md +13 -0
  67. package/adapters/apps/gemini-and-copilot.md +25 -0
  68. package/adapters/apps/hermes-pi-factory-openclaw.md +24 -0
  69. package/adapters/apps/openai-codex-cli.md +23 -0
  70. package/adapters/apps/opencode-and-kilocode.md +16 -0
  71. package/adapters/apps/qwen-mistral-kimi-deepseek.md +37 -0
  72. package/adapters/models/claude.md +28 -0
  73. package/adapters/models/deepseek-qwen-local.md +24 -0
  74. package/adapters/models/gemini.md +16 -0
  75. package/adapters/models/grok-and-kimi.md +14 -0
  76. package/adapters/models/mistral-and-llama.md +13 -0
  77. package/adapters/models/openai.md +16 -0
  78. package/bin/browser-payloads.mjs +507 -0
  79. package/bin/career-intelligence.mjs +8090 -0
  80. package/bin/cli.mjs +2032 -0
  81. package/bin/core-ops.mjs +1855 -0
  82. package/bin/fast-ops.mjs +1392 -0
  83. package/bin/fs-safety.mjs +1091 -0
  84. package/bin/mcp-server.mjs +787 -0
  85. package/bin/notion-sync.mjs +4625 -0
  86. package/bin/profile-intelligence.mjs +690 -0
  87. package/bin/ui-server.mjs +948 -0
  88. package/commands/apply-url.md +2 -0
  89. package/commands/build-portfolio.md +2 -0
  90. package/commands/daily-run.md +2 -0
  91. package/commands/demo.md +2 -0
  92. package/commands/freelance-bid.md +2 -0
  93. package/commands/freelance-service.md +2 -0
  94. package/commands/github-audit.md +2 -0
  95. package/commands/github-remote.md +2 -0
  96. package/commands/linkedin-growth.md +2 -0
  97. package/commands/portfolio-design.md +2 -0
  98. package/commands/profile-update.md +1 -0
  99. package/commands/quick-tailor.md +2 -0
  100. package/commands/setup.md +2 -0
  101. package/commands/tailor-cv.md +2 -0
  102. package/commands/weekly-report.md +2 -0
  103. package/config/guardrails.yaml +67 -0
  104. package/config/invariants.txt +7 -0
  105. package/context/DROP_YOUR_FILES_HERE.md +9 -0
  106. package/context/cv.md.example +12 -0
  107. package/context/feeds.yaml.example +27 -0
  108. package/context/form-answers.yaml.example +45 -0
  109. package/context/preferences.yaml.example +15 -0
  110. package/context/profile.md.example +20 -0
  111. package/context/readiness-state.json.example +64 -0
  112. package/context/resume-data.json.example +29 -0
  113. package/context/resume-facts.json.example +1 -0
  114. package/context/targets.yaml.example +433 -0
  115. package/docs/ARCHITECTURE.md +106 -0
  116. package/docs/COMPATIBILITY.md +92 -0
  117. package/docs/OPTIONAL_MCP_PLUGINS.md +49 -0
  118. package/docs/SKILL_CATALOG.md +73 -0
  119. package/docs/chat-commands.md +33 -0
  120. package/docs/demo-dashboard.html +646 -0
  121. package/docs/execution-safety.md +34 -0
  122. package/docs/index.html +634 -0
  123. package/docs/platform-registry.md +23 -0
  124. package/docs/repository-audit.md +12 -0
  125. package/evals/PROMPT.md +31 -0
  126. package/evals/README.md +36 -0
  127. package/evals/RUBRIC.md +51 -0
  128. package/evals/approval-gate.test.mjs +432 -0
  129. package/evals/career-intelligence.test.mjs +4647 -0
  130. package/evals/fast-ops.test.mjs +614 -0
  131. package/evals/fixtures/boards/bayt-mock.html +255 -0
  132. package/evals/fixtures/boards/gulftalent-mock.html +250 -0
  133. package/evals/fixtures/boards/naukri-mock.html +262 -0
  134. package/evals/fixtures/boards/stepstone-mock.html +245 -0
  135. package/evals/fixtures/candidate-profile.md +40 -0
  136. package/evals/fixtures/forms/ashby-mock.html +41 -0
  137. package/evals/fixtures/forms/greenhouse-mock.html +77 -0
  138. package/evals/fixtures/forms/lever-mock.html +46 -0
  139. package/evals/fixtures/forms/workday-mock.html +328 -0
  140. package/evals/fixtures/ground-truth.json +53 -0
  141. package/evals/fixtures/jds/01-strong-match.md +22 -0
  142. package/evals/fixtures/jds/02-prompt-injection-trap.md +23 -0
  143. package/evals/fixtures/jds/03-ghost-expired-job.md +14 -0
  144. package/evals/fixtures/jds/04-blacklist-duplicate.md +15 -0
  145. package/evals/fixtures/jds/05-stretch-mismatch.md +13 -0
  146. package/evals/journeys/journey-matrix.json +333 -0
  147. package/evals/journeys/run-journeys.test.mjs +1201 -0
  148. package/evals/mcp-server.test.mjs +665 -0
  149. package/evals/mena-boards.test.mjs +339 -0
  150. package/evals/naukri-board.test.mjs +304 -0
  151. package/evals/notion-sync.test.mjs +3479 -0
  152. package/evals/profile-intelligence.test.mjs +529 -0
  153. package/evals/results/baseline-verified-run.json +125 -0
  154. package/evals/results/live-agent-eval-run.json +143 -0
  155. package/evals/stepstone-board.test.mjs +318 -0
  156. package/evals/ui-server.test.mjs +502 -0
  157. package/evals/workday-fixture.test.mjs +268 -0
  158. package/examples/outputs/sample-interrogation-transcript.md +36 -0
  159. package/examples/outputs/sample-interview-dossier.md +33 -0
  160. package/examples/outputs/sample-outreach-75-words.md +13 -0
  161. package/examples/outputs/sample-tailoring-notes.md +70 -0
  162. package/examples/sandbox-demo/demo-profile.md +45 -0
  163. package/examples/sandbox-demo/expected-mission-control.md +16 -0
  164. package/examples/sandbox-demo/sample-jds.md +39 -0
  165. package/glama.json +6 -0
  166. package/llms.txt +70 -0
  167. package/mcp/README.md +80 -0
  168. package/mcp/claude_desktop_config.example.json +47 -0
  169. package/mcp/mcp.template.json +33 -0
  170. package/opencode.json +42 -0
  171. package/package.json +115 -6
  172. package/prompts/partials/pacing.md +8 -0
  173. package/prompts/partials/snapshot-first.md +4 -0
  174. package/prompts/partials/stop-conditions.md +5 -0
  175. package/schemas/application-ledger.schema.json +272 -0
  176. package/schemas/career-insights.schema.json +111 -0
  177. package/schemas/cv-versions.schema.json +83 -0
  178. package/schemas/notion-sync-plan.schema.json +338 -0
  179. package/schemas/profile-update-plan.schema.json +133 -0
  180. package/schemas/readiness.schema.json +484 -0
  181. package/schemas/resume-data.schema.json +171 -0
  182. package/scripts/install.ps1 +107 -0
  183. package/scripts/install.sh +130 -0
  184. package/skills/00-daily-run.md +89 -0
  185. package/skills/00-interrogate-and-onboard.md +87 -0
  186. package/skills/01-resume-ingestion.md +76 -0
  187. package/skills/02-discover-and-triage.md +121 -0
  188. package/skills/03-tailor-resume-and-verify.md +114 -0
  189. package/skills/04-fill-and-apply.md +108 -0
  190. package/skills/05-outreach-and-interview-prep.md +80 -0
  191. package/skills/06-log-and-insights.md +99 -0
  192. package/skills/07-persona-switcher.md +61 -0
  193. package/skills/08-follow-up-radar.md +59 -0
  194. package/skills/09-offer-negotiator.md +62 -0
  195. package/skills/10-autonomous-scheduler-loop.md +64 -0
  196. package/skills/11-portfolio-and-github-auditor.md +130 -0
  197. package/skills/12-recruiter-inbox-triage.md +69 -0
  198. package/skills/13-company-due-diligence.md +60 -0
  199. package/skills/14-privacy-pii-shield.md +56 -0
  200. package/skills/15-multilingual-adaptation.md +61 -0
  201. package/skills/16-rejection-pattern-analyzer.md +60 -0
  202. package/skills/17-score-calibration.md +61 -0
  203. package/skills/18-condition-based-browser-waiting.md +65 -0
  204. package/skills/19-on-demand-mcp-routing.md +69 -0
  205. package/skills/20-skill-authoring-standard.md +61 -0
  206. package/skills/21-ats-keyword-heatmap.md +60 -0
  207. package/skills/22-technical-assessment-architect.md +59 -0
  208. package/skills/23-contract-and-nda-auditor.md +60 -0
  209. package/skills/24-circuit-breaker-and-antiban.md +68 -0
  210. package/skills/25-prompt-injection-defense.md +59 -0
  211. package/skills/26-deduplication-and-blacklist-guard.md +59 -0
  212. package/skills/27-universal-cv-builder.md +99 -0
  213. package/skills/28-recruiter-brand-and-domain-intelligence.md +99 -0
  214. package/skills/29-portfolio-builder-and-deployer.md +160 -0
  215. package/skills/30-portfolio-design-system-and-qa.md +163 -0
  216. package/skills/54-github-cli-remote-manager.md +144 -0
  217. package/skills/55-freelance-profile-and-service-publisher.md +90 -0
  218. package/skills/56-freelance-offer-radar-and-batch-bidder.md +94 -0
  219. package/skills/REGISTRY.md +98 -0
  220. package/skills/ats/ashby.md +54 -0
  221. package/skills/ats/breezyhr.md +54 -0
  222. package/skills/ats/greenhouse.md +54 -0
  223. package/skills/ats/lever.md +54 -0
  224. package/skills/ats/smartrecruiters.md +54 -0
  225. package/skills/ats/taleo.md +43 -0
  226. package/skills/ats/workday.md +49 -0
  227. package/skills/fallback-no-mcp.md +57 -0
  228. package/skills/linkedin-growth.md +188 -0
  229. package/skills/meta-context-compaction.md +88 -0
  230. package/skills/meta-dom-recovery.md +63 -0
  231. package/skills/meta-self-verification.md +75 -0
  232. package/skills/meta-structured-debugging.md +69 -0
  233. package/skills/platforms/_template.md +69 -0
  234. package/skills/platforms/ats-engines.md +67 -0
  235. package/skills/platforms/b2b-contract-networks.md +59 -0
  236. package/skills/platforms/global-boards.md +122 -0
  237. package/skills/platforms/linkedin.md +162 -0
  238. package/skills/platforms/mena-boards.md +99 -0
  239. package/skills/platforms/remote-boards.md +64 -0
  240. package/skills/platforms/wellfound.md +59 -0
  241. package/skills/profile-intelligence-engine.md +98 -0
  242. package/skills/skills-manifest.json +1730 -0
  243. package/templates/analytics-dashboard.html +1106 -0
  244. package/templates/ats-cover-letter-template.html +29 -0
  245. package/templates/ats-resume-template.html +38 -0
  246. package/templates/ats-resume.html +3 -0
  247. package/ui/app.js +1113 -0
  248. package/ui/favicon.svg +4 -0
  249. package/ui/index.html +53 -0
  250. package/ui/styles.css +595 -0
@@ -0,0 +1,111 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/redasalem/veycraft/schemas/career-insights.schema.json",
4
+ "title": "Veycraft Career Insights & Daily Run Artifacts",
5
+ "description": "Validates logs/insights/<type>-<period>.json and logs/runs/YYYY-MM-DD.json while preserving backward compatibility and separating deterministic metrics from AI interpretations.",
6
+ "oneOf": [
7
+ { "$ref": "#/$defs/insight_report" },
8
+ { "$ref": "#/$defs/daily_run" }
9
+ ],
10
+ "$defs": {
11
+ "skill_count": {
12
+ "type": "object",
13
+ "additionalProperties": false,
14
+ "required": ["skill", "count"],
15
+ "properties": {
16
+ "skill": { "type": "string", "minLength": 1 },
17
+ "count": { "type": "integer", "minimum": 0 }
18
+ }
19
+ },
20
+ "ai_statement": {
21
+ "type": "object",
22
+ "additionalProperties": false,
23
+ "required": ["claim", "evidence_refs"],
24
+ "properties": {
25
+ "claim": { "type": "string", "minLength": 1 },
26
+ "evidence_refs": { "type": "array", "items": { "type": "string", "minLength": 1 } },
27
+ "confidence": { "enum": ["low", "medium", "high"] }
28
+ }
29
+ },
30
+ "insight_report": {
31
+ "type": "object",
32
+ "required": ["type", "period", "generated_at", "scanned", "applied"],
33
+ "properties": {
34
+ "schema_version": { "const": "2.0" },
35
+ "type": { "enum": ["weekly", "monthly", "calibration", "rejection_audit", "all"] },
36
+ "period": { "type": "string", "minLength": 1 },
37
+ "generated_at": { "type": "string", "format": "date-time" },
38
+ "scanned": { "type": "integer", "minimum": 0 },
39
+ "prepared": { "type": "integer", "minimum": 0 },
40
+ "applied": { "type": "integer", "minimum": 0 },
41
+ "match_rate": { "type": ["number", "null"], "minimum": 0, "maximum": 1 },
42
+ "avg_match_score": { "type": ["number", "null"], "minimum": 0, "maximum": 10 },
43
+ "top_skills": { "type": "array", "items": { "$ref": "#/$defs/skill_count" } },
44
+ "skill_gaps": { "type": "array", "items": { "$ref": "#/$defs/skill_count" } },
45
+ "recommendations": { "type": "array", "items": { "type": "string" } },
46
+ "notion_synced": { "type": "boolean" },
47
+ "intelligence": {
48
+ "type": "object",
49
+ "additionalProperties": false,
50
+ "required": ["deterministic_facts", "sample_sufficiency"],
51
+ "properties": {
52
+ "deterministic_facts": { "type": "object" },
53
+ "sample_sufficiency": {
54
+ "type": "object",
55
+ "additionalProperties": false,
56
+ "required": ["submitted_n", "decided_n", "min_threshold", "sufficient"],
57
+ "properties": {
58
+ "submitted_n": { "type": "integer", "minimum": 0 },
59
+ "decided_n": { "type": "integer", "minimum": 0 },
60
+ "min_threshold": { "type": "integer", "minimum": 1 },
61
+ "sufficient": { "type": "boolean" }
62
+ }
63
+ },
64
+ "ai_interpretations": { "type": "array", "items": { "$ref": "#/$defs/ai_statement" } },
65
+ "hypotheses": { "type": "array", "items": { "$ref": "#/$defs/ai_statement" } },
66
+ "recommended_actions": { "type": "array", "items": { "$ref": "#/$defs/ai_statement" } }
67
+ }
68
+ }
69
+ }
70
+ },
71
+ "daily_run": {
72
+ "type": "object",
73
+ "required": ["run_id", "started_at", "dry_run", "status", "counts"],
74
+ "properties": {
75
+ "run_id": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" },
76
+ "started_at": { "type": "string", "format": "date-time" },
77
+ "finished_at": { "type": ["string", "null"], "format": "date-time" },
78
+ "dry_run": { "type": "boolean" },
79
+ "status": { "enum": ["running", "completed", "aborted"] },
80
+ "counts": {
81
+ "type": "object",
82
+ "required": ["scanned", "applied", "dry_run", "needs_review", "skipped", "failed"],
83
+ "properties": {
84
+ "scanned": { "type": "integer", "minimum": 0 },
85
+ "prepared": { "type": "integer", "minimum": 0 },
86
+ "applied": { "type": "integer", "minimum": 0 },
87
+ "dry_run": { "type": "integer", "minimum": 0 },
88
+ "needs_review": { "type": "integer", "minimum": 0 },
89
+ "skipped": { "type": "integer", "minimum": 0 },
90
+ "failed": { "type": "integer", "minimum": 0 }
91
+ }
92
+ },
93
+ "platforms": { "type": "array", "items": { "type": "string" } },
94
+ "errors": { "type": "array", "items": { "type": "string" } },
95
+ "steps": {
96
+ "type": "array",
97
+ "items": {
98
+ "type": "object",
99
+ "required": ["at", "step"],
100
+ "properties": {
101
+ "at": { "type": "string", "format": "date-time" },
102
+ "step": { "type": "string", "minLength": 1 },
103
+ "detail": { "type": "string" }
104
+ }
105
+ }
106
+ },
107
+ "notes": { "type": "string" }
108
+ }
109
+ }
110
+ }
111
+ }
@@ -0,0 +1,83 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/redasalem/veycraft/schemas/cv-versions.schema.json",
4
+ "title": "Veycraft CV Version Registry",
5
+ "description": "Metadata registry for owner base and job-tailored CV versions stored in logs/cv-versions.json. Stores version hashes and metrics only (never raw CV prose); isolates third-party CVs.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["schema_version", "versions"],
9
+ "properties": {
10
+ "schema_version": { "const": "1.0" },
11
+ "updated_at": { "type": ["string", "null"], "format": "date-time" },
12
+ "versions": {
13
+ "type": "array",
14
+ "items": { "$ref": "#/$defs/cv_version" }
15
+ }
16
+ },
17
+ "$defs": {
18
+ "tailoring_metadata": {
19
+ "type": "object",
20
+ "additionalProperties": false,
21
+ "required": ["target_role"],
22
+ "properties": {
23
+ "target_job_id": { "type": ["string", "null"] },
24
+ "target_role": { "type": "string", "minLength": 1 },
25
+ "emphasized_skills": { "type": "array", "items": { "type": "string", "minLength": 1 } },
26
+ "true_gaps_excluded": { "type": "array", "items": { "type": "string", "minLength": 1 } }
27
+ }
28
+ },
29
+ "ats_metrics": {
30
+ "type": "object",
31
+ "additionalProperties": false,
32
+ "properties": {
33
+ "keyword_match_before_pct": { "type": ["number", "null"], "minimum": 0, "maximum": 100 },
34
+ "keyword_match_after_pct": { "type": ["number", "null"], "minimum": 0, "maximum": 100 },
35
+ "hygiene_score": { "type": ["number", "null"], "minimum": 0, "maximum": 100 },
36
+ "page_count": { "type": ["integer", "null"], "minimum": 1, "maximum": 10 }
37
+ }
38
+ },
39
+ "cv_version": {
40
+ "type": "object",
41
+ "additionalProperties": false,
42
+ "required": [
43
+ "cv_version_id",
44
+ "version_number",
45
+ "label",
46
+ "kind",
47
+ "owner_scope",
48
+ "created_at",
49
+ "application_ids"
50
+ ],
51
+ "properties": {
52
+ "cv_version_id": { "type": "string", "minLength": 1 },
53
+ "version_number": { "type": "integer", "minimum": 1 },
54
+ "label": { "type": "string", "minLength": 1 },
55
+ "kind": { "enum": ["generic", "tailored"] },
56
+ "owner_scope": { "enum": ["owner", "third_party"] },
57
+ "base_cv_version_id": { "type": ["string", "null"] },
58
+ "content_sha256": { "type": ["string", "null"], "pattern": "^[a-f0-9]{64}$" },
59
+ "persona_id": { "type": ["string", "null"] },
60
+ "language": { "type": "string", "minLength": 2, "maxLength": 12 },
61
+ "created_at": { "type": "string", "format": "date-time" },
62
+ "updated_at": { "type": ["string", "null"], "format": "date-time" },
63
+ "local_ref_rel": { "type": ["string", "null"] },
64
+ "tailoring_metadata": {
65
+ "oneOf": [
66
+ { "$ref": "#/$defs/tailoring_metadata" },
67
+ { "type": "null" }
68
+ ]
69
+ },
70
+ "ats_metrics": {
71
+ "oneOf": [
72
+ { "$ref": "#/$defs/ats_metrics" },
73
+ { "type": "null" }
74
+ ]
75
+ },
76
+ "application_ids": {
77
+ "type": "array",
78
+ "items": { "type": "string", "minLength": 1 }
79
+ }
80
+ }
81
+ }
82
+ }
83
+ }
@@ -0,0 +1,338 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/redasalem/veycraft/schemas/notion-sync-plan.schema.json",
4
+ "title": "Veycraft Notion Sync Plan & Local Sync State",
5
+ "description": "Validates preview-gated, one-way Notion sync plans (logs/insights/notion-sync-plan-YYYY-MM-DD.json) and logs/sync-state.json. Strictly restricts application sync eligibility to submitted outcomes only.",
6
+ "oneOf": [
7
+ { "$ref": "#/$defs/sync_plan" },
8
+ { "$ref": "#/$defs/sync_state_file" }
9
+ ],
10
+ "$defs": {
11
+ "submitted_only_status": {
12
+ "enum": ["applied", "interview", "assessment", "offer", "rejected", "withdrawn"]
13
+ },
14
+ "target_database": {
15
+ "enum": ["applications", "daily_runs", "insights"]
16
+ },
17
+ "notion_uuid": {
18
+ "type": "string",
19
+ "pattern": "^(?:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|[0-9a-fA-F]{32})$"
20
+ },
21
+ "sync_item_state": {
22
+ "enum": [
23
+ "ineligible_not_submitted",
24
+ "pending_sync",
25
+ "blocked_privacy",
26
+ "previewed",
27
+ "in_flight",
28
+ "synced",
29
+ "failed_retryable",
30
+ "failed_permanent",
31
+ "conflict_duplicate_remote",
32
+ "receipt_uncertain"
33
+ ]
34
+ },
35
+ "executable_operation_state": {
36
+ "enum": [
37
+ "previewed",
38
+ "in_flight",
39
+ "synced",
40
+ "failed_retryable",
41
+ "failed_permanent",
42
+ "conflict_duplicate_remote",
43
+ "receipt_uncertain"
44
+ ]
45
+ },
46
+ "privacy_violation": {
47
+ "type": "object",
48
+ "additionalProperties": false,
49
+ "required": ["field_path", "code", "reason"],
50
+ "properties": {
51
+ "field_path": { "type": "string", "minLength": 1 },
52
+ "code": {
53
+ "enum": [
54
+ "secret_token",
55
+ "private_email",
56
+ "phone_number",
57
+ "local_file_path",
58
+ "eeo_or_sensitive_key",
59
+ "raw_cv_dump",
60
+ "unsafe_url",
61
+ "third_party_subject"
62
+ ]
63
+ },
64
+ "reason": { "type": "string", "minLength": 1 }
65
+ }
66
+ },
67
+ "plan_approval": {
68
+ "type": "object",
69
+ "additionalProperties": false,
70
+ "required": [
71
+ "approved_plan_hash",
72
+ "approved_plan_id",
73
+ "approved_at",
74
+ "approved_by",
75
+ "operation_count"
76
+ ],
77
+ "properties": {
78
+ "approved_plan_hash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
79
+ "approved_plan_id": { "type": "string", "minLength": 1 },
80
+ "approved_at": { "type": "string", "format": "date-time" },
81
+ "approved_by": { "const": "owner" },
82
+ "operation_count": { "type": "integer", "minimum": 0 }
83
+ }
84
+ },
85
+ "planned_operation": {
86
+ "type": "object",
87
+ "additionalProperties": false,
88
+ "required": [
89
+ "operation_id",
90
+ "database",
91
+ "canonical_key",
92
+ "action",
93
+ "sync_hash",
94
+ "payload",
95
+ "status"
96
+ ],
97
+ "properties": {
98
+ "operation_id": { "type": "string", "pattern": "^[a-f0-9]{16}$" },
99
+ "database": { "$ref": "#/$defs/target_database" },
100
+ "canonical_key": { "type": "string", "minLength": 1 },
101
+ "application_status": { "$ref": "#/$defs/submitted_only_status" },
102
+ "action": { "enum": ["create", "update", "skip_unchanged"] },
103
+ "existing_page_id": {
104
+ "oneOf": [
105
+ { "$ref": "#/$defs/notion_uuid" },
106
+ { "type": "null" }
107
+ ]
108
+ },
109
+ "sync_hash": { "type": "string", "pattern": "^[a-f0-9]{16}$" },
110
+ "payload": { "type": "object" },
111
+ "status": { "$ref": "#/$defs/executable_operation_state" }
112
+ },
113
+ "allOf": [
114
+ {
115
+ "if": {
116
+ "properties": { "database": { "const": "applications" } },
117
+ "required": ["database"]
118
+ },
119
+ "then": {
120
+ "required": ["application_status"]
121
+ }
122
+ },
123
+ {
124
+ "if": {
125
+ "properties": { "action": { "const": "create" } },
126
+ "required": ["action"]
127
+ },
128
+ "then": {
129
+ "properties": {
130
+ "existing_page_id": { "type": "null" }
131
+ }
132
+ }
133
+ },
134
+ {
135
+ "if": {
136
+ "properties": { "action": { "const": "update" } },
137
+ "required": ["action"]
138
+ },
139
+ "then": {
140
+ "required": ["existing_page_id"],
141
+ "properties": {
142
+ "existing_page_id": { "$ref": "#/$defs/notion_uuid" }
143
+ }
144
+ }
145
+ }
146
+ ]
147
+ },
148
+ "blocked_item": {
149
+ "type": "object",
150
+ "additionalProperties": false,
151
+ "required": ["database", "canonical_key", "state", "violations"],
152
+ "properties": {
153
+ "database": { "$ref": "#/$defs/target_database" },
154
+ "canonical_key": { "type": "string", "minLength": 1 },
155
+ "state": { "const": "blocked_privacy" },
156
+ "violations": {
157
+ "type": "array",
158
+ "minItems": 1,
159
+ "items": { "$ref": "#/$defs/privacy_violation" }
160
+ }
161
+ }
162
+ },
163
+ "sync_plan": {
164
+ "type": "object",
165
+ "additionalProperties": false,
166
+ "required": [
167
+ "schema_version",
168
+ "plan_id",
169
+ "plan_hash",
170
+ "created_at",
171
+ "mode",
172
+ "eligibility_policy",
173
+ "transport_enabled",
174
+ "dry_run",
175
+ "operations",
176
+ "blocked_items",
177
+ "skipped_ineligible"
178
+ ],
179
+ "properties": {
180
+ "schema_version": { "const": "1.0" },
181
+ "plan_id": { "type": "string", "minLength": 1 },
182
+ "plan_hash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
183
+ "created_at": { "type": "string", "format": "date-time" },
184
+ "mode": { "enum": ["preview", "approved_execute", "verified"] },
185
+ "eligibility_policy": { "const": "submitted_only" },
186
+ "transport_enabled": { "type": "boolean" },
187
+ "dry_run": { "type": "boolean" },
188
+ "approval": {
189
+ "oneOf": [
190
+ { "$ref": "#/$defs/plan_approval" },
191
+ { "type": "null" }
192
+ ]
193
+ },
194
+ "operations": {
195
+ "type": "array",
196
+ "items": { "$ref": "#/$defs/planned_operation" }
197
+ },
198
+ "blocked_items": {
199
+ "type": "array",
200
+ "items": { "$ref": "#/$defs/blocked_item" }
201
+ },
202
+ "skipped_ineligible": {
203
+ "type": "array",
204
+ "items": {
205
+ "type": "object",
206
+ "additionalProperties": false,
207
+ "required": ["canonical_key", "status", "reason"],
208
+ "properties": {
209
+ "canonical_key": { "type": "string", "minLength": 1 },
210
+ "status": { "type": "string" },
211
+ "reason": { "type": "string", "minLength": 1 }
212
+ }
213
+ }
214
+ }
215
+ },
216
+ "allOf": [
217
+ {
218
+ "if": {
219
+ "properties": { "mode": { "enum": ["approved_execute", "verified"] } },
220
+ "required": ["mode"]
221
+ },
222
+ "then": {
223
+ "required": ["approval"],
224
+ "properties": {
225
+ "approval": { "$ref": "#/$defs/plan_approval" }
226
+ }
227
+ }
228
+ }
229
+ ]
230
+ },
231
+ "sync_state_entry": {
232
+ "type": "object",
233
+ "additionalProperties": false,
234
+ "required": ["database", "canonical_key", "state"],
235
+ "properties": {
236
+ "database": { "$ref": "#/$defs/target_database" },
237
+ "canonical_key": { "type": "string", "minLength": 1 },
238
+ "state": { "$ref": "#/$defs/sync_item_state" },
239
+ "page_id": {
240
+ "oneOf": [
241
+ { "$ref": "#/$defs/notion_uuid" },
242
+ { "type": "null" }
243
+ ]
244
+ },
245
+ "last_synced_hash": {
246
+ "oneOf": [
247
+ { "type": "string", "pattern": "^[a-f0-9]{16}$" },
248
+ { "type": "null" }
249
+ ]
250
+ },
251
+ "attempted_hash": {
252
+ "oneOf": [
253
+ { "type": "string", "pattern": "^[a-f0-9]{16}$" },
254
+ { "type": "null" }
255
+ ]
256
+ },
257
+ "attempted_at": { "type": ["string", "null"], "format": "date-time" },
258
+ "last_synced_at": { "type": ["string", "null"], "format": "date-time" },
259
+ "operation_id": {
260
+ "oneOf": [
261
+ { "type": "string", "pattern": "^[a-f0-9]{16}$" },
262
+ { "type": "null" }
263
+ ]
264
+ },
265
+ "approved_plan_hash": {
266
+ "oneOf": [
267
+ { "type": "string", "pattern": "^[a-f0-9]{64}$" },
268
+ { "type": "null" }
269
+ ]
270
+ },
271
+ "retry_count": { "type": "integer", "minimum": 0 },
272
+ "next_retry_after": { "type": ["string", "null"], "format": "date-time" },
273
+ "conflicting_page_ids": { "type": "array", "items": { "$ref": "#/$defs/notion_uuid" } },
274
+ "last_error": { "type": ["string", "null"] }
275
+ },
276
+ "allOf": [
277
+ {
278
+ "if": {
279
+ "properties": { "state": { "const": "synced" } },
280
+ "required": ["state"]
281
+ },
282
+ "then": {
283
+ "required": ["page_id", "last_synced_hash"],
284
+ "properties": {
285
+ "page_id": { "$ref": "#/$defs/notion_uuid" },
286
+ "last_synced_hash": { "type": "string", "pattern": "^[a-f0-9]{16}$" }
287
+ }
288
+ }
289
+ },
290
+ {
291
+ "if": {
292
+ "properties": { "state": { "const": "in_flight" } },
293
+ "required": ["state"]
294
+ },
295
+ "then": {
296
+ "required": ["attempted_hash", "attempted_at", "operation_id", "approved_plan_hash"],
297
+ "properties": {
298
+ "attempted_hash": { "type": "string", "pattern": "^[a-f0-9]{16}$" },
299
+ "attempted_at": { "type": "string", "format": "date-time" },
300
+ "operation_id": { "type": "string", "pattern": "^[a-f0-9]{16}$" },
301
+ "approved_plan_hash": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
302
+ }
303
+ }
304
+ },
305
+ {
306
+ "if": {
307
+ "properties": { "state": { "const": "conflict_duplicate_remote" } },
308
+ "required": ["state"]
309
+ },
310
+ "then": {
311
+ "required": ["conflicting_page_ids"],
312
+ "properties": {
313
+ "conflicting_page_ids": {
314
+ "type": "array",
315
+ "minItems": 2,
316
+ "uniqueItems": true,
317
+ "items": { "$ref": "#/$defs/notion_uuid" }
318
+ }
319
+ }
320
+ }
321
+ }
322
+ ]
323
+ },
324
+ "sync_state_file": {
325
+ "type": "object",
326
+ "additionalProperties": false,
327
+ "required": ["schema_version", "updated_at", "records"],
328
+ "properties": {
329
+ "schema_version": { "const": "1.0" },
330
+ "updated_at": { "type": ["string", "null"], "format": "date-time" },
331
+ "records": {
332
+ "type": "object",
333
+ "additionalProperties": { "$ref": "#/$defs/sync_state_entry" }
334
+ }
335
+ }
336
+ }
337
+ }
338
+ }
@@ -0,0 +1,133 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/redasalem/veycraft/schemas/profile-update-plan.schema.json",
4
+ "title": "Veycraft Profile Update Plan",
5
+ "description": "A reviewable, evidence-grounded plan for profile edits across career platforms. Removal actions are intentionally not supported.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["schema_version", "target_role", "platform", "mode", "changes"],
9
+ "properties": {
10
+ "schema_version": { "const": "1.0" },
11
+ "plan_id": { "type": "string", "minLength": 1 },
12
+ "target_role": { "type": "string", "minLength": 1 },
13
+ "target_job_url": { "type": ["string", "null"], "format": "uri" },
14
+ "platform": { "type": "string", "minLength": 1 },
15
+ "profile_url": { "type": ["string", "null"], "format": "uri" },
16
+ "mode": { "enum": ["draft_only", "review", "approved_apply"] },
17
+ "created_at": { "type": "string", "format": "date-time" },
18
+ "adapter": { "$ref": "#/$defs/adapter_capability_summary" },
19
+ "missing_facts": {
20
+ "type": "array",
21
+ "items": { "type": "string", "minLength": 1 }
22
+ },
23
+ "skipped_unchanged": {
24
+ "type": "array",
25
+ "items": { "type": "string", "minLength": 1 }
26
+ },
27
+ "verification_summary": { "$ref": "#/$defs/verification_summary" },
28
+ "changes": {
29
+ "type": "array",
30
+ "items": { "$ref": "#/$defs/change" }
31
+ }
32
+ },
33
+ "$defs": {
34
+ "adapter_capability_summary": {
35
+ "type": "object",
36
+ "additionalProperties": false,
37
+ "required": ["platform_id", "capabilities", "requires_approval"],
38
+ "properties": {
39
+ "platform_id": { "type": "string", "minLength": 1 },
40
+ "capabilities": {
41
+ "type": "object",
42
+ "additionalProperties": false,
43
+ "required": ["read", "draft", "fill", "save", "verify"],
44
+ "properties": {
45
+ "read": { "type": "boolean" },
46
+ "draft": { "type": "boolean" },
47
+ "fill": { "type": "boolean" },
48
+ "save": { "type": "boolean" },
49
+ "verify": { "type": "boolean" }
50
+ }
51
+ },
52
+ "requires_approval": { "type": "boolean" },
53
+ "limitations": {
54
+ "type": "array",
55
+ "items": { "type": "string", "minLength": 1 }
56
+ }
57
+ }
58
+ },
59
+ "verification_summary": {
60
+ "type": "object",
61
+ "additionalProperties": false,
62
+ "required": ["outcome", "verified_count", "total_changes"],
63
+ "properties": {
64
+ "outcome": {
65
+ "enum": [
66
+ "prepared",
67
+ "approved",
68
+ "applied",
69
+ "verified",
70
+ "partially_applied",
71
+ "blocked",
72
+ "not_verified"
73
+ ]
74
+ },
75
+ "verified_count": { "type": "integer", "minimum": 0 },
76
+ "total_changes": { "type": "integer", "minimum": 0 },
77
+ "verified_at": { "type": ["string", "null"], "format": "date-time" },
78
+ "notes": { "type": "string" }
79
+ }
80
+ },
81
+ "change": {
82
+ "type": "object",
83
+ "additionalProperties": false,
84
+ "required": [
85
+ "section",
86
+ "field",
87
+ "action",
88
+ "before",
89
+ "after",
90
+ "reason",
91
+ "evidence",
92
+ "confidence",
93
+ "requires_confirmation",
94
+ "fact_basis",
95
+ "status"
96
+ ],
97
+ "properties": {
98
+ "section": { "type": "string", "minLength": 1 },
99
+ "field": { "type": "string", "minLength": 1 },
100
+ "action": { "enum": ["add", "replace"] },
101
+ "before": { "type": ["string", "null"] },
102
+ "after": { "type": "string", "minLength": 1 },
103
+ "reason": { "type": "string", "minLength": 1 },
104
+ "evidence": {
105
+ "type": "array",
106
+ "minItems": 1,
107
+ "items": { "type": "string", "minLength": 1 }
108
+ },
109
+ "confidence": { "type": "number", "minimum": 0, "maximum": 1 },
110
+ "requires_confirmation": { "type": "boolean" },
111
+ "fact_basis": {
112
+ "enum": ["verified", "user_confirmed", "inferred", "platform_specific"]
113
+ },
114
+ "adapter_capability": {
115
+ "enum": ["read_only", "draft_only", "fill_supported", "save_and_verify_supported"]
116
+ },
117
+ "verification_evidence": { "type": ["string", "null"] },
118
+ "status": {
119
+ "enum": [
120
+ "draft",
121
+ "needs_user_confirmation",
122
+ "approved",
123
+ "applied",
124
+ "verified",
125
+ "not_verified",
126
+ "blocked",
127
+ "needs_review"
128
+ ]
129
+ }
130
+ }
131
+ }
132
+ }
133
+ }