feat: Add Scope Creep Detector kit#204
Conversation
WalkthroughChangesThe 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
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. |
|
Failure recorded at 2026-07-10T00:19:56Z UTC. If this PR is not fixed within 4 weeks it will be automatically closed. |
There was a problem hiding this comment.
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
📒 Files selected for processing (6)
kits/scope-creep-detector/README.mdkits/scope-creep-detector/config.jsonkits/scope-creep-detector/flows/scope-creep-detector/README.mdkits/scope-creep-detector/flows/scope-creep-detector/config.jsonkits/scope-creep-detector/flows/scope-creep-detector/inputs.jsonkits/scope-creep-detector/flows/scope-creep-detector/meta.json
| "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\": \"...\"}]" } | ||
| ], |
There was a problem hiding this comment.
🎯 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.
| "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.
| "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" | ||
| } |
There was a problem hiding this comment.
🗄️ 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
fiRepository: 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'
doneRepository: 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'
doneRepository: 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"
doneRepository: 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:
- 1: https://lamatic.ai/docs/studio/studio-variables-and-secrets
- 2: https://lamatic.ai/docs/studio/studio-project
- 3: https://github.com/lamatic/docs/blob/main/pages/integrations/models.mdx
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.
✅ Action performedReview finished.
|
There was a problem hiding this comment.
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
📒 Files selected for processing (5)
kits/scope-creep-detector/README.mdkits/scope-creep-detector/agent.mdkits/scope-creep-detector/constitutions/default.mdkits/scope-creep-detector/flows/scope-creep-detector.tskits/scope-creep-detector/lamatic.config.ts
| 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: {}, | ||
| }, | ||
| }; |
There was a problem hiding this comment.
📐 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/ -C2Repository: 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'
doneRepository: 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
doneRepository: 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 250Repository: 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 250Repository: 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 2Repository: 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)
PYRepository: 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 -nRepository: 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 250Repository: 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'}")
PYRepository: 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", |
There was a problem hiding this comment.
🎯 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.
| 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.
| 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", | ||
| }, |
There was a problem hiding this comment.
🔒 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/ -C3Repository: 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 -SRepository: 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))
PYRepository: 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.tsRepository: 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.
| 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", | ||
| }, | ||
| }; |
There was a problem hiding this comment.
📐 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.
| 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
| 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 |
There was a problem hiding this comment.
🎯 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.
| 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
|
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:
This helps keep the review process efficient for everyone. Thank you! 🙏 |
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>)scopeTextandnewMessagethrough an API/GraphQL trigger.