@kirill.konshin/lint 0.5.2 → 0.5.3
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/lintPrepare.d.ts +9 -5
- package/dist/lintPrepare.d.ts.map +1 -1
- package/dist/lintPrepare.js +25 -9
- package/package.json +5 -3
- package/rules/openspec.md +12 -0
- package/rules/testing.md +1 -0
- package/skills/spec-steward/SKILL.md +76 -0
- package/skills/spec-steward/references/apply.md +18 -0
- package/skills/spec-steward/references/audit.md +57 -0
- package/skills/spec-steward/references/contract.md +186 -0
- package/skills/spec-steward/references/criteria.md +59 -0
- package/skills/spec-steward/references/model.md +71 -0
- package/skills/spec-steward/references/review-format.md +61 -0
- package/skills/spec-steward/references/wiring.md +19 -0
- package/skills/spec-steward/scripts/lib/align.mjs +126 -0
- package/skills/spec-steward/scripts/lib/checks.mjs +584 -0
- package/skills/spec-steward/scripts/lib/citations.mjs +156 -0
- package/skills/spec-steward/scripts/lib/corpus.mjs +259 -0
- package/skills/spec-steward/scripts/lib/coverage.mjs +124 -0
- package/skills/spec-steward/scripts/lib/evidence.mjs +335 -0
- package/skills/spec-steward/scripts/lib/git.mjs +138 -0
- package/skills/spec-steward/scripts/lib/review.mjs +347 -0
- package/skills/spec-steward/scripts/lib/scan.mjs +364 -0
- package/skills/spec-steward/scripts/lib/util.mjs +161 -0
- package/skills/spec-steward/scripts/lib/wire.mjs +331 -0
- package/skills/spec-steward/scripts/steward.mjs +350 -0
- package/skills/spec-steward/workflows/audit.js +539 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# The specification model
|
|
2
|
+
|
|
3
|
+
Where a piece of guidance lives is decided by `rules/agent.md`, shipped by `@kirill.konshin/lint`; in a repository it is `.agents/rules/agent.md`. Read it there; this file covers only what is specific to the specifications themselves. What the gate checks mechanically — citations, binding, markers, size lines, the scenario ratchet — is [contract.md](contract.md).
|
|
4
|
+
|
|
5
|
+
## A rule in `openspec/specs` is a contract
|
|
6
|
+
|
|
7
|
+
A requirement states durable, observable behaviour of the system or of a component: inputs and validation, outputs, error semantics, lifecycle, state transitions, ordering, compatibility, persistence, concurrency, interactions between components. Internal package and API contracts qualify as much as user-facing behaviour — the line is **contract versus implementation or process**, never product versus engineering.
|
|
8
|
+
|
|
9
|
+
Normative force is carried by the RFC 2119 keywords — MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, MAY, OPTIONAL — written in capitals and read as RFC 2119 defines them; emphasis or capitalisation of any other word carries no force, and a keyword inside backticks is mentioned, not issued.
|
|
10
|
+
|
|
11
|
+
A specification describes only real, existing behaviour. What is knowingly absent or incomplete is recorded as a [Known gap](#advisory-known-gap-or-neither), never written as though implemented and never left as unmarked silence.
|
|
12
|
+
|
|
13
|
+
Apply the two litmus questions from `rules/agent.md`; then the decision test:
|
|
14
|
+
|
|
15
|
+
> **Name the observable failure this rule prevents, and the cheapest evidence that would catch it.**
|
|
16
|
+
|
|
17
|
+
If you cannot name a failure, the rule is not a REQUIRED contract.
|
|
18
|
+
|
|
19
|
+
## Two kinds of requirement
|
|
20
|
+
|
|
21
|
+
| Kind | Meaning | Evidence |
|
|
22
|
+
| --- | --- | --- |
|
|
23
|
+
| **REQUIRED** | An invariant whose violation is a real defect — behavioural, API, compatibility, security, data. | The cheapest rung that catches the failure (ladder below). The requirement names that failure and that rung; a test is one rung, not the only one. |
|
|
24
|
+
| **⚠️ ADVISORY** | Design guidance that matters but cannot reasonably be proven mechanically. | Review judgement. Never a gate, never a reason to write a test. |
|
|
25
|
+
|
|
26
|
+
A REQUIRED requirement stating an absolute names its exceptions, or has none; one with neither is listed for the owner's review.
|
|
27
|
+
|
|
28
|
+
## Advisory, Known gap, or neither
|
|
29
|
+
|
|
30
|
+
A requirement is REQUIRED unless a marker says otherwise. The exact spellings, and what each exempts, are in [contract.md](contract.md#markers).
|
|
31
|
+
|
|
32
|
+
- **⚠️ Advisory** — permanent guidance whose only evidence is review, such as a design direction. Its line says why review is its evidence, and its RFC 2119 keywords stay. The marker qualifies the whole requirement, so a requirement that mixes a contract with guidance is split, and the contract half stays REQUIRED. Marking an existing requirement Advisory weakens it, so the owner confirms it.
|
|
33
|
+
- **⚠️ Known gap (<tracker>)** — behaviour the requirement describes is knowingly absent or incomplete, or a REQUIRED rule lacks the evidence that would catch its failure. The line says what is missing (for missing evidence, the missing rung) and names what tracks it: a ticket, a tickets-page entry or an open change. Under the requirement, it names by title the scenarios it exempts; inside a scenario's block, it exempts that scenario. A gap is never restated as a scenario, and a scenario that a gap conditions states that condition.
|
|
34
|
+
- **Neither** — a test (an end-to-end test included), a type assertion, a lint entry or a deterministic check that CI runs proves the rule. It stays REQUIRED and unmarked.
|
|
35
|
+
|
|
36
|
+
## The evidence ladder — cheapest first
|
|
37
|
+
|
|
38
|
+
1. The type system or compiler
|
|
39
|
+
2. Deterministic static analysis — lint, dependency rules, schema validation, a simple script
|
|
40
|
+
3. A behavioural test of the contract
|
|
41
|
+
4. A focused integration or end-to-end test
|
|
42
|
+
5. Implementation evidence a reader can point at
|
|
43
|
+
6. Review judgement, for a genuinely semantic concern
|
|
44
|
+
|
|
45
|
+
Prefer the cheapest rung that catches the failure. Never spend an LLM audit on what rungs 1–2 can prove. A requirement that constrains a shape, an interface or a structure rather than runtime behaviour is proven at rung 1 or 2 — a compile-time type assertion, a schema assertion, a lint entry or a deterministic script — as fully as a runtime test would prove it. Rungs 1–4 bind a scenario through a citation ([contract.md](contract.md#binding)); rungs 5 and 6 cannot. A REQUIRED rule that only they evidence therefore takes a Known gap naming the missing rung once one of its scenarios is added or changed.
|
|
46
|
+
|
|
47
|
+
## What is not evidence
|
|
48
|
+
|
|
49
|
+
- **Comments, descriptions, prompt or documentation text, and citations.** They are not evidence that code complies, and their absence or wording is never a violation. A citation in code is an optional pointer for a reader; the only rule on it is that it resolves.
|
|
50
|
+
- **A test that reads source, spec or documentation text** and asserts on it proves the text is present, not that the system behaves. If the structure itself is the contract (a dependency boundary, a manifest field), a deterministic tool usually proves it better than a test.
|
|
51
|
+
- **Coverage.** A test written so that spec prose counts as "covered" is compliance theatre. A test exists because it catches a meaningful regression.
|
|
52
|
+
|
|
53
|
+
## Citations
|
|
54
|
+
|
|
55
|
+
A code citation is written only where a reader needs the pointer: on the declaration whose behaviour it explains, never on a file's header, whose scope is everything and therefore nothing. Write it `{@link openspec/specs/<capability>/spec.md#<anchor>}`, addressed from the repository root, inside the declaration's `/** */` block, or as a `//` comment where JSDoc cannot attach. The gate checks only that it resolves.
|
|
56
|
+
|
|
57
|
+
## Tests and scenarios
|
|
58
|
+
|
|
59
|
+
A spec-driven test names the scenario it proves (`{@link openspec/specs/<capability>/spec.md#scenario-<slug>}`), so the binding between contract and evidence is explicit. The citation goes in the comment directly above the `describe`/`it`/`test` call, or inside it. A citation in a test file's header binds nothing ([contract.md](contract.md#binding)). A requirement with a single scenario may be cited by its requirement anchor.
|
|
60
|
+
|
|
61
|
+
A requirement describes one coherent area of behaviour a reader can hold in their head; related cases group under it as scenarios, one case each. Several rules that govern the same area form one requirement, and its scenarios carry the individual cases. A scenario exercises one specific case, not a family of them. A requirement past a size line ([contract.md](contract.md#size-gate-with-obligation-counting)) is split into coherent areas, never into one requirement per sentence.
|
|
62
|
+
|
|
63
|
+
A scenario adds precision — one concrete case, preferably Given/When/Then — or it is not written; a scenario that restates its requirement is noise. A requirement may carry a single scenario. That is not a smell, and no case is padded in to avoid it; OpenSpec's strict validation needs at least one.
|
|
64
|
+
|
|
65
|
+
New and edited text uses EARS for requirement statements — When <trigger>, the <system> SHALL <response>; While <state>, the <system> SHALL …; If <condition>, then the <system> SHALL …; or The <system> SHALL … — and Given/When/Then for scenarios, with Given only where a precondition matters. The RFC 2119 keyword stays in capitals: OpenSpec's strict validation fails a requirement whose body has no SHALL or MUST. Untouched text is not rewritten for syntax alone.
|
|
66
|
+
|
|
67
|
+
## Changing a rule
|
|
68
|
+
|
|
69
|
+
- Never weaken, narrow, delete or reclassify a rule to make code pass. A demonstrated divergence is decided by the owner: the code is wrong, or the rule is — and a wrong rule is changed openly, through the repository's change process.
|
|
70
|
+
- A rule shared by several repositories is worded identically in each.
|
|
71
|
+
- A rule restated in two places is one rule too many: keep it in the owning place and reference it elsewhere.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Review file format
|
|
2
|
+
|
|
3
|
+
An audit's findings go to the owner as one Markdown review file. The owner answers each item, and the file stays as the audit trail across rounds. `steward review render` writes items in this format; `steward review lint` checks it; `steward review verify --root NAME=path` checks that every quote is found where its location says; `steward review status` counts the answers.
|
|
4
|
+
|
|
5
|
+
## Items
|
|
6
|
+
|
|
7
|
+
Each item has a scan line and five bullets. The bullet labels are fixed — the parser reads them.
|
|
8
|
+
|
|
9
|
+
```md
|
|
10
|
+
### R-007 · SPEC-ADVISORY · CXAD apps/mastra · 1, 6
|
|
11
|
+
|
|
12
|
+
- Rule: “The A2A endpoint and Agent Card are the ONLY surface a consumer may target”
|
|
13
|
+
- Location: `CXAD openspec/specs/apps/mastra/spec.md:20`
|
|
14
|
+
- What’s wrong: <the concrete problem>. Evidence: `apps/mastra/src/main.ts:59`.
|
|
15
|
+
- Proposed: Reclassify → OpenSpec ⚠️ ADVISORY — <exactly what to do>
|
|
16
|
+
- My response: ⬜
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
- **Scan line**: `### R-NNN · <owning layer> · <area> · <criteria numbers>`, plus `· ❓ intent` when the intent is ambiguous and the item proposes options.
|
|
20
|
+
- **Rule**: the original text, quoted verbatim, so the owner recognises the rule without opening the file. Use `…` to elide.
|
|
21
|
+
- **Location**: `` `NAME path:line` ``, where NAME is the repository and path is repository-relative.
|
|
22
|
+
- **Proposed**: starts with the target notation of [criteria.md](criteria.md#proposals-name-their-target).
|
|
23
|
+
|
|
24
|
+
## Theme items
|
|
25
|
+
|
|
26
|
+
When several rules share one problem and one solution, they become a single theme item. Its Rule bullet lists the members, each with its own quote and location.
|
|
27
|
+
|
|
28
|
+
```md
|
|
29
|
+
### R-012 · DELETE · Theme: Scenarios that restate their requirement · 19, 20
|
|
30
|
+
|
|
31
|
+
- Rule: “Scenarios that restate their requirement” — 3 rules:
|
|
32
|
+
- “WHEN the module is evaluated THEN no instance exists until the factory runs” — `CXAD openspec/specs/apps/mastra/spec.md:31`
|
|
33
|
+
- “…” — `APC openspec/specs/client/spec.md:88` — member-specific note
|
|
34
|
+
- Location: each member above
|
|
35
|
+
- What’s wrong: …
|
|
36
|
+
- Proposed: …
|
|
37
|
+
- My response: ⬜
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The owner gives one verdict for the whole theme, or comments under individual members by adding indented lines below a member. A rule appears in exactly one item. A second, distinct problem with the same rule becomes its own item, cross-referencing the first.
|
|
41
|
+
|
|
42
|
+
## Responses
|
|
43
|
+
|
|
44
|
+
| The owner writes | Meaning |
|
|
45
|
+
| ---------------- | ------------------------------------------------------------------------- |
|
|
46
|
+
| `⬜` | open — not yet answered |
|
|
47
|
+
| `✅` | accept the proposal |
|
|
48
|
+
| `✅ <comment>` | accept, with the clarification or instruction in the comment |
|
|
49
|
+
| `<comment>` | neither accepted nor rejected: interpret the comment and revisit the item |
|
|
50
|
+
| `❌` | reject: keep the rule as it is |
|
|
51
|
+
| `❌ <comment>` | reject, and follow the comment instead |
|
|
52
|
+
|
|
53
|
+
Silence is never approval. An item left at ⬜ is open.
|
|
54
|
+
|
|
55
|
+
## After a round
|
|
56
|
+
|
|
57
|
+
Processing a round ([apply.md](apply.md)) adds to the file and never deletes from it:
|
|
58
|
+
|
|
59
|
+
- **An applied item** gets ` * Applied: R<round> — <what changed, with paths>` after its response.
|
|
60
|
+
- **A comment-only item** is revisited. The previous answer moves into ` * Previous response (R<n>): …`, the proposal is revised in place, and the response resets to `⬜`.
|
|
61
|
+
- **New findings** go under `## Round <n> — new`, numbered after the last item, so resolved items stay recognisable as the trail.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Wiring the guard into a repository
|
|
2
|
+
|
|
3
|
+
A skill is discovered at the agent's discretion, so it cannot be the only thing that prevents a bad spec edit. The guard steers through points that reach the agent anyway. `steward wire --check` verifies each point, and every `steward` command warns in one line when one is missing.
|
|
4
|
+
|
|
5
|
+
| Point | What it does | Placed by |
|
|
6
|
+
| --- | --- | --- |
|
|
7
|
+
| Scoped rule `.agents/rules/openspec.md` (+ `.claude/rules`, `.codex/rules`) | Hard constraints, loaded when the agent touches `openspec/**`. | `lint-prepare` (`@kirill.konshin/lint`) |
|
|
8
|
+
| Skill `.agents/skills/spec-steward` (+ `.claude/skills`, `.codex/skills`) | The procedures, the model, the contract and the scripts. | `lint-prepare` |
|
|
9
|
+
| Edit hook in `.claude/settings.json` | Runs `steward hook` after every Edit/Write/MultiEdit and feeds findings back to the agent at once — only for what the edit changed, with no ratchet. | `steward wire --fix` |
|
|
10
|
+
| Routing line in `AGENTS.md` | Tells every agent, Codex included, where the guard lives, and that corpus-quality audits use this skill while code conformance is the repository's own audit. | You, beside the specification-driven convention; `wire --fix` prints the line. |
|
|
11
|
+
| OPSX operation guidance in `openspec/config.yaml` | One narrow line each for `apply` and `archive`: run the repository's spec gate (AGENTS.md → Checks); a `weakened` finding stops the flow. | `steward wire --fix`, when the file has OpenSpec's standard shape |
|
|
12
|
+
|
|
13
|
+
These five points keep to the placement rules:
|
|
14
|
+
|
|
15
|
+
- Nothing restates `rules/agent.md` or the repository's own rules.
|
|
16
|
+
- The OPSX `context` stays untouched: it already carries `AGENTS.md`.
|
|
17
|
+
- The hook is a no-op where the skill is not installed, so teammates without it are not blocked.
|
|
18
|
+
|
|
19
|
+
**The gate.** A repository's spec gate (`spec:gates` and its CI job, listed in `AGENTS.md` → Checks) runs `steward check --base auto`, passing the repository's `--binds` globs, and then whatever change gates the repository keeps. Error findings fail it; warnings and prompts never do ([contract](contract.md#kinds-and-severities)). Steward is the one spec engine, so it never runs as a second job beside an existing gate, and the repository keeps no copy of a check steward implements. Whether a repository puts the gate in CI is its owner's decision.
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
/**
|
|
3
|
+
* Rules shared by several repositories, compared: capabilities pair by path or by leaf name, requirements by anchor or
|
|
4
|
+
* by text. Reports identical, drifted and one-sided rules; choosing the wording stays with the owner.
|
|
5
|
+
*/
|
|
6
|
+
import { loadCorpus } from './corpus.mjs';
|
|
7
|
+
import { jaccard, normalize, words } from './util.mjs';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @typedef {import('./corpus.mjs').Corpus} Corpus
|
|
11
|
+
* @typedef {import('./corpus.mjs').Requirement} Requirement
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/** Body without heading, normalized. @param {Requirement} r */
|
|
15
|
+
const body = (r) => normalize(r.block.split('\n').slice(1).join('\n'));
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Word-level difference of two texts: the words only one side has, in order.
|
|
19
|
+
* @param {string} a
|
|
20
|
+
* @param {string} b
|
|
21
|
+
*/
|
|
22
|
+
export function wordDiff(a, b) {
|
|
23
|
+
const wa = normalize(a).split(' ');
|
|
24
|
+
const wb = normalize(b).split(' ');
|
|
25
|
+
const sa = new Set(wa);
|
|
26
|
+
const sb = new Set(wb);
|
|
27
|
+
return { onlyA: wa.filter((w) => !sb.has(w)).join(' '), onlyB: wb.filter((w) => !sa.has(w)).join(' ') };
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @param {Corpus} a
|
|
32
|
+
* @param {Corpus} b
|
|
33
|
+
*/
|
|
34
|
+
export function align(a, b) {
|
|
35
|
+
const pairs = [];
|
|
36
|
+
const leaf = (/** @type {string} */ c) => c.split('/').pop();
|
|
37
|
+
for (const ca of a.capabilities) {
|
|
38
|
+
const cb =
|
|
39
|
+
b.capabilities.find((x) => x.capability === ca.capability) ??
|
|
40
|
+
b.capabilities.find((x) => leaf(x.capability) === leaf(ca.capability));
|
|
41
|
+
if (!cb) continue;
|
|
42
|
+
const used = new Set();
|
|
43
|
+
const reqs = [];
|
|
44
|
+
for (const ra of ca.requirements) {
|
|
45
|
+
let rb = cb.requirements.find((x) => x.slug === ra.slug && !used.has(x.slug));
|
|
46
|
+
if (!rb) {
|
|
47
|
+
const best = cb.requirements
|
|
48
|
+
.filter((x) => !used.has(x.slug))
|
|
49
|
+
.map((x) => ({ x, s: jaccard(words(ra.block), words(x.block)) }))
|
|
50
|
+
.sort((p, q) => q.s - p.s)[0];
|
|
51
|
+
if (best && best.s >= 0.5) rb = best.x;
|
|
52
|
+
}
|
|
53
|
+
if (!rb) {
|
|
54
|
+
reqs.push({ kind: 'only-a', a: ra });
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
used.add(rb.slug);
|
|
58
|
+
const same = body(ra) === body(rb) && ra.name === rb.name;
|
|
59
|
+
reqs.push({
|
|
60
|
+
kind: same ? 'identical' : 'drift',
|
|
61
|
+
a: ra,
|
|
62
|
+
b: rb,
|
|
63
|
+
...(same ? {} : wordDiff(ra.block, rb.block)),
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
for (const rb of cb.requirements) if (!used.has(rb.slug)) reqs.push({ kind: 'only-b', b: rb });
|
|
67
|
+
pairs.push({ a: ca.capability, b: cb.capability, requirements: reqs });
|
|
68
|
+
}
|
|
69
|
+
return pairs;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @param {Record<string, any>} opts
|
|
74
|
+
* @param {{ name: string, path: string, specsDir: string }[]} roots
|
|
75
|
+
*/
|
|
76
|
+
export function alignCli(opts, roots) {
|
|
77
|
+
if (roots.length < 2) {
|
|
78
|
+
process.stderr.write('align needs two --root NAME=path\n');
|
|
79
|
+
return 2;
|
|
80
|
+
}
|
|
81
|
+
const [ra, rb] = roots;
|
|
82
|
+
const pairs = align(loadCorpus(ra.path, ra), loadCorpus(rb.path, rb));
|
|
83
|
+
if (opts.json) {
|
|
84
|
+
process.stdout.write(
|
|
85
|
+
JSON.stringify(
|
|
86
|
+
pairs.map((p) => ({
|
|
87
|
+
...p,
|
|
88
|
+
requirements: p.requirements.map((r) => ({
|
|
89
|
+
kind: r.kind,
|
|
90
|
+
a: r.a && `${r.a.file}:${r.a.line} ${r.a.name}`,
|
|
91
|
+
b: r.b && `${r.b.file}:${r.b.line} ${r.b.name}`,
|
|
92
|
+
onlyA: r.onlyA,
|
|
93
|
+
onlyB: r.onlyB,
|
|
94
|
+
})),
|
|
95
|
+
})),
|
|
96
|
+
null,
|
|
97
|
+
2,
|
|
98
|
+
) + '\n',
|
|
99
|
+
);
|
|
100
|
+
return 0;
|
|
101
|
+
}
|
|
102
|
+
let drift = 0;
|
|
103
|
+
for (const p of pairs) {
|
|
104
|
+
const count = (/** @type {string} */ k) => p.requirements.filter((r) => r.kind === k).length;
|
|
105
|
+
process.stdout.write(
|
|
106
|
+
`\n${ra.name}:${p.a} ↔ ${rb.name}:${p.b} — identical ${count('identical')}, drift ${count('drift')}, only ${ra.name} ${count('only-a')}, only ${rb.name} ${count('only-b')}\n`,
|
|
107
|
+
);
|
|
108
|
+
for (const r of p.requirements) {
|
|
109
|
+
if (r.kind === 'identical') continue;
|
|
110
|
+
if (r.kind === 'drift') {
|
|
111
|
+
drift++;
|
|
112
|
+
process.stdout.write(
|
|
113
|
+
` drift ${ra.name} ${r.a?.file}:${r.a?.line} ↔ ${rb.name} ${r.b?.file}:${r.b?.line} "${r.a?.name}"\n`,
|
|
114
|
+
);
|
|
115
|
+
if (r.onlyA) process.stdout.write(` only ${ra.name}: ${r.onlyA.slice(0, 300)}\n`);
|
|
116
|
+
if (r.onlyB) process.stdout.write(` only ${rb.name}: ${r.onlyB.slice(0, 300)}\n`);
|
|
117
|
+
} else {
|
|
118
|
+
const x = r.a ?? r.b;
|
|
119
|
+
process.stdout.write(
|
|
120
|
+
` ${r.kind === 'only-a' ? `only ${ra.name}` : `only ${rb.name}`} ${x?.file}:${x?.line} "${x?.name}"\n`,
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return drift ? 1 : 0;
|
|
126
|
+
}
|