Skip to content

feat: Add Scope Creep Detector kit#204

Open
ynagonzalesss wants to merge 39 commits into
Lamatic:mainfrom
ynagonzalesss:main
Open

feat: Add Scope Creep Detector kit#204
ynagonzalesss wants to merge 39 commits into
Lamatic:mainfrom
ynagonzalesss:main

Conversation

@ynagonzalesss

@ynagonzalesss ynagonzalesss commented Jul 10, 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 the Scope Creep Detector kit documentation, including setup, inputs, outputs, workflow, and deployment guidance.
  • Added the agent instructions and constitution defining scope-based classification rules, ambiguity handling, compound-request splitting, neutral reasoning, and structured JSON output.
  • Added Lamatic configuration with template metadata, tags, repository link, and API settings.
  • Added the Scope Creep Detector flow:
    • Accepts scopeText and newMessage through an API/GraphQL trigger.
    • Uses an LLM node to split and classify requests as In Scope, Out of Scope, or Ambiguous.
    • Returns structured JSON containing each request, its classification, and reasoning through an API/GraphQL response node.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Changes

The Scope Creep Detector kit adds template metadata, a GraphQL-triggered LLM classification flow, structured JSON output mapping, agent behavior rules, and README documentation covering setup and deployment.

Scope Creep Detector

Layer / File(s) Summary
Kit workflow and metadata
kits/scope-creep-detector/lamatic.config.ts, kits/scope-creep-detector/flows/scope-creep-detector.ts
Defines template metadata, API settings, scopeText and newMessage inputs, classification instructions, and the mapped structured response.
Classification rules and usage documentation
kits/scope-creep-detector/agent.md, kits/scope-creep-detector/constitutions/default.md, kits/scope-creep-detector/README.md
Documents classification categories, ambiguity handling, compound-request splitting, JSON output requirements, workflow behavior, and deployment steps.

Suggested reviewers: amanintech, d-pamneja

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title is concise and clearly names the main change: adding the Scope Creep Detector kit.
Description check ✅ Passed The description follows the checklist template and includes all required sections, with only some optional validation items left unchecked.
✨ 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 10, 2026

Copy link
Copy Markdown
Contributor

:robot_face: AgentKit Structural Validation

New Contributions Detected

  • Template: kits/scope-creep-detector

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.

@github-actions

Copy link
Copy Markdown
Contributor

Failure recorded at 2026-07-10T00:19:56Z UTC. If this PR is not fixed within 4 weeks it will be automatically closed.

@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: 2

