FlowGuard API - v1.2.0-rc.2
    Preparing search index...

    Interface ProfileDetectionInput

    Input struct for profile auto-detection.

    Wraps RepoSignals (always available) and optionally DiscoveryResult (available after Phase 5 discovery). Profiles can use either or both.

    This struct is evolvable: new fields can be added without changing the detect() function signature on FlowGuardProfile or ProfileRegistry.

    interface ProfileDetectionInput {
        repoSignals: RepoSignals;
        discovery?: {
            schemaVersion: "discovery.v1";
            collectedAt: string;
            collectors: Record<string, "complete" | "failed" | "partial">;
            repoMetadata: {
                defaultBranch: string | null;
                headCommit: string | null;
                isDirty: boolean;
                worktreePath: string;
                canonicalRemote: string | null;
                fingerprint: string;
            };
            stack: {
                languages: {
                    id: string;
                    confidence: number;
                    classification: "fact"
                    | "derived_signal"
                    | "hypothesis";
                    evidence: string[];
                    version?: string;
                    versionEvidence?: string;
                    compilerTarget?: string;
                    compilerTargetEvidence?: string;
                }[];
                frameworks: {
                    id: string;
                    confidence: number;
                    classification: "fact"
                    | "derived_signal"
                    | "hypothesis";
                    evidence: string[];
                    version?: string;
                    versionEvidence?: string;
                    compilerTarget?: string;
                    compilerTargetEvidence?: string;
                }[];
                buildTools: {
                    id: string;
                    confidence: number;
                    classification: "fact"
                    | "derived_signal"
                    | "hypothesis";
                    evidence: string[];
                    version?: string;
                    versionEvidence?: string;
                    compilerTarget?: string;
                    compilerTargetEvidence?: string;
                }[];
                testFrameworks: {
                    id: string;
                    confidence: number;
                    classification: "fact"
                    | "derived_signal"
                    | "hypothesis";
                    evidence: string[];
                    version?: string;
                    versionEvidence?: string;
                    compilerTarget?: string;
                    compilerTargetEvidence?: string;
                }[];
                runtimes: {
                    id: string;
                    confidence: number;
                    classification: "fact"
                    | "derived_signal"
                    | "hypothesis";
                    evidence: string[];
                    version?: string;
                    versionEvidence?: string;
                    compilerTarget?: string;
                    compilerTargetEvidence?: string;
                }[];
                tools: {
                    id: string;
                    confidence: number;
                    classification: "fact"
                    | "derived_signal"
                    | "hypothesis";
                    evidence: string[];
                    version?: string;
                    versionEvidence?: string;
                    compilerTarget?: string;
                    compilerTargetEvidence?: string;
                }[];
                qualityTools: {
                    id: string;
                    confidence: number;
                    classification: "fact"
                    | "derived_signal"
                    | "hypothesis";
                    evidence: string[];
                    version?: string;
                    versionEvidence?: string;
                    compilerTarget?: string;
                    compilerTargetEvidence?: string;
                }[];
                databases: {
                    id: string;
                    confidence: number;
                    classification: "fact"
                    | "derived_signal"
                    | "hypothesis";
                    evidence: string[];
                    version?: string;
                    versionEvidence?: string;
                    compilerTarget?: string;
                    compilerTargetEvidence?: string;
                }[];
            };
            topology: {
                kind: "unknown"
                | "monorepo"
                | "single-project";
                modules: { path: string; name: string; manifestFile: string }[];
                entryPoints: {
                    path: string;
                    kind: "other" | "main" | "bin" | "script" | "handler";
                }[];
                rootConfigs: string[];
                ignorePaths: string[];
            };
            surfaces: {
                api: {
                    id: string;
                    label: string;
                    classification: "fact"
                    | "derived_signal"
                    | "hypothesis";
                    evidence: string[];
                }[];
                persistence: {
                    id: string;
                    label: string;
                    classification: "fact"
                    | "derived_signal"
                    | "hypothesis";
                    evidence: string[];
                }[];
                cicd: {
                    id: string;
                    label: string;
                    classification: "fact"
                    | "derived_signal"
                    | "hypothesis";
                    evidence: string[];
                }[];
                security: {
                    id: string;
                    label: string;
                    classification: "fact"
                    | "derived_signal"
                    | "hypothesis";
                    evidence: string[];
                }[];
                layers: { name: string; pathPatterns: string[] }[];
            };
            codeSurfaces?: {
                status: "failed"
                | "ok"
                | "partial";
                endpoints: {
                    id: string;
                    label: string;
                    confidence: number;
                    classification: "fact" | "derived_signal" | "hypothesis";
                    evidence: string[];
                    location: string;
                }[];
                authBoundaries: {
                    id: string;
                    label: string;
                    confidence: number;
                    classification: "fact"
                    | "derived_signal"
                    | "hypothesis";
                    evidence: string[];
                    location: string;
                }[];
                dataAccess: {
                    id: string;
                    label: string;
                    confidence: number;
                    classification: "fact"
                    | "derived_signal"
                    | "hypothesis";
                    evidence: string[];
                    location: string;
                }[];
                integrations: {
                    id: string;
                    label: string;
                    confidence: number;
                    classification: "fact"
                    | "derived_signal"
                    | "hypothesis";
                    evidence: string[];
                    location: string;
                }[];
                budget: {
                    scannedFiles: number;
                    scannedBytes: number;
                    maxFiles: number;
                    maxBytesPerFile: number;
                    maxTotalBytes: number;
                    timedOut: boolean;
                };
            };
            domainSignals: {
                keywords: {
                    term: string;
                    occurrences: number;
                    classification: "fact"
                    | "derived_signal"
                    | "hypothesis";
                }[];
                glossarySources: string[];
            };
            validationHints: {
                commands: {
                    kind: "other"
                    | "format"
                    | "build"
                    | "test"
                    | "lint"
                    | "typecheck";
                    command: string;
                    confidence: number;
                    classification: "fact" | "derived_signal" | "hypothesis";
                }[];
                lintTools: {
                    id: string;
                    confidence: number;
                    classification: "fact"
                    | "derived_signal"
                    | "hypothesis";
                    evidence: string[];
                    version?: string;
                    versionEvidence?: string;
                    compilerTarget?: string;
                    compilerTargetEvidence?: string;
                }[];
            };
        };
    }
    Index

    Properties

    repoSignals: RepoSignals
    discovery?: {
        schemaVersion: "discovery.v1";
        collectedAt: string;
        collectors: Record<string, "complete" | "failed" | "partial">;
        repoMetadata: {
            defaultBranch: string | null;
            headCommit: string | null;
            isDirty: boolean;
            worktreePath: string;
            canonicalRemote: string | null;
            fingerprint: string;
        };
        stack: {
            languages: {
                id: string;
                confidence: number;
                classification: "fact"
                | "derived_signal"
                | "hypothesis";
                evidence: string[];
                version?: string;
                versionEvidence?: string;
                compilerTarget?: string;
                compilerTargetEvidence?: string;
            }[];
            frameworks: {
                id: string;
                confidence: number;
                classification: "fact"
                | "derived_signal"
                | "hypothesis";
                evidence: string[];
                version?: string;
                versionEvidence?: string;
                compilerTarget?: string;
                compilerTargetEvidence?: string;
            }[];
            buildTools: {
                id: string;
                confidence: number;
                classification: "fact"
                | "derived_signal"
                | "hypothesis";
                evidence: string[];
                version?: string;
                versionEvidence?: string;
                compilerTarget?: string;
                compilerTargetEvidence?: string;
            }[];
            testFrameworks: {
                id: string;
                confidence: number;
                classification: "fact"
                | "derived_signal"
                | "hypothesis";
                evidence: string[];
                version?: string;
                versionEvidence?: string;
                compilerTarget?: string;
                compilerTargetEvidence?: string;
            }[];
            runtimes: {
                id: string;
                confidence: number;
                classification: "fact"
                | "derived_signal"
                | "hypothesis";
                evidence: string[];
                version?: string;
                versionEvidence?: string;
                compilerTarget?: string;
                compilerTargetEvidence?: string;
            }[];
            tools: {
                id: string;
                confidence: number;
                classification: "fact"
                | "derived_signal"
                | "hypothesis";
                evidence: string[];
                version?: string;
                versionEvidence?: string;
                compilerTarget?: string;
                compilerTargetEvidence?: string;
            }[];
            qualityTools: {
                id: string;
                confidence: number;
                classification: "fact"
                | "derived_signal"
                | "hypothesis";
                evidence: string[];
                version?: string;
                versionEvidence?: string;
                compilerTarget?: string;
                compilerTargetEvidence?: string;
            }[];
            databases: {
                id: string;
                confidence: number;
                classification: "fact"
                | "derived_signal"
                | "hypothesis";
                evidence: string[];
                version?: string;
                versionEvidence?: string;
                compilerTarget?: string;
                compilerTargetEvidence?: string;
            }[];
        };
        topology: {
            kind: "unknown"
            | "monorepo"
            | "single-project";
            modules: { path: string; name: string; manifestFile: string }[];
            entryPoints: {
                path: string;
                kind: "other" | "main" | "bin" | "script" | "handler";
            }[];
            rootConfigs: string[];
            ignorePaths: string[];
        };
        surfaces: {
            api: {
                id: string;
                label: string;
                classification: "fact"
                | "derived_signal"
                | "hypothesis";
                evidence: string[];
            }[];
            persistence: {
                id: string;
                label: string;
                classification: "fact"
                | "derived_signal"
                | "hypothesis";
                evidence: string[];
            }[];
            cicd: {
                id: string;
                label: string;
                classification: "fact"
                | "derived_signal"
                | "hypothesis";
                evidence: string[];
            }[];
            security: {
                id: string;
                label: string;
                classification: "fact"
                | "derived_signal"
                | "hypothesis";
                evidence: string[];
            }[];
            layers: { name: string; pathPatterns: string[] }[];
        };
        codeSurfaces?: {
            status: "failed"
            | "ok"
            | "partial";
            endpoints: {
                id: string;
                label: string;
                confidence: number;
                classification: "fact" | "derived_signal" | "hypothesis";
                evidence: string[];
                location: string;
            }[];
            authBoundaries: {
                id: string;
                label: string;
                confidence: number;
                classification: "fact"
                | "derived_signal"
                | "hypothesis";
                evidence: string[];
                location: string;
            }[];
            dataAccess: {
                id: string;
                label: string;
                confidence: number;
                classification: "fact"
                | "derived_signal"
                | "hypothesis";
                evidence: string[];
                location: string;
            }[];
            integrations: {
                id: string;
                label: string;
                confidence: number;
                classification: "fact"
                | "derived_signal"
                | "hypothesis";
                evidence: string[];
                location: string;
            }[];
            budget: {
                scannedFiles: number;
                scannedBytes: number;
                maxFiles: number;
                maxBytesPerFile: number;
                maxTotalBytes: number;
                timedOut: boolean;
            };
        };
        domainSignals: {
            keywords: {
                term: string;
                occurrences: number;
                classification: "fact"
                | "derived_signal"
                | "hypothesis";
            }[];
            glossarySources: string[];
        };
        validationHints: {
            commands: {
                kind: "other"
                | "format"
                | "build"
                | "test"
                | "lint"
                | "typecheck";
                command: string;
                confidence: number;
                classification: "fact" | "derived_signal" | "hypothesis";
            }[];
            lintTools: {
                id: string;
                confidence: number;
                classification: "fact"
                | "derived_signal"
                | "hypothesis";
                evidence: string[];
                version?: string;
                versionEvidence?: string;
                compilerTarget?: string;
                compilerTargetEvidence?: string;
            }[];
        };
    }

    Type Declaration

    • schemaVersion: "discovery.v1"
    • collectedAt: string
    • collectors: Record<string, "complete" | "failed" | "partial">

      Per-collector execution status.

    • repoMetadata: {
          defaultBranch: string | null;
          headCommit: string | null;
          isDirty: boolean;
          worktreePath: string;
          canonicalRemote: string | null;
          fingerprint: string;
      }
    • stack: {
          languages: {
              id: string;
              confidence: number;
              classification: "fact" | "derived_signal" | "hypothesis";
              evidence: string[];
              version?: string;
              versionEvidence?: string;
              compilerTarget?: string;
              compilerTargetEvidence?: string;
          }[];
          frameworks: {
              id: string;
              confidence: number;
              classification: "fact"
              | "derived_signal"
              | "hypothesis";
              evidence: string[];
              version?: string;
              versionEvidence?: string;
              compilerTarget?: string;
              compilerTargetEvidence?: string;
          }[];
          buildTools: {
              id: string;
              confidence: number;
              classification: "fact"
              | "derived_signal"
              | "hypothesis";
              evidence: string[];
              version?: string;
              versionEvidence?: string;
              compilerTarget?: string;
              compilerTargetEvidence?: string;
          }[];
          testFrameworks: {
              id: string;
              confidence: number;
              classification: "fact"
              | "derived_signal"
              | "hypothesis";
              evidence: string[];
              version?: string;
              versionEvidence?: string;
              compilerTarget?: string;
              compilerTargetEvidence?: string;
          }[];
          runtimes: {
              id: string;
              confidence: number;
              classification: "fact"
              | "derived_signal"
              | "hypothesis";
              evidence: string[];
              version?: string;
              versionEvidence?: string;
              compilerTarget?: string;
              compilerTargetEvidence?: string;
          }[];
          tools: {
              id: string;
              confidence: number;
              classification: "fact"
              | "derived_signal"
              | "hypothesis";
              evidence: string[];
              version?: string;
              versionEvidence?: string;
              compilerTarget?: string;
              compilerTargetEvidence?: string;
          }[];
          qualityTools: {
              id: string;
              confidence: number;
              classification: "fact"
              | "derived_signal"
              | "hypothesis";
              evidence: string[];
              version?: string;
              versionEvidence?: string;
              compilerTarget?: string;
              compilerTargetEvidence?: string;
          }[];
          databases: {
              id: string;
              confidence: number;
              classification: "fact"
              | "derived_signal"
              | "hypothesis";
              evidence: string[];
              version?: string;
              versionEvidence?: string;
              compilerTarget?: string;
              compilerTargetEvidence?: string;
          }[];
      }
      • languages: {
            id: string;
            confidence: number;
            classification: "fact" | "derived_signal" | "hypothesis";
            evidence: string[];
            version?: string;
            versionEvidence?: string;
            compilerTarget?: string;
            compilerTargetEvidence?: string;
        }[]
      • frameworks: {
            id: string;
            confidence: number;
            classification: "fact" | "derived_signal" | "hypothesis";
            evidence: string[];
            version?: string;
            versionEvidence?: string;
            compilerTarget?: string;
            compilerTargetEvidence?: string;
        }[]
      • buildTools: {
            id: string;
            confidence: number;
            classification: "fact" | "derived_signal" | "hypothesis";
            evidence: string[];
            version?: string;
            versionEvidence?: string;
            compilerTarget?: string;
            compilerTargetEvidence?: string;
        }[]
      • testFrameworks: {
            id: string;
            confidence: number;
            classification: "fact" | "derived_signal" | "hypothesis";
            evidence: string[];
            version?: string;
            versionEvidence?: string;
            compilerTarget?: string;
            compilerTargetEvidence?: string;
        }[]
      • runtimes: {
            id: string;
            confidence: number;
            classification: "fact" | "derived_signal" | "hypothesis";
            evidence: string[];
            version?: string;
            versionEvidence?: string;
            compilerTarget?: string;
            compilerTargetEvidence?: string;
        }[]
      • tools: {
            id: string;
            confidence: number;
            classification: "fact" | "derived_signal" | "hypothesis";
            evidence: string[];
            version?: string;
            versionEvidence?: string;
            compilerTarget?: string;
            compilerTargetEvidence?: string;
        }[]

        Detected ecosystem tools (e.g., openapi-generator, flyway, liquibase). Default [] for backward compat.

      • qualityTools: {
            id: string;
            confidence: number;
            classification: "fact" | "derived_signal" | "hypothesis";
            evidence: string[];
            version?: string;
            versionEvidence?: string;
            compilerTarget?: string;
            compilerTargetEvidence?: string;
        }[]

        Detected quality/analysis tools (e.g., spotless, checkstyle, jacoco). Default [] for backward compat.

      • databases: {
            id: string;
            confidence: number;
            classification: "fact" | "derived_signal" | "hypothesis";
            evidence: string[];
            version?: string;
            versionEvidence?: string;
            compilerTarget?: string;
            compilerTargetEvidence?: string;
        }[]

        Detected database engines (e.g., postgresql, mysql, mongodb). Default [] for backward compat.

    • topology: {
          kind: "unknown" | "monorepo" | "single-project";
          modules: { path: string; name: string; manifestFile: string }[];
          entryPoints: {
              path: string;
              kind: "other" | "main" | "bin" | "script" | "handler";
          }[];
          rootConfigs: string[];
          ignorePaths: string[];
      }
      • kind: "unknown" | "monorepo" | "single-project"
      • modules: { path: string; name: string; manifestFile: string }[]
      • entryPoints: { path: string; kind: "other" | "main" | "bin" | "script" | "handler" }[]
      • rootConfigs: string[]

        Root-level config files (relative paths).

      • ignorePaths: string[]

        Paths to ignore during analysis (node_modules, dist, etc.).

    • surfaces: {
          api: {
              id: string;
              label: string;
              classification: "fact" | "derived_signal" | "hypothesis";
              evidence: string[];
          }[];
          persistence: {
              id: string;
              label: string;
              classification: "fact"
              | "derived_signal"
              | "hypothesis";
              evidence: string[];
          }[];
          cicd: {
              id: string;
              label: string;
              classification: "fact"
              | "derived_signal"
              | "hypothesis";
              evidence: string[];
          }[];
          security: {
              id: string;
              label: string;
              classification: "fact"
              | "derived_signal"
              | "hypothesis";
              evidence: string[];
          }[];
          layers: { name: string; pathPatterns: string[] }[];
      }
    • OptionalcodeSurfaces?: {
          status: "failed" | "ok" | "partial";
          endpoints: {
              id: string;
              label: string;
              confidence: number;
              classification: "fact" | "derived_signal" | "hypothesis";
              evidence: string[];
              location: string;
          }[];
          authBoundaries: {
              id: string;
              label: string;
              confidence: number;
              classification: "fact"
              | "derived_signal"
              | "hypothesis";
              evidence: string[];
              location: string;
          }[];
          dataAccess: {
              id: string;
              label: string;
              confidence: number;
              classification: "fact"
              | "derived_signal"
              | "hypothesis";
              evidence: string[];
              location: string;
          }[];
          integrations: {
              id: string;
              label: string;
              confidence: number;
              classification: "fact"
              | "derived_signal"
              | "hypothesis";
              evidence: string[];
              location: string;
          }[];
          budget: {
              scannedFiles: number;
              scannedBytes: number;
              maxFiles: number;
              maxBytesPerFile: number;
              maxTotalBytes: number;
              timedOut: boolean;
          };
      }
    • domainSignals: {
          keywords: {
              term: string;
              occurrences: number;
              classification: "fact" | "derived_signal" | "hypothesis";
          }[];
          glossarySources: string[];
      }
      • keywords: {
            term: string;
            occurrences: number;
            classification: "fact" | "derived_signal" | "hypothesis";
        }[]
      • glossarySources: string[]

        Files that might contain domain glossary (README, GLOSSARY, etc.).

    • validationHints: {
          commands: {
              kind: "other" | "format" | "build" | "test" | "lint" | "typecheck";
              command: string;
              confidence: number;
              classification: "fact" | "derived_signal" | "hypothesis";
          }[];
          lintTools: {
              id: string;
              confidence: number;
              classification: "fact"
              | "derived_signal"
              | "hypothesis";
              evidence: string[];
              version?: string;
              versionEvidence?: string;
              compilerTarget?: string;
              compilerTargetEvidence?: string;
          }[];
      }