@temet/cli 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/macos/README.md +8 -0
- package/assets/macos/Temet.app.zip +0 -0
- package/dist/audit.js +160 -31
- package/dist/doctor.d.ts +5 -0
- package/dist/doctor.js +79 -0
- package/dist/index.js +93 -1
- package/dist/lib/audit-tracking.js +13 -2
- package/dist/lib/cli-args.js +6 -1
- package/dist/lib/diagnostic-runner.d.ts +13 -0
- package/dist/lib/diagnostic-runner.js +106 -0
- package/dist/lib/menubar-installer.d.ts +19 -0
- package/dist/lib/menubar-installer.js +99 -0
- package/dist/lib/menubar-state.d.ts +78 -0
- package/dist/lib/menubar-state.js +275 -0
- package/dist/lib/notifier.d.ts +2 -0
- package/dist/lib/notifier.js +11 -0
- package/dist/lib/report-writer.d.ts +2 -0
- package/dist/lib/report-writer.js +19 -1
- package/dist/plan.d.ts +33 -0
- package/dist/plan.js +90 -0
- package/dist/traces.d.ts +41 -0
- package/dist/traces.js +119 -0
- package/package.json +3 -2
package/dist/plan.js
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { resolveDiagnostics } from "./lib/diagnostic-runner.js";
|
|
2
|
+
import { buildSkillAuditReport } from "./lib/profile-report.js";
|
|
3
|
+
function actionForBlindSpot(title) {
|
|
4
|
+
switch (title) {
|
|
5
|
+
case "Feature sprawl":
|
|
6
|
+
return {
|
|
7
|
+
title,
|
|
8
|
+
action: "Finish one live path before opening another new direction this week.",
|
|
9
|
+
reason: "Your output is not the constraint. Selection and closure are.",
|
|
10
|
+
};
|
|
11
|
+
case "Git hygiene under pressure":
|
|
12
|
+
return {
|
|
13
|
+
title,
|
|
14
|
+
action: "Reduce branch churn and land one clean, reviewable slice before the next risky change.",
|
|
15
|
+
reason: "The skill is there; the failure mode is pressure, not ignorance.",
|
|
16
|
+
};
|
|
17
|
+
case "Technical detours":
|
|
18
|
+
return {
|
|
19
|
+
title,
|
|
20
|
+
action: "Timebox deep exploration and force a product decision when the learning curve flattens.",
|
|
21
|
+
reason: "Curiosity is helping you, but it still needs a stopping rule.",
|
|
22
|
+
};
|
|
23
|
+
case "Coordination drag":
|
|
24
|
+
return {
|
|
25
|
+
title,
|
|
26
|
+
action: "Write the one-line decision and owner before you expand the system further.",
|
|
27
|
+
reason: "Alignment cost is starting to compete with build cost.",
|
|
28
|
+
};
|
|
29
|
+
default:
|
|
30
|
+
return {
|
|
31
|
+
title,
|
|
32
|
+
action: "Keep the loop short and choose one concrete improvement to test next.",
|
|
33
|
+
reason: "The report points to a leverage point, not a reason to add more layers.",
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function buildPlanItems(blindSpots, meaningfulChanges) {
|
|
38
|
+
const items = blindSpots
|
|
39
|
+
.slice(0, 3)
|
|
40
|
+
.map((spot) => actionForBlindSpot(spot.title));
|
|
41
|
+
if (meaningfulChanges.length > 0) {
|
|
42
|
+
items.push({
|
|
43
|
+
title: "Recent movement",
|
|
44
|
+
action: "Protect the newest positive change and turn it into a repeated habit.",
|
|
45
|
+
reason: meaningfulChanges[0] ?? "A new pattern just surfaced; reinforce it.",
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
return items.slice(0, 3);
|
|
49
|
+
}
|
|
50
|
+
export function buildPlanJsonOutput(input) {
|
|
51
|
+
return input;
|
|
52
|
+
}
|
|
53
|
+
function printPlan(output) {
|
|
54
|
+
console.log("PLAN");
|
|
55
|
+
console.log("");
|
|
56
|
+
console.log(output.professionalDna);
|
|
57
|
+
console.log("");
|
|
58
|
+
console.log("Keep");
|
|
59
|
+
for (const item of output.keep) {
|
|
60
|
+
console.log(` - ${item.title}${item.tagline ? ` — ${item.tagline}` : ""}`);
|
|
61
|
+
}
|
|
62
|
+
console.log("");
|
|
63
|
+
console.log("Watch");
|
|
64
|
+
for (const item of output.watch) {
|
|
65
|
+
console.log(` - ${item.title}: ${item.body}`);
|
|
66
|
+
}
|
|
67
|
+
console.log("");
|
|
68
|
+
console.log("Plan");
|
|
69
|
+
for (const item of output.plan) {
|
|
70
|
+
console.log(` - ${item.action}`);
|
|
71
|
+
console.log(` Why: ${item.reason}`);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
export async function runPlanCommand(opts) {
|
|
75
|
+
const diagnostics = await resolveDiagnostics(opts);
|
|
76
|
+
if (opts.quiet)
|
|
77
|
+
return;
|
|
78
|
+
const report = buildSkillAuditReport(diagnostics.result, diagnostics.competencies, diagnostics.tracking);
|
|
79
|
+
const output = buildPlanJsonOutput({
|
|
80
|
+
professionalDna: diagnostics.bilan?.trim() || report.professionalDna,
|
|
81
|
+
keep: report.tacitSkills.slice(0, 3),
|
|
82
|
+
watch: report.blindSpots.slice(0, 3),
|
|
83
|
+
plan: buildPlanItems(report.blindSpots, report.meaningfulChanges),
|
|
84
|
+
});
|
|
85
|
+
if (opts.json) {
|
|
86
|
+
console.log(JSON.stringify(output, null, 2));
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
printPlan(output);
|
|
90
|
+
}
|
package/dist/traces.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { AuditCliOptions } from "./lib/cli-args.js";
|
|
2
|
+
import type { CompetencyEntry } from "./lib/types.js";
|
|
3
|
+
type EvidenceItem = {
|
|
4
|
+
kind: "example" | "decision" | "anti_pattern" | "mentor";
|
|
5
|
+
text: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function buildTracesJsonOutput(input: {
|
|
8
|
+
projectLabel: string;
|
|
9
|
+
sessions: number;
|
|
10
|
+
prompts: number;
|
|
11
|
+
toolCalls: number;
|
|
12
|
+
competencies: CompetencyEntry[];
|
|
13
|
+
workflows: Array<{
|
|
14
|
+
description: string;
|
|
15
|
+
sequence: string[];
|
|
16
|
+
occurrences: number;
|
|
17
|
+
sessions: number;
|
|
18
|
+
confidence: number;
|
|
19
|
+
}>;
|
|
20
|
+
}): {
|
|
21
|
+
project: string;
|
|
22
|
+
sessions: number;
|
|
23
|
+
prompts: number;
|
|
24
|
+
toolCalls: number;
|
|
25
|
+
competencies: {
|
|
26
|
+
name: string;
|
|
27
|
+
category: import("./lib/types.js").CompetencyCategory;
|
|
28
|
+
proficiencyLevel: import("./lib/types.js").ProficiencyLevel;
|
|
29
|
+
description: string;
|
|
30
|
+
evidence: EvidenceItem[];
|
|
31
|
+
}[];
|
|
32
|
+
workflows: {
|
|
33
|
+
description: string;
|
|
34
|
+
sequence: string[];
|
|
35
|
+
occurrences: number;
|
|
36
|
+
sessions: number;
|
|
37
|
+
confidence: number;
|
|
38
|
+
}[];
|
|
39
|
+
};
|
|
40
|
+
export declare function runTracesCommand(opts: AuditCliOptions): Promise<void>;
|
|
41
|
+
export {};
|
package/dist/traces.js
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { defaultProjectLabel, resolveDiagnostics, } from "./lib/diagnostic-runner.js";
|
|
2
|
+
function evidenceCount(entry) {
|
|
3
|
+
return (entry.evidence.examples.length +
|
|
4
|
+
entry.evidence.decisionCriteria.length +
|
|
5
|
+
entry.evidence.antiPatterns.length +
|
|
6
|
+
entry.evidence.mentorAdvice.length);
|
|
7
|
+
}
|
|
8
|
+
function proficiencyScore(level) {
|
|
9
|
+
switch (level) {
|
|
10
|
+
case "expert":
|
|
11
|
+
return 5;
|
|
12
|
+
case "proficient":
|
|
13
|
+
return 4;
|
|
14
|
+
case "competent":
|
|
15
|
+
return 3;
|
|
16
|
+
case "advanced_beginner":
|
|
17
|
+
return 2;
|
|
18
|
+
default:
|
|
19
|
+
return 1;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function topCompetencies(competencies, limit = 6) {
|
|
23
|
+
return [...competencies]
|
|
24
|
+
.sort((a, b) => {
|
|
25
|
+
const scoreDiff = proficiencyScore(b.proficiencyLevel) -
|
|
26
|
+
proficiencyScore(a.proficiencyLevel);
|
|
27
|
+
if (scoreDiff !== 0)
|
|
28
|
+
return scoreDiff;
|
|
29
|
+
return evidenceCount(b) - evidenceCount(a);
|
|
30
|
+
})
|
|
31
|
+
.slice(0, limit);
|
|
32
|
+
}
|
|
33
|
+
function flattenEvidence(entry) {
|
|
34
|
+
return [
|
|
35
|
+
...entry.evidence.examples.map((text) => ({
|
|
36
|
+
kind: "example",
|
|
37
|
+
text,
|
|
38
|
+
})),
|
|
39
|
+
...entry.evidence.decisionCriteria.map((text) => ({
|
|
40
|
+
kind: "decision",
|
|
41
|
+
text,
|
|
42
|
+
})),
|
|
43
|
+
...entry.evidence.antiPatterns.map((text) => ({
|
|
44
|
+
kind: "anti_pattern",
|
|
45
|
+
text,
|
|
46
|
+
})),
|
|
47
|
+
...entry.evidence.mentorAdvice.map((text) => ({
|
|
48
|
+
kind: "mentor",
|
|
49
|
+
text,
|
|
50
|
+
})),
|
|
51
|
+
].slice(0, 6);
|
|
52
|
+
}
|
|
53
|
+
function kindLabel(kind) {
|
|
54
|
+
switch (kind) {
|
|
55
|
+
case "example":
|
|
56
|
+
return "example";
|
|
57
|
+
case "decision":
|
|
58
|
+
return "decision";
|
|
59
|
+
case "anti_pattern":
|
|
60
|
+
return "anti-pattern";
|
|
61
|
+
case "mentor":
|
|
62
|
+
return "signal";
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
export function buildTracesJsonOutput(input) {
|
|
66
|
+
return {
|
|
67
|
+
project: input.projectLabel,
|
|
68
|
+
sessions: input.sessions,
|
|
69
|
+
prompts: input.prompts,
|
|
70
|
+
toolCalls: input.toolCalls,
|
|
71
|
+
competencies: topCompetencies(input.competencies).map((entry) => ({
|
|
72
|
+
name: entry.name,
|
|
73
|
+
category: entry.category,
|
|
74
|
+
proficiencyLevel: entry.proficiencyLevel,
|
|
75
|
+
description: entry.description,
|
|
76
|
+
evidence: flattenEvidence(entry),
|
|
77
|
+
})),
|
|
78
|
+
workflows: input.workflows.slice(0, 5),
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function printTraces(input) {
|
|
82
|
+
console.log("TRACES");
|
|
83
|
+
console.log("");
|
|
84
|
+
console.log(`${input.project} · ${input.sessions} sessions · ${input.prompts} prompts · ${input.toolCalls} tool calls`);
|
|
85
|
+
console.log("");
|
|
86
|
+
for (const entry of input.competencies) {
|
|
87
|
+
console.log(`${entry.name} · ${entry.proficiencyLevel}`);
|
|
88
|
+
console.log(` ${entry.description}`);
|
|
89
|
+
for (const item of entry.evidence) {
|
|
90
|
+
console.log(` - ${kindLabel(item.kind)}: ${item.text}`);
|
|
91
|
+
}
|
|
92
|
+
console.log("");
|
|
93
|
+
}
|
|
94
|
+
if (input.workflows.length > 0) {
|
|
95
|
+
console.log("Repeated patterns");
|
|
96
|
+
for (const workflow of input.workflows) {
|
|
97
|
+
console.log(` - ${workflow.description} · ${workflow.occurrences} occurrences across ${workflow.sessions} sessions`);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
export async function runTracesCommand(opts) {
|
|
102
|
+
const diagnostics = await resolveDiagnostics(opts);
|
|
103
|
+
if (opts.quiet)
|
|
104
|
+
return;
|
|
105
|
+
const output = buildTracesJsonOutput({
|
|
106
|
+
projectLabel: diagnostics.tracking?.current.projectLabel ??
|
|
107
|
+
defaultProjectLabel(diagnostics.resolvedPath),
|
|
108
|
+
sessions: diagnostics.result.sessionCount,
|
|
109
|
+
prompts: diagnostics.result.promptCount,
|
|
110
|
+
toolCalls: diagnostics.result.toolCallCount,
|
|
111
|
+
competencies: diagnostics.competencies,
|
|
112
|
+
workflows: diagnostics.result.workflows,
|
|
113
|
+
});
|
|
114
|
+
if (opts.json) {
|
|
115
|
+
console.log(JSON.stringify(output, null, 2));
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
printTraces(output);
|
|
119
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@temet/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "Temet CLI — discover the skills you already demonstrate in AI work",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"temet",
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"temet": "dist/index.js"
|
|
25
25
|
},
|
|
26
26
|
"files": [
|
|
27
|
-
"dist"
|
|
27
|
+
"dist",
|
|
28
|
+
"assets"
|
|
28
29
|
],
|
|
29
30
|
"scripts": {
|
|
30
31
|
"build": "tsc -p tsconfig.json",
|