Version 2.53.0 Release: Thinking Partner Protocol and Context-Aware Chronicle

This commit is contained in:
g1nation
2026-05-03 20:25:37 +09:00
parent f230eb4663
commit 9c242a5b8d
4 changed files with 58 additions and 5 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "g1nation", "name": "g1nation",
"displayName": "G1nation", "displayName": "G1nation",
"description": "High-performance autonomous local AI coding agent for VS Code. Features vectorized inference, asynchronous task management, and 100% offline processing.", "description": "High-performance autonomous local AI coding agent for VS Code. Features vectorized inference, asynchronous task management, and 100% offline processing.",
"version": "2.52.0", "version": "2.53.0",
"publisher": "connectailab", "publisher": "connectailab",
"license": "MIT", "license": "MIT",
"icon": "assets/icon.png", "icon": "assets/icon.png",
@@ -52,6 +52,10 @@ export function buildProjectChronicleGuardContext(project: ProjectProfile | null
'', '',
'Tone and scope:', 'Tone and scope:',
'- Be practical and plain-spoken.', '- Be practical and plain-spoken.',
'- For architecture, design, and direction questions, be a thinking partner rather than a generic advisor.',
'- Start with a clear verdict. Then separate confirmed facts, inferences, concerns, decision forks, and next action.',
'- Do not only say the direction is good. Say what is strong, what is weak, what is missing, and what decision would make the project clearer.',
'- If the user is using the tool to organize their thinking, reflect the shape of their uncertainty and turn it into 1-2 concrete choices.',
'- Keep the top conclusion calm and short so the user can understand the answer before reading the long version.', '- Keep the top conclusion calm and short so the user can understand the answer before reading the long version.',
'- Prefer short paragraphs with blank lines between numbered sections. Avoid starting most lines with `*` or `-` bullets.', '- Prefer short paragraphs with blank lines between numbered sections. Avoid starting most lines with `*` or `-` bullets.',
'- Use visible markdown headings such as `## 간단 요약`, `## 요청 요약`, `## 상세 답변`, and `## 추가 조언` for major sections.', '- Use visible markdown headings such as `## 간단 요약`, `## 요청 요약`, `## 상세 답변`, and `## 추가 조언` for major sections.',
+48 -4
View File
@@ -1483,12 +1483,12 @@ export class SidebarChatProvider implements vscode.WebviewViewProvider, BridgeIn
} }
private async _autoWriteChronicleAfterPrompt() { private async _autoWriteChronicleAfterPrompt() {
const profile = this._getActiveChronicleProject();
if (!profile) return;
const history = this._agent.getHistory(); const history = this._agent.getHistory();
const latestUser = [...history].reverse().find(message => message.role === 'user')?.content || ''; const latestUser = [...history].reverse().find(message => message.role === 'user')?.content || '';
const latestAssistant = [...history].reverse().find(message => message.role === 'assistant')?.content || ''; const latestAssistant = [...history].reverse().find(message => message.role === 'assistant')?.content || '';
const profile = this._getChronicleProjectForConversation(latestUser) || this._getActiveChronicleProject();
if (!profile) return;
const recordType = this._inferAutoChronicleRecordType(latestUser, latestAssistant); const recordType = this._inferAutoChronicleRecordType(latestUser, latestAssistant);
if (!recordType) return; if (!recordType) return;
@@ -1573,12 +1573,56 @@ export class SidebarChatProvider implements vscode.WebviewViewProvider, BridgeIn
this._chronicle.appendTimeline(profile, [`Auto ${recordType} record created: ${result.relativePath}`], createdAt); this._chronicle.appendTimeline(profile, [`Auto ${recordType} record created: ${result.relativePath}`], createdAt);
await this._context.globalState.update(SidebarChatProvider.lastAutoChronicleSignatureStateKey, signature); await this._context.globalState.update(SidebarChatProvider.lastAutoChronicleSignatureStateKey, signature);
await this._sendChronicleRecords(); await this._sendChronicleRecords();
this.injectSystemMessage(`**[Chronicle Auto Saved]** ${recordType} · \`${result.filePath}\``); vscode.window.setStatusBarMessage(`G1nation: Chronicle auto-saved ${recordType}`, 3500);
} catch (err: any) { } catch (err: any) {
logError('Automatic Chronicle record write failed.', { error: err?.message || String(err), recordType }); logError('Automatic Chronicle record write failed.', { error: err?.message || String(err), recordType });
} }
} }
private _getChronicleProjectForConversation(text: string): ProjectProfile | null {
const projectPath = this._extractLocalProjectPath(text);
if (!projectPath) return null;
const projects = this._getChronicleProjects();
const resolvedPath = path.resolve(projectPath);
const existing = projects.find(project => {
const root = project.projectRoot ? path.resolve(project.projectRoot) : '';
const recordRoot = path.resolve(project.recordRoot);
return root === resolvedPath || recordRoot.startsWith(`${resolvedPath}${path.sep}`);
});
if (existing) return existing;
const projectName = path.basename(resolvedPath) || 'Current Project';
const now = new Date().toISOString();
return {
projectId: this._slugify(projectName),
projectName,
projectRoot: resolvedPath,
recordRoot: path.join(resolvedPath, 'docs', 'records', projectName),
description: 'Auto-detected from the local project path in the conversation.',
corePurpose: 'Capture project direction, architecture discussion, decisions, and development notes as Markdown.',
targetUsers: ['Project developer'],
avoidDirections: ['Do not mix records across projects.'],
detailLevel: 'standard',
createdAt: now,
updatedAt: now
};
}
private _extractLocalProjectPath(text: string): string | null {
const match = text.match(/\/Volumes\/Data\/project\/Antigravity\/[^\s`"'<>]+/i);
if (!match) return null;
const candidate = match[0].replace(/[.,;:)\]]+$/, '');
try {
if (fs.existsSync(candidate) && fs.statSync(candidate).isDirectory()) {
return candidate;
}
} catch {
return null;
}
return null;
}
private _inferAutoChronicleRecordType(userText: string, assistantText: string): 'planning' | 'discussion' | 'decision' | 'development' | 'bug' | null { private _inferAutoChronicleRecordType(userText: string, assistantText: string): 'planning' | 'discussion' | 'decision' | 'development' | 'bug' | null {
const combined = `${userText}\n${assistantText}`; const combined = `${userText}\n${assistantText}`;
if (!combined.trim()) return null; if (!combined.trim()) return null;
+5
View File
@@ -161,6 +161,11 @@ Core behavior:
- Do not force this structure for tiny factual replies, quick confirmations, or one-line operational updates. - Do not force this structure for tiny factual replies, quick confirmations, or one-line operational updates.
- For product ideas, feature proposals, and architecture discussions, narrow the direction before expanding it. Prefer a practical MVP first, then separate later expansion ideas. - For product ideas, feature proposals, and architecture discussions, narrow the direction before expanding it. Prefer a practical MVP first, then separate later expansion ideas.
- Avoid inflated consulting language. Use concrete engineering tradeoffs, dependency risk, and next decisions instead. - Avoid inflated consulting language. Use concrete engineering tradeoffs, dependency risk, and next decisions instead.
- For design, architecture, product direction, or "what do you think?" questions, act as a thinking partner, not a cheerleader.
- Give an opinionated verdict first. Then explain: what is confirmed, what is only an inference, what worries you, what choice the user is really facing, and what you would do next.
- Do not give merely pleasant guidance such as "좋은 방향입니다" without a concrete reason, risk, or decision fork.
- Help the user organize their thinking. Name the user's likely intent, the hidden tradeoff, and the next small decision that would reduce confusion.
- If the user sounds unsure or discouraged, reassure them briefly, then return to concrete diagnosis. Do not imply the issue is the user's intelligence.
- Do not use grand labels like "final execution mandate", "engineering standard", "knowledge distiller", or "Antigravity's yardstick" unless the user explicitly asks for that style. - Do not use grand labels like "final execution mandate", "engineering standard", "knowledge distiller", or "Antigravity's yardstick" unless the user explicitly asks for that style.
- No Evidence, No Project Claim: do not state that the current project has a technical structure unless it is supported by user-provided facts, source code, design docs, project docs, or project records. - No Evidence, No Project Claim: do not state that the current project has a technical structure unless it is supported by user-provided facts, source code, design docs, project docs, or project records.
- Even if Second Brain provides a general concept note, do not describe that concept as actually implemented in the current project. General concept notes are not project evidence. - Even if Second Brain provides a general concept note, do not describe that concept as actually implemented in the current project. General concept notes are not project evidence.