/** * Forgen v1 — Config Injector * * v1 설계: Rule Renderer + Profile 기반 규칙 생성. * philosophy/scope/pack ��반 직접 규칙 생성은 제거됨. * * Authoritative: docs/plans/2026-04-03-forgen-rule-renderer-spec.md */ import type { RuntimeHost } from './types.js'; /** 보안 규칙 (정적 — v1 GLOBAL_SAFETY_RULES와 동일 맥락) */ /** * ADR-010 W2-3: 보안 규칙 prose → 2줄 포인터로 축약. * 실제 강제는 훅(secret-filter, db-guard)이 결정적으로 수행하며, * prose 는 순수 토큰 비용이었다 (native /doctor 도 "코드에서 유추 가능한 * 규칙"으로 트리밍 제안하는 부류). 차단 발생 시 확인: `forgen explain`. */ export declare function generateSecurityRules(): string; /** ADR-010 W2-3: prose 제거 — 포인터는 generateSecurityRules 로 통합됨 */ export declare function generateAntiPatternRules(): string; /** compound loop + 개인 규칙 (me/rules) 로드 */ export declare function generateCompoundRules(cwd: string): string; /** * ADR-010 W1-2: 캡처 사이드 공유 판정 — 첫 유효 라인이 Claude-voice 에코인가. * * auto-compound-runner 가 behavior 파일을 디스크에 쓰기 전에 호출한다. * 렌더 타임 필터(위)만으로는 오염 데이터가 스토어에 계속 쌓이므로, * 저장 자체를 차단하는 것이 우선이다. 판정은 첫 유효 라인 기준 — * 에코는 항상 assistant 발화로 시작하고, 진짜 패턴 요약은 지시문으로 시작한다. */ export declare function isSelfReferentialEcho(text: string): boolean; /** * Strip formatting that already exists in the source line BEFORE the * renderer adds its own prefix/suffix. Without this, a behavior file * whose content begins with `- **[의사결정]** ... (3회 관찰)` ends up * rendered as `- - **[의사결정]** ... (3회 관찰) (1회 관찰)` — double * bullet + double count observed in production. * * Exported under `__testOnly` below for C5 regression coverage. */ declare function normalizeDescription(raw: string): string; /** 모든 규칙 파일을 생성하여 반환. v1RenderedRules가 있으면 포함. */ export declare function generateClaudeRuleFiles(cwd: string, v1RenderedRules?: string | null): Record; /** 하위 호환: 단일 규칙 문자열 생성 */ export declare function generateClaudeRules(cwd: string, v1RenderedRules?: string | null): string; /** tmux 키바인딩 등록 */ export declare function registerTmuxBindings(): Promise; /** * B10 (2026-04-09): environment variables for the harness context. * * The canonical namespace is now `FORGEN_*`. The legacy `COMPOUND_*` * names are set alongside for one transition period (third-party hooks * or user scripts may still read them). When all consumers have been * migrated and a major version ships, remove the `COMPOUND_*` lines. */ export declare function buildEnv(cwd: string, v1SessionId?: string, runtime?: RuntimeHost): Record; /** * Test-only exports for the C5 rendering pipeline. The ergonomic choice * over `export function normalizeDescription` is intentional: anything * reached via `__testOnly` is explicitly flagged as "not for production * callers" and easy to grep for in future refactors. */ export declare const __testOnly: { normalizeDescription: typeof normalizeDescription; SELF_REFERENTIAL_PATTERNS: readonly RegExp[]; }; export {};