🤖 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/scope-creep-detector/flows/scope-creep-detector/config.json`:
- Around line 20-23: Update the user prompt in the prompts configuration to
explicitly require returning only the JSON array, with no prose, explanations,
or Markdown/code fences. Preserve the existing schema and classification
instructions, and make the JSON-only requirement clear near the output-format
directive.
- Around line 28-37: Remove the project-specific UUID from the
generativeModelName configuration’s credentialId field in config.json, replacing
it with an empty string or import-safe placeholder so users must select their
own Gemini credential.
🪄 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: cdc648cc-c16d-4478-ac20-b6ae526b2525

📥 Commits

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

📒 Files selected for processing (6)
  • kits/scope-creep-detector/README.md
  • kits/scope-creep-detector/config.json
  • kits/scope-creep-detector/flows/scope-creep-detector/README.md
  • kits/scope-creep-detector/flows/scope-creep-detector/config.json
  • kits/scope-creep-detector/flows/scope-creep-detector/inputs.json
  • kits/scope-creep-detector/flows/scope-creep-detector/meta.json

Comment on lines +20 to +23
"prompts": [
{ "id": "187c2f4b-c23d-4545-abef-73dc897d6b7b", "role": "system", "content": "You are an AI Assistant" },
{ "id": "187c2f4b-c23d-4545-abef-73dc897d6b7d", "role": "user", "content": "You are a scope-compliance assistant.\n\nORIGINAL SCOPE:\n{{scopeText}}\n\nNEW CLIENT MESSAGE:\n{{newMessage}}\n\nTask: Identify every distinct ask in the new message. For each one, classify it as:\n- \"In Scope\" — clearly covered by the original scope\n- \"Out of Scope\" — not covered, should be flagged to the client\n- \"Ambiguous\" — unclear, worth clarifying\n\nReturn a JSON array like:\n[{\"ask\": \"...\", \"classification\": \"...\", \"reason\": \"...\"}]" }
],

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.

🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Prompt should enforce JSON-only output to prevent parsing failures downstream.

The user prompt says "Return a JSON array like: [...]" but doesn't explicitly instruct the model to return only JSON with no surrounding text or markdown. LLMs frequently wrap JSON in prose or code fences, and since outputMapping passes generatedResponse as a raw string, consumers will need to extract the JSON themselves. Adding a strict output instruction improves reliability across model providers.

♻️ Proposed prompt tightening
           { "id": "187c2f4b-c23d-4545-abef-73dc897d6b7d", "role": "user", "content": "You are a scope-compliance assistant.\n\nORIGINAL SCOPE:\n{{scopeText}}\n\nNEW CLIENT MESSAGE:\n{{newMessage}}\n\nTask: Identify every distinct ask in the new message. For each one, classify it as:\n- \"In Scope\" — clearly covered by the original scope\n- \"Out of Scope\" — not covered, should be flagged to the client\n- \"Ambiguous\" — unclear, worth clarifying\n\nReturn ONLY a valid JSON array (no markdown, no explanation, no code fences) like:\n[{\"ask\": \"...\", \"classification\": \"...\", \"reason\": \"...\"}]" }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"prompts": [
{ "id": "187c2f4b-c23d-4545-abef-73dc897d6b7b", "role": "system", "content": "You are an AI Assistant" },
{ "id": "187c2f4b-c23d-4545-abef-73dc897d6b7d", "role": "user", "content": "You are a scope-compliance assistant.\n\nORIGINAL SCOPE:\n{{scopeText}}\n\nNEW CLIENT MESSAGE:\n{{newMessage}}\n\nTask: Identify every distinct ask in the new message. For each one, classify it as:\n- \"In Scope\" — clearly covered by the original scope\n- \"Out of Scope\" — not covered, should be flagged to the client\n- \"Ambiguous\" — unclear, worth clarifying\n\nReturn a JSON array like:\n[{\"ask\": \"...\", \"classification\": \"...\", \"reason\": \"...\"}]" }
],
"prompts": [
{ "id": "187c2f4b-c23d-4545-abef-73dc897d6b7b", "role": "system", "content": "You are an AI Assistant" },
{ "id": "187c2f4b-c23d-4545-abef-73dc897d6b7d", "role": "user", "content": "You are a scope-compliance assistant.\n\nORIGINAL SCOPE:\n{{scopeText}}\n\nNEW CLIENT MESSAGE:\n{{newMessage}}\n\nTask: Identify every distinct ask in the new message. For each one, classify it as:\n- \"In Scope\" — clearly covered by the original scope\n- \"Out of Scope\" — not covered, should be flagged to the client\n- \"Ambiguous\" — unclear, worth clarifying\n\nReturn ONLY a valid JSON array (no markdown, no explanation, no code fences) like:\n[{\"ask\": \"...\", \"classification\": \"...\", \"reason\": \"...\"}]" }
],
🤖 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/scope-creep-detector/flows/scope-creep-detector/config.json` around
lines 20 - 23, Update the user prompt in the prompts configuration to explicitly
require returning only the JSON array, with no prose, explanations, or
Markdown/code fences. Preserve the existing schema and classification
instructions, and make the JSON-only requirement clear near the output-format
directive.

