feat: add job-posting-notion-sync template#192
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughA new ChangesJob Posting Notion Sync Kit
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
:robot_face: AgentKit Structural ValidationNew Contributions Detected
Check Results
🎉 All checks passed! This contribution follows the AgentKit structure. |
There was a problem hiding this comment.
Actionable comments posted: 6
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@kits/job-posting-notion-sync/agent.md`:
- Around line 41-57: The missing-value contract is inconsistent for
experience_level in the extraction schema. Update the agent.md output schema and
guardrail text so experience_level follows the same rule as the other fields
when unstated, using the same empty-value convention instead of null. Keep the
fix localized to the schema/contract section describing the JSON output for the
job-posting extraction agent.
In `@kits/job-posting-notion-sync/flows/job.ts`:
- Around line 208-217: The classifier routing in job.ts currently maps both
“Classifier 1” and “Classifier 2” to the same destination, and the edges array
duplicates the same edge object, so the branch logic has no effect. Update the
classifier definitions and the related edge setup in job.ts so each classifier
either routes to a distinct target via unique edge values, or, if convergence is
intended, remove the duplicate edge entry and keep a single shared edge. Use the
classifier mapping and the edges array entries as the main symbols to locate and
fix the duplication.
- Around line 232-239: The Notion page creation config in the job flow has
hardcoded personal workspace IDs for the create-page target, so replace the
fixed values used by the Notion node with placeholders like the existing
databaseId pattern. Update the JOB flow’s createPage setup (the object
containing pageId, parent, and nodeName for “Save to Notion”) so consumers must
provide their own page/parent IDs instead of shipping the author’s private
Notion page reference.
In `@kits/job-posting-notion-sync/lamatic.config.ts`:
- Around line 8-10: The `steps` entry in `lamatic.config.ts` is using a raw UUID
for `envKey`, but `process.env[step.envKey]` expects the actual environment
variable name that contains the deployed flow ID. Update the
`job-posting-extractor` step to reference the correct env var key instead of the
UUID, keeping the `id` and `type` unchanged.
In `@kits/job-posting-notion-sync/prompts/job_instructor-llmnode-200_system_0.md`:
- Around line 2-5: The prompt rules for experience_level are inconsistent: it
says to return null when not stated, but the node contract in job.ts expects a
string. Update the instructions in job_instructor-llmnode-200_system_0.md so
missing experience_level uses an empty string like other missing string fields,
and keep tech_stack as an empty array when absent. Make sure the guidance is
explicit and consistent with the downstream Notion write expectations.
In `@kits/job-posting-notion-sync/README.md`:
- Around line 84-87: The README has markdownlint issues in the examples and link
text: update the unlabeled code fences in the Notion ID example and other fenced
blocks referenced by the review to use an explicit language such as text, and
replace the generic [link] label with a more descriptive label in the affected
section so the markdown is cleaner and less noisy. Use the existing README
examples around the Notion URL and the later link section to locate and fix the
fenced blocks and link label consistently.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: ASSERTIVE
Plan: Pro
Run ID: da447c48-6bde-435d-974d-057e35c83752
📒 Files selected for processing (11)
kits/job-posting-notion-sync/README.mdkits/job-posting-notion-sync/agent.mdkits/job-posting-notion-sync/constitutions/default.mdkits/job-posting-notion-sync/flows/job.tskits/job-posting-notion-sync/lamatic.config.tskits/job-posting-notion-sync/model-configs/job_agent-classifier-node-222_generative-model-name.tskits/job-posting-notion-sync/model-configs/job_instructor-llmnode-200_generative-model-name.tskits/job-posting-notion-sync/prompts/job_agent-classifier-node-222_system_0.mdkits/job-posting-notion-sync/prompts/job_agent-classifier-node-222_user_1.mdkits/job-posting-notion-sync/prompts/job_instructor-llmnode-200_system_0.mdkits/job-posting-notion-sync/prompts/job_instructor-llmnode-200_user_1.md
- Use distinct High/Low labels and values for classifier routes - Replace hardcoded personal Notion workspace UUIDs with REPLACE_WITH_YOUR_NOTION_DATABASE_ID placeholder - Remove duplicate agentClassifierNode_222->notionNode_1 edge - Fix experience_level missing-value convention from null to empty string in agent.md
There was a problem hiding this comment.
♻️ Duplicate comments (2)
kits/job-posting-notion-sync/flows/job.ts (2)
208-217: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy liftMission status: half-decoded. The team differentiated the classifier's High/Low values (Lines 211, 215) — good, agent — but the edges array (Lines 302-309) still only carries one edge,
agentClassifierNode_222-notionNode_1, matching neither-highnor-low. If this platform's classifier node binds routing by matching an option'svaluestring to an edgeid(as the earlier duplicate-edge review implied), both branches may now be orphaned rather than merely non-differentiated.Before this parachutes into production: either add two distinct edges whose ids match
agentClassifierNode_222-notionNode_1-high/-low, or confirm the classifier routes purely bysource/targetand doesn't care about thevaluesuffix at all.🕵️ Proposed fix (if edge-id matching is required)
{ - "id": "agentClassifierNode_222-notionNode_1", + "id": "agentClassifierNode_222-notionNode_1-high", "source": "agentClassifierNode_222", "target": "notionNode_1", "sourceHandle": "bottom", "targetHandle": "top", "type": "agentClassifierEdge" }, + { + "id": "agentClassifierNode_222-notionNode_1-low", + "source": "agentClassifierNode_222", + "target": "notionNode_1", + "sourceHandle": "bottom", + "targetHandle": "top", + "type": "agentClassifierEdge" + },Lamatic AgentKit agentClassifierNode edge routing value id matchingAlso applies to: 302-310
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@kits/job-posting-notion-sync/flows/job.ts` around lines 208 - 217, The classifier in job.ts now has distinct High/Low option values, but the edges definition still exposes only a single agentClassifierNode_222-notionNode_1 edge, so the routing may not resolve to either branch. Update the edges array to either define two edges whose ids exactly match agentClassifierNode_222-notionNode_1-high and agentClassifierNode_222-notionNode_1-low, or verify in the classifier node wiring that routing uses source/target only and then keep the existing edge id. Use the classifier config and edges block in job.ts to make the routing identifiers consistent.
235-236: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winPlaceholder reused across two different targets, agent.
pageIdandparent(previously hardcoded UUIDs) now both borrow theREPLACE_WITH_YOUR_NOTION_DATABASE_IDtext — same string as the actualdatabaseIdfield on Line 239. Consumers filling in a real database ID fordatabaseIdmight copy-paste the identical value intopageId/parenttoo, even though those conceptually represent a page/parent, not a database. A distinct placeholder name (e.g.REPLACE_WITH_YOUR_NOTION_PAGE_ID) would make the contract unambiguous.♻️ Proposed fix
- "pageId": "REPLACE_WITH_YOUR_NOTION_DATABASE_ID", - "parent": "REPLACE_WITH_YOUR_NOTION_DATABASE_ID", + "pageId": "REPLACE_WITH_YOUR_NOTION_PAGE_ID", + "parent": "REPLACE_WITH_YOUR_NOTION_PAGE_ID",🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@kits/job-posting-notion-sync/flows/job.ts` around lines 235 - 236, The placeholder values for pageId and parent in the JobPostingNotionSync flow are reusing the same database ID text as databaseId, which makes the target fields ambiguous. Update the constants in the job.ts config block so pageId and parent use a distinct page/parent placeholder name (for example, a page-specific identifier) while keeping databaseId unchanged, and ensure the surrounding setup in JobPostingNotionSync clearly distinguishes the three fields.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Duplicate comments:
In `@kits/job-posting-notion-sync/flows/job.ts`:
- Around line 208-217: The classifier in job.ts now has distinct High/Low option
values, but the edges definition still exposes only a single
agentClassifierNode_222-notionNode_1 edge, so the routing may not resolve to
either branch. Update the edges array to either define two edges whose ids
exactly match agentClassifierNode_222-notionNode_1-high and
agentClassifierNode_222-notionNode_1-low, or verify in the classifier node
wiring that routing uses source/target only and then keep the existing edge id.
Use the classifier config and edges block in job.ts to make the routing
identifiers consistent.
- Around line 235-236: The placeholder values for pageId and parent in the
JobPostingNotionSync flow are reusing the same database ID text as databaseId,
which makes the target fields ambiguous. Update the constants in the job.ts
config block so pageId and parent use a distinct page/parent placeholder name
(for example, a page-specific identifier) while keeping databaseId unchanged,
and ensure the surrounding setup in JobPostingNotionSync clearly distinguishes
the three fields.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: ASSERTIVE
Plan: Pro
Run ID: 145cc973-2c09-4c73-a949-294eb672221e
📒 Files selected for processing (2)
kits/job-posting-notion-sync/agent.mdkits/job-posting-notion-sync/flows/job.ts
- Add two distinct edges (agentClassifierNode_222-notionNode_1-high/low) to match the classifier option value strings - Rename pageId/parent placeholder to REPLACE_WITH_YOUR_NOTION_PAGE_ID to distinguish it from databaseId - Update README to document all three Notion placeholders clearly
- Update envKey to use a string identifier instead of a raw UUID - Fix markdown linting issues in README.md by providing explicit language tags and descriptive link text
AnshSingh30
left a comment
There was a problem hiding this comment.
fixed all coderabbit issues
… extractor prompt
|
Hi @AnshSingh30! 👋 Before this PR can be reviewed by maintainers, please resolve all comments and requested changes from the CodeRabbit automated review. Steps to follow:
This helps keep the review process efficient for everyone. Thank you! 🙏 |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
kits/job-posting-notion-sync/flows/job.ts (1)
1-337: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winRename
kits/job-posting-notion-sync/flows/job.tstojob-posting-extractor.ts
The kit’s step id isjob-posting-extractor, so this flow file should match the required kebab-case naming convention.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@kits/job-posting-notion-sync/flows/job.ts` around lines 1 - 337, The flow file name does not match the required step id naming convention. Rename the `job` flow definition file to `job-posting-extractor.ts` so it matches the `job-posting-extractor` step id and keeps the kit file naming consistent. Update any references that point to the current `job.ts` entry if needed, but the flow contents such as `meta`, `nodes`, and `edges` can remain unchanged.Source: Coding guidelines
♻️ Duplicate comments (1)
kits/job-posting-notion-sync/README.md (1)
89-91: 📐 Maintainability & Code Quality | 🟡 Minor | 💤 Low valueAdd language specifier to the Notion URL code fence.
The code block at line 89 showing the Notion URL structure lacks a language specifier, triggering markdownlint MD040. Add
textto the opening fence.🛠️ Proposed fix
-``` +```text https://www.notion.so/myworkspace/<PAGE_ID>?v=<DATABASE_ID></details> <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.In
@kits/job-posting-notion-sync/README.mdaround lines 89 - 91, The README’s
Notion URL example is in a fenced code block without a language specifier,
triggering MD040. Update the fence around the example in the README to use a
text language tag while keeping the existing Notion URL content unchanged.</details> <!-- cr-comment:v1:eb3ad05352872896982b54bb --> _Source: Linters/SAST tools_ </blockquote></details> </blockquote></details> <details> <summary>🤖 Prompt for all review comments with AI agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.Inline comments:
In@kits/job-posting-notion-sync/prompts/job_instructor-llmnode-200_system_0.md:
- Around line 2-4: Consolidate the repeated tech_stack guidance in the prompt by
keeping the general rule in the job_instructor-llmnode-200_system_0.md
instructions and removing the duplicate standalone sentence; preserve the
explicit requirement that tech_stack should be [] when no technologies are
mentioned, while keeping the rest of the null-avoidance and “do not guess” rules
unchanged.
Outside diff comments:
In@kits/job-posting-notion-sync/flows/job.ts:
- Around line 1-337: The flow file name does not match the required step id
naming convention. Rename thejobflow definition file to
job-posting-extractor.tsso it matches thejob-posting-extractorstep id and
keeps the kit file naming consistent. Update any references that point to the
currentjob.tsentry if needed, but the flow contents such asmeta,nodes,
andedgescan remain unchanged.
Duplicate comments:
In@kits/job-posting-notion-sync/README.md:
- Around line 89-91: The README’s Notion URL example is in a fenced code block
without a language specifier, triggering MD040. Update the fence around the
example in the README to use a text language tag while keeping the existing
Notion URL content unchanged.</details> <details> <summary>🪄 Autofix (Beta)</summary> Fix all unresolved CodeRabbit comments on this PR: - [ ] <!-- {"checkboxId": "4b0d0e0a-96d7-4f10-b296-3a18ea78f0b9"} --> Push a commit to this branch (recommended) - [ ] <!-- {"checkboxId": "ff5b1114-7d8c-49e6-8ac1-43f82af23a33"} --> Create a new PR with the fixes </details> --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: Repository UI (base), Organization UI (inherited) **Review profile**: ASSERTIVE **Plan**: Pro **Run ID**: `bd8b8edb-53da-4c53-82bb-97da7f8bc1e0` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between e5d12be6140c2f28ef7a4acbba38e0f765e67485 and 46bcd9ffd1a98b1406efe444f267a77f0f3ef6a7. </details> <details> <summary>📒 Files selected for processing (4)</summary> * `kits/job-posting-notion-sync/README.md` * `kits/job-posting-notion-sync/flows/job.ts` * `kits/job-posting-notion-sync/lamatic.config.ts` * `kits/job-posting-notion-sync/prompts/job_instructor-llmnode-200_system_0.md` </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
PR Checklist
1. Select Contribution Type
kits/<category>/<kit-name>/)bundles/<bundle-name>/)templates/<template-name>/)2. General Requirements
kebab-caseand matches the flow IDREADME.md(purpose, setup, usage)3. File Structure (Check what applies)
config.jsonpresent with valid metadata (name, description, tags, steps, author, env keys)flows/<flow-name>/(where applicable) include:config.json(Lamatic flow export)inputs.jsonmeta.jsonREADME.md.env.examplewith placeholder values only (kits only)config.jsonnode graphs (changes via Lamatic Studio export)4. Validation
npm install && npm run devworks locally (kits: UI runs; bundles/templates: flows are valid)[kit] Add <name> for <use case>)kits/job-posting-notion-sync/kits/job-posting-notion-sync/README.mdkits/job-posting-notion-sync/agent.mdkits/job-posting-notion-sync/constitutions/default.mdflow.jsonfound for this kit):kits/job-posting-notion-sync/flows/job.tskits/job-posting-notion-sync/lamatic.config.tskits/job-posting-notion-sync/model-configs/job_instructor-llmnode-200_generative-model-name.tskits/job-posting-notion-sync/model-configs/job_agent-classifier-node-222_generative-model-name.tskits/job-posting-notion-sync/prompts/job_instructor-llmnode-200_system_0.mdkits/job-posting-notion-sync/prompts/job_instructor-llmnode-200_user_1.mdkits/job-posting-notion-sync/prompts/job_agent-classifier-node-222_system_0.mdkits/job-posting-notion-sync/prompts/job_agent-classifier-node-222_user_1.mdFlow high-level behavior (
flows/job.ts)triggerNode(GraphQL realtime trigger, inputs:job_url,destination)dynamicNode:mode: syncSingleScrape,urls: {{triggerNode_1.output.job_url}})NOTION_CREATE_NOTION_PAGE,operation: createPage, maps extracted fields to Notion properties)agentClassifierNode(classifies intoHighvsLow)responseNode(API response)triggerNode_1receives realtime inputs (job_url,destination)firecrawlNode_795scrapes the job page via FirecrawlInstructorLLMNode_200converts scraped content into structured JSON (company, role_title, location, remote_type, tech_stack, experience_level, salary_range, application_deadline, source_url)agentClassifierNode_222labels the posting asHighorLow(based on tech stack)notionNode_1creates a Notion database page (priorityis set from the classifier output; other fields map fromInstructorLLMNode_200.output.*)responseNode_triggerNode_1through:notionNode_1 -> responseNode_triggerNode_1triggerNode_1 -> responseNode_triggerNode_1direct response edge