peaks-cli 1.3.7 → 1.3.9
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/src/cli/commands/core-artifact-commands.js +119 -14
- package/dist/src/cli/commands/project-commands.js +58 -1
- package/dist/src/cli/commands/request-commands.js +124 -4
- package/dist/src/cli/commands/retrospective-commands.d.ts +3 -0
- package/dist/src/cli/commands/retrospective-commands.js +113 -0
- package/dist/src/cli/program.js +2 -0
- package/dist/src/services/artifacts/request-artifact-service.d.ts +16 -0
- package/dist/src/services/artifacts/request-artifact-service.js +18 -2
- package/dist/src/services/memory/project-memory-service.d.ts +19 -0
- package/dist/src/services/memory/project-memory-service.js +33 -0
- package/dist/src/services/retrospective/migrate-from-md.d.ts +37 -0
- package/dist/src/services/retrospective/migrate-from-md.js +528 -0
- package/dist/src/services/retrospective/retrospective-index.d.ts +37 -0
- package/dist/src/services/retrospective/retrospective-index.js +110 -0
- package/dist/src/services/retrospective/retrospective-show.d.ts +40 -0
- package/dist/src/services/retrospective/retrospective-show.js +109 -0
- package/dist/src/services/session/caller-binding-service.d.ts +70 -0
- package/dist/src/services/session/caller-binding-service.js +148 -0
- package/dist/src/services/session/caller-id-types.d.ts +77 -0
- package/dist/src/services/session/caller-id-types.js +46 -0
- package/dist/src/services/session/index.d.ts +4 -0
- package/dist/src/services/session/index.js +5 -0
- package/dist/src/services/session/platform-fallbacks.d.ts +31 -0
- package/dist/src/services/session/platform-fallbacks.js +35 -0
- package/dist/src/services/session/resolve-caller-id.d.ts +57 -0
- package/dist/src/services/session/resolve-caller-id.js +88 -0
- package/dist/src/services/skills/skill-presence-service.d.ts +11 -0
- package/dist/src/services/skills/skill-presence-service.js +59 -0
- package/dist/src/shared/format-md-compact.d.ts +32 -0
- package/dist/src/shared/format-md-compact.js +297 -0
- package/dist/src/shared/stale-policy.d.ts +67 -0
- package/dist/src/shared/stale-policy.js +85 -0
- package/dist/src/shared/version.d.ts +1 -1
- package/dist/src/shared/version.js +1 -1
- package/package.json +1 -1
- package/skills/peaks-qa/SKILL.md +86 -515
- package/skills/peaks-qa/references/artifact-per-request.md +7 -79
- package/skills/peaks-qa/references/browser-validation-contracts.md +51 -0
- package/skills/peaks-qa/references/codegraph-regression-focus.md +5 -0
- package/skills/peaks-qa/references/external-capability-guidance.md +9 -0
- package/skills/peaks-qa/references/qa-compact-handoff.md +3 -0
- package/skills/peaks-qa/references/qa-context-governance.md +24 -0
- package/skills/peaks-qa/references/qa-fanout-contract.md +8 -0
- package/skills/peaks-qa/references/qa-gstack-integration.md +7 -0
- package/skills/peaks-qa/references/qa-local-artifacts.md +3 -0
- package/skills/peaks-qa/references/qa-matt-pocock-integration.md +9 -0
- package/skills/peaks-qa/references/qa-refactor-role.md +3 -0
- package/skills/peaks-qa/references/qa-runbook.md +74 -0
- package/skills/peaks-qa/references/qa-skill-presence.md +22 -0
- package/skills/peaks-qa/references/qa-standards-preflight.md +8 -0
- package/skills/peaks-qa/references/qa-sub-agent-dispatch.md +38 -0
- package/skills/peaks-qa/references/qa-transition-gates.md +79 -0
- package/skills/peaks-qa/references/requirement-boundary-recheck.md +9 -0
- package/skills/peaks-qa/references/test-case-generation.md +27 -0
- package/skills/peaks-qa/references/test-report-output.md +14 -0
- package/skills/peaks-rd/SKILL.md +85 -732
- package/skills/peaks-rd/references/artifact-and-standards-output.md +9 -0
- package/skills/peaks-rd/references/artifact-per-request.md +20 -0
- package/skills/peaks-rd/references/browser-self-test-contracts.md +29 -0
- package/skills/peaks-rd/references/codegraph-project-analysis.md +5 -0
- package/skills/peaks-rd/references/compact-handoff.md +3 -0
- package/skills/peaks-rd/references/external-references.md +11 -0
- package/skills/peaks-rd/references/frontend-project-generation.md +11 -0
- package/skills/peaks-rd/references/library-version-awareness.md +30 -0
- package/skills/peaks-rd/references/mandatory-perf-baseline.md +40 -0
- package/skills/peaks-rd/references/mandatory-tech-doc.md +18 -0
- package/skills/peaks-rd/references/matt-pocock-integration.md +11 -0
- package/skills/peaks-rd/references/mock-data-placement.md +40 -0
- package/skills/peaks-rd/references/parallel-review-fanout.md +81 -0
- package/skills/peaks-rd/references/rd-context-governance.md +36 -0
- package/skills/peaks-rd/references/rd-gstack-integration.md +16 -0
- package/skills/peaks-rd/references/rd-runbook.md +125 -0
- package/skills/peaks-rd/references/rd-standards-preflight.md +8 -0
- package/skills/peaks-rd/references/rd-sub-agent-dispatch.md +39 -0
- package/skills/peaks-rd/references/rd-transition-gates.md +148 -0
- package/skills/peaks-rd/references/skill-presence-and-title.md +22 -0
- package/skills/peaks-solo/SKILL.md +87 -786
- package/skills/peaks-solo/references/anchoring-and-session-info.md +25 -0
- package/skills/peaks-solo/references/boundaries.md +21 -0
- package/skills/peaks-solo/references/codegraph-orchestration.md +5 -0
- package/skills/peaks-solo/references/completion-handoff.md +16 -0
- package/skills/peaks-solo/references/context-governance.md +51 -0
- package/skills/peaks-solo/references/external-references.md +17 -0
- package/skills/peaks-solo/references/frontend-only-mode.md +87 -0
- package/skills/peaks-solo/references/gstack-integration.md +7 -0
- package/skills/peaks-solo/references/local-artifact-workspace.md +79 -0
- package/skills/peaks-solo/references/micro-cycle.md +68 -0
- package/skills/peaks-solo/references/mode-selection.md +21 -0
- package/skills/peaks-solo/references/openspec-workflow.md +43 -0
- package/skills/peaks-solo/references/project-memory-loading.md +17 -0
- package/skills/peaks-solo/references/project-scan-checklist.md +136 -0
- package/skills/peaks-solo/references/quality-gate-cheatsheet.md +13 -0
- package/skills/peaks-solo/references/resume-detection.md +63 -0
- package/skills/peaks-solo/references/runbook.md +1 -1
- package/skills/peaks-solo/references/skill-presence-and-title.md +31 -0
- package/skills/peaks-solo/references/standards-preflight.md +23 -0
- package/skills/peaks-solo/references/sub-agent-dispatch.md +46 -0
- package/skills/peaks-solo/references/swarm-dispatch-contract.md +56 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* stale-policy — pure helper for stale detection and filtering on memory
|
|
3
|
+
* and (future) retrospective entries.
|
|
4
|
+
*
|
|
5
|
+
* Slice 023 (R3) applies this to memory only (`peaks project memories:show`
|
|
6
|
+
* and the underlying `readMemoryIndex` load path). The retrospective index
|
|
7
|
+
* loader shares the same shape (`updatedAt: string`) and will be wired to
|
|
8
|
+
* the same helper in a future slice.
|
|
9
|
+
*
|
|
10
|
+
* Behavior:
|
|
11
|
+
* - `isStale(updatedAt)` returns true when (now - updatedAt) >
|
|
12
|
+
* thresholdDays * 86_400_000. Strict greater-than: a 30-day-old
|
|
13
|
+
* entry is NOT stale.
|
|
14
|
+
* - `applyStalePolicy(entries)` adds `stale: boolean` and
|
|
15
|
+
* `ageDays: number` to every entry (computed at CLI load time, never
|
|
16
|
+
* persisted to source `.md` files) and filters out entries where
|
|
17
|
+
* `stale === true` unless `includeStale: true` is passed.
|
|
18
|
+
* - Missing `updatedAt` is treated as fresh (`stale: false`,
|
|
19
|
+
* `ageDays: 0`); we never throw, so older index.json entries that
|
|
20
|
+
* lack the field stay loadable.
|
|
21
|
+
*/
|
|
22
|
+
export const DAY_MS = 86_400_000;
|
|
23
|
+
export const DEFAULT_STALE_DAYS = 30;
|
|
24
|
+
/**
|
|
25
|
+
* Returns true when the entry is older than `thresholdDays`. Strict
|
|
26
|
+
* greater-than: an entry exactly at the threshold is NOT stale.
|
|
27
|
+
*
|
|
28
|
+
* A missing or unparseable `updatedAt` is treated as fresh (false). This
|
|
29
|
+
* is the "defensive — older index.json entries may lack the field" rule
|
|
30
|
+
* from PRD R4.
|
|
31
|
+
*/
|
|
32
|
+
export function isStale(updatedAt, options = {}) {
|
|
33
|
+
const parsed = parseUpdatedAt(updatedAt);
|
|
34
|
+
if (parsed === null)
|
|
35
|
+
return false;
|
|
36
|
+
const now = options.now ?? Date.now();
|
|
37
|
+
const thresholdDays = options.thresholdDays ?? DEFAULT_STALE_DAYS;
|
|
38
|
+
return now - parsed > thresholdDays * DAY_MS;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Age in days between `updatedAt` and `now` (default Date.now()).
|
|
42
|
+
* Returns 0 for a missing / unparseable `updatedAt`.
|
|
43
|
+
*/
|
|
44
|
+
export function ageInDays(updatedAt, now = Date.now()) {
|
|
45
|
+
const parsed = parseUpdatedAt(updatedAt);
|
|
46
|
+
if (parsed === null)
|
|
47
|
+
return 0;
|
|
48
|
+
return Math.max(0, Math.floor((now - parsed) / DAY_MS));
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Apply the stale policy to a list of entries. Each entry is augmented
|
|
52
|
+
* with `stale: boolean` and `ageDays: number` (immutably — a fresh
|
|
53
|
+
* object is returned per entry). Stale entries are dropped from
|
|
54
|
+
* `entries` unless `includeStale: true` is passed.
|
|
55
|
+
*/
|
|
56
|
+
export function applyStalePolicy(entries, options = {}) {
|
|
57
|
+
const now = options.now ?? Date.now();
|
|
58
|
+
const thresholdDays = options.thresholdDays ?? DEFAULT_STALE_DAYS;
|
|
59
|
+
const includeStale = options.includeStale ?? false;
|
|
60
|
+
const annotated = entries.map((entry) => {
|
|
61
|
+
const parsed = parseUpdatedAt(entry.updatedAt ?? null);
|
|
62
|
+
if (parsed === null) {
|
|
63
|
+
return { ...entry, stale: false, ageDays: 0 };
|
|
64
|
+
}
|
|
65
|
+
const stale = now - parsed > thresholdDays * DAY_MS;
|
|
66
|
+
const ageDays = Math.max(0, Math.floor((now - parsed) / DAY_MS));
|
|
67
|
+
return { ...entry, stale, ageDays };
|
|
68
|
+
});
|
|
69
|
+
const filtered = includeStale
|
|
70
|
+
? annotated
|
|
71
|
+
: annotated.filter((entry) => !entry.stale);
|
|
72
|
+
return {
|
|
73
|
+
entries: filtered,
|
|
74
|
+
droppedCount: annotated.length - filtered.length,
|
|
75
|
+
totalCount: annotated.length
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
function parseUpdatedAt(value) {
|
|
79
|
+
if (value === null || value === undefined || value === '')
|
|
80
|
+
return null;
|
|
81
|
+
const parsed = Date.parse(value);
|
|
82
|
+
if (Number.isNaN(parsed))
|
|
83
|
+
return null;
|
|
84
|
+
return parsed;
|
|
85
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const CLI_VERSION = "1.3.
|
|
1
|
+
export declare const CLI_VERSION = "1.3.9";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const CLI_VERSION = "1.3.
|
|
1
|
+
export const CLI_VERSION = "1.3.9";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "peaks-cli",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.9",
|
|
4
4
|
"description": "Cross-AI-IDE workflow-gating CLI + skill family (Claude Code shipped, Trae in progress; Codex / Cursor / Qoder / Tongyi Lingma on the roadmap).",
|
|
5
5
|
"author": "SquabbyZ",
|
|
6
6
|
"license": "MIT",
|