Skip to content

feat: add job-posting-notion-sync template#192

Open
AnshSingh30 wants to merge 6 commits into
Lamatic:mainfrom
AnshSingh30:feat/job-posting-notion-sync
Open

feat: add job-posting-notion-sync template#192
AnshSingh30 wants to merge 6 commits into
Lamatic:mainfrom
AnshSingh30:feat/job-posting-notion-sync

Conversation

@AnshSingh30

@AnshSingh30 AnshSingh30 commented Jul 7, 2026

Copy link
Copy Markdown

PR Checklist

1. Select Contribution Type

  • Kit (kits/<category>/<kit-name>/)
  • Bundle (bundles/<bundle-name>/)
  • Template (templates/<template-name>/)

2. General Requirements

  • PR is for one project only (no unrelated changes)
  • No secrets, API keys, or real credentials are committed
  • Folder name uses kebab-case and matches the flow ID
  • All changes are documented in README.md (purpose, setup, usage)

3. File Structure (Check what applies)

  • config.json present with valid metadata (name, description, tags, steps, author, env keys)
  • All flows in flows/<flow-name>/ (where applicable) include:
    • config.json (Lamatic flow export)
    • inputs.json
    • meta.json
    • README.md
  • .env.example with placeholder values only (kits only)
  • No hand‑edited flow config.json node graphs (changes via Lamatic Studio export)

4. Validation

  • npm install && npm run dev works locally (kits: UI runs; bundles/templates: flows are valid)
  • PR title is clear (e.g., [kit] Add <name> for <use case>)
  • GitHub Actions workflows pass (all checks are green)
  • All CodeRabbit or other PR review comments are addressed and resolved
  • No unrelated files or projects are modified
  • Added new template kit: kits/job-posting-notion-sync/
  • Added documentation:
    • kits/job-posting-notion-sync/README.md
    • kits/job-posting-notion-sync/agent.md
    • kits/job-posting-notion-sync/constitutions/default.md
  • Added workflow definition (no flow.json found for this kit):
    • kits/job-posting-notion-sync/flows/job.ts
  • Added template configuration:
    • kits/job-posting-notion-sync/lamatic.config.ts
  • Added model configuration modules:
    • kits/job-posting-notion-sync/model-configs/job_instructor-llmnode-200_generative-model-name.ts
    • kits/job-posting-notion-sync/model-configs/job_agent-classifier-node-222_generative-model-name.ts
  • Added prompt files:
    • kits/job-posting-notion-sync/prompts/job_instructor-llmnode-200_system_0.md
    • kits/job-posting-notion-sync/prompts/job_instructor-llmnode-200_user_1.md
    • kits/job-posting-notion-sync/prompts/job_agent-classifier-node-222_system_0.md
    • kits/job-posting-notion-sync/prompts/job_agent-classifier-node-222_user_1.md

Flow high-level behavior (flows/job.ts)

  • Node types used:
    • triggerNode (GraphQL realtime trigger, inputs: job_url, destination)
    • dynamicNode:
      • Firecrawl scrape (mode: syncSingleScrape, urls: {{triggerNode_1.output.job_url}})
      • Instructor LLM JSON generation (extracts structured job fields per provided schema)
      • Notion write (NOTION_CREATE_NOTION_PAGE, operation: createPage, maps extracted fields to Notion properties)
    • agentClassifierNode (classifies into High vs Low)
    • responseNode (API response)
  • Execution path:
    1. triggerNode_1 receives realtime inputs (job_url, destination)
    2. firecrawlNode_795 scrapes the job page via Firecrawl
    3. InstructorLLMNode_200 converts scraped content into structured JSON (company, role_title, location, remote_type, tech_stack, experience_level, salary_range, application_deadline, source_url)
    4. agentClassifierNode_222 labels the posting as High or Low (based on tech stack)
    5. notionNode_1 creates a Notion database page (priority is set from the classifier output; other fields map from InstructorLLMNode_200.output.*)
    6. Output is returned via responseNode_triggerNode_1 through:
      • notionNode_1 -> responseNode_triggerNode_1
      • an additional triggerNode_1 -> responseNode_triggerNode_1 direct response edge

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 25758d9c-ad91-4574-a3b7-4a31b62dca9d

📥 Commits

Reviewing files that changed from the base of the PR and between 46bcd9f and a7f9594.

📒 Files selected for processing (1)
  • kits/job-posting-notion-sync/prompts/job_instructor-llmnode-200_system_0.md

Walkthrough

A new Job Posting Notion Sync AgentKit template was added under kits/job-posting-notion-sync/. It includes the workflow, prompts, model configs, constitution, template config, and documentation for scraping job postings, extracting structured fields, classifying priority, and saving results to Notion.

