Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
node_modules
dist
.env
workspace
/workspace
data
*.log
.DS_Store
8 changes: 8 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
---
paths:
- "server/**"
- "web/**"
- "CLAUDE.md"
- "LEARNINGS.md"
---

# Feature Gap Dashboard — context for Claude

This file is auto-loaded by Claude Code when working in this directory. It exists so Claude picks up project context without re-deriving it every session. Before making changes, **also read `LEARNINGS.md`** — it contains the running iteration log and the "things we already tried and know don't work" list.
Expand Down
30 changes: 27 additions & 3 deletions server/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,44 @@ export const PORT = Number(process.env.PORT ?? 5174);

export type RepoKey = "web" | "mobile";

/** Extended repo key including the rn_packages sub-repo (used by sdk-integrator & coder skills). */
export type ExtendedRepoKey = "web" | "mobile" | "rn_packages";

/** Subset of RepoKey used by the gap-analysis pipeline (same as RepoKey). */
export type AnalysisRepoKey = "web" | "mobile";

/** User-facing targets for the sdk-integrator skill. */
export type IntegrationTarget = "web" | "mobile";

export const REPOS: Record<
RepoKey,
ExtendedRepoKey,
{ name: string; url: string; dir: string }
> = {
web: {
name: "hyperswitch-web",
url: "https://github.com/juspay/hyperswitch-web.git",
dir: path.join(WORKSPACE_DIR, "hyperswitch-web"),
dir: path.join(WORKSPACE_DIR, "web", "hyperswitch-web"),
},
mobile: {
name: "hyperswitch-client-core",
url: "https://github.com/juspay/hyperswitch-client-core.git",
dir: path.join(WORKSPACE_DIR, "hyperswitch-client-core"),
dir: path.join(WORKSPACE_DIR, "mobile", "hyperswitch-client-core"),
},
rn_packages: {
name: "react-native-hyperswitch",
url: "https://github.com/juspay/react-native-hyperswitch.git",
dir: path.join(WORKSPACE_DIR, "mobile", "react-native-hyperswitch"),
},
};

/**
* Namespace directories used as cwd for coder subprocesses.
* "mobile" → workspace/mobile/ (contains both client-core + rn-packages)
* "web" → workspace/web/ (contains hyperswitch-web)
*/
export const INTEGRATION_TARGET_CWD: Record<IntegrationTarget, string> = {
mobile: path.join(WORKSPACE_DIR, "mobile"),
web: path.join(WORKSPACE_DIR, "web"),
};

// LLM model selection — extraction is cheap, validation/patching is expensive.
Expand Down
28 changes: 17 additions & 11 deletions server/src/llm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,16 @@ export function ask(prompt: string, opts: AskOptions = {}): Promise<string> {

let stdout = "";
let stderr = "";
const timer = setTimeout(() => {
child.kill("SIGKILL");
reject(new LLMError(`claude CLI timed out after ${timeoutMs}ms`, stderr));
}, timeoutMs);
// timeoutMs <= 0 disables the hard timeout — used by long-running coder paths.
const timer = timeoutMs > 0
? setTimeout(() => {
child.kill("SIGKILL");
reject(new LLMError(`claude CLI timed out after ${timeoutMs}ms`, stderr));
}, timeoutMs)
: null;

const cleanup = () => {
clearTimeout(timer);
if (timer) clearTimeout(timer);
activeChildren.delete(child);
};

Expand Down Expand Up @@ -200,14 +203,17 @@ export function askStream(

let buf = "";
let stderr = "";
const timer = setTimeout(() => {
child.kill("SIGKILL");
onChunk({ type: "error", error: `claude CLI timed out after ${timeoutMs}ms` });
reject(new LLMError(`claude CLI timed out after ${timeoutMs}ms`, stderr));
}, timeoutMs);
// timeoutMs <= 0 disables the hard timeout — used by long-running coder paths.
const timer = timeoutMs > 0
? setTimeout(() => {
child.kill("SIGKILL");
onChunk({ type: "error", error: `claude CLI timed out after ${timeoutMs}ms` });
reject(new LLMError(`claude CLI timed out after ${timeoutMs}ms`, stderr));
}, timeoutMs)
: null;

const cleanup = () => {
clearTimeout(timer);
if (timer) clearTimeout(timer);
activeChildren.delete(child);
};

Expand Down
5 changes: 5 additions & 0 deletions server/src/routes/skills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import { handleTestsSkill } from "../skills/tests/index.js";
import { handleTranslationsSkill } from "../skills/translations/index.js";
import { handleReviewSkill } from "../skills/review/index.js";
import { handleIntegrationSkill } from "../skills/integration/index.js";
import { handleSdkIntegratorSkill, handleClassifySkill } from "../skills/sdk-integrator/index.js";
import { handleCoderSkill } from "../skills/coder/index.js";
import { runTestSuite, type TestRunSpec, type TestRunChunk } from "../skills/tests/runner.js";
import { withRepoLock } from "../workspace/mutex.js";
import type { RepoKey } from "../config.js";
Expand All @@ -32,6 +34,9 @@ skillsRouter.post("/skills/tests/generate", handleTestsSkill);
skillsRouter.post("/skills/translations/generate", handleTranslationsSkill);
skillsRouter.post("/skills/review/generate", handleReviewSkill);
skillsRouter.post("/skills/integration/generate", handleIntegrationSkill);
skillsRouter.post("/skills/sdk-integrator/classify", handleClassifySkill);
skillsRouter.post("/skills/sdk-integrator/generate", handleSdkIntegratorSkill);
skillsRouter.post("/skills/coder/generate", handleCoderSkill);

// ─── Skill run history ────────────────────────────────────────────────────

Expand Down
Loading