@amistio/cli 0.1.35 → 0.1.36
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/dist/index.js +46 -0
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5790,6 +5790,25 @@ var canonicalProjectContextCitationSources = /* @__PURE__ */ new Map([
|
|
|
5790
5790
|
["runnerstate", "runnerState"],
|
|
5791
5791
|
["mixed", "mixed"]
|
|
5792
5792
|
]);
|
|
5793
|
+
var canonicalProjectContextFreshnessValues = /* @__PURE__ */ new Map([
|
|
5794
|
+
["fresh", "fresh"],
|
|
5795
|
+
["current", "fresh"],
|
|
5796
|
+
["uptodate", "fresh"],
|
|
5797
|
+
["accurate", "fresh"],
|
|
5798
|
+
["stale", "stale"],
|
|
5799
|
+
["outdated", "stale"],
|
|
5800
|
+
["outofdate", "stale"],
|
|
5801
|
+
["old", "stale"],
|
|
5802
|
+
["historical", "stale"],
|
|
5803
|
+
["partial", "partial"],
|
|
5804
|
+
["partiallyfresh", "partial"],
|
|
5805
|
+
["incomplete", "partial"],
|
|
5806
|
+
["mixed", "partial"],
|
|
5807
|
+
["missing", "missing"],
|
|
5808
|
+
["absent", "missing"],
|
|
5809
|
+
["notfound", "missing"],
|
|
5810
|
+
["notpresent", "missing"]
|
|
5811
|
+
]);
|
|
5793
5812
|
function createImplementationVerificationPrompt(workItem) {
|
|
5794
5813
|
return [
|
|
5795
5814
|
"# Amistio Implementation Verification",
|
|
@@ -6082,6 +6101,7 @@ function createProjectContextRefreshPrompt(workItem, context) {
|
|
|
6082
6101
|
"- Use only these exact singular slice kind values: overview, architecture, domain, data, api, frontend, backend, cli, workflow, operations, security, testing, unknown.",
|
|
6083
6102
|
"- Capture entities and relations that explain how the app is put together and where future work should look first.",
|
|
6084
6103
|
"- Prefer summaries, repository-relative paths, short citations, tags, and freshness status over raw source excerpts.",
|
|
6104
|
+
"- Use only these exact freshness values for coverage.status and slices[].freshness: fresh, stale, partial, missing.",
|
|
6085
6105
|
"- Use only these exact citation source values: projectBrain, localSource, runnerState, mixed. Approved project-brain records use projectBrain, not approvedBrain.",
|
|
6086
6106
|
"- Mark stale or missing areas explicitly instead of guessing.",
|
|
6087
6107
|
"- Keep coverage.missingAreas entries concise noun phrases under 160 characters.",
|
|
@@ -6828,6 +6848,11 @@ function normalizeProjectContextRefreshEnums(value) {
|
|
|
6828
6848
|
return value;
|
|
6829
6849
|
}
|
|
6830
6850
|
const normalized = { ...value };
|
|
6851
|
+
if (isObjectRecord(normalized.coverage)) {
|
|
6852
|
+
const normalizedCoverage = { ...normalized.coverage };
|
|
6853
|
+
normalizedCoverage.status = normalizeProjectContextFreshness(normalizedCoverage.status);
|
|
6854
|
+
normalized.coverage = normalizedCoverage;
|
|
6855
|
+
}
|
|
6831
6856
|
if (Array.isArray(normalized.slices)) {
|
|
6832
6857
|
normalized.slices = normalized.slices.map((slice) => {
|
|
6833
6858
|
if (!isObjectRecord(slice)) {
|
|
@@ -6835,6 +6860,7 @@ function normalizeProjectContextRefreshEnums(value) {
|
|
|
6835
6860
|
}
|
|
6836
6861
|
const normalizedSlice = { ...slice };
|
|
6837
6862
|
normalizedSlice.kind = normalizeProjectContextSliceKind(slice.kind);
|
|
6863
|
+
normalizedSlice.freshness = normalizeProjectContextFreshness(slice.freshness);
|
|
6838
6864
|
return normalizedSlice;
|
|
6839
6865
|
});
|
|
6840
6866
|
}
|
|
@@ -6945,6 +6971,26 @@ function normalizeProjectContextSliceKind(value) {
|
|
|
6945
6971
|
}
|
|
6946
6972
|
return "unknown";
|
|
6947
6973
|
}
|
|
6974
|
+
function normalizeProjectContextFreshness(value) {
|
|
6975
|
+
if (typeof value !== "string") {
|
|
6976
|
+
return value;
|
|
6977
|
+
}
|
|
6978
|
+
const trimmed = value.trim();
|
|
6979
|
+
if (!trimmed) {
|
|
6980
|
+
return value;
|
|
6981
|
+
}
|
|
6982
|
+
const direct = canonicalProjectContextFreshnessValues.get(normalizeEnumKey(trimmed));
|
|
6983
|
+
if (direct) {
|
|
6984
|
+
return direct;
|
|
6985
|
+
}
|
|
6986
|
+
for (const segment of trimmed.split(/[\/,|]+/)) {
|
|
6987
|
+
const segmentFreshness = canonicalProjectContextFreshnessValues.get(normalizeEnumKey(segment));
|
|
6988
|
+
if (segmentFreshness) {
|
|
6989
|
+
return segmentFreshness;
|
|
6990
|
+
}
|
|
6991
|
+
}
|
|
6992
|
+
return "partial";
|
|
6993
|
+
}
|
|
6948
6994
|
function normalizeProjectContextRefreshBoundedText(value) {
|
|
6949
6995
|
if (!isObjectRecord(value)) {
|
|
6950
6996
|
return value;
|