Changes

Job Posting Notion Sync Kit

Layer / File(s) Summary
Template config and default constitution
kits/job-posting-notion-sync/lamatic.config.ts, kits/job-posting-notion-sync/constitutions/default.md
Adds the template metadata and step wiring, plus the default constitution with identity, safety, data handling, and tone rules.
Flow meta, inputs, and references
kits/job-posting-notion-sync/flows/job.ts
Adds the workflow metadata, input declarations, and file references used by the job flow.
Workflow graph and edges
kits/job-posting-notion-sync/flows/job.ts
Adds the trigger, Firecrawl scrape, instructor LLM, classifier, Notion, and response nodes, plus the edges wiring the end-to-end flow.
Node prompts and model configs
kits/job-posting-notion-sync/prompts/*, kits/job-posting-notion-sync/model-configs/*
Adds the extraction and classification prompts, plus the generative model configuration files for both LLM nodes.
Agent specification and README documentation
kits/job-posting-notion-sync/agent.md, kits/job-posting-notion-sync/README.md
Documents the agent purpose, trigger schema, flow behavior, guardrails, integration table, setup, usage examples, project structure, and reference links.

Suggested reviewers: amanintech, d-pamneja

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: adding the job-posting-notion-sync template.
Description check ✅ Passed The description follows the repository checklist structure and covers the required sections with mostly complete details.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

:robot_face: AgentKit Structural Validation

New Contributions Detected

  • Template: kits/job-posting-notion-sync

Check Results

Check Status
No edits to existing kits ✅ Pass
Required root files present ✅ Pass
Flow .ts files present ✅ Pass
lamatic.config.ts valid ✅ Pass
No changes outside kits/ ✅ Pass

🎉 All checks passed! This contribution follows the AgentKit structure.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between dafde4c and 0a3d83e.

📒 Files selected for processing (11)
  • kits/job-posting-notion-sync/README.md
  • kits/job-posting-notion-sync/agent.md
  • kits/job-posting-notion-sync/constitutions/default.md
  • kits/job-posting-notion-sync/flows/job.ts
  • kits/job-posting-notion-sync/lamatic.config.ts
  • kits/job-posting-notion-sync/model-configs/job_agent-classifier-node-222_generative-model-name.ts
  • kits/job-posting-notion-sync/model-configs/job_instructor-llmnode-200_generative-model-name.ts
  • kits/job-posting-notion-sync/prompts/job_agent-classifier-node-222_system_0.md
  • kits/job-posting-notion-sync/prompts/job_agent-classifier-node-222_user_1.md
  • kits/job-posting-notion-sync/prompts/job_instructor-llmnode-200_system_0.md
  • kits/job-posting-notion-sync/prompts/job_instructor-llmnode-200_user_1.md

Comment thread kits/job-posting-notion-sync/agent.md
Comment thread kits/job-posting-notion-sync/flows/job.ts
Comment thread kits/job-posting-notion-sync/flows/job.ts
Comment thread kits/job-posting-notion-sync/lamatic.config.ts
Comment thread kits/job-posting-notion-sync/prompts/job_instructor-llmnode-200_system_0.md Outdated
Comment thread kits/job-posting-notion-sync/README.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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (2)
kits/job-posting-notion-sync/flows/job.ts (2)

208-217: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Mission 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 -high nor -low. If this platform's classifier node binds routing by matching an option's value string to an edge id (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 by source/target and doesn't care about the value suffix 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 matching

Also 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 win

Placeholder reused across two different targets, agent.

pageId and parent (previously hardcoded UUIDs) now both borrow the REPLACE_WITH_YOUR_NOTION_DATABASE_ID text — same string as the actual databaseId field on Line 239. Consumers filling in a real database ID for databaseId might copy-paste the identical value into pageId/parent too, 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

📥 Commits

Reviewing files that changed from the base of the PR and between 0a3d83e and e5d12be.

📒 Files selected for processing (2)
  • kits/job-posting-notion-sync/agent.md
  • kits/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 AnshSingh30 left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed all coderabbit issues

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

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:

  1. Read through all CodeRabbit comments carefully
  2. Address each issue raised (or reply explaining why you disagree)
  3. Push your fixes as new commits
  4. Once all issues are resolved, comment here so we can re-review

This helps keep the review process efficient for everyone. Thank you! 🙏

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 win

Rename kits/job-posting-notion-sync/flows/job.ts to job-posting-extractor.ts
The kit’s step id is job-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 value

Add 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 text to 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.md around 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 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.

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 -->

Comment thread kits/job-posting-notion-sync/prompts/job_instructor-llmnode-200_system_0.md Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant