@osovv/vv-opencode 1.3.6-rc.6 → 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.
- package/CHANGELOG.md +8 -0
- package/README.md +32 -2
- package/dist/cli.js +5 -3
- package/dist/cli.js.map +1 -1
- package/dist/commands/lint.d.ts +74 -0
- package/dist/commands/lint.js +269 -0
- package/dist/commands/lint.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/lib/opencode.js +3 -2
- package/dist/lib/opencode.js.map +1 -1
- package/dist/lib/plugin-toggle-config.d.ts +13 -1
- package/dist/lib/plugin-toggle-config.js +38 -4
- package/dist/lib/plugin-toggle-config.js.map +1 -1
- package/dist/lib/spec-lint-cache.d.ts +34 -0
- package/dist/lib/spec-lint-cache.js +140 -0
- package/dist/lib/spec-lint-cache.js.map +1 -0
- package/dist/lib/spec-lint.d.ts +57 -0
- package/dist/lib/spec-lint.js +963 -0
- package/dist/lib/spec-lint.js.map +1 -0
- package/dist/lib/vvoc-config.d.ts +25 -0
- package/dist/lib/vvoc-config.js +9 -0
- package/dist/lib/vvoc-config.js.map +1 -1
- package/dist/lib/vvoc-paths.d.ts +1 -0
- package/dist/lib/vvoc-paths.js +15 -5
- package/dist/lib/vvoc-paths.js.map +1 -1
- package/dist/plugins/spec-guard/index.d.ts +39 -0
- package/dist/plugins/spec-guard/index.js +251 -0
- package/dist/plugins/spec-guard/index.js.map +1 -0
- package/package.json +6 -2
- package/schemas/vvoc/v3.json +23 -6
- package/templates/skills/vv-execute/SKILL.md +8 -3
- package/templates/skills/vv-plan/SKILL.md +7 -7
- package/templates/skills/vv-plan/references/plan-template.xml +11 -6
- package/templates/skills/vv-spec/SKILL.md +5 -3
- package/templates/skills/vv-spec/references/design-context-template.xml +2 -2
- 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 {};
|