Feat: Implement Project Claim Output Brake and refine agent reasoning
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
# 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 `AgentExecutor` before final response streaming and history persistence.
|
||||
- Added regression tests for the exact problematic phrases.
|
||||
|
||||
## Changed Files
|
||||
- `src/features/secondBrainTrace.ts`
|
||||
- `src/agent.ts`
|
||||
- `tests/secondBrainTrace.test.ts`
|
||||
|
||||
## Verification
|
||||
- `./node_modules/.bin/tsc --noEmit`
|
||||
- `npm 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.
|
||||
@@ -17,3 +17,4 @@
|
||||
- Added progressive answer format guidance: short conclusion first, brief summary second, detailed answer third.
|
||||
- Added No Evidence, No Project Claim rules and Second Brain source type classification to prevent general notes from being treated as project implementation evidence.
|
||||
- Added project claim policy enforcement so main answers must treat general-only or mixed evidence as cautious and avoid unsupported technical structure claims.
|
||||
- Added a deterministic output brake that removes unsupported technical structure claims from final answers when Trace policy is `general-only`.
|
||||
|
||||
Reference in New Issue
Block a user