archgen-skill 0.0.7 → 0.1.1

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.7",
2
+ "version": "0.1.1",
3
3
  "skillName": "archgen",
4
4
  "markers": {
5
5
  "start": "<!-- archgen:start (managed block - do not edit between markers) -->",
@@ -1,70 +1,54 @@
1
1
  # Code standards — contractual, verifier-enforced
2
2
 
3
- Workers and planners follow these. The verifier rejects tasks whose plan or
4
- output violates them. Every rule exists because its absence produced real
5
- production incidents somewhere.
3
+ Workers and planners must follow these rules. The verifier rejects plans or outputs that violate them.
6
4
 
7
5
  ## Typing (TypeScript projects)
8
6
 
9
- - NO ANY: `any` is BANNED — including implicit anys and `as any` casts. Enable `"strict": true` plus
10
- `noImplicitAny`, `strictNullChecks`, `noUncheckedIndexedAccess`.
11
- - No unhandled `undefined`/null: validate at boundaries (env parsing, API
12
- input) with a schema; inside the codebase use non-optional types + explicit
13
- result objects for fallible operations.
14
- - Prefer discriminated unions over boolean-flag parameters.
15
- - Generated Python/Rust/Go equivalents: type hints mandatory / no `unwrap()` on
16
- fallibles / handle errors explicitly — same discipline per language.
7
+ - **NO `any`:** Explicit `any`, implicit `any`, and `as any` casts are BANNED. Enforce `"strict": true`, `noImplicitAny`, `strictNullChecks`, and `noUncheckedIndexedAccess`.
8
+ - **No unhandled `undefined`/`null`:** Validate external boundaries (env vars, API payloads) with schemas; internally use non-optional types and explicit result unions for fallible operations.
9
+ - **Discriminated unions:** Prefer discriminated unions over boolean-flag parameters.
10
+ - **Other languages:** Mandatory type hints in Python; no `.unwrap()` on fallible types in Rust; explicit error handling in Go.
17
11
 
18
12
  ## File & module limits
19
13
 
20
- - HARD CEILING: files < 1000 LOC. Split well before — when a file gains a
21
- second responsibility, that IS the split signal.
22
- - One public purpose per module. If the docstring needs "and", split.
14
+ - **Hard ceiling:** Files MUST stay `< 1000 LOC`. Split immediately when a file acquires a second responsibility.
15
+ - **Single responsibility:** One public purpose per module. If its summary requires `"and"`, split it.
23
16
 
24
17
  ## Folder structure (planned in architecture.yaml BEFORE coding)
25
18
 
26
19
  ```
27
20
  src/
28
- features/<name>/ # feature-first: everything a feature owns
29
- api/ # inbound contracts (routes/handlers)
30
- internal/ # private implementation
31
- tests/ # colocated tests mirror structure
32
- shared/ # cross-feature ONLY; may not import features/
33
- config/ # typed env + constants
21
+ features/<name>/ # Feature-first: everything a feature owns
22
+ api/ # Inbound contracts (routes/handlers)
23
+ internal/ # Private implementation
24
+ tests/ # Colocated tests mirroring structure
25
+ shared/ # Cross-feature utilities ONLY; MUST NOT import features/
26
+ config/ # Typed env parsing + constants
34
27
  ```
35
28
 
36
- - Feature modules may import `shared/`; `shared/` imports NOTHING from features.
37
- - Tests live beside code (mirrored path), never a distant `/tests` desert.
29
+ - `features/*` may import `shared/`; `shared/` imports NOTHING from `features/`.
30
+ - Colocate tests beside the code they test—never in a disconnected root `/tests` directory.
38
31
 
39
32
  ## File naming
40
33
 
41
- Per-language conventions (professional, descriptive, consistent):
42
-
43
- | Language | Source files | Components/classes | Tests |
34
+ | Language | Source files | Components / Classes | Tests |
44
35
  |---|---|---|---|
45
- | TypeScript | `kebab-case.ts` | `PascalCase.tsx` components, `PascalCase` classes | `<subject>.test.ts` colocated |
46
- | Python | `snake_case.py` modules | `PascalCase` classes, `snake_case` functions | `test_<subject>.py` mirrored |
47
- | Rust | `snake_case.rs` modules | `PascalCase` types/traits | `#[cfg(test)] mod tests` inline or `tests/` |
48
- | Go | `snake_case.go` packages | `PascalCase` exported / `camelCase` internal | `<subject>_test.go` same dir |
36
+ | TypeScript | `kebab-case.ts` | `PascalCase.tsx` components, `PascalCase` classes | `<subject>.test.ts` (colocated) |
37
+ | Python | `snake_case.py` | `PascalCase` classes, `snake_case` functions | `test_<subject>.py` (mirrored) |
38
+ | Rust | `snake_case.rs` | `PascalCase` types/traits | `#[cfg(test)] mod tests` or `tests/` |
39
+ | Go | `snake_case.go` | `PascalCase` exported, `camelCase` internal | `<subject>_test.go` (same dir) |
49
40
 
50
- - Descriptive > clever: `rate-limiter.ts` not `rl.ts`; `parse-config.ts` not
51
- `utils2.ts`.
52
- - BANNED names: `utils.ts`, `misc.ts`, `helpers.ts`, `temp*`, `final*`,
53
- `copy*`, numbered duplicates (`auth2.ts`) — split by responsibility instead.
41
+ - **Descriptive over terse:** Use `rate-limiter.ts` (not `rl.ts`) and `parse-config.ts` (not `utils2.ts`).
42
+ - **BANNED names:** `utils.*`, `misc.*`, `helpers.*`, `temp*`, `final*`, `copy*`, or numbered duplicates (`auth2.ts`). Split by specific responsibility.
54
43
 
55
44
  ## Comments
56
45
 
57
- - WHY at decision points: tradeoffs taken, non-obvious constraints, links to
58
- decisions ("see ADR D3").
59
- - Public APIs get doc comments: purpose, params, failure modes.
60
- - NO noise: no `// increment i`, no commented-out code, no change-log comments
61
- (git remembers).
46
+ - **Document WHY:** Explain trade-offs, non-obvious constraints, and ADR references (`see ADR D3`) at decision points.
47
+ - **Public APIs:** Document purpose, parameters, and failure modes.
48
+ - **Zero noise:** No restating code (`// increment i`), no commented-out code, no inline changelogs.
62
49
 
63
50
  ## Enforcement hooks
64
51
 
65
- - tasks.yaml acceptance criteria MUST include at least one objectively
66
- checkable statement (command exit, observable output).
67
- - The verifier runs `archgen_plan{action:'verify'}` AND reads plans against this
68
- file; violations = ISSUES, not warnings.
69
- - Workers receive this reference in their prompt contract; "I didn't know" is
70
- not available to them.
52
+ - Every `tasks.yaml` acceptance list MUST include $\ge 1$ objectively verifiable check (exit code or observable output).
53
+ - The verifier runs `archgen_plan{action:'verify'}` and audits plans against this file; violations trigger `ISSUES`.
54
+ - Workers receive this file path in their prompt contract and are strictly bound by it.