Repository Analysis

nicobailon/pi-subagents

Pi extension for async subagent delegation with truncation, artifacts, and session sharing

3.8 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of nicobailon/pi-subagents, a TypeScript project with 3,044 GitHub stars. SynthScan v2.0 examined 139,747 lines of code across 383 source files, recording 498 pattern matches distributed across 5 syntactic categories. The overall adjusted score of 3.8 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).

3.8
Adjusted Score
3.8
Raw Score
100%
Time Factor
2026-08-09
Last Push
3.0K
Stars
TypeScript
Language
139.7K
Lines of Code
383
Files
498
Pattern Hits
2026-08-09
Scan Date
0.00
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

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.

CRITICAL 0HIGH 0MEDIUM 11LOW 487

Directory Score Breakdown

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.

Pattern Findings

The scanner identified 498 distinct pattern matches across 5 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.

Hyper-Verbose Identifiers482 hits · 488 pts
SeverityFileLineSnippetContext
LOWtest/unit/schemas.test.ts122function hasAnyOfArrayWithStringItems(schema: JsonSchemaNode | undefined): boolean {CODE
LOWtest/unit/pi-coding-agent-dir.test.ts42function assertPrivateHistoryModes(historyPath: string): void {CODE
LOWtest/unit/completion-guard.test.ts294function checkpointNestedDetailsMessage(beforeCommit: string, afterCommit: string): Message {CODE
LOWtest/unit/host-peer-runtime-imports.test.ts25function extractStaticImportSpecifiers(source: string): string[] {CODE
LOWtest/unit/tool-description.test.ts144 function readRegisteredDescription(agentDir: string): string {CODE
LOWtest/unit/windows-hide-spawn.test.ts9function assertNestedPiSpawnHidesWindows(sourcePath: string): void {CODE
LOWtest/integration/fork-context-execution.test.ts61function makeSessionManagerRecorder(options: SessionStubOptions = {}) {CODE
LOWtest/integration/fork-context-execution.test.ts132 function makeExecutorWithDiscoverAgents(discoverAgentsImpl: typeof discoverAgents, config: Record<string, unknown> = {}CODE
LOWtest/integration/fork-context-execution.test.ts209 function makeForkingSessionManagerRecorder(options: { sessionFile: string; leafId: string }) {CODE
LOWtest/integration/fork-context-execution.test.ts280 function makeSignedThinkingSessionManager(childSessionFile: string) {CODE
LOWtest/integration/async-execution.test.ts343async function waitForDeferredTurnBudget(id: string, timeoutMs = 10_000): Promise<AsyncStatusPayload> {CODE
LOWtest/integration/slash-commands.test.ts218async function captureSlashCommandParams(CODE
LOWtest/support/real-session-runner.ts50export function routeParentThroughSubagent(input: {CODE
LOWtest/support/real-session-runner.ts75function latestSubagentToolResultText(messages: Array<{ role?: string; toolName?: string; content?: unknown }>): string CODE
LOWsrc/extension/doctor.ts109function formatConfiguredSessionDir(input: DoctorReportInput): string {CODE
LOWsrc/extension/doctor.ts178function formatPermissionSystemSection(): string[] {CODE
LOWsrc/extension/steering-notices.ts21export function handleSubagentSteeringNotice(input: {CODE
LOWsrc/extension/control-notices.ts19export function formatSubagentControlNotice(details: SubagentControlMessageDetails, content?: string): string {CODE
LOWsrc/extension/control-notices.ts44export function handleSubagentControlNotice(input: {CODE
LOWsrc/extension/schemas.ts28function isTopLevelParameterDescription(path: string[]): boolean {CODE
LOWsrc/extension/rpc.ts622export function registerSubagentRpcBridge(options: RegisterSubagentRpcBridgeOptions): {CODE
LOWsrc/extension/fanout-child.ts53function resolveNestedControlRoute(): NestedRoute | undefined {CODE
LOWsrc/extension/fanout-child.ts76function createNestedControlInboxState(): NestedControlInboxState {CODE
LOWsrc/extension/fanout-child.ts80function startNestedControlInboxListener(pi: ExtensionAPI, state: SubagentState, route: NestedRoute, inboxState: NestedCCODE
LOWsrc/extension/fanout-child.ts147export default function registerFanoutChildSubagentExtension(pi: ExtensionAPI): void {CODE
LOWsrc/extension/tool-description.ts68export function resolveToolDescriptionMode(config: Pick<ExtensionConfig, "toolDescriptionMode">, options?: ToolDescriptiCODE
LOWsrc/extension/tool-description.ts107function loadCustomToolDescription(options?: ToolDescriptionOptions): string | undefined {CODE
LOWsrc/extension/tool-description.ts144function withMandatorySafetyGuidance(description: string): string {CODE
LOWsrc/extension/tool-description.ts155export function buildSubagentToolDescription(config: Pick<ExtensionConfig, "toolDescriptionMode"> = {}, options?: ToolDeCODE
LOWsrc/extension/index.ts245function isStaleExtensionContextError(error: unknown): boolean {CODE
LOWsrc/extension/index.ts249function rebuildSlashResultContainer(CODE
LOWsrc/extension/index.ts263function createSlashResultComponent(CODE
LOWsrc/extension/index.ts312export default function registerSubagentExtension(pi: ExtensionAPI): void {CODE
LOWsrc/extension/config.ts12export function resolveScheduledStoreRoot(value: string): string {CODE
LOWsrc/extension/config.ts18function validateScheduledRunsConfig(value: unknown): void {CODE
LOWsrc/missions/goal-driver.ts118export function collectGoalContinuationNotices(input: {CODE
LOWsrc/missions/lifecycle.ts167export function attachMissionToLaunchResult(input: {CODE
LOWsrc/missions/lifecycle.ts286export function syncMissionFromAsyncCompletion(value: unknown): MissionRecord | undefined {CODE
LOWsrc/missions/workflow-state.ts198export function createMissionWorkflowState(location: MissionStoreLocation, missionId: string): MissionWorkflowState {CODE
LOWsrc/missions/store.ts230export function validateMissionStoreConfig(value: unknown, label = "config.missions"): MissionStoreConfig | undefined {CODE
LOWsrc/missions/store.ts254export function resolveMissionStoreLocation(input: {CODE
LOWsrc/tui/render.ts171export function clearLegacyResultAnimationTimer(context: LegacyResultAnimationContext): void {CODE
LOWsrc/tui/render.ts188function hasEmptyTextOutputWithoutOutputTarget(task: string, output: string): boolean {CODE
LOWsrc/tui/render.ts294function semanticResultPresentation(input: {CODE
LOWsrc/tui/render.ts534function widgetParallelAgentDetails(job: AsyncJobState, theme: Theme, expanded = false, width = getTermWidth()): string[CODE
LOWsrc/tui/render.ts551function parseParallelGroupAgentCount(label: string | undefined): number | undefined {CODE
LOWsrc/tui/render.ts1009function foregroundStyleWidgetStepLines(CODE
LOWsrc/tui/render.ts1049function foregroundStyleWidgetDetails(job: AsyncJobState, theme: Theme, expanded: boolean, width: number, frame?: numberCODE
LOWsrc/tui/render.ts1120function estimateAvailableWidgetRows(): number {CODE
LOWsrc/tui/render.ts1150function buildSingleLineWidgetLines(jobs: AsyncJobState[], theme: Theme, width: number, frame?: number): string[] {CODE
LOWsrc/tui/render.ts1252function buildProgressiveWidgetLines(jobs: AsyncJobState[], theme: Theme, width: number, lockedRows: number, previousKeyCODE
LOWsrc/tui/render.ts1278function collapsedWidgetLineBudget(rows: number): number {CODE
LOWsrc/tui/render.ts1499function renderWorkflowChatProgress(d: Details, result: AgentToolResult<Details>, theme: Theme, frame?: number): ComponeCODE
LOWsrc/tui/fleet-status.ts47export function resolveFleetViewPlacement(value: unknown): FleetViewPlacement {CODE
LOWsrc/tui/fleet-status.ts140function isStaleExtensionContextError(error: unknown): boolean {CODE
LOWsrc/tui/fleet-status.ts147export function collectFleetStatusEntries(state: SubagentState): FleetStatusEntry[] {CODE
LOWsrc/intercom/native-supervisor-channel.ts89export function resolveSupervisorChannelDir(runId: string, agent: string, childIndex: number): string {CODE
LOWsrc/intercom/native-supervisor-channel.ts93export function ensureSupervisorChannelDir(channelDir: string): void {CODE
LOWsrc/intercom/native-supervisor-channel.ts290export function registerNativeSupervisorClient(pi: ExtensionAPI, options: { includeIntercomFallback?: boolean } = {}): vCODE
LOWsrc/intercom/native-supervisor-channel.ts393function removeStaleEmptySupervisorChannel(channelDir: string, nowMs: number): boolean {CODE
422 more matches not shown…
Decorative Section Separators6 hits · 18 pts
SeverityFileLineSnippetContext
MEDIUMsrc/runs/foreground/chain-clarify.ts265 // ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/runs/foreground/chain-clarify.ts267 // ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/runs/foreground/chain-clarify.ts314 // ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/runs/foreground/chain-clarify.ts316 // ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/runs/foreground/chain-clarify.ts374 // ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMsrc/runs/foreground/chain-clarify.ts376 // ─────────────────────────────────────────────────────────────────────────────COMMENT
Modern AI Meta-Vocabulary5 hits · 14 pts
SeverityFileLineSnippetContext
MEDIUMCHANGELOG.md1163- Removed exported `resolveSessionRoot()` function and `SessionRootInput` interface. These were introduced by PR #46 butCODE
MEDIUMdocs/workflows.md1# Workflows and orchestrationCOMMENT
MEDIUMdocs/workflows.md5## Recommended orchestration patternCOMMENT
MEDIUMskills/pi-subagents/references/prompting-and-roles.md102### Staged fix orchestration techniqueCOMMENT
MEDIUM…lls/pi-subagents/references/constraints-and-recipes.md26### Prefer async orchestrationCOMMENT
Fake / Example Data4 hits · 4 pts
SeverityFileLineSnippetContext
LOWsrc/tui/render.ts645 kind: "placeholder";CODE
LOWsrc/tui/render.ts661 kind: "placeholder",CODE
LOWsrc/tui/render.ts1582 if (entry.kind === "placeholder") {CODE
LOWsrc/tui/render.ts1909 if (entry.kind === "placeholder") {CODE
Overly Generic Function Names1 hit · 1 pts
SeverityFileLineSnippetContext
LOWsrc/extension/rpc.ts532async function handleRequest(CODE