@osovv/vv-opencode 1.3.6-rc.5 → 1.3.6-rc.7

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.
Files changed (40) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +33 -3
  3. package/dist/cli.js +5 -3
  4. package/dist/cli.js.map +1 -1
  5. package/dist/commands/lint.d.ts +74 -0
  6. package/dist/commands/lint.js +269 -0
  7. package/dist/commands/lint.js.map +1 -0
  8. package/dist/index.d.ts +1 -0
  9. package/dist/index.js +6 -5
  10. package/dist/index.js.map +1 -1
  11. package/dist/lib/opencode.js +3 -2
  12. package/dist/lib/opencode.js.map +1 -1
  13. package/dist/lib/plugin-toggle-config.d.ts +13 -1
  14. package/dist/lib/plugin-toggle-config.js +38 -4
  15. package/dist/lib/plugin-toggle-config.js.map +1 -1
  16. package/dist/lib/spec-lint-cache.d.ts +34 -0
  17. package/dist/lib/spec-lint-cache.js +140 -0
  18. package/dist/lib/spec-lint-cache.js.map +1 -0
  19. package/dist/lib/spec-lint.d.ts +57 -0
  20. package/dist/lib/spec-lint.js +963 -0
  21. package/dist/lib/spec-lint.js.map +1 -0
  22. package/dist/lib/vvoc-config.d.ts +25 -0
  23. package/dist/lib/vvoc-config.js +9 -0
  24. package/dist/lib/vvoc-config.js.map +1 -1
  25. package/dist/lib/vvoc-paths.d.ts +1 -0
  26. package/dist/lib/vvoc-paths.js +15 -5
  27. package/dist/lib/vvoc-paths.js.map +1 -1
  28. package/dist/plugins/hashline-edit/routing.js +9 -12
  29. package/dist/plugins/hashline-edit/routing.js.map +1 -1
  30. package/dist/plugins/spec-guard/index.d.ts +39 -0
  31. package/dist/plugins/spec-guard/index.js +251 -0
  32. package/dist/plugins/spec-guard/index.js.map +1 -0
  33. package/package.json +6 -2
  34. package/schemas/vvoc/v3.json +23 -6
  35. package/templates/skills/vv-execute/SKILL.md +8 -3
  36. package/templates/skills/vv-plan/SKILL.md +7 -7
  37. package/templates/skills/vv-plan/references/plan-template.xml +11 -6
  38. package/templates/skills/vv-spec/SKILL.md +5 -3
  39. package/templates/skills/vv-spec/references/design-context-template.xml +2 -2
  40. package/templates/skills/vv-spec/references/spec-template.xml +17 -9
@@ -0,0 +1,57 @@
1
+ export declare const LINT_VERSION = 1;
2
+ export type SpecLintArtifactKind = "spec" | "plan" | "design-context";
3
+ export type SpecLintSeverity = "error" | "warning";
4
+ export interface SpecLintFinding {
5
+ severity: SpecLintSeverity;
6
+ rule: string;
7
+ message: string;
8
+ file: string;
9
+ line: number;
10
+ }
11
+ export interface SpecLintVerdict {
12
+ version: number;
13
+ file: string;
14
+ kind: SpecLintArtifactKind | "unknown";
15
+ ok: boolean;
16
+ findings: SpecLintFinding[];
17
+ }
18
+ export interface SpecLintArtifactInput {
19
+ file: string;
20
+ content: string;
21
+ }
22
+ export interface SpecLintOptions {
23
+ /** Skip cross-file rules even when plan and spec inputs are both present. */
24
+ skipCrossFile?: boolean;
25
+ }
26
+ interface XmlNode {
27
+ name: string;
28
+ line: number;
29
+ attribs: Record<string, string>;
30
+ children: XmlNode[];
31
+ text: string;
32
+ cdataCount: number;
33
+ }
34
+ interface ParseResult {
35
+ root: XmlNode | null;
36
+ findings: SpecLintFinding[];
37
+ }
38
+ /**
39
+ * Strict XML parse over htmlparser2's xmlMode Tokenizer event stream.
40
+ * The low-level tokenizer is used directly (not Parser) because the Parser
41
+ * silently drops unmatched closing tags and implies closes at end-of-input;
42
+ * strict artifacts need both violation classes reported. Builds a positioned
43
+ * element tree and reports well-formedness violations: tokenizer errors,
44
+ * mismatched or unmatched closing tags, unclosed elements, stray top-level
45
+ * content, multiple roots, and content after the root element.
46
+ */
47
+ export declare function parseSpecXml(content: string, file: string): ParseResult;
48
+ /** True when a file label sits under an archive/ directory. */
49
+ export declare function isSpecArchivePath(file: string): boolean;
50
+ export declare function detectSpecArtifactKind(rootName: string): SpecLintArtifactKind | "unknown";
51
+ /**
52
+ * Lint a set of spec-package artifacts together. Plans resolve their linked
53
+ * spec among the provided inputs by path or basename for cross-file subset
54
+ * checks; a plan without its spec yields a warning, not an error.
55
+ */
56
+ export declare function lintSpecArtifacts(inputs: SpecLintArtifactInput[], options?: SpecLintOptions): SpecLintVerdict[];
57
+ export {};