Comment on lines +28 to +37
"generativeModelName": [
{
"type": "generator/text",
"params": {},
"configName": "configA",
"model_name": "gemini/gemini-2.5-flash",
"credentialId": "dd54972e-fdae-40a4-831a-e23889301f6d",
"provider_name": "gemini",
"credential_name": "Gemini"
}

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.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check how other kits handle credentialId — do they use real UUIDs or placeholders?
rg -n '"credentialId"' kits/ --type json -g '!**/scope-creep-detector/**'

Repository: Lamatic/AgentKit

Length of output: 154


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== File inventory =="
git ls-files | rg '^(kits/scope-creep-detector/|README|docs/|.*import.*|.*credential.*|.*kit.*)$' || true

echo
echo "== Search for credential handling / import flow =="
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/dist/**' --glob '!**/build/**' \
  'credentialId|credential_name|credential selection|select.*credential|import.*credential|missing credential|resolve.*credential|credentials' .

echo
echo "== Read scope-creep-detector config around the cited lines =="
sed -n '1,120p' kits/scope-creep-detector/flows/scope-creep-detector/config.json

echo
echo "== Read scope-creep-detector README if present =="
if [ -f kits/scope-creep-detector/README.md ]; then
  sed -n '1,220p' kits/scope-creep-detector/README.md
fi
if [ -f kits/scope-creep-detector/readme.md ]; then
  sed -n '1,220p' kits/scope-creep-detector/readme.md
fi

Repository: Lamatic/AgentKit

Length of output: 50373


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== scope-creep-detector README =="
sed -n '1,220p' kits/scope-creep-detector/README.md

echo
echo "== scope-creep-detector flow README =="
sed -n '1,220p' kits/scope-creep-detector/flows/scope-creep-detector/README.md

echo
echo "== scope-creep-detector config.json =="
sed -n '1,220p' kits/scope-creep-detector/flows/scope-creep-detector/config.json

echo
echo "== Search for importer / credential resolution docs or code =="
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/dist/**' --glob '!**/build/**' \
  'import .*kit|kit import|credentialId|credential_name|Connect an LLM credential|select your own credential|missing credential|prompt.*credential|resolve.*credential|credentials' \
  kits README.md docs .

Repository: Lamatic/AgentKit

Length of output: 50373


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== scope-creep-detector config excerpt =="
nl -ba kits/scope-creep-detector/flows/scope-creep-detector/config.json | sed -n '1,120p'

echo
echo "== scope-creep-detector README excerpt =="
nl -ba kits/scope-creep-detector/README.md | sed -n '1,220p'

echo
echo "== scope-creep-detector flow README excerpt =="
nl -ba kits/scope-creep-detector/flows/scope-creep-detector/README.md | sed -n '1,220p'

echo
echo "== Model config files in comparable kits =="
for f in \
  kits/status-drift-detector/model-configs/status-drift-detector_llmnode-190_generative-model-name.ts \
  kits/sre-incident-postmortem-agent/model-configs/sre-incident-postmortem-agent_llmnode-492_generative-model-name.ts \
  kits/mou-drafter/model-configs/mou-drafter_llmnode-842_generative-model-name.ts
do
  echo "--- $f ---"
  nl -ba "$f" | sed -n '1,80p'
done

Repository: Lamatic/AgentKit

Length of output: 236


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== scope-creep-detector config excerpt =="
nl -ba kits/scope-creep-detector/flows/scope-creep-detector/config.json | sed -n '1,120p'

echo
echo "== scope-creep-detector README excerpt =="
nl -ba kits/scope-creep-detector/README.md | sed -n '1,220p'

echo
echo "== scope-creep-detector flow README excerpt =="
nl -ba kits/scope-creep-detector/flows/scope-creep-detector/README.md | sed -n '1,220p'

echo
echo "== Comparable model config files =="
for f in \
  kits/status-drift-detector/model-configs/status-drift-detector_llmnode-190_generative-model-name.ts \
  kits/sre-incident-postmortem-agent/model-configs/sre-incident-postmortem-agent_llmnode-492_generative-model-name.ts \
  kits/mou-drafter/model-configs/mou-drafter_llmnode-842_generative-model-name.ts
do
  echo "--- $f ---"
  nl -ba "$f" | sed -n '1,80p'
done

Repository: Lamatic/AgentKit

Length of output: 236


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== scope-creep-detector config excerpt =="
sed -n '1,120p' kits/scope-creep-detector/flows/scope-creep-detector/config.json

echo
echo "== scope-creep-detector README excerpt =="
sed -n '1,220p' kits/scope-creep-detector/README.md

echo
echo "== scope-creep-detector flow README excerpt =="
sed -n '1,220p' kits/scope-creep-detector/flows/scope-creep-detector/README.md

echo
echo "== Comparable model config files =="
for f in \
  kits/status-drift-detector/model-configs/status-drift-detector_llmnode-190_generative-model-name.ts \
  kits/sre-incident-postmortem-agent/model-configs/sre-incident-postmortem-agent_llmnode-492_generative-model-name.ts \
  kits/mou-drafter/model-configs/mou-drafter_llmnode-842_generative-model-name.ts
do
  echo "--- $f ---"
  sed -n '1,80p' "$f"
done

Repository: Lamatic/AgentKit

Length of output: 6094


🌐 Web query:

Lamatic Studio kit import credentialId credential_name flow export import placeholder empty string credential selection

💡 Result:

In Lamatic Studio, credentials and sensitive data are managed via the Variables & Secrets system [1][2]. When working with flows, credentials (such as API keys for LLM providers) are configured by adding them to the project settings, which allows them to be referenced dynamically within nodes without hardcoding values [1][3]. Regarding your query about import/export and empty string placeholders: 1. Credential Management: You should store API keys and tokens in Studio > Settings > Secrets [1]. Once defined, these secrets are referenced in flow nodes to ensure secure and reusable access [1][3]. 2. Flow Portability: When exporting or importing flows, it is critical to ensure that the environment receiving the flow has the corresponding secrets defined. If a credential selection field appears as an empty string or requires a placeholder upon import, it indicates that the specific credential (often referenced by a credential_name or identifier) is not yet mapped or available in the target project's Secrets configuration [1][2]. 3. Best Practices: To avoid issues with credential selection or missing identifiers, always ensure that all required provider-specific credentials are created and named identically in the target project's Secrets settings before importing the flow [1][3]. Since projects are self-contained and do not share credentials, you must manually populate the Secrets in the new environment to resolve any empty string placeholders [2]. If you are encountering specific import errors related to credentialId or credential_name fields, verify that your exported flow JSON explicitly references the correct secret keys and that those keys have been initialized in the destination project settings [1][2].

Citations:


Remove the hardcoded credentialId from this kit export. In kits/scope-creep-detector/flows/scope-creep-detector/config.json, this UUID is project-specific and can leave importers with an unresolved credential reference. Use an empty string or placeholder so Studio forces the user to pick their own credential.

🤖 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/scope-creep-detector/flows/scope-creep-detector/config.json` around
lines 28 - 37, Remove the project-specific UUID from the generativeModelName
configuration’s credentialId field in config.json, replacing it with an empty
string or import-safe placeholder so users must select their own Gemini
credential.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@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: 5

🤖 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/scope-creep-detector/flows/scope-creep-detector.ts`:
- Line 18: Correct the misspelled `responeType` property to `responseType` in
the trigger configuration, preserving its `"realtime"` value so the platform
recognizes the intended response mode.
- Around line 66-75: The generative model configuration hardcodes a
workspace-specific credential in the `generativeModelName` definition. Replace
the literal `credentialId` with the flow’s configurable/template credential
reference, preserving the existing model and provider settings so copied
projects can bind their own LLM credential.
- Around line 1-105: Update the default flow export to follow the repository
contract by adding the required meta, inputs, references, and edges fields,
while preserving the existing nodes and response behavior. Use the existing
triggerNode_1, LLMNode_985, and responseNode_triggerNode_1 identifiers to define
the input metadata, references, and explicit execution edges; retain needs only
if the contract permits it.

In `@kits/scope-creep-detector/lamatic.config.ts`:
- Around line 1-15: Add the missing steps metadata to the default configuration
object in lamatic.config.ts, defining a step entry with an id matching the
corresponding flow filename in kebab-case. Preserve the existing name, type,
author, and links fields while ensuring the steps array satisfies the kit
configuration contract.

In `@kits/scope-creep-detector/README.md`:
- Around line 55-61: Update the README setup section to reference the shipped
flows/scope-creep-detector.ts artifact instead of the nonexistent YAML file, and
replace the YAML-pasting instructions with the correct TypeScript flow
deployment/import steps. Ensure all setup guidance consistently points to the
TypeScript flow.
🪄 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: cc21823c-038c-49ed-a0fc-f4dfa9bfebfc

📥 Commits

Reviewing files that changed from the base of the PR and between ba76309 and acefff8.

📒 Files selected for processing (5)
  • kits/scope-creep-detector/README.md
  • kits/scope-creep-detector/agent.md
  • kits/scope-creep-detector/constitutions/default.md
  • kits/scope-creep-detector/flows/scope-creep-detector.ts
  • kits/scope-creep-detector/lamatic.config.ts

Comment on lines +1 to +105
export default {
flowId: "ee3bb1d9-2722-46da-8181-25a3c5d5aae7",
name: "Scope Creep Detector",
purpose:
"Takes an original scope/SOW and a new client message, and classifies each ask in the new message as In Scope, Out of Scope, or Ambiguous with a reason.",
inputSchema: {
scopeText: "string",
newMessage: "string",
},
outputSchema: {
output: "string", // JSON array: [{ ask, classification, reason }]
},
triggerNode: {
nodeId: "triggerNode_1",
nodeType: "graphqlNode",
nodeName: "API Request",
values: {
responeType: "realtime",
advance_schema: JSON.stringify({
scopeText: "string",
newMessage: "string",
}),
},
modes: {},
schema: {
sampleOutput: "string",
},
},
nodes: [
{
nodeId: "LLMNode_985",
nodeType: "LLMNode",
nodeName: "Generate Text",
values: {
tools: [],
prompts: [
{
id: "187c2f4b-c23d-4545-abef-73dc897d6b7b",
role: "system",
content: "You are an AI Assistant",
},
{
id: "187c2f4b-c23d-4545-abef-73dc897d6b7d",
role: "user",
content: `You are a scope-compliance assistant.
ORIGINAL SCOPE:
{{scopeText}}
NEW CLIENT MESSAGE:
{{newMessage}}
Task: Identify every distinct ask in the new message. For each one, classify it as:
- "In Scope" — clearly covered by the original scope
- "Out of Scope" — not covered, should be flagged to the client
- "Ambiguous" — unclear, worth clarifying
Return a JSON array like:
[{"ask": "...", "classification": "...", "reason": "..."}]`,
},
],
memories: "[]",
messages: "[]",
attachments: "",
credentials: "",
generativeModelName: [
{
type: "generator/text",
params: {},
configName: "configA",
model_name: "gemini/gemini-2.5-flash",
credentialId: "dd54972e-fdae-40a4-831a-e23889301f6d",
provider_name: "gemini",
credential_name: "Gemini",
},
],
},
modes: {},
needs: ["triggerNode_1"],
schema: {
generatedResponse: "string",
_meta: "object",
tool_calls: "object",
images: "array",
},
},
],
responseNode: {
nodeId: "responseNode_triggerNode_1",
nodeType: "graphqlResponseNode",
nodeName: "API Response",
values: {
headers: JSON.stringify({ "content-type": "application/json" }),
retries: "0",
webhookUrl: "",
retry_delay: "0",
outputMapping: JSON.stringify({
output: "{{LLMNode_985.output.generatedResponse}}",
}),
},
needs: ["LLMNode_985"],
modes: {},
schema: {},
},
};

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.

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check whether other kit flows use explicit `edges` and `references` fields
# or rely on `needs` arrays like this flow does.

# Search for explicit edges/references fields in other flow files
rg -nP '\b(edges|references)\s*:' kits/*/flows/ -C2

# Search for needs-based edge patterns in other flows
rg -nP '\bneeds\s*:' kits/*/flows/ -C2

Repository: Lamatic/AgentKit

Length of output: 3947


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Candidate flow files =="
fd -a '.*\.ts$' kits -E node_modules | rg '/flows/.*\.ts$' | head -n 10

echo
echo "== Search for flow-shape docs / types =="
rg -n --hidden -g '!node_modules' -g '!dist' -g '!build' '\breferences\b|\bedges\b|\bneeds\b' . \
  | rg 'flow|flows|Flow|graph|lamatic|schema' -i | head -n 200

echo
echo "== Representative flow files (outline) =="
for f in kits/deep-search/flows/sharepoint.ts kits/founder-lens/flows/chat.ts kits/scope-creep-detector/flows/scope-creep-detector.ts; do
  echo "--- $f ---"
  ast-grep outline "$f" --view expanded | sed -n '1,220p'
done

Repository: Lamatic/AgentKit

Length of output: 36544


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Representative flow file snippets =="
for f in kits/deep-search/flows/sharepoint.ts kits/founder-lens/flows/chat.ts kits/scope-creep-detector/flows/scope-creep-detector.ts; do
  echo "--- $f ---"
  wc -l "$f"
  sed -n '1,140p' "$f" | cat -n
done

Repository: Lamatic/AgentKit

Length of output: 36566


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Look for any source of truth describing flow object fields.
rg -n --hidden -g '!node_modules' -g '!dist' -g '!build' \
  'flowId|triggerNode|responseNode|needs:|edges:|references:' \
  . | head -n 250

Repository: Lamatic/AgentKit

Length of output: 32683


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Flow files with explicit edges/references fields =="
rg -n --glob 'kits/*/flows/*.ts' '^\s*(edges|references)\s*:' kits

echo
echo "== Flow files with needs arrays =="
rg -n --glob 'kits/*/flows/*.ts' '^\s*needs\s*:' kits | head -n 200

echo
echo "== Any flow schema/docs mentioning these fields =="
rg -n --hidden -g '!node_modules' -g '!dist' -g '!build' \
  '^\s*(edges|references|needs)\s*:|self-contained meta, inputs, references, nodes, and edges|flowId|triggerNode|responseNode' . | head -n 250

Repository: Lamatic/AgentKit

Length of output: 209


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Search for scope-creep-detector companions =="
fd -a . kits/scope-creep-detector

echo
echo "== Nearby flow/config files =="
git ls-files kits/scope-creep-detector | sed -n '1,200p'

echo
echo "== Any explicit references to the scope-creep-detector flow shape =="
rg -n --hidden -g '!node_modules' -g '!dist' -g '!build' \
  'scope-creep-detector|flowId|advance_schema|responeType|needs:' kits/scope-creep-detector -C 2

Repository: Lamatic/AgentKit

Length of output: 4122


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Flows that export a single default object =="
rg -n --glob 'kits/*/flows/*.ts' '^export default \{' kits | head -n 200

echo
echo "== Flows with export const references / edges =="
rg -n --glob 'kits/*/flows/*.ts' '^export const (references|edges)\b' kits | head -n 200

echo
echo "== Flows with needs arrays but no export const edges =="
python3 - <<'PY'
from pathlib import Path
import re
for p in Path("kits").glob("*/flows/*.ts"):
    text = p.read_text(errors="ignore")
    if "needs:" in text and "export const edges" not in text:
        print(p)
PY

Repository: Lamatic/AgentKit

Length of output: 32586


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Target file context and any companion config =="
sed -n '1,120p' kits/scope-creep-detector/flows/scope-creep-detector.ts | cat -n
echo
sed -n '1,200p' kits/scope-creep-detector/lamatic.config.ts | cat -n

Repository: Lamatic/AgentKit

Length of output: 4428


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Search for flow-schema/type definitions mentioning references/edges/needs =="
rg -n --hidden -g '!node_modules' -g '!dist' -g '!build' \
  'export type .*Flow|interface .*Flow|type .*Flow|references:|edges:|needs:' \
  . | head -n 250

Repository: Lamatic/AgentKit

Length of output: 4389


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Repository docs mentioning the flow guidelines wording =="
rg -n --hidden -g '!node_modules' -g '!dist' -g '!build' \
  'self-contained meta, inputs, references, nodes, and edges|kits/\*/flows/\*.ts|flows/.*flat.*ts|references, nodes, edges' \
  .

Repository: Lamatic/AgentKit

Length of output: 17681


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
from pathlib import Path
import re

files = [
    Path("kits/scope-creep-detector/flows/scope-creep-detector.ts"),
    Path("kits/reddit-scout/flows/reddit-scout.ts"),
    Path("kits/article-summariser/flows/article-summariser.ts"),
    Path("kits/founder-lens/flows/chat.ts"),
]

for p in files:
    text = p.read_text(errors="ignore")
    print(f"\n--- {p} ---")
    for name, pat in [
        ("export const references", r'^\s*export const references\b'),
        ("export const edges", r'^\s*export const edges\b'),
        ("default export includes references", r'export default \{[^}]*references'),
        ("default export includes edges", r'export default \{[^}]*edges'),
        ("needs arrays", r'\bneeds\s*:\s*\['),
    ]:
        print(f"{name}: {'yes' if re.search(pat, text, re.M|re.S) else 'no'}")
PY

Repository: Lamatic/AgentKit

Length of output: 947


Add references and edges to the flow export
kits/scope-creep-detector/flows/scope-creep-detector.ts is the only flow file here that omits them and relies on needs arrays instead. The repo flow contract in CLAUDE.md requires meta, inputs, references, nodes, and edges, so this file should match that shape.

🤖 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/scope-creep-detector/flows/scope-creep-detector.ts` around lines 1 -
105, Update the default flow export to follow the repository contract by adding
the required meta, inputs, references, and edges fields, while preserving the
existing nodes and response behavior. Use the existing triggerNode_1,
LLMNode_985, and responseNode_triggerNode_1 identifiers to define the input
metadata, references, and explicit execution edges; retain needs only if the
contract permits it.

Source: Coding guidelines

nodeType: "graphqlNode",
nodeName: "API Request",
values: {
responeType: "realtime",

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.

🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win

Typo: responeType should be responseType.

Your mission has a compromised directive. Line 18 contains responeType — a misspelling of responseType. If the platform expects the correctly spelled key, this value will be silently ignored, causing the trigger node to fall back to default behavior instead of the intended realtime response type.

🐛 Proposed fix for typo
-      responeType: "realtime",
+      responseType: "realtime",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
responeType: "realtime",
responseType: "realtime",
🤖 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/scope-creep-detector/flows/scope-creep-detector.ts` at line 18, Correct
the misspelled `responeType` property to `responseType` in the trigger
configuration, preserving its `"realtime"` value so the platform recognizes the
intended response mode.

Comment on lines +66 to +75
generativeModelName: [
{
type: "generator/text",
params: {},
configName: "configA",
model_name: "gemini/gemini-2.5-flash",
credentialId: "dd54972e-fdae-40a4-831a-e23889301f6d",
provider_name: "gemini",
credential_name: "Gemini",
},

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.

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check whether other kit flows hardcode credentialId or use env/variable references.

rg -nP 'credentialId' kits/*/flows/ -C3
rg -nP 'credential_name' kits/*/flows/ -C3

Repository: Lamatic/AgentKit

Length of output: 38291


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== scope-creep-detector flow ==\n'
wc -l kits/scope-creep-detector/flows/scope-creep-detector.ts
sed -n '1,180p' kits/scope-creep-detector/flows/scope-creep-detector.ts

printf '\n== kit files ==\n'
git ls-files kits/scope-creep-detector

printf '\n== scope-creep-detector readme/config hits ==\n'
rg -n "credentialId|credential_name|Gemini|scope-creep-detector|lamatic.config" kits/scope-creep-detector -S

Repository: Lamatic/AgentKit

Length of output: 3863


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== docs mentioning kit portability / imports / credentials ==\n'
rg -n "kit|portable|template|export|import|credentialId|credential_name|environment" README.md kits -S

printf '\n== scope-creep-detector companion files ==\n'
fd -a . kits/scope-creep-detector

printf '\n== nearby flow metadata shape ==\n'
python3 - <<'PY'
from pathlib import Path
p = Path("kits/scope-creep-detector/flows/scope-creep-detector.ts")
text = p.read_text()
for key in ["credentialId", "credential_name", "provider_name", "model_name", "configName"]:
    print(key, text.count(key))
PY

Repository: Lamatic/AgentKit

Length of output: 50373


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== README excerpt ==\n'
sed -n '50,75p' kits/scope-creep-detector/README.md

printf '\n== lamatic.config.ts excerpt ==\n'
cat -n kits/scope-creep-detector/lamatic.config.ts

Repository: Lamatic/AgentKit

Length of output: 2079


Template the credential reference here. This flow is meant to be copied into another Lamatic Studio project, but the hardcoded credentialId ties it to one workspace. Leave it configurable so users can attach their own LLM credential.

🤖 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/scope-creep-detector/flows/scope-creep-detector.ts` around lines 66 -
75, The generative model configuration hardcodes a workspace-specific credential
in the `generativeModelName` definition. Replace the literal `credentialId` with
the flow’s configurable/template credential reference, preserving the existing
model and provider settings so copied projects can bind their own LLM
credential.

Comment on lines +1 to +15
export default {
type: "template",
name: "Scope Creep Detector",
author: "Czarina Mari Gonzales",
description:
"Compares a new client message against an original project scope/SOW and flags each request as In Scope, Out of Scope, or Ambiguous — helping freelancers and consultants catch scope creep before it happens.",
tags: ["productivity", "freelance", "contracts", "text-generation", "llm"],
links: {
github: "kits/scope-creep-detector",
},
api: {
endpoint: "https://prod-api.lamatic.ai/graphql",
projectId: "dcc1be74-93df-4b09-9e9a-4e97e24c64fb",
},
};

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.

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Missing steps field in kit configuration.

Agent, your mission file is incomplete. The coding guidelines for kits/*/lamatic.config.ts require project metadata including name, type, author, steps, and links. The steps field is absent from this configuration. Without it, flow files in flows/ cannot match their kebab-case names to a step id, breaking the cross-file contract.

As per coding guidelines: kits/*/lamatic.config.ts: Each kit must contain a lamatic.config.ts file with project metadata including name, type, author, steps, and links.

🔧 Proposed fix: add `steps` field
 export default {
   type: "template",
   name: "Scope Creep Detector",
   author: "Czarina Mari Gonzales",
   description:
     "Compares a new client message against an original project scope/SOW and flags each request as In Scope, Out of Scope, or Ambiguous — helping freelancers and consultants catch scope creep before it happens.",
   tags: ["productivity", "freelance", "contracts", "text-generation", "llm"],
+  steps: [
+    {
+      id: "scope-creep-detector",
+      name: "Scope Creep Detector",
+    },
+  ],
   links: {
     github: "kits/scope-creep-detector",
   },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export default {
type: "template",
name: "Scope Creep Detector",
author: "Czarina Mari Gonzales",
description:
"Compares a new client message against an original project scope/SOW and flags each request as In Scope, Out of Scope, or Ambiguous — helping freelancers and consultants catch scope creep before it happens.",
tags: ["productivity", "freelance", "contracts", "text-generation", "llm"],
links: {
github: "kits/scope-creep-detector",
},
api: {
endpoint: "https://prod-api.lamatic.ai/graphql",
projectId: "dcc1be74-93df-4b09-9e9a-4e97e24c64fb",
},
};
export default {
type: "template",
name: "Scope Creep Detector",
author: "Czarina Mari Gonzales",
description:
"Compares a new client message against an original project scope/SOW and flags each request as In Scope, Out of Scope, or Ambiguous — helping freelancers and consultants catch scope creep before it happens.",
tags: ["productivity", "freelance", "contracts", "text-generation", "llm"],
steps: [
{
id: "scope-creep-detector",
name: "Scope Creep Detector",
},
],
links: {
github: "kits/scope-creep-detector",
},
api: {
endpoint: "https://prod-api.lamatic.ai/graphql",
projectId: "dcc1be74-93df-4b09-9e9a-4e97e24c64fb",
},
};
🤖 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/scope-creep-detector/lamatic.config.ts` around lines 1 - 15, Add the
missing steps metadata to the default configuration object in lamatic.config.ts,
defining a step entry with an id matching the corresponding flow filename in
kebab-case. Preserve the existing name, type, author, and links fields while
ensuring the steps array satisfies the kit configuration contract.

Source: Coding guidelines

Comment on lines +55 to +61
See [`flows/scope-creep-detector.yaml`](./flows/scope-creep-detector.yaml)
for the full flow definition.

## Setup

1. Copy this flow config into a new Flow in your own Lamatic Studio project
(Config tab → paste the YAML), or recreate the 3 nodes manually as shown

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Mission-critical: point the setup guide at the shipped .ts flow.

The repository provides flows/scope-creep-detector.ts, but this README links to scope-creep-detector.yaml and instructs users to paste YAML. The link is dead and the documented setup path cannot deploy this kit. Update the instructions to match the TypeScript artifact, or add the YAML file the guide promises.

Suggested correction
-See [`flows/scope-creep-detector.yaml`](./flows/scope-creep-detector.yaml)
+See [`flows/scope-creep-detector.ts`](./flows/scope-creep-detector.ts)

-1. Copy this flow config into a new Flow in your own Lamatic Studio project
-   (Config tab → paste the YAML), or recreate the 3 nodes manually as shown
-   above.
+1. Use the shipped TypeScript flow definition, or document the exact
+   TypeScript-to-Lamatic import process.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
See [`flows/scope-creep-detector.yaml`](./flows/scope-creep-detector.yaml)
for the full flow definition.
## Setup
1. Copy this flow config into a new Flow in your own Lamatic Studio project
(Config tab → paste the YAML), or recreate the 3 nodes manually as shown
See [`flows/scope-creep-detector.ts`](./flows/scope-creep-detector.ts)
for the full flow definition.
## Setup
1. Use the shipped TypeScript flow definition, or document the exact
TypeScript-to-Lamatic import process.
🤖 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/scope-creep-detector/README.md` around lines 55 - 61, Update the README
setup section to reference the shipped flows/scope-creep-detector.ts artifact
instead of the nonexistent YAML file, and replace the YAML-pasting instructions
with the correct TypeScript flow deployment/import steps. Ensure all setup
guidance consistently points to the TypeScript flow.

Source: Coding guidelines

@github-actions

Copy link
Copy Markdown
Contributor

Hi @ynagonzalesss! 👋

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

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