refactor(FN-1317): rename remaining kb references to fn

- Update executor, triage, and merger prompt strings to identify the product as "fn"
- Align branch/worktree documentation examples with fusion/fn-* naming conventions
- Rename dashboard websocket attachment guard from __kbWebSocketsAttached to __fnWebSocketsAttached
- Refresh engine tests, dashboard utility comments, and TUI header text to remove stale kb wording
This commit is contained in:
gsxdsm
2026-04-08 14:38:36 -07:00
parent 9ad0b8be24
commit 1d57fb4b50
12 changed files with 23 additions and 23 deletions

View File

@@ -103,7 +103,7 @@ const reviewStepParams = Type.Object({
),
});
const EXECUTOR_SYSTEM_PROMPT = `You are a task execution agent for "kb", an AI-orchestrated task board.
const EXECUTOR_SYSTEM_PROMPT = `You are a task execution agent for "fn", an AI-orchestrated task board.
You are working in a git worktree isolated from the main branch. Your job is to implement the task described in the PROMPT.md specification you're given.
@@ -657,7 +657,7 @@ export class TaskExecutor {
* than being named after the task ID. This decouples directory names from
* tasks, enabling worktree reuse across dependency chains. When resuming
* a task that already has `task.worktree` set, the existing path is used
* as-is. Branches remain task-scoped (`kb/{task-id}`).
* as-is. Branches remain task-scoped (`fusion/{task-id}`).
*/
async execute(task: Task): Promise<void> {
executorLog.log(`execute() called for ${task.id} (already executing=${this.executing.has(task.id)})`);
@@ -2068,9 +2068,9 @@ export class TaskExecutor {
/**
* Create a git worktree at `path` on a new branch.
*
* @param branch — Branch name (e.g., `kb/kb-042`)
* @param branch — Branch name (e.g., `fusion/fn-042`)
* @param path — Absolute worktree directory path
* @param startPoint — Optional git ref to branch from (e.g., `kb/kb-041`).
* @param startPoint — Optional git ref to branch from (e.g., `fusion/fn-041`).
* When provided, the worktree starts from that ref instead of HEAD.
*/
/**
@@ -2357,7 +2357,7 @@ If issues are found that need attention, describe them clearly.`;
* Create a git worktree with automatic recovery from conflicts.
* Implements retry logic with exponential backoff for transient failures.
*
* @param branch - The branch name to create (e.g., "kb/kb-123")
* @param branch - The branch name to create (e.g., "fusion/fn-123")
* @param path - The desired worktree path
* @param taskId - The task ID for logging
* @param startPoint - Optional base branch/commit for new branch

View File

@@ -71,7 +71,7 @@ export interface HybridExecutorOptions {
* coordinates task execution across all registered projects, and enforces
* global concurrency limits from CentralCore.
*
* This is the main entry point for multi-project task execution in kb. It sits
* This is the main entry point for multi-project task execution in fn. It sits
* between CentralCore (project registry) and the individual ProjectRuntimes,
* routing tasks to the appropriate runtime based on project configuration.
*

View File

@@ -246,7 +246,7 @@ describe("aiMergeTask — task.branch field", () => {
const result = await aiMergeTask(store, "/tmp/root", "FN-050");
// Should use kb/fn-050-2, not kb/fn-050
// Should use fusion/fn-050-2, not fusion/fn-050
expect(result.branch).toBe("fusion/fn-050-2");
// Verify the suffixed branch was verified and deleted

View File

@@ -594,7 +594,7 @@ and the bash tool returned exit code 0.
The merge will only be completed if the build passes or no build command is configured.`;
}
return `You are a merge agent for "kb", an AI-orchestrated task board.
return `You are a merge agent for "fn", an AI-orchestrated task board.
Your job is to finalize a squash merge: resolve any conflicts and write a good commit message.
All changes from the branch are squashed into a single commit.

View File

@@ -1,5 +1,5 @@
/**
* Shared pi SDK setup for kb engine agents.
* Shared pi SDK setup for fn engine agents.
*
* Uses the user's existing pi auth (API keys / OAuth from ~/.pi/agent/auth.json).
* Provides factory functions for creating triage and executor agent sessions.
@@ -254,7 +254,7 @@ async function registerExtensionProviders(cwd: string, modelRegistry: ModelRegis
}
/**
* Create a pi agent session configured for kb.
* Create a pi agent session configured for fn.
* Reuses the user's existing pi auth and model configuration.
*/
export async function createKbAgent(options: AgentOptions): Promise<AgentResult> {

View File

@@ -34,7 +34,7 @@ import {
createTaskDocumentWriteTool,
} from "./agent-tools.js";
export const TRIAGE_SYSTEM_PROMPT = `You are a task specification agent for "kb", an AI-orchestrated task board.
export const TRIAGE_SYSTEM_PROMPT = `You are a task specification agent for "fn", an AI-orchestrated task board.
Your job: take a rough task description and produce a fully specified PROMPT.md that another AI agent can execute autonomously in a fresh context with zero memory of this conversation.

View File

@@ -8,7 +8,7 @@ describe("generateWorktreeName", () => {
let tempDir: string;
beforeEach(() => {
tempDir = mkdtempSync(join(tmpdir(), "kb-wt-test-"));
tempDir = mkdtempSync(join(tmpdir(), "fn-wt-test-"));
});
afterEach(() => {

View File

@@ -112,11 +112,11 @@ export class WorktreePool {
* 4. `git checkout -B <branchName> <startPoint>` — create/reset branch from start point
*
* Returns the actual branch name used. This may differ from `branchName`
* when conflict recovery generates a suffixed name (e.g., `kb/fn-042-2`).
* when conflict recovery generates a suffixed name (e.g., `fusion/fn-042-2`).
*
* @param worktreePath — Absolute path to the recycled worktree
* @param branchName — Branch name for the new task (e.g., `kb/kb-042`)
* @param startPoint — Git ref to branch from (e.g., `kb/kb-041`). Defaults to `main`.
* @param branchName — Branch name for the new task (e.g., `fusion/fn-042`)
* @param startPoint — Git ref to branch from (e.g., `fusion/fn-041`). Defaults to `main`.
* @returns The actual branch name checked out in the worktree
*/
prepareForTask(worktreePath: string, branchName: string, startPoint?: string): string {