lat.md 0.1.2 → 0.1.4
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/index.js +6 -1
- package/package.json +1 -1
- package/templates/AGENTS.md +18 -1
package/dist/src/cli/index.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
// Suppress deprecation warnings from transitive dependencies unless --verbose
|
|
3
|
+
if (!process.argv.includes('--verbose')) {
|
|
4
|
+
process.noDeprecation = true;
|
|
5
|
+
}
|
|
2
6
|
import { readFileSync } from 'node:fs';
|
|
3
7
|
import { dirname, join } from 'node:path';
|
|
4
8
|
import { fileURLToPath } from 'node:url';
|
|
@@ -27,7 +31,8 @@ program
|
|
|
27
31
|
.description('Anchor source code to high-level concepts defined in markdown')
|
|
28
32
|
.version(version)
|
|
29
33
|
.option('--dir <path>', 'project root to look for lat.md in (default: cwd)')
|
|
30
|
-
.option('--no-color', 'disable color output')
|
|
34
|
+
.option('--no-color', 'disable color output')
|
|
35
|
+
.option('--verbose', 'show deprecation warnings and extra diagnostics');
|
|
31
36
|
program
|
|
32
37
|
.command('locate')
|
|
33
38
|
.description('Find sections by id')
|
package/package.json
CHANGED
package/templates/AGENTS.md
CHANGED
|
@@ -50,7 +50,24 @@ lat:
|
|
|
50
50
|
|
|
51
51
|
## User login
|
|
52
52
|
### Rejects expired tokens
|
|
53
|
+
Tokens past their expiry timestamp are rejected with 401, even if otherwise valid.
|
|
54
|
+
|
|
53
55
|
### Handles missing password
|
|
56
|
+
Login request without a password field returns 400 with a descriptive error.
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Every section MUST have a description — at least one sentence explaining what the test verifies and why. Empty sections with just a heading are not acceptable.
|
|
60
|
+
|
|
61
|
+
Each test in code should reference its spec with exactly one comment placed next to the relevant test — not at the top of the file:
|
|
62
|
+
|
|
63
|
+
```python
|
|
64
|
+
# @lat: [[tests#User login#Rejects expired tokens]]
|
|
65
|
+
def test_rejects_expired_tokens():
|
|
66
|
+
...
|
|
67
|
+
|
|
68
|
+
# @lat: [[tests#User login#Handles missing password]]
|
|
69
|
+
def test_handles_missing_password():
|
|
70
|
+
...
|
|
54
71
|
```
|
|
55
72
|
|
|
56
|
-
|
|
73
|
+
Do not duplicate refs. One `@lat:` comment per spec section, placed at the test that covers it. `lat check` will flag any spec section not covered by a code reference, and any code reference pointing to a nonexistent section.
|