Story Creation AI Agent for novel, scripts, translation, interactive games, and IP content
This report presents the forensic synthetic code analysis of Narcooo/inkos, a TypeScript project with 7,974 GitHub stars. SynthScan v2.0 examined 173,941 lines of code across 753 source files, recording 429 pattern matches distributed across 9 syntactic categories. The overall adjusted score of 2.9 places this repository in the Likely human-written band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 429 distinct pattern matches across 9 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | packages/studio/src/components/chat-utils.ts | 21 | export function coerceSharedSessionMessages( | CODE |
| LOW | packages/studio/src/components/chat-utils.ts | 49 | export function formatSharedSessionContext(meta: SharedSessionMeta): string { | CODE |
| LOW | …ages/studio/src/components/chat/ToolExecutionSteps.tsx | 192 | export function getGeneratedArtifactDetails(exec: ToolExecution): GeneratedArtifactDetails | null { | CODE |
| LOW | …ages/studio/src/components/chat/ToolExecutionSteps.tsx | 224 | function ScriptStoryboardResultPreview({ exec, onOpenFilmStudio }: { exec: ToolExecution; onOpenFilmStudio?: (projectId: | CODE |
| LOW | …ages/studio/src/components/chat/ToolExecutionSteps.tsx | 289 | function ShortFictionResultPreview({ exec }: { exec: ToolExecution }) { | CODE |
| LOW | …ages/studio/src/components/chat/ToolExecutionSteps.tsx | 480 | export function getProposedActionContractRows(details: ProposedActionDetails): ReadonlyArray<{ label: string; value: str | CODE |
| LOW | …ages/studio/src/components/chat/ToolExecutionSteps.tsx | 855 | export function groupToolExecutionsChronologically(executions: ToolExecution[]): RenderGroup[] { | CODE |
| LOW | packages/studio/src/hooks/use-book-activity.ts | 149 | export function shouldRefetchBookCollections(message: SSEMessage | undefined): boolean { | CODE |
| LOW | packages/studio/src/hooks/use-book-activity.ts | 153 | export function shouldRefetchDaemonStatus(message: SSEMessage | undefined): boolean { | CODE |
| LOW | packages/studio/src/lib/error-copy.ts | 33 | export function localizeKnownRuntimeMessage(message: string): string { | CODE |
| LOW⚡ | packages/studio/src/api/server.ts | 498 | function normalizeStudioSessionKind(value: unknown, fallback: SessionKind): SessionKind { | CODE |
| LOW⚡ | packages/studio/src/api/server.ts | 507 | function normalizeStudioActionSource(value: unknown): ActionSource { | CODE |
| LOW⚡ | packages/studio/src/api/server.ts | 515 | function normalizeStudioRequestedIntent(value: unknown): RequestedIntent | undefined { | CODE |
| LOW⚡ | packages/studio/src/api/server.ts | 523 | function normalizeStudioActionPayload(value: unknown): ActionPayload | undefined { | CODE |
| LOW⚡ | packages/studio/src/api/server.ts | 532 | function normalizeStudioSkillIdList(value: unknown, field: string): string[] { | CODE |
| LOW⚡ | packages/studio/src/api/server.ts | 1801 | function normalizeChapterReviewMode(mode: unknown): ChapterReviewMode { | CODE |
| LOW⚡ | packages/studio/src/api/server.ts | 1805 | function readProjectChapterReviewMode(config: Record<string, unknown>): ChapterReviewMode { | CODE |
| LOW⚡ | packages/studio/src/api/server.ts | 1812 | function readBookChapterReviewMode(rawBook: Record<string, unknown>): ChapterReviewMode | undefined { | CODE |
| LOW | packages/studio/src/api/server.ts | 418 | function normalizeProjectGeneratedPath(root: string, rawPath: string, code: string): { readonly relPath: string; readonl | CODE |
| LOW | packages/studio/src/api/server.ts | 449 | function resolveProjectTextArtifactFile(root: string, rawPath: string): { readonly relPath: string; readonly resolved: s | CODE |
| LOW | packages/studio/src/api/server.ts | 471 | function hasSuccessfulSubAgentExec( | CODE |
| LOW | packages/studio/src/api/server.ts | 591 | async function normalizeAgentAttachments( | CODE |
| LOW | packages/studio/src/api/server.ts | 867 | function parseReplacementInstruction(instruction: string): { oldText: string; newText: string } | null { | CODE |
| LOW | packages/studio/src/api/server.ts | 883 | function isExplicitExternalChatEditInstruction(instruction: string): boolean { | CODE |
| LOW | packages/studio/src/api/server.ts | 895 | function parseChapterNumberForEdit(instruction: string): number | null { | CODE |
| LOW | packages/studio/src/api/server.ts | 918 | function resolveExternalChatEditPath(root: string, requestedPath: string): { path: string; rel: string } { | CODE |
| LOW | packages/studio/src/api/server.ts | 949 | function parseBookChapterFromRelativePath(rel: string): { bookId: string; chapterNumber: number } | null { | CODE |
| LOW | packages/studio/src/api/server.ts | 991 | async function tryHandleExternalChatEdit(params: { | CODE |
| LOW | packages/studio/src/api/server.ts | 1071 | function validateAgentActionExecution(args: { | CODE |
| LOW | packages/studio/src/api/server.ts | 1220 | function suppressManualTextForTool(exec: CollectedToolExec): boolean { | CODE |
| LOW | packages/studio/src/api/server.ts | 1229 | function manualToolAssistantMessage( | CODE |
| LOW | packages/studio/src/api/server.ts | 1264 | function isConfirmedProductionAction(args: { | CODE |
| LOW | packages/studio/src/api/server.ts | 1297 | async function executeConfirmedProductionAction(args: { | CODE |
| LOW | packages/studio/src/api/server.ts | 1644 | function resolveArchitectBookIdFromArgs(args?: Record<string, unknown>): string | null { | CODE |
| LOW | packages/studio/src/api/server.ts | 1653 | function resolveCreatedBookIdFromToolExecs(execs: ReadonlyArray<CollectedToolExec>): string | null { | CODE |
| LOW | packages/studio/src/api/server.ts | 1666 | function resolveCreatedBookIdFromDetails(details: Readonly<Record<string, unknown>> | undefined): string | null { | CODE |
| LOW | packages/studio/src/api/server.ts | 1673 | async function loadStudioBookListSummary( | CODE |
| LOW | packages/studio/src/api/server.ts | 1825 | async function resolveBookChapterReviewMode(root: string, bookId: string | undefined, projectMode: ChapterReviewMode): P | CODE |
| LOW | packages/studio/src/api/server.ts | 1939 | async function readEffectiveEnvConfigValues(root: string): Promise<{ source: "project" | "global"; values: EnvConfigValu | CODE |
| LOW | packages/studio/src/api/server.ts | 1947 | async function resolveConfiguredServiceBaseUrl(root: string, serviceId: string, inlineBaseUrl?: string): Promise<string | CODE |
| LOW | packages/studio/src/api/server.ts | 1964 | async function resolveConfiguredServiceEntry(root: string, serviceId: string): Promise<ServiceConfigEntry | undefined> { | CODE |
| LOW | packages/studio/src/api/server.ts | 2036 | function radarTimestampForFilename(value: string | undefined): string { | CODE |
| LOW | packages/studio/src/api/server.ts | 2098 | function fallbackTextModelsForEndpoint( | CODE |
| LOW | packages/studio/src/api/server.ts | 2111 | function shouldTrustStaticModelsWhenLiveListUnavailable(endpoint: ReturnType<typeof getAllEndpoints>[number] | undefined | CODE |
| LOW | packages/studio/src/api/server.ts | 2219 | async function fetchModelsFromServiceBaseUrl( | CODE |
| LOW | packages/studio/src/pages/prompt-pack-ui-state.ts | 31 | export function groupPromptPacksForDisplay(input: PromptPacksResponse): PromptPackDisplayGroup[] { | CODE |
| LOW | packages/studio/src/pages/prompt-pack-ui-state.ts | 63 | function sortPromptsByPackManifest( | CODE |
| LOW | packages/studio/src/pages/chat-page-state.ts | 124 | export function shouldShowPlayChoicePanel(input: { | CODE |
| LOW | packages/studio/src/pages/StoryGraphTree.tsx | 17 | export function buildProjectExportDownloadUrl(projectId: string): string | null { | CODE |
| LOW | packages/studio/src/pages/service-detail-state.ts | 64 | export async function rehydrateServiceConnectionStatus(args: { | CODE |
| LOW | packages/studio/src/pages/service-detail-state.ts | 92 | export function matchServiceConfigEntryForDetail( | CODE |
| LOW | packages/studio/src/pages/BookCreate.tsx | 215 | export function defaultChapterWordsForLanguage(language: "zh" | "en"): string { | CODE |
| LOW | packages/studio/src/pages/BookCreate.tsx | 230 | export function platformOptionsForLanguage(language: "zh" | "en"): ReadonlyArray<PlatformOption> { | CODE |
| LOW | packages/studio/src/pages/BookCreate.tsx | 400 | export function buildCreationDraftSummary( | CODE |
| LOW | packages/studio/src/pages/BookCreate.tsx | 454 | export function buildBookCreateAgentRequest( | CODE |
| LOW | packages/studio/src/pages/BookCreate.tsx | 478 | export async function ensureBookCreateSessionId( | CODE |
| LOW | packages/studio/src/store/preferences/store.ts | 28 | export function readStoredToolDetailsDefaultOpen( | CODE |
| LOW | packages/studio/src/store/chat/message-policy.ts | 3 | export function shouldRefreshSidebarForTool(toolName: string): boolean { | CODE |
| LOW | packages/studio/src/store/chat/parts-builder.ts | 125 | function applyContextCompressionEvent(parts: MessagePart[], event: ContextCompressionStreamEvent): void { | CODE |
| LOW | …/studio/src/store/chat/slices/message/stream-events.ts | 97 | export function createStreamTextDeltaBatcher( | CODE |
| 309 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | packages/studio/e2e/authoring-confirm.spec.ts | 25 | // Step 1: navigate to the film tree page | COMMENT |
| LOW⚡ | packages/studio/e2e/authoring-confirm.spec.ts | 33 | // Step 2: click the authoring button → navigates to #/film-author/<id> | COMMENT |
| LOW⚡ | packages/studio/e2e/authoring-confirm.spec.ts | 42 | // Step 3: type the instruction and press Enter to send | COMMENT |
| LOW⚡ | packages/studio/e2e/authoring-confirm.spec.ts | 46 | // Step 4: wait for the agent to stream and render the proposed-action card. | COMMENT |
| LOW⚡ | packages/studio/e2e/authoring-confirm.spec.ts | 52 | // Step 5: click the confirm button | COMMENT |
| LOW⚡ | packages/studio/e2e/authoring-confirm.spec.ts | 55 | // Step 6: cross-check via the graph API endpoint. | COMMENT |
| LOW⚡ | packages/studio/e2e/export.spec.ts | 19 | // Step 1: fetch the exported HTML from the server. | COMMENT |
| LOW⚡ | packages/studio/e2e/export.spec.ts | 25 | // Step 2: load the raw HTML string into a blank page (no server connection). | COMMENT |
| LOW⚡ | packages/studio/e2e/export.spec.ts | 29 | // Step 3: the embedded player must have bootstrapped with no server. | COMMENT |
| LOW⚡ | packages/studio/e2e/export.spec.ts | 32 | // Step 4: click the single choice in the start node. | COMMENT |
| LOW⚡ | packages/studio/e2e/export.spec.ts | 37 | // Step 5: the ending screen must appear. | COMMENT |
| LOW | …es/studio/src/__tests__/authoring-confirm-flow.test.ts | 39 | // Step 1: free-text instruction → stubbed agent proposes draft_structure via propose_action | COMMENT |
| LOW | …es/studio/src/__tests__/authoring-confirm-flow.test.ts | 53 | // Step 2: confirm the proposed action → executeConfirmedProductionAction runs draft_structure | COMMENT |
| LOW⚡ | packages/core/src/pipeline/runner.ts | 955 | // Step 1: Import source material → fanfic_canon.md | COMMENT |
| LOW⚡ | packages/core/src/pipeline/runner.ts | 959 | // Step 2: Generate foundation with review loop | COMMENT |
| LOW⚡ | packages/core/src/pipeline/runner.ts | 989 | // Step 3: Generate style guide from source material | COMMENT |
| LOW⚡ | packages/core/src/pipeline/runner.ts | 995 | // Step 4: Initialize chapters directory + snapshot | COMMENT |
| LOW | packages/core/src/pipeline/runner.ts | 2742 | // Step 1: Generate foundation on first run (not on resume) | COMMENT |
| LOW | packages/core/src/pipeline/runner.ts | 2788 | // Step 2: Sequential replay | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | packages/studio/e2e/authoring-confirm.spec.ts | 25 | // Step 1: navigate to the film tree page | COMMENT |
| LOW⚡ | packages/studio/e2e/authoring-confirm.spec.ts | 33 | // Step 2: click the authoring button → navigates to #/film-author/<id> | COMMENT |
| LOW⚡ | packages/studio/e2e/authoring-confirm.spec.ts | 42 | // Step 3: type the instruction and press Enter to send | COMMENT |
| LOW⚡ | packages/studio/e2e/authoring-confirm.spec.ts | 46 | // Step 4: wait for the agent to stream and render the proposed-action card. | COMMENT |
| LOW⚡ | packages/studio/e2e/authoring-confirm.spec.ts | 52 | // Step 5: click the confirm button | COMMENT |
| LOW⚡ | packages/studio/e2e/authoring-confirm.spec.ts | 55 | // Step 6: cross-check via the graph API endpoint. | COMMENT |
| LOW⚡ | packages/studio/e2e/export.spec.ts | 19 | // Step 1: fetch the exported HTML from the server. | COMMENT |
| LOW⚡ | packages/studio/e2e/export.spec.ts | 25 | // Step 2: load the raw HTML string into a blank page (no server connection). | COMMENT |
| LOW⚡ | packages/studio/e2e/export.spec.ts | 29 | // Step 3: the embedded player must have bootstrapped with no server. | COMMENT |
| LOW⚡ | packages/studio/e2e/export.spec.ts | 32 | // Step 4: click the single choice in the start node. | COMMENT |
| LOW⚡ | packages/studio/e2e/export.spec.ts | 37 | // Step 5: the ending screen must appear. | COMMENT |
| LOW | …es/studio/src/__tests__/authoring-confirm-flow.test.ts | 39 | // Step 1: free-text instruction → stubbed agent proposes draft_structure via propose_action | COMMENT |
| LOW | …es/studio/src/__tests__/authoring-confirm-flow.test.ts | 53 | // Step 2: confirm the proposed action → executeConfirmedProductionAction runs draft_structure | COMMENT |
| LOW⚡ | packages/core/src/pipeline/runner.ts | 955 | // Step 1: Import source material → fanfic_canon.md | COMMENT |
| LOW⚡ | packages/core/src/pipeline/runner.ts | 959 | // Step 2: Generate foundation with review loop | COMMENT |
| LOW⚡ | packages/core/src/pipeline/runner.ts | 989 | // Step 3: Generate style guide from source material | COMMENT |
| LOW⚡ | packages/core/src/pipeline/runner.ts | 995 | // Step 4: Initialize chapters directory + snapshot | COMMENT |
| LOW | packages/core/src/pipeline/runner.ts | 2742 | // Step 1: Generate foundation on first run (not on resume) | COMMENT |
| LOW | packages/core/src/pipeline/runner.ts | 2788 | // Step 2: Sequential replay | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | packages/cli/src/project-bootstrap.ts | 13 | return content.includes("INKOS_LLM_API_KEY=") && !content.includes("your-api-key-here"); | CODE |
| HIGH | packages/cli/src/tui/setup.ts | 326 | return !!match && match[1]!.trim().length > 0 && !match[1]!.includes("your-api-key"); | CODE |
| HIGH | packages/cli/src/tui/setup.ts | 379 | if (!key || key.includes("your-api-key")) return undefined; | CODE |
| HIGH | packages/cli/src/commands/doctor.ts | 162 | hasGlobal = globalContent.includes("INKOS_LLM_API_KEY=") && !globalContent.includes("your-api-key-here"); | CODE |
| HIGH | packages/cli/src/commands/doctor.ts | 193 | const hasKey = apiKeyOptional || (!!apiKey && apiKey.length > 10 && apiKey !== "your-api-key-here"); | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | packages/core/src/utils/chapter-cadence.ts | 205 | // ── Helpers ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/core/src/__tests__/provider.test.ts | 9 | // ── Mock @mariozechner/pi-ai ────────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/core/src/__tests__/provider.test.ts | 26 | // ── Helpers ─────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/core/src/__tests__/provider.test.ts | 139 | // ── Tests ───────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | packages/core/src/__tests__/provider.test.ts | 864 | // ── 回归测试:per-call maxTokens 不被裁剪(v2.0.0 精简版)───────────── | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | packages/studio/src/api/server.ts | 2761 | COMMENT | |
| LOW | packages/core/src/llm/provider.ts | 301 | if (!RESERVED_KEYS.has(key)) result[key] = value; | COMMENT |
| LOW | packages/core/src/agents/architect.ts | 21 | // | COMMENT |
| LOW | packages/core/src/agents/architect.ts | 41 | // | COMMENT |
| LOW | packages/core/src/agents/architect.ts | 681 | const rolesRaw = parsedSections.get("roles") ?? ""; | COMMENT |
| LOW | packages/core/src/utils/chapter-memo-parser.ts | 1 | import { ChapterMemoSchema, type ChapterMemo } from "../models/input-governance.js"; | COMMENT |
| LOW | packages/core/src/utils/outline-paths.ts | 221 | return blocks.join("\n\n"); | COMMENT |
| LOW | …re/src/__tests__/architect-phase5-consolidated.test.ts | 21 | // append to. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | packages/studio/src/lib/truth-display.ts | 216 | // reader-facing; parse the table by header name (robust to column reordering) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …ges/core/src/__tests__/agent-tools-en-language.test.ts | 108 | getEnvApiKey: vi.fn(() => "fake-key"), | CODE |
| LOW | packages/core/src/__tests__/agent-session.test.ts | 179 | getEnvApiKey: vi.fn(() => "fake-key"), | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | packages/core/src/__tests__/writer.test.ts | 1438 | expect(systemPrompt).toContain("Real hook_id"); // English book gets the English output scaffold | CODE |