1.5 KiB
1.5 KiB
Development Log: Project Claim Output Brake
Purpose
Stop unsupported project technical claims in the final answer body, not only in Trace diagnostics.
Problem
Even when Trace reported projectClaimPolicy=general-only, the model could still write phrases such as:
- "기술적 기반 면에서는 안정적"
- "아키텍처는 유연하나"
- "모듈화된 구조는 향후 기능 추가 시 유연성을 제공합니다"
Prompt guidance alone was not enough.
Implementation Summary
- Added
enforceProjectClaimPolicyInAnswer. - When
projectClaimPolicy=general-only, final answer text is scanned before output. - Unsupported technical structure claim sentences are removed.
- A safe notice is inserted:
- "현재 정보만으로는 기술 구조를 판단할 수 없습니다."
- "기술적 안정성, 아키텍처 유연성, 모듈화 여부는 소스 코드나 설계 문서 확인이 필요합니다."
- Connected the enforcement function in
AgentExecutorbefore final response streaming and history persistence. - Added regression tests for the exact problematic phrases.
Changed Files
src/features/secondBrainTrace.tssrc/agent.tstests/secondBrainTrace.test.ts
Verification
./node_modules/.bin/tsc --noEmitnpm run compile./node_modules/.bin/jest --runInBand
Result
The system now has a deterministic output brake for unsupported project implementation claims when Trace says only general/reference evidence is available.