Skip to content

Commit c4b07aa

Browse files
tosin2013claude
andcommitted
style: apply Prettier formatting to source files
Apply consistent code formatting across memory, tools, and utils modules: - Standardize string quotes (single → double) - Fix arrow function formatting in filter callbacks - Adjust function parameter line breaks - Add trailing commas per project config Files formatted: - src/memory/: export-import, multi-agent-sharing, temporal-analysis, visualization - src/tools/: cleanup-agent-artifacts, update-existing-documentation - src/utils/: artifact-detector, drift-detector, llm-client, semantic-analyzer 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 8adb6ad commit c4b07aa

5 files changed

Lines changed: 202 additions & 143 deletions

File tree

src/tools/cleanup-agent-artifacts.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ const inputSchema = z.object({
2121
path: z.string().describe("Path to the project directory to scan"),
2222
operation: z
2323
.enum(["scan", "clean", "archive"])
24-
.describe("Operation to perform: scan (detect only), clean (remove), or archive (move to .agent-archive/)"),
24+
.describe(
25+
"Operation to perform: scan (detect only), clean (remove), or archive (move to .agent-archive/)",
26+
),
2527
dryRun: z
2628
.boolean()
2729
.optional()
@@ -31,7 +33,9 @@ const inputSchema = z.object({
3133
.boolean()
3234
.optional()
3335
.default(false)
34-
.describe("Prompt for confirmation before each action (not supported in MCP, treated as dryRun)"),
36+
.describe(
37+
"Prompt for confirmation before each action (not supported in MCP, treated as dryRun)",
38+
),
3539
autoDeleteThreshold: z
3640
.number()
3741
.min(0)
@@ -253,7 +257,8 @@ export async function cleanupAgentArtifacts(
253257
executionTime: Date.now() - startTime,
254258
timestamp: new Date().toISOString(),
255259
},
256-
recommendations: recommendations.length > 0 ? recommendations : undefined,
260+
recommendations:
261+
recommendations.length > 0 ? recommendations : undefined,
257262
nextSteps: nextSteps.length > 0 ? nextSteps : undefined,
258263
},
259264
{ fullResponse: true },

src/utils/artifact-detector.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ import { globby } from "globby";
1111

1212
export interface AgentArtifact {
1313
path: string;
14-
type: "file" | "directory" | "inline-comment" | "block-comment" | "code-block";
14+
type:
15+
| "file"
16+
| "directory"
17+
| "inline-comment"
18+
| "block-comment"
19+
| "code-block";
1520
category: "planning" | "debug" | "temporary" | "state" | "documentation";
1621
confidence: number; // 0-1 how sure we are this is agent-generated
1722
recommendation: "delete" | "review" | "keep" | "archive";
@@ -261,10 +266,7 @@ export class ArtifactDetector {
261266
const relativePath = path.relative(this.projectPath, filePath);
262267

263268
// Check for inline markers
264-
const inlineArtifacts = this.detectInlineMarkers(
265-
content,
266-
relativePath,
267-
);
269+
const inlineArtifacts = this.detectInlineMarkers(content, relativePath);
268270
artifacts.push(...inlineArtifacts);
269271

270272
// Check for block patterns
@@ -387,9 +389,7 @@ export class ArtifactDetector {
387389
/**
388390
* Categorize a marker
389391
*/
390-
private categorizeMarker(
391-
marker: string,
392-
): AgentArtifact["category"] {
392+
private categorizeMarker(marker: string): AgentArtifact["category"] {
393393
if (marker.includes("TODO") || marker.includes("FIXME")) {
394394
return "planning";
395395
}

src/utils/drift-detector.ts

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,18 +1312,17 @@ export class DriftDetector {
13121312
const weights = this.getWeights();
13131313

13141314
// Calculate individual factors
1315-
const codeComplexity = this.calculateCodeComplexityScore(
1316-
result,
1317-
snapshot,
1318-
);
1315+
const codeComplexity = this.calculateCodeComplexityScore(result, snapshot);
13191316
const usageFrequency = this.calculateUsageFrequencyScore(
13201317
result,
13211318
snapshot,
13221319
usageMetadata,
13231320
);
13241321
const changeMagnitude = this.calculateChangeMagnitudeScore(result);
1325-
const documentationCoverage =
1326-
this.calculateDocumentationCoverageScore(result, snapshot);
1322+
const documentationCoverage = this.calculateDocumentationCoverageScore(
1323+
result,
1324+
snapshot,
1325+
);
13271326
const staleness = this.calculateStalenessScore(result, snapshot);
13281327
const userFeedback = this.calculateUserFeedbackScore(result);
13291328

@@ -1429,10 +1428,7 @@ export class DriftDetector {
14291428
);
14301429
const publicAPIBonus = isPublicAPI ? PUBLIC_API_BONUS : 0;
14311430

1432-
return Math.min(
1433-
exportScore + referenceScore + publicAPIBonus,
1434-
100,
1435-
);
1431+
return Math.min(exportScore + referenceScore + publicAPIBonus, 100);
14361432
}
14371433

14381434
// Use actual usage data if available
@@ -1442,8 +1438,7 @@ export class DriftDetector {
14421438
if (diff.category === "function") {
14431439
totalUsage += usageMetadata.functionCalls.get(diff.name) || 0;
14441440
} else if (diff.category === "class") {
1445-
totalUsage +=
1446-
usageMetadata.classInstantiations.get(diff.name) || 0;
1441+
totalUsage += usageMetadata.classInstantiations.get(diff.name) || 0;
14471442
}
14481443
totalUsage += usageMetadata.imports.get(diff.name) || 0;
14491444
}
@@ -1457,9 +1452,7 @@ export class DriftDetector {
14571452
* Calculate change magnitude score (0-100)
14581453
* Larger changes = higher priority
14591454
*/
1460-
private calculateChangeMagnitudeScore(
1461-
result: DriftDetectionResult,
1462-
): number {
1455+
private calculateChangeMagnitudeScore(result: DriftDetectionResult): number {
14631456
const { breakingChanges, majorChanges, minorChanges } =
14641457
result.impactAnalysis;
14651458

@@ -1566,9 +1559,7 @@ export class DriftDetector {
15661559
* More reported issues = higher priority
15671560
* Note: This is a placeholder - actual implementation would integrate with issue tracking
15681561
*/
1569-
private calculateUserFeedbackScore(
1570-
_result: DriftDetectionResult,
1571-
): number {
1562+
private calculateUserFeedbackScore(_result: DriftDetectionResult): number {
15721563
// Placeholder implementation
15731564
// In a real system, this would query issue tracking systems
15741565
// for documentation-related issues on the affected files

0 commit comments

Comments
 (0)