@specship/specship-darwin-arm64 0.29.0 → 0.30.0
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/bin/specship +1 -1
- package/lib/dist/.claude-plugin/plugin.json +15 -3
- package/lib/dist/activation/cheatsheet.d.ts +10 -7
- package/lib/dist/activation/cheatsheet.d.ts.map +1 -1
- package/lib/dist/activation/cheatsheet.js +21 -5
- package/lib/dist/activation/cheatsheet.js.map +1 -1
- package/lib/dist/activation/hook-output.d.ts +75 -2
- package/lib/dist/activation/hook-output.d.ts.map +1 -1
- package/lib/dist/activation/hook-output.js +114 -3
- package/lib/dist/activation/hook-output.js.map +1 -1
- package/lib/dist/activation/search-intercept.d.ts +20 -7
- package/lib/dist/activation/search-intercept.d.ts.map +1 -1
- package/lib/dist/activation/search-intercept.js +27 -5
- package/lib/dist/activation/search-intercept.js.map +1 -1
- package/lib/dist/activation/steering.d.ts +7 -4
- package/lib/dist/activation/steering.d.ts.map +1 -1
- package/lib/dist/activation/steering.js +10 -8
- package/lib/dist/activation/steering.js.map +1 -1
- package/lib/dist/agents/detect.d.ts +32 -0
- package/lib/dist/agents/detect.d.ts.map +1 -0
- package/lib/dist/agents/detect.js +54 -0
- package/lib/dist/agents/detect.js.map +1 -0
- package/lib/dist/agents/recent-project.d.ts +18 -0
- package/lib/dist/agents/recent-project.d.ts.map +1 -0
- package/lib/dist/agents/recent-project.js +92 -0
- package/lib/dist/agents/recent-project.js.map +1 -0
- package/lib/dist/analytics/canonical-tools.d.ts +23 -0
- package/lib/dist/analytics/canonical-tools.d.ts.map +1 -0
- package/lib/dist/analytics/canonical-tools.js +36 -0
- package/lib/dist/analytics/canonical-tools.js.map +1 -0
- package/lib/dist/analytics/canonical-tools.json +16 -0
- package/lib/dist/analytics/specship-impact.d.ts +3 -2
- package/lib/dist/analytics/specship-impact.d.ts.map +1 -1
- package/lib/dist/analytics/specship-impact.js +6 -4
- package/lib/dist/analytics/specship-impact.js.map +1 -1
- package/lib/dist/bin/specship.js +215 -170
- package/lib/dist/bin/specship.js.map +1 -1
- package/lib/dist/bin/uninstall.js +2 -2
- package/lib/dist/bin/uninstall.js.map +1 -1
- package/lib/dist/claudemd/audit.d.ts +12 -3
- package/lib/dist/claudemd/audit.d.ts.map +1 -1
- package/lib/dist/claudemd/audit.js +65 -22
- package/lib/dist/claudemd/audit.js.map +1 -1
- package/lib/dist/commands/specship/spec.md +9 -0
- package/lib/dist/db/migrations.d.ts +1 -1
- package/lib/dist/db/migrations.d.ts.map +1 -1
- package/lib/dist/db/migrations.js +18 -4
- package/lib/dist/db/migrations.js.map +1 -1
- package/lib/dist/db/schema.sql +8 -0
- package/lib/dist/db/spec-queries.d.ts +13 -1
- package/lib/dist/db/spec-queries.d.ts.map +1 -1
- package/lib/dist/db/spec-queries.js +21 -0
- package/lib/dist/db/spec-queries.js.map +1 -1
- package/lib/dist/enforce/changed-files.d.ts +7 -0
- package/lib/dist/enforce/changed-files.d.ts.map +1 -1
- package/lib/dist/enforce/changed-files.js +17 -0
- package/lib/dist/enforce/changed-files.js.map +1 -1
- package/lib/dist/enforce/enforce.d.ts +35 -1
- package/lib/dist/enforce/enforce.d.ts.map +1 -1
- package/lib/dist/enforce/enforce.js +66 -2
- package/lib/dist/enforce/enforce.js.map +1 -1
- package/lib/dist/extraction/index.d.ts +50 -4
- package/lib/dist/extraction/index.d.ts.map +1 -1
- package/lib/dist/extraction/index.js +105 -13
- package/lib/dist/extraction/index.js.map +1 -1
- package/lib/dist/extraction/parse-warnings.d.ts +16 -0
- package/lib/dist/extraction/parse-warnings.d.ts.map +1 -0
- package/lib/dist/extraction/parse-warnings.js +30 -0
- package/lib/dist/extraction/parse-warnings.js.map +1 -0
- package/lib/dist/extraction/tree-sitter.d.ts +27 -0
- package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.js +168 -1
- package/lib/dist/extraction/tree-sitter.js.map +1 -1
- package/lib/dist/health/smoke-check.js +1 -1
- package/lib/dist/health/smoke-check.js.map +1 -1
- package/lib/dist/hooks/hooks.json +16 -1
- package/lib/dist/index.d.ts +63 -3
- package/lib/dist/index.d.ts.map +1 -1
- package/lib/dist/index.js +235 -9
- package/lib/dist/index.js.map +1 -1
- package/lib/dist/installer/agent-record.d.ts +80 -0
- package/lib/dist/installer/agent-record.d.ts.map +1 -0
- package/lib/dist/installer/agent-record.js +351 -0
- package/lib/dist/installer/agent-record.js.map +1 -0
- package/lib/dist/installer/auto-migrate.d.ts +56 -0
- package/lib/dist/installer/auto-migrate.d.ts.map +1 -0
- package/lib/dist/installer/auto-migrate.js +328 -0
- package/lib/dist/installer/auto-migrate.js.map +1 -0
- package/lib/dist/installer/index.d.ts +37 -8
- package/lib/dist/installer/index.d.ts.map +1 -1
- package/lib/dist/installer/index.js +156 -46
- package/lib/dist/installer/index.js.map +1 -1
- package/lib/dist/installer/install-defaults.d.ts +4 -3
- package/lib/dist/installer/install-defaults.d.ts.map +1 -1
- package/lib/dist/installer/install-defaults.js +6 -5
- package/lib/dist/installer/install-defaults.js.map +1 -1
- package/lib/dist/installer/{config-writer.d.ts → targets/claude-config-writer.d.ts} +1 -1
- package/lib/dist/installer/targets/claude-config-writer.d.ts.map +1 -0
- package/lib/dist/installer/{config-writer.js → targets/claude-config-writer.js} +7 -6
- package/lib/dist/installer/targets/claude-config-writer.js.map +1 -0
- package/lib/dist/installer/targets/claude-projects.d.ts +9 -0
- package/lib/dist/installer/targets/claude-projects.d.ts.map +1 -0
- package/lib/dist/installer/targets/claude-projects.js +151 -0
- package/lib/dist/installer/targets/claude-projects.js.map +1 -0
- package/lib/dist/installer/targets/claude.d.ts +28 -1
- package/lib/dist/installer/targets/claude.d.ts.map +1 -1
- package/lib/dist/installer/targets/claude.js +39 -20
- package/lib/dist/installer/targets/claude.js.map +1 -1
- package/lib/dist/installer/targets/feature-parity.d.ts +28 -0
- package/lib/dist/installer/targets/feature-parity.d.ts.map +1 -0
- package/lib/dist/installer/targets/feature-parity.js +32 -0
- package/lib/dist/installer/targets/feature-parity.js.map +1 -0
- package/lib/dist/installer/{gemini-commands.d.ts → targets/gemini-commands.d.ts} +7 -3
- package/lib/dist/installer/targets/gemini-commands.d.ts.map +1 -0
- package/lib/dist/installer/{gemini-commands.js → targets/gemini-commands.js} +35 -14
- package/lib/dist/installer/targets/gemini-commands.js.map +1 -0
- package/lib/dist/installer/targets/gemini-projects.d.ts +11 -0
- package/lib/dist/installer/targets/gemini-projects.d.ts.map +1 -0
- package/lib/dist/installer/targets/gemini-projects.js +84 -0
- package/lib/dist/installer/targets/gemini-projects.js.map +1 -0
- package/lib/dist/installer/targets/gemini.d.ts +94 -8
- package/lib/dist/installer/targets/gemini.d.ts.map +1 -1
- package/lib/dist/installer/targets/gemini.js +392 -33
- package/lib/dist/installer/targets/gemini.js.map +1 -1
- package/lib/dist/installer/targets/registry.d.ts +8 -1
- package/lib/dist/installer/targets/registry.d.ts.map +1 -1
- package/lib/dist/installer/targets/registry.js +14 -5
- package/lib/dist/installer/targets/registry.js.map +1 -1
- package/lib/dist/installer/targets/shared.d.ts +44 -1
- package/lib/dist/installer/targets/shared.d.ts.map +1 -1
- package/lib/dist/installer/targets/shared.js +130 -3
- package/lib/dist/installer/targets/shared.js.map +1 -1
- package/lib/dist/installer/targets/types.d.ts +23 -1
- package/lib/dist/installer/targets/types.d.ts.map +1 -1
- package/lib/dist/jira/auto-publish.d.ts +22 -2
- package/lib/dist/jira/auto-publish.d.ts.map +1 -1
- package/lib/dist/jira/auto-publish.js +54 -9
- package/lib/dist/jira/auto-publish.js.map +1 -1
- package/lib/dist/jira/board-first.d.ts +15 -2
- package/lib/dist/jira/board-first.d.ts.map +1 -1
- package/lib/dist/jira/board-first.js +16 -0
- package/lib/dist/jira/board-first.js.map +1 -1
- package/lib/dist/jira/ci-publish.d.ts +72 -0
- package/lib/dist/jira/ci-publish.d.ts.map +1 -0
- package/lib/dist/jira/ci-publish.js +162 -0
- package/lib/dist/jira/ci-publish.js.map +1 -0
- package/lib/dist/jira/publish.d.ts +23 -0
- package/lib/dist/jira/publish.d.ts.map +1 -1
- package/lib/dist/jira/publish.js +0 -0
- package/lib/dist/jira/publish.js.map +1 -1
- package/lib/dist/jira/regression-pack.d.ts.map +1 -1
- package/lib/dist/jira/regression-pack.js +7 -1
- package/lib/dist/jira/regression-pack.js.map +1 -1
- package/lib/dist/jira/repo-config.d.ts.map +1 -1
- package/lib/dist/jira/repo-config.js +8 -0
- package/lib/dist/jira/repo-config.js.map +1 -1
- package/lib/dist/jira/types.d.ts +8 -0
- package/lib/dist/jira/types.d.ts.map +1 -1
- package/lib/dist/jira/types.js.map +1 -1
- package/lib/dist/knowledge/enforce.d.ts.map +1 -1
- package/lib/dist/knowledge/enforce.js +6 -1
- package/lib/dist/knowledge/enforce.js.map +1 -1
- package/lib/dist/mcp/jira-tools.d.ts +5 -0
- package/lib/dist/mcp/jira-tools.d.ts.map +1 -1
- package/lib/dist/mcp/jira-tools.js +59 -4
- package/lib/dist/mcp/jira-tools.js.map +1 -1
- package/lib/dist/mcp/proxy.d.ts.map +1 -1
- package/lib/dist/mcp/proxy.js +2 -1
- package/lib/dist/mcp/proxy.js.map +1 -1
- package/lib/dist/mcp/server-instructions.d.ts +16 -10
- package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
- package/lib/dist/mcp/server-instructions.js +69 -20
- package/lib/dist/mcp/server-instructions.js.map +1 -1
- package/lib/dist/mcp/session.d.ts +11 -0
- package/lib/dist/mcp/session.d.ts.map +1 -1
- package/lib/dist/mcp/session.js +43 -1
- package/lib/dist/mcp/session.js.map +1 -1
- package/lib/dist/mcp/tools.d.ts.map +1 -1
- package/lib/dist/mcp/tools.js +8 -0
- package/lib/dist/mcp/tools.js.map +1 -1
- package/lib/dist/reflect/apply.d.ts +2 -2
- package/lib/dist/reflect/apply.d.ts.map +1 -1
- package/lib/dist/reflect/apply.js +6 -5
- package/lib/dist/reflect/apply.js.map +1 -1
- package/lib/dist/reflect/miner.d.ts.map +1 -1
- package/lib/dist/reflect/miner.js +28 -15
- package/lib/dist/reflect/miner.js.map +1 -1
- package/lib/dist/reflect/session-outcomes.d.ts.map +1 -1
- package/lib/dist/reflect/session-outcomes.js +8 -3
- package/lib/dist/reflect/session-outcomes.js.map +1 -1
- package/lib/dist/reflect/targets.d.ts.map +1 -1
- package/lib/dist/reflect/targets.js +25 -5
- package/lib/dist/reflect/targets.js.map +1 -1
- package/lib/dist/reflect/types.d.ts +7 -0
- package/lib/dist/reflect/types.d.ts.map +1 -1
- package/lib/dist/resolution/spec-link-resolver.d.ts +14 -2
- package/lib/dist/resolution/spec-link-resolver.d.ts.map +1 -1
- package/lib/dist/resolution/spec-link-resolver.js +13 -3
- package/lib/dist/resolution/spec-link-resolver.js.map +1 -1
- package/lib/dist/server/canonical-tools.js +50 -0
- package/lib/dist/server/cli.js +2 -2
- package/lib/dist/server/host-profiles.js +39 -0
- package/lib/dist/server/ingest/index.js +2 -1
- package/lib/dist/server/ingest/ingestor.js +195 -76
- package/lib/dist/server/ingest/project-paths.js +8 -2
- package/lib/dist/server/ingest/recorded-projects.js +43 -0
- package/lib/dist/server/ingest/specship-classify.js +7 -2
- package/lib/dist/server/ingest/transcripts/claude-jsonl.js +54 -0
- package/lib/dist/server/ingest/transcripts/claude.js +64 -0
- package/lib/dist/server/ingest/transcripts/gemini.js +469 -0
- package/lib/dist/server/ingest/transcripts/index.js +14 -0
- package/lib/dist/server/ingest/{parser.js → transcripts/shared.js} +3 -49
- package/lib/dist/server/ingest/transcripts/types.js +4 -0
- package/lib/dist/server/ingest/watcher.js +31 -30
- package/lib/dist/server/routes/claude.js +27 -10
- package/lib/dist/server/routes/graph.js +64 -3
- package/lib/dist/server/routes/mcp.js +57 -15
- package/lib/dist/server/routes/memory.js +54 -35
- package/lib/dist/server/routes/projects.js +78 -7
- package/lib/dist/server/routes/spec.js +125 -0
- package/lib/dist/server/server.js +8 -2
- package/lib/dist/skills/spec-author/SKILL.md +1 -1
- package/lib/dist/skills/spec-author/references/gap-questions.md +1 -1
- package/lib/dist/spec-lint/lint.d.ts +26 -1
- package/lib/dist/spec-lint/lint.d.ts.map +1 -1
- package/lib/dist/spec-lint/lint.js +96 -7
- package/lib/dist/spec-lint/lint.js.map +1 -1
- package/lib/dist/sync/worktree.d.ts +48 -0
- package/lib/dist/sync/worktree.d.ts.map +1 -1
- package/lib/dist/sync/worktree.js +109 -0
- package/lib/dist/sync/worktree.js.map +1 -1
- package/lib/dist/ui/assets/bricolage-latin-C23fTOVi.woff2 +0 -0
- package/lib/dist/ui/assets/bricolage-latin-ext-B82pxkPf.woff2 +0 -0
- package/lib/dist/ui/assets/index-54vorjyq.css +1 -0
- package/lib/dist/ui/assets/index-BZQonCVb.js +52 -0
- package/lib/dist/ui/assets/space-grotesk-latin-DPT1xrvW.woff2 +0 -0
- package/lib/dist/ui/assets/space-grotesk-latin-ext-wJGaI8U0.woff2 +0 -0
- package/lib/dist/ui/index.html +2 -2
- package/lib/dist/update/updater.d.ts +6 -0
- package/lib/dist/update/updater.d.ts.map +1 -1
- package/lib/dist/update/updater.js +13 -1
- package/lib/dist/update/updater.js.map +1 -1
- package/lib/dist/workflows/agents/claude.d.ts +9 -0
- package/lib/dist/workflows/agents/claude.d.ts.map +1 -1
- package/lib/dist/workflows/agents/claude.js +22 -3
- package/lib/dist/workflows/agents/claude.js.map +1 -1
- package/lib/dist/workflows/agents/gemini-version.d.ts +18 -0
- package/lib/dist/workflows/agents/gemini-version.d.ts.map +1 -0
- package/lib/dist/workflows/agents/gemini-version.js +81 -0
- package/lib/dist/workflows/agents/gemini-version.js.map +1 -0
- package/lib/dist/workflows/agents/gemini.d.ts +1 -1
- package/lib/dist/workflows/agents/gemini.d.ts.map +1 -1
- package/lib/dist/workflows/agents/gemini.js +12 -2
- package/lib/dist/workflows/agents/gemini.js.map +1 -1
- package/lib/dist/workflows/agents/index.d.ts +2 -0
- package/lib/dist/workflows/agents/index.d.ts.map +1 -1
- package/lib/dist/workflows/agents/index.js +5 -0
- package/lib/dist/workflows/agents/index.js.map +1 -1
- package/lib/dist/workflows/agents/types.d.ts +13 -0
- package/lib/dist/workflows/agents/types.d.ts.map +1 -1
- package/lib/dist/workflows/agents/types.js.map +1 -1
- package/lib/dist/workflows/condition-evaluator.d.ts +8 -0
- package/lib/dist/workflows/condition-evaluator.d.ts.map +1 -1
- package/lib/dist/workflows/condition-evaluator.js +7 -0
- package/lib/dist/workflows/condition-evaluator.js.map +1 -1
- package/lib/dist/workflows/defaults/claude-design-implement.yaml +11 -11
- package/lib/dist/workflows/defaults/spec-author.yaml +9 -9
- package/lib/dist/workflows/defaults/spec-fix.yaml +8 -8
- package/lib/dist/workflows/defaults/spec-implement.yaml +38 -23
- package/lib/dist/workflows/defaults/spec-relink.yaml +5 -5
- package/lib/dist/workflows/defaults/spec-verify.yaml +3 -3
- package/lib/dist/workflows/executor.d.ts +7 -0
- package/lib/dist/workflows/executor.d.ts.map +1 -1
- package/lib/dist/workflows/executor.js +22 -5
- package/lib/dist/workflows/executor.js.map +1 -1
- package/lib/node_modules/.package-lock.json +1 -1
- package/lib/package.json +3 -2
- package/package.json +1 -1
- package/lib/dist/installer/config-writer.d.ts.map +0 -1
- package/lib/dist/installer/config-writer.js.map +0 -1
- package/lib/dist/installer/gemini-commands.d.ts.map +0 -1
- package/lib/dist/installer/gemini-commands.js.map +0 -1
- package/lib/dist/ui/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/lib/dist/ui/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/lib/dist/ui/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/lib/dist/ui/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/lib/dist/ui/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/lib/dist/ui/assets/index-BzuUWUAE.js +0 -50
- package/lib/dist/ui/assets/index-ezwX2EfG.css +0 -1
package/lib/dist/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ import { EnforceConfig, EnforceReport, EnforceScope } from './enforce/enforce';
|
|
|
22
22
|
import { BehaviourSurface } from './behaviour/behaviour-surface';
|
|
23
23
|
import { FlowDiagramOptions, FlowDiagramResult } from './diagram/flow-diagram';
|
|
24
24
|
import { WatchOptions, PendingFile } from './sync';
|
|
25
|
+
import { IndexFreshness } from './sync/worktree';
|
|
25
26
|
export * from './types';
|
|
26
27
|
export { getDatabasePath, DatabaseConnection } from './db';
|
|
27
28
|
export { QueryBuilder } from './db/queries';
|
|
@@ -44,15 +45,16 @@ export { computeMaintainability, resolveThresholds, resolveExclude, DEFAULT_THRE
|
|
|
44
45
|
export { collectFlows, renderMermaidFlowchart, writeFlowDiagramIfChanged, shouldAutoRefreshDiagram, resolveDiagramConfig, DEFAULT_DIAGRAM_OPTIONS } from './diagram/flow-diagram';
|
|
45
46
|
export type { FlowDiagramOptions, FlowDiagramConfig, FlowDiagramResult, FlowGraph } from './diagram/flow-diagram';
|
|
46
47
|
export { evaluateFitness, loadFitnessRules, FITNESS_CONFIG_FILE } from './fitness/fitness';
|
|
47
|
-
export { evaluateEnforcement, loadEnforceConfig, ENFORCE_CONFIG_FILE, normalizePath } from './enforce/enforce';
|
|
48
|
-
export { changedFilesSince, InvalidRefError, workingTreeDiffText } from './enforce/changed-files';
|
|
48
|
+
export { evaluateEnforcement, loadEnforceConfig, ENFORCE_CONFIG_FILE, normalizePath, undeclaredLinkFindings, branchBrokenFindings } from './enforce/enforce';
|
|
49
|
+
export { changedFilesSince, InvalidRefError, workingTreeDiffText, existedAtRef } from './enforce/changed-files';
|
|
49
50
|
export { scanDisableComments, formatSuppressionFinding } from './enforce/suppressions';
|
|
50
51
|
export type { SuppressionFinding } from './enforce/suppressions';
|
|
52
|
+
export type { IndexFreshness, IndexStaleReason } from './sync/worktree';
|
|
51
53
|
export { parseMutationReport, loadMutationDeps, DEFAULT_MUTATION_THRESHOLD, DEFAULT_MUTATION_REPORT } from './enforce/mutation';
|
|
52
54
|
export type { MutationConfig, MutationDeps, MutationFileStats } from './enforce/mutation';
|
|
53
55
|
export { computeBehaviourSurface, renderBehaviourSurface, isUiNode, classifyCriterionShape, propertyFramework } from './behaviour/behaviour-surface';
|
|
54
56
|
export type { BehaviourSurface, BehaviourFlowElement, BehaviourSurfaceDeps } from './behaviour/behaviour-surface';
|
|
55
|
-
export type { EnforceConfig, GateConfig, EnforceReport, EnforceDeps, EnforceScope, CheckOutcome, CheckName, RequirementVerification, } from './enforce/enforce';
|
|
57
|
+
export type { EnforceConfig, GateConfig, EnforceReport, EnforceDeps, EnforceScope, CheckOutcome, CheckName, RequirementVerification, BrokenAtRefEntry, } from './enforce/enforce';
|
|
56
58
|
export type { FitnessRule, ForbiddenRule, LayersRule, IsolationRule, FitnessReport, FitnessViolation, FitnessConfigError, Selector, } from './fitness/fitness';
|
|
57
59
|
export type { MaintainabilityReport, MaintainabilityThresholds, CouplingFinding, OversizedFinding, GodFileFinding, CycleFinding, DeadCodeFinding, } from './graph/maintainability';
|
|
58
60
|
export { SpecShipError, FileError, ParseError, DatabaseError, SearchError, VectorError, ConfigError, Logger, setLogger, getLogger, silentLogger, defaultLogger, } from './errors';
|
|
@@ -185,6 +187,22 @@ export declare class SpecShip {
|
|
|
185
187
|
* gate evaluates the whole repository exactly as before.
|
|
186
188
|
*/
|
|
187
189
|
getEnforce(config?: EnforceConfig, scope?: EnforceScope): EnforceReport;
|
|
190
|
+
/**
|
|
191
|
+
* Load the grammars `getEnforce` needs to parse link-target files at a
|
|
192
|
+
* `--since` ref (REQ-MULTIDEV-002). `getEnforce` is synchronous; call this
|
|
193
|
+
* first. Without it a target whose grammar isn't loaded counts as not
|
|
194
|
+
* resolving at the ref, so it is never reported (silent beats wrong).
|
|
195
|
+
*/
|
|
196
|
+
prepareEnforce(scope?: EnforceScope): Promise<void>;
|
|
197
|
+
/**
|
|
198
|
+
* Each orphaned/broken link, marked with whether its target resolved at
|
|
199
|
+
* `ref` (REQ-MULTIDEV-002.A2/A3). Reads the file's blob from git and parses
|
|
200
|
+
* it in memory — no index of the ref is needed. The qualified-name match is
|
|
201
|
+
* the spec-link resolver's (every `.` ⇄ `::` separator variant), so a
|
|
202
|
+
* spec-declared `Class.method` finds an extracted `Class::method`. Each
|
|
203
|
+
* file is parsed once.
|
|
204
|
+
*/
|
|
205
|
+
private linksBrokenSinceRef;
|
|
188
206
|
/**
|
|
189
207
|
* The behaviour surface for a requirement (REQ-BEHAVIOUR-001): its linked code
|
|
190
208
|
* plus the 1-hop route / component / handler neighbourhood, grouped UI vs
|
|
@@ -292,6 +310,20 @@ export declare class SpecShip {
|
|
|
292
310
|
* Uses a mutex to prevent concurrent indexing operations.
|
|
293
311
|
*/
|
|
294
312
|
indexAll(options?: IndexOptions): Promise<IndexResult>;
|
|
313
|
+
/**
|
|
314
|
+
* Record the git branch, commit and uncommitted-tracked-state fingerprint
|
|
315
|
+
* this index was built against (REQ-MULTIDEV-004). Called only at the end of
|
|
316
|
+
* a full `indexAll()` / `sync()` — never from `indexFiles()` — so the record
|
|
317
|
+
* always describes a complete pass. Outside git it writes nothing.
|
|
318
|
+
* Best-effort: never fails the index.
|
|
319
|
+
*/
|
|
320
|
+
private recordIndexedRevision;
|
|
321
|
+
/**
|
|
322
|
+
* Compare the recorded index revision with the checkout's live HEAD and
|
|
323
|
+
* uncommitted tracked state (REQ-MULTIDEV-004). Read-only: never syncs.
|
|
324
|
+
* Null outside git or when no revision was recorded.
|
|
325
|
+
*/
|
|
326
|
+
getIndexFreshness(): IndexFreshness | null;
|
|
295
327
|
/**
|
|
296
328
|
* Refresh `.specship/statusline.json` so the `specship statusline` segment
|
|
297
329
|
* has current Tier-A data without ever opening the DB itself
|
|
@@ -327,6 +359,18 @@ export declare class SpecShip {
|
|
|
327
359
|
* drift rule over the surviving rows.
|
|
328
360
|
*/
|
|
329
361
|
private replaceSpecsForFile;
|
|
362
|
+
/**
|
|
363
|
+
* Remove `code-comment` links the last full pass did not re-derive
|
|
364
|
+
* (REQ-MULTIDEV-006): the `@implements` / `@verifies` marker, the test
|
|
365
|
+
* title naming the requirement, or the whole file is gone. A link the spec
|
|
366
|
+
* file still declares is kept and re-labelled as a declaration, with its
|
|
367
|
+
* state and evidence untouched (A4). Links in files that could not be read
|
|
368
|
+
* are left alone. Removed links are not drift, so nothing is reported.
|
|
369
|
+
*
|
|
370
|
+
* Must run only after BOTH code-derived passes over every indexed file —
|
|
371
|
+
* a partial pass would take the links of the files it skipped.
|
|
372
|
+
*/
|
|
373
|
+
private reconcileCodeDerivedLinks;
|
|
330
374
|
/**
|
|
331
375
|
* Internal spec indexing — does NOT take the indexMutex (caller already holds it)
|
|
332
376
|
* and does NOT take the fileLock. Used by indexAll and sync, which manage locks
|
|
@@ -363,12 +407,28 @@ export declare class SpecShip {
|
|
|
363
407
|
indexSpecs(roots?: string[]): Promise<{
|
|
364
408
|
filesProcessed: number;
|
|
365
409
|
filesSkipped: number;
|
|
410
|
+
/** Spec files pruned because they no longer exist (REQ-MULTIDEV-003). */
|
|
411
|
+
filesRemoved: number;
|
|
366
412
|
specsExtracted: number;
|
|
367
413
|
linkCandidates: number;
|
|
368
414
|
resolverStats: SpecLinkResolverStats;
|
|
369
415
|
errors: number;
|
|
370
416
|
durationMs: number;
|
|
371
417
|
}>;
|
|
418
|
+
/**
|
|
419
|
+
* Remove indexed spec files that no longer exist in the checkout — a
|
|
420
|
+
* deleted file, or one missing on the branch just checked out
|
|
421
|
+
* (REQ-MULTIDEV-003). `deleteSpecFile` cascades to the file's specs,
|
|
422
|
+
* acceptance criteria, links and virtual `spec` nodes, so the removed links
|
|
423
|
+
* never reach drift. No drift transitions are emitted.
|
|
424
|
+
*
|
|
425
|
+
* A row is pruned only when its path was not collected this pass AND is
|
|
426
|
+
* absent on disk — a file that merely failed to read keeps its rows. With
|
|
427
|
+
* explicit `roots`, only rows under those roots are considered.
|
|
428
|
+
*
|
|
429
|
+
* Returns the number of spec files removed.
|
|
430
|
+
*/
|
|
431
|
+
private pruneMissingSpecFiles;
|
|
372
432
|
/**
|
|
373
433
|
* Default spec roots: `<projectRoot>/specs/` if it exists. Future
|
|
374
434
|
* iterations can read from `.specship/config.json`.
|
package/lib/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,IAAI,EACJ,IAAI,EACJ,UAAU,EACV,gBAAgB,EAChB,QAAQ,EACR,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,OAAO,EACP,UAAU,EACV,SAAS,EACT,WAAW,EACX,mBAAmB,EACnB,0BAA0B,EAC3B,MAAM,SAAS,CAAC;AAWjB,OAAO,EAEL,aAAa,EACb,WAAW,EACX,UAAU,EAGX,MAAM,cAAc,CAAC;AAGtB,OAAO,EAGL,gBAAgB,EACjB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EAGtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAqB,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAwB,aAAa,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAuB,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAoB,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EASL,aAAa,EACb,WAAW,EACX,QAAQ,EACR,aAAa,EACb,aAAa,EACb,YAAY,EACZ,WAAW,EAEZ,MAAM,WAAW,CAAC;AACnB,OAAO,EAAwC,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC/E,YAAY,EAAE,MAAM,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAKlF,OAAO,EAIL,qBAAqB,EACrB,yBAAyB,EAC1B,MAAM,yBAAyB,C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AAE,GAAG,IAAI,EAAE;IAI5C;;;;;OAKG;IACH,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG;QAC9B,iBAAiB,EAAE,MAAM,CAAC;QAC1B,iBAAiB,EAAE,MAAM,CAAC;QAC1B,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,EAAE,MAAM,CAAC;QACpB,UAAU,EAAE,MAAM,CAAC;QACnB,KAAK,EAAE,MAAM,CAAC;KACf;IAQD;;;;;;;OAOG;IACG,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAIrD;;;;;;;;;OASG;IACG,mBAAmB,CACvB,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,0BAA0B,GACnC,OAAO,CAAC,QAAQ,CAAC;IAIpB;;;;;;;;;;;;OAYG;IACG,YAAY,CAChB,KAAK,EAAE,SAAS,EAChB,OAAO,CAAC,EAAE,mBAAmB,GAC5B,OAAO,CAAC,WAAW,GAAG,MAAM,CAAC;IAQhC;;OAEG;IACH,QAAQ,IAAI,IAAI;IAIhB;;OAEG;IACH,KAAK,IAAI,IAAI;IAIb;;;OAGG;IACH,OAAO,IAAI,IAAI;IAIf;;;;;OAKG;IACH,YAAY,IAAI,IAAI;CAIrB;AAGD,eAAe,QAAQ,CAAC"}
|
package/lib/dist/index.js
CHANGED
|
@@ -43,7 +43,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
43
43
|
};
|
|
44
44
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
45
|
exports.writeFlowDiagramIfChanged = exports.renderMermaidFlowchart = exports.collectFlows = exports.highPrecisionClean = exports.LOW_CONFIDENCE_CLASSES = exports.HIGH_PRECISION_CLASSES = exports.CONFIG_FILE_NAME = exports.DEFAULT_EXCLUDE = exports.DEFAULT_THRESHOLDS = exports.resolveExclude = exports.resolveThresholds = exports.computeMaintainability = exports.undoProposal = exports.applyProposal = exports.previewProposal = exports.ReflectStore = exports.reflectSweep = exports.reflectAnalyze = exports.scanTestTitleRefs = exports.isNonTestEvidence = exports.isRecognizedTestFile = exports.TestReportParseError = exports.caseMatchesLink = exports.parseVitestJsonReport = exports.ingestTestReport = exports.requireKindsExitCode = exports.criteriaMissingKind = exports.evidenceKindCoverage = exports.verdictFor = exports.formatCoverageLine = exports.computeSpecCoverage = exports.computeDomainGapSeed = exports.findBriefsForSpec = exports.summarizeBriefFunnel = exports.resolveBriefLink = exports.computeSpecFunnel = exports.loadAllGrammars = exports.loadGrammarsForLanguages = exports.initGrammars = exports.getSupportedLanguages = exports.isGrammarLoaded = exports.isLanguageSupported = exports.detectLanguage = exports.SPECSHIP_DIR = exports.findNearestSpecShipRoot = exports.isInitialized = exports.getSpecShipDir = exports.QueryBuilder = exports.DatabaseConnection = exports.getDatabasePath = void 0;
|
|
46
|
-
exports.SpecShip = exports.MCPServer = exports.LockUnavailableError = exports.FileWatcher = exports.MemoryMonitor = exports.throttle = exports.debounce = exports.processInBatches = exports.FileLock = exports.Mutex = exports.defaultLogger = exports.silentLogger = exports.getLogger = exports.setLogger = exports.ConfigError = exports.VectorError = exports.SearchError = exports.DatabaseError = exports.ParseError = exports.FileError = exports.SpecShipError = exports.propertyFramework = exports.classifyCriterionShape = exports.isUiNode = exports.renderBehaviourSurface = exports.computeBehaviourSurface = exports.DEFAULT_MUTATION_REPORT = exports.DEFAULT_MUTATION_THRESHOLD = exports.loadMutationDeps = exports.parseMutationReport = exports.formatSuppressionFinding = exports.scanDisableComments = exports.workingTreeDiffText = exports.InvalidRefError = exports.changedFilesSince = exports.normalizePath = exports.ENFORCE_CONFIG_FILE = exports.loadEnforceConfig = exports.evaluateEnforcement = exports.FITNESS_CONFIG_FILE = exports.loadFitnessRules = exports.evaluateFitness = exports.DEFAULT_DIAGRAM_OPTIONS = exports.resolveDiagramConfig = exports.shouldAutoRefreshDiagram = void 0;
|
|
46
|
+
exports.SpecShip = exports.MCPServer = exports.LockUnavailableError = exports.FileWatcher = exports.MemoryMonitor = exports.throttle = exports.debounce = exports.processInBatches = exports.FileLock = exports.Mutex = exports.defaultLogger = exports.silentLogger = exports.getLogger = exports.setLogger = exports.ConfigError = exports.VectorError = exports.SearchError = exports.DatabaseError = exports.ParseError = exports.FileError = exports.SpecShipError = exports.propertyFramework = exports.classifyCriterionShape = exports.isUiNode = exports.renderBehaviourSurface = exports.computeBehaviourSurface = exports.DEFAULT_MUTATION_REPORT = exports.DEFAULT_MUTATION_THRESHOLD = exports.loadMutationDeps = exports.parseMutationReport = exports.formatSuppressionFinding = exports.scanDisableComments = exports.existedAtRef = exports.workingTreeDiffText = exports.InvalidRefError = exports.changedFilesSince = exports.branchBrokenFindings = exports.undeclaredLinkFindings = exports.normalizePath = exports.ENFORCE_CONFIG_FILE = exports.loadEnforceConfig = exports.evaluateEnforcement = exports.FITNESS_CONFIG_FILE = exports.loadFitnessRules = exports.evaluateFitness = exports.DEFAULT_DIAGRAM_OPTIONS = exports.resolveDiagramConfig = exports.shouldAutoRefreshDiagram = void 0;
|
|
47
47
|
const path = __importStar(require("path"));
|
|
48
48
|
const db_1 = require("./db");
|
|
49
49
|
const queries_1 = require("./db/queries");
|
|
@@ -73,8 +73,11 @@ const changed_files_1 = require("./enforce/changed-files");
|
|
|
73
73
|
const behaviour_surface_1 = require("./behaviour/behaviour-surface");
|
|
74
74
|
const flow_diagram_1 = require("./diagram/flow-diagram");
|
|
75
75
|
const context_1 = require("./context");
|
|
76
|
+
const hook_output_1 = require("./activation/hook-output");
|
|
77
|
+
const detect_1 = require("./agents/detect");
|
|
76
78
|
const utils_1 = require("./utils");
|
|
77
79
|
const sync_1 = require("./sync");
|
|
80
|
+
const worktree_1 = require("./sync/worktree");
|
|
78
81
|
// Re-export types for consumers
|
|
79
82
|
__exportStar(require("./types"), exports);
|
|
80
83
|
// Storage building blocks for embedded/SDK consumers that drive the graph
|
|
@@ -160,11 +163,14 @@ Object.defineProperty(exports, "evaluateEnforcement", { enumerable: true, get: f
|
|
|
160
163
|
Object.defineProperty(exports, "loadEnforceConfig", { enumerable: true, get: function () { return enforce_2.loadEnforceConfig; } });
|
|
161
164
|
Object.defineProperty(exports, "ENFORCE_CONFIG_FILE", { enumerable: true, get: function () { return enforce_2.ENFORCE_CONFIG_FILE; } });
|
|
162
165
|
Object.defineProperty(exports, "normalizePath", { enumerable: true, get: function () { return enforce_2.normalizePath; } });
|
|
166
|
+
Object.defineProperty(exports, "undeclaredLinkFindings", { enumerable: true, get: function () { return enforce_2.undeclaredLinkFindings; } });
|
|
167
|
+
Object.defineProperty(exports, "branchBrokenFindings", { enumerable: true, get: function () { return enforce_2.branchBrokenFindings; } });
|
|
163
168
|
// Change-scoped gating (REQ-AUTHG-006) — `specship check --since <ref>`.
|
|
164
169
|
var changed_files_2 = require("./enforce/changed-files");
|
|
165
170
|
Object.defineProperty(exports, "changedFilesSince", { enumerable: true, get: function () { return changed_files_2.changedFilesSince; } });
|
|
166
171
|
Object.defineProperty(exports, "InvalidRefError", { enumerable: true, get: function () { return changed_files_2.InvalidRefError; } });
|
|
167
172
|
Object.defineProperty(exports, "workingTreeDiffText", { enumerable: true, get: function () { return changed_files_2.workingTreeDiffText; } });
|
|
173
|
+
Object.defineProperty(exports, "existedAtRef", { enumerable: true, get: function () { return changed_files_2.existedAtRef; } });
|
|
168
174
|
// Suppression-comment scan (REQ-QGATE-004).
|
|
169
175
|
var suppressions_2 = require("./enforce/suppressions");
|
|
170
176
|
Object.defineProperty(exports, "scanDisableComments", { enumerable: true, get: function () { return suppressions_2.scanDisableComments; } });
|
|
@@ -370,7 +376,67 @@ class SpecShip {
|
|
|
370
376
|
const mutation = cfg.mutation !== undefined || cfg.gate?.mutation === true
|
|
371
377
|
? (0, mutation_1.loadMutationDeps)(this.projectRoot, cfg.mutation)
|
|
372
378
|
: undefined;
|
|
373
|
-
|
|
379
|
+
// Merge checks (REQ-MULTIDEV-002): every link row feeds the
|
|
380
|
+
// undeclared-links check; a `--since` run also compares each currently
|
|
381
|
+
// orphaned/broken link against its file's blob at the ref.
|
|
382
|
+
const links = sq.getAllLinks();
|
|
383
|
+
const brokenAtRef = scope?.since ? this.linksBrokenSinceRef(scope.since) : undefined;
|
|
384
|
+
return (0, enforce_1.evaluateEnforcement)({
|
|
385
|
+
drift, fitness: this.getFitness(), maintainability: this.getMaintainability(), requirements, suppressions, mutation,
|
|
386
|
+
links, brokenAtRef,
|
|
387
|
+
}, cfg, scope);
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* Load the grammars `getEnforce` needs to parse link-target files at a
|
|
391
|
+
* `--since` ref (REQ-MULTIDEV-002). `getEnforce` is synchronous; call this
|
|
392
|
+
* first. Without it a target whose grammar isn't loaded counts as not
|
|
393
|
+
* resolving at the ref, so it is never reported (silent beats wrong).
|
|
394
|
+
*/
|
|
395
|
+
async prepareEnforce(scope) {
|
|
396
|
+
if (!scope?.since)
|
|
397
|
+
return;
|
|
398
|
+
const files = new Set(this.specQueries.getLinksByState(['orphaned', 'broken']).map((l) => l.targetFilePath));
|
|
399
|
+
if (files.size === 0)
|
|
400
|
+
return;
|
|
401
|
+
await (0, extraction_1.initGrammars)();
|
|
402
|
+
await (0, extraction_1.loadGrammarsForLanguages)([...files].map((f) => (0, extraction_1.detectLanguage)(f)));
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* Each orphaned/broken link, marked with whether its target resolved at
|
|
406
|
+
* `ref` (REQ-MULTIDEV-002.A2/A3). Reads the file's blob from git and parses
|
|
407
|
+
* it in memory — no index of the ref is needed. The qualified-name match is
|
|
408
|
+
* the spec-link resolver's (every `.` ⇄ `::` separator variant), so a
|
|
409
|
+
* spec-declared `Class.method` finds an extracted `Class::method`. Each
|
|
410
|
+
* file is parsed once.
|
|
411
|
+
*/
|
|
412
|
+
linksBrokenSinceRef(ref) {
|
|
413
|
+
const namesAtRef = new Map();
|
|
414
|
+
const namesIn = (file) => {
|
|
415
|
+
const cached = namesAtRef.get(file);
|
|
416
|
+
if (cached)
|
|
417
|
+
return cached;
|
|
418
|
+
const names = new Set();
|
|
419
|
+
const blob = (0, changed_files_1.existedAtRef)(this.projectRoot, ref, file);
|
|
420
|
+
if (blob !== null) {
|
|
421
|
+
try {
|
|
422
|
+
for (const n of (0, extraction_1.extractFromSource)(file, blob).nodes) {
|
|
423
|
+
// Exact qualified name only — the resolver's getNodesByQualifiedNameExact.
|
|
424
|
+
if (n.qualifiedName)
|
|
425
|
+
names.add(n.qualifiedName);
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
catch {
|
|
429
|
+
// unparseable at the ref → treated as unresolved
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
namesAtRef.set(file, names);
|
|
433
|
+
return names;
|
|
434
|
+
};
|
|
435
|
+
return this.specQueries.getLinksByState(['orphaned', 'broken']).map((link) => {
|
|
436
|
+
const names = namesIn(link.targetFilePath);
|
|
437
|
+
const resolvedAtRef = (0, spec_link_resolver_1.qualifiedNameVariants)(link.targetQualifiedName).some((v) => names.has(v));
|
|
438
|
+
return { link, resolvedAtRef, ref };
|
|
439
|
+
});
|
|
374
440
|
}
|
|
375
441
|
/**
|
|
376
442
|
* The behaviour surface for a requirement (REQ-BEHAVIOUR-001): its linked code
|
|
@@ -469,7 +535,14 @@ class SpecShip {
|
|
|
469
535
|
catch {
|
|
470
536
|
domainGapEntities = undefined;
|
|
471
537
|
}
|
|
472
|
-
|
|
538
|
+
// Proposals target the agent this process serves (REQ-AGENTSWITCH-003);
|
|
539
|
+
// an undetectable agent maps to the default host.
|
|
540
|
+
return {
|
|
541
|
+
projectRoot: this.projectRoot,
|
|
542
|
+
homeDir: os.homedir(),
|
|
543
|
+
domainGapEntities,
|
|
544
|
+
host: (0, hook_output_1.hostTraitsFor)((0, detect_1.agentFromEnv)()),
|
|
545
|
+
};
|
|
473
546
|
}
|
|
474
547
|
/**
|
|
475
548
|
* Estimated time-to-completion for a workflow run (WORKFLOW-ETA-DOC):
|
|
@@ -767,6 +840,8 @@ class SpecShip {
|
|
|
767
840
|
catch {
|
|
768
841
|
/* a diagram fault must never fail an index */
|
|
769
842
|
}
|
|
843
|
+
if (result.success)
|
|
844
|
+
this.recordIndexedRevision();
|
|
770
845
|
this.refreshStatuslineCache();
|
|
771
846
|
return result;
|
|
772
847
|
}
|
|
@@ -775,6 +850,50 @@ class SpecShip {
|
|
|
775
850
|
}
|
|
776
851
|
});
|
|
777
852
|
}
|
|
853
|
+
/**
|
|
854
|
+
* Record the git branch, commit and uncommitted-tracked-state fingerprint
|
|
855
|
+
* this index was built against (REQ-MULTIDEV-004). Called only at the end of
|
|
856
|
+
* a full `indexAll()` / `sync()` — never from `indexFiles()` — so the record
|
|
857
|
+
* always describes a complete pass. Outside git it writes nothing.
|
|
858
|
+
* Best-effort: never fails the index.
|
|
859
|
+
*/
|
|
860
|
+
recordIndexedRevision() {
|
|
861
|
+
try {
|
|
862
|
+
const head = (0, worktree_1.readGitHead)(this.projectRoot);
|
|
863
|
+
if (!head)
|
|
864
|
+
return;
|
|
865
|
+
this.queries.setMetadata('indexed_commit', head.commit);
|
|
866
|
+
this.queries.setMetadata('indexed_branch', head.branch ?? '');
|
|
867
|
+
this.queries.setMetadata('indexed_worktree_fingerprint', (0, worktree_1.uncommittedTrackedFingerprint)(this.projectRoot) ?? '');
|
|
868
|
+
}
|
|
869
|
+
catch {
|
|
870
|
+
/* best-effort */
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
/**
|
|
874
|
+
* Compare the recorded index revision with the checkout's live HEAD and
|
|
875
|
+
* uncommitted tracked state (REQ-MULTIDEV-004). Read-only: never syncs.
|
|
876
|
+
* Null outside git or when no revision was recorded.
|
|
877
|
+
*/
|
|
878
|
+
getIndexFreshness() {
|
|
879
|
+
try {
|
|
880
|
+
const indexedCommit = this.queries.getMetadata('indexed_commit');
|
|
881
|
+
if (!indexedCommit)
|
|
882
|
+
return null;
|
|
883
|
+
const head = (0, worktree_1.readGitHead)(this.projectRoot);
|
|
884
|
+
if (!head)
|
|
885
|
+
return null;
|
|
886
|
+
const indexedBranch = this.queries.getMetadata('indexed_branch') || null;
|
|
887
|
+
const recordedFp = this.queries.getMetadata('indexed_worktree_fingerprint');
|
|
888
|
+
const currentFp = (0, worktree_1.uncommittedTrackedFingerprint)(this.projectRoot);
|
|
889
|
+
// Unknown on either side → don't claim a working-tree change (silent beats wrong).
|
|
890
|
+
const worktreeChanged = !!recordedFp && !!currentFp && recordedFp !== currentFp;
|
|
891
|
+
return (0, worktree_1.computeIndexFreshness)({ branch: indexedBranch, commit: indexedCommit }, head, worktreeChanged);
|
|
892
|
+
}
|
|
893
|
+
catch {
|
|
894
|
+
return null;
|
|
895
|
+
}
|
|
896
|
+
}
|
|
778
897
|
/**
|
|
779
898
|
* Refresh `.specship/statusline.json` so the `specship statusline` segment
|
|
780
899
|
* has current Tier-A data without ever opening the DB itself
|
|
@@ -850,6 +969,57 @@ class SpecShip {
|
|
|
850
969
|
}
|
|
851
970
|
return result;
|
|
852
971
|
}
|
|
972
|
+
/**
|
|
973
|
+
* Remove `code-comment` links the last full pass did not re-derive
|
|
974
|
+
* (REQ-MULTIDEV-006): the `@implements` / `@verifies` marker, the test
|
|
975
|
+
* title naming the requirement, or the whole file is gone. A link the spec
|
|
976
|
+
* file still declares is kept and re-labelled as a declaration, with its
|
|
977
|
+
* state and evidence untouched (A4). Links in files that could not be read
|
|
978
|
+
* are left alone. Removed links are not drift, so nothing is reported.
|
|
979
|
+
*
|
|
980
|
+
* Must run only after BOTH code-derived passes over every indexed file —
|
|
981
|
+
* a partial pass would take the links of the files it skipped.
|
|
982
|
+
*/
|
|
983
|
+
// @implements REQ-MULTIDEV-006
|
|
984
|
+
reconcileCodeDerivedLinks(derived) {
|
|
985
|
+
const declaredBySource = new Map();
|
|
986
|
+
const declaredKeys = (sourcePath) => {
|
|
987
|
+
let keys = declaredBySource.get(sourcePath);
|
|
988
|
+
if (keys)
|
|
989
|
+
return keys;
|
|
990
|
+
keys = new Set();
|
|
991
|
+
try {
|
|
992
|
+
const abs = path.isAbsolute(sourcePath) ? sourcePath : path.join(this.projectRoot, sourcePath);
|
|
993
|
+
const result = new markdown_spec_extractor_1.MarkdownSpecExtractor(sourcePath, fs.readFileSync(abs, 'utf-8')).extract();
|
|
994
|
+
for (const c of result.linkCandidates) {
|
|
995
|
+
keys.add((0, spec_link_resolver_1.codeDerivedLinkKey)(c.specId, c.targetFilePath, (0, spec_link_resolver_1.canonicalQualifiedName)(c.targetQualifiedName), c.kind));
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
catch {
|
|
999
|
+
// An unreadable spec declares nothing we can see; its spec rows are
|
|
1000
|
+
// pruned separately (REQ-MULTIDEV-003).
|
|
1001
|
+
}
|
|
1002
|
+
declaredBySource.set(sourcePath, keys);
|
|
1003
|
+
return keys;
|
|
1004
|
+
};
|
|
1005
|
+
let removed = 0;
|
|
1006
|
+
const now = Date.now();
|
|
1007
|
+
for (const link of this.specQueries.getLinksByProvenance('code-comment')) {
|
|
1008
|
+
if (derived.unreadFiles.has(link.targetFilePath))
|
|
1009
|
+
continue;
|
|
1010
|
+
const key = (0, spec_link_resolver_1.codeDerivedLinkKey)(link.specId, link.targetFilePath, link.targetQualifiedName, link.kind);
|
|
1011
|
+
if (derived.keys.has(key))
|
|
1012
|
+
continue;
|
|
1013
|
+
const spec = this.specQueries.getSpecById(link.specId);
|
|
1014
|
+
if (spec && declaredKeys(spec.sourcePath).has(key)) {
|
|
1015
|
+
this.specQueries.setSpecLinkProvenance(link.id, 'spec-declaration', 0.7, now);
|
|
1016
|
+
continue;
|
|
1017
|
+
}
|
|
1018
|
+
this.specQueries.deleteSpecLink(link.id);
|
|
1019
|
+
removed++;
|
|
1020
|
+
}
|
|
1021
|
+
return removed;
|
|
1022
|
+
}
|
|
853
1023
|
/**
|
|
854
1024
|
* Internal spec indexing — does NOT take the indexMutex (caller already holds it)
|
|
855
1025
|
* and does NOT take the fileLock. Used by indexAll and sync, which manage locks
|
|
@@ -873,13 +1043,15 @@ class SpecShip {
|
|
|
873
1043
|
candidatesApplied: 0, commentLinksApplied: 0, reattached: 0, transitions,
|
|
874
1044
|
};
|
|
875
1045
|
let specFilesChanged = 0;
|
|
1046
|
+
// No early return when specs/ is missing: a checkout without the
|
|
1047
|
+
// directory must still prune the rows of files that are gone
|
|
1048
|
+
// (REQ-MULTIDEV-003).
|
|
876
1049
|
const specRoots = this.defaultSpecRoots();
|
|
877
|
-
if (specRoots.length === 0)
|
|
878
|
-
return { transitions, errors: totalErrors, warnings: totalWarnings };
|
|
879
1050
|
const specFiles = [];
|
|
880
1051
|
for (const root of specRoots) {
|
|
881
1052
|
this.collectSpecFiles(root, specFiles);
|
|
882
1053
|
}
|
|
1054
|
+
const present = new Set(specFiles.map((p) => path.relative(this.projectRoot, p)));
|
|
883
1055
|
for (const absPath of specFiles) {
|
|
884
1056
|
const rel = path.relative(this.projectRoot, absPath);
|
|
885
1057
|
let source;
|
|
@@ -915,10 +1087,17 @@ class SpecShip {
|
|
|
915
1087
|
this.specLinkResolver.markSpecDrifted(spec.id, spec.contentHash, specStats);
|
|
916
1088
|
}
|
|
917
1089
|
}
|
|
1090
|
+
// Prune AFTER the per-file loop: a spec id that moved from a.md to b.md
|
|
1091
|
+
// has already been re-homed (source_path = b.md), so deleting a.md's rows
|
|
1092
|
+
// by source_path cannot take it (REQ-MULTIDEV-003, REQ-VSTATE-001).
|
|
1093
|
+
specFilesChanged += this.pruneMissingSpecFiles(present);
|
|
918
1094
|
if (specFilesChanged > 0 || forceResolve) {
|
|
919
1095
|
const allFiles = this.queries.getAllFiles().map((f) => f.path);
|
|
920
|
-
|
|
921
|
-
this.specLinkResolver.
|
|
1096
|
+
const derived = { keys: new Set(), unreadFiles: new Set() };
|
|
1097
|
+
this.specLinkResolver.applyCodeCommentLinks(allFiles, undefined, derived);
|
|
1098
|
+
this.specLinkResolver.applyTestTitleLinks(allFiles, specStats, derived);
|
|
1099
|
+
// Drop code-derived links whose marker or file is gone (REQ-MULTIDEV-006).
|
|
1100
|
+
this.reconcileCodeDerivedLinks(derived);
|
|
922
1101
|
const resolveStats = this.specLinkResolver.resolveAll();
|
|
923
1102
|
transitions.push(...resolveStats.transitions);
|
|
924
1103
|
}
|
|
@@ -952,6 +1131,7 @@ class SpecShip {
|
|
|
952
1131
|
return {
|
|
953
1132
|
filesProcessed: 0,
|
|
954
1133
|
filesSkipped: 0,
|
|
1134
|
+
filesRemoved: 0,
|
|
955
1135
|
specsExtracted: 0,
|
|
956
1136
|
linkCandidates: 0,
|
|
957
1137
|
resolverStats: {
|
|
@@ -1033,15 +1213,22 @@ class SpecShip {
|
|
|
1033
1213
|
totalCandidates += result.linkCandidates.length;
|
|
1034
1214
|
totalErrors += result.errors.filter((e) => e.severity === 'error').length;
|
|
1035
1215
|
}
|
|
1216
|
+
// Drop specs whose spec file is gone (REQ-MULTIDEV-003). Explicit
|
|
1217
|
+
// roots scope the prune to those roots; default roots prune all.
|
|
1218
|
+
const present = new Set(specFiles.map((p) => path.relative(this.projectRoot, p)));
|
|
1219
|
+
const filesRemoved = this.pruneMissingSpecFiles(present, roots && roots.length > 0 ? roots : undefined);
|
|
1036
1220
|
// After spec changes settle, also scan code docstrings for
|
|
1037
1221
|
// `@implements REQ-X` markers. Bounded to the files that already
|
|
1038
1222
|
// have nodes in the graph (full-graph scan is acceptable here —
|
|
1039
1223
|
// node count is bounded and the scan is O(N) regex over docstrings).
|
|
1040
1224
|
const allFiles = this.queries.getAllFiles().map((f) => f.path);
|
|
1041
|
-
|
|
1225
|
+
const derived = { keys: new Set(), unreadFiles: new Set() };
|
|
1226
|
+
this.specLinkResolver.applyCodeCommentLinks(allFiles, stats, derived);
|
|
1042
1227
|
// Spec ids inside `it()` titles in test files → `tests` links
|
|
1043
1228
|
// (REQ-VSTATE-002).
|
|
1044
|
-
this.specLinkResolver.applyTestTitleLinks(allFiles, stats);
|
|
1229
|
+
this.specLinkResolver.applyTestTitleLinks(allFiles, stats, derived);
|
|
1230
|
+
// Drop code-derived links whose marker or file is gone (REQ-MULTIDEV-006).
|
|
1231
|
+
this.reconcileCodeDerivedLinks(derived);
|
|
1045
1232
|
// Re-resolve all links (post-extraction).
|
|
1046
1233
|
const resolveStats = this.specLinkResolver.resolveAll();
|
|
1047
1234
|
stats.scanned += resolveStats.scanned;
|
|
@@ -1053,6 +1240,7 @@ class SpecShip {
|
|
|
1053
1240
|
return {
|
|
1054
1241
|
filesProcessed: processed,
|
|
1055
1242
|
filesSkipped: skipped,
|
|
1243
|
+
filesRemoved,
|
|
1056
1244
|
specsExtracted: totalSpecs,
|
|
1057
1245
|
linkCandidates: totalCandidates,
|
|
1058
1246
|
resolverStats: stats,
|
|
@@ -1065,6 +1253,43 @@ class SpecShip {
|
|
|
1065
1253
|
}
|
|
1066
1254
|
});
|
|
1067
1255
|
}
|
|
1256
|
+
/**
|
|
1257
|
+
* Remove indexed spec files that no longer exist in the checkout — a
|
|
1258
|
+
* deleted file, or one missing on the branch just checked out
|
|
1259
|
+
* (REQ-MULTIDEV-003). `deleteSpecFile` cascades to the file's specs,
|
|
1260
|
+
* acceptance criteria, links and virtual `spec` nodes, so the removed links
|
|
1261
|
+
* never reach drift. No drift transitions are emitted.
|
|
1262
|
+
*
|
|
1263
|
+
* A row is pruned only when its path was not collected this pass AND is
|
|
1264
|
+
* absent on disk — a file that merely failed to read keeps its rows. With
|
|
1265
|
+
* explicit `roots`, only rows under those roots are considered.
|
|
1266
|
+
*
|
|
1267
|
+
* Returns the number of spec files removed.
|
|
1268
|
+
*/
|
|
1269
|
+
pruneMissingSpecFiles(present, roots) {
|
|
1270
|
+
const scopes = roots?.map((r) => {
|
|
1271
|
+
const rel = path.relative(this.projectRoot, path.resolve(this.projectRoot, r));
|
|
1272
|
+
return rel === '' ? '' : rel.split(path.sep).join('/');
|
|
1273
|
+
});
|
|
1274
|
+
const inScope = (p) => {
|
|
1275
|
+
if (!scopes)
|
|
1276
|
+
return true;
|
|
1277
|
+
const norm = p.split(path.sep).join('/');
|
|
1278
|
+
return scopes.some((s) => s === '' || norm === s || norm.startsWith(s + '/'));
|
|
1279
|
+
};
|
|
1280
|
+
let removed = 0;
|
|
1281
|
+
for (const row of this.specQueries.getAllSpecFiles()) {
|
|
1282
|
+
if (present.has(row.path))
|
|
1283
|
+
continue;
|
|
1284
|
+
if (!inScope(row.path))
|
|
1285
|
+
continue;
|
|
1286
|
+
if (fs.existsSync(path.join(this.projectRoot, row.path)))
|
|
1287
|
+
continue;
|
|
1288
|
+
this.specQueries.deleteSpecFile(row.path);
|
|
1289
|
+
removed++;
|
|
1290
|
+
}
|
|
1291
|
+
return removed;
|
|
1292
|
+
}
|
|
1068
1293
|
/**
|
|
1069
1294
|
* Default spec roots: `<projectRoot>/specs/` if it exists. Future
|
|
1070
1295
|
* iterations can read from `.specship/config.json`.
|
|
@@ -1251,6 +1476,7 @@ class SpecShip {
|
|
|
1251
1476
|
catch {
|
|
1252
1477
|
/* a diagram fault must never fail a sync */
|
|
1253
1478
|
}
|
|
1479
|
+
this.recordIndexedRevision();
|
|
1254
1480
|
this.refreshStatuslineCache();
|
|
1255
1481
|
return result;
|
|
1256
1482
|
}
|