human-to-code 0.1.4 → 0.1.5

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.
@@ -0,0 +1,43 @@
1
+ # Swift support plan
2
+
3
+ ## Status today
4
+ Level 2 only: not in `LANGUAGE_PROFILES`; `.swift` not scanned for markers.
5
+
6
+ ## Target profile
7
+ - `Ecosystem`: `swift`.
8
+ - Variants: `spm-package` (Package.swift) first. Xcode-project apps
9
+ (`.xcodeproj`/`.xcworkspace`) are explicitly **out of scope** initially —
10
+ pbxproj is too dynamic to analyze honestly; declare `UNSUPPORTED`.
11
+ - Versions: Swift ≥ 5.9 (from `// swift-tools-version:` header).
12
+
13
+ ## Detection signals (static only)
14
+ - `Package.swift` tools-version comment line (parsed textually — the
15
+ manifest itself is Swift code and must never be evaluated), `Package.resolved`,
16
+ `Sources/`, `Tests/` layout.
17
+
18
+ ## Version evidence
19
+ `Package.resolved` pins exact dependency versions; targets/products read
20
+ only from conservative literal parsing of `Package.swift`, refusing
21
+ computed manifests with `NEEDS_INPUT`.
22
+
23
+ ## Validation plan
24
+ - `["swift", "build"]`, `["swift", "test"]` in a Swift toolchain image
25
+ (Linux). Apple-platform-only packages (UIKit imports) are `INCONCLUSIVE`
26
+ on a Linux sandbox — say so rather than skipping silently.
27
+
28
+ ## Skill pack
29
+ Target/directory correspondence, XCTest conventions, access-control
30
+ (`public`/`internal`) discipline for library targets, `Package.resolved`
31
+ protected.
32
+
33
+ ## Risks & gates
34
+ Manifest edits (executable code), macros/plugins (arbitrary build-time
35
+ code), and `@objc`/C interop are elevated-risk.
36
+
37
+ ## Checklist
38
+ 0. Add `swift` to `LANGUAGE_PROFILES` (`.swift`) and scan `.swift` for `// @human`.
39
+ 1. `Ecosystem` union + `analysis/adapters/swift.ts`.
40
+ 2. `swift/spm-package` at `preview`; Xcode variants declared unsupported.
41
+ 3. Register adapter; Swift skill pack.
42
+ 4. Tests: computed manifests refused, platform-gated packages, resolved-file absence, stable fingerprints.
43
+ 5. Docs updates.
@@ -0,0 +1,47 @@
1
+ # Terraform / HCL support plan
2
+
3
+ ## Status today
4
+ Level 2 only: not in `LANGUAGE_PROFILES`; `.tf` not scanned for markers
5
+ (`# @human` comment form would parse; extension isn't scanned).
6
+
7
+ ## Target profile
8
+ - `Ecosystem`: `terraform`.
9
+ - Variants: `root-module` (has backend/provider config) and `child-module`
10
+ (reusable module without backend). Workspaces with multiple root modules
11
+ need explicit targeting → `NEEDS_INPUT`, mirroring the multi-app rule.
12
+ - Versions: `required_version` and `required_providers` blocks.
13
+
14
+ ## Detection signals (static only)
15
+ - `*.tf`/`*.tf.json`, `.terraform.lock.hcl`, `terraform.tfvars`,
16
+ `backend`/`provider` blocks (textual HCL parsing, conservative),
17
+ `modules/` layout.
18
+
19
+ ## Version evidence
20
+ `.terraform.lock.hcl` pins exact provider versions with hashes — first-class
21
+ grounding evidence. Module registry sources with versions count; git-ref
22
+ module sources without a pinned rev are unproven.
23
+
24
+ ## Validation plan
25
+ - `["terraform", "fmt", "-check"]` and `["terraform", "validate"]` with a
26
+ pre-initialized `.terraform` directory baked into the image/fixture
27
+ (validation has no network for `init`). `plan`/`apply` are out of scope:
28
+ plan needs credentials and state — never available in the sandbox.
29
+
30
+ ## Skill pack
31
+ Variable/output descriptions and types, no inline credentials (secret
32
+ scanner already blocks values; the pack forbids the pattern), tagging
33
+ conventions, `for_each` over `count` for stable addresses, state-affecting
34
+ rename awareness (`moved` blocks).
35
+
36
+ ## Risks & gates
37
+ Everything that changes resource addresses (renames without `moved`),
38
+ `destroy`-provoking changes, provider version bumps, and backend changes
39
+ are elevated-risk. The tool must be explicit that `validate`-clean ≠
40
+ apply-safe — plan/apply stay human-owned.
41
+
42
+ ## Checklist
43
+ 0. Scan `.tf` for `# @human` markers (direct-path quick win, `LANGUAGE_PROFILES` entry `hcl`/`.tf`).
44
+ 1. `Ecosystem` union + `analysis/adapters/terraform.ts`.
45
+ 2. `terraform/root-module`, `terraform/child-module` at `preview`.
46
+ 3. Skill pack; tests for lockfile evidence, multi-root refusal, moved-block gating.
47
+ 4. Docs updates (including the honest validate-vs-apply distinction in README).
@@ -0,0 +1,47 @@
1
+ # YAML config support plan
2
+
3
+ ## Status today
4
+ Level 2 only. YAML is not a programming language here — the meaningful
5
+ target is *schema-validated configuration editing* (CI workflows, K8s
6
+ manifests, app config), where correctness is checkable without execution.
7
+
8
+ ## Target profile
9
+ - `Ecosystem`: `yaml-config`.
10
+ - Variants by proven schema family: `github-actions`
11
+ (`.github/workflows/*.yml`), `kubernetes` (apiVersion/kind docs),
12
+ `generic` (only when a JSON Schema is discoverable via
13
+ `# yaml-language-server: $schema=` or operator config).
14
+ - Unschema'd YAML stays on the general fallback — there is nothing to
15
+ validate, so nothing to profile.
16
+
17
+ ## Detection signals (static only)
18
+ - Path conventions (`.github/workflows/`), `apiVersion`/`kind` keys,
19
+ explicit `$schema` pragmas, `kustomization.yaml`.
20
+
21
+ ## Version evidence
22
+ The schema is the "dependency": pin the schema source (bundled
23
+ GitHub-Actions/K8s schemas shipped as immutable package data, like compiler
24
+ skills) and record which schema+version validated the patch.
25
+
26
+ ## Validation plan
27
+ - Offline schema validation in-process or via a bundled validator; K8s:
28
+ `["kubeconform", "-strict", "<files>"]` with schemas preloaded in the
29
+ image. Never `kubectl apply`.
30
+
31
+ ## Skill pack
32
+ Anchors/aliases used sparingly, no duplicate keys, quoting rules for
33
+ booleans/versions (Norway problem), GitHub Actions pinning conventions
34
+ (action SHAs), K8s resource limits present.
35
+
36
+ ## Risks & gates
37
+ CI workflow edits are supply-chain-sensitive: adding `run:` steps, changing
38
+ action refs, or touching secrets contexts is elevated-risk and needs
39
+ explicit contract authorization. Secrets scanning already covers values;
40
+ the skill pack must also forbid *referencing* new secret names silently.
41
+
42
+ ## Checklist
43
+ 1. `Ecosystem` union + `analysis/adapters/yaml-config.ts`.
44
+ 2. Variants at `preview`; bundle schema data as frozen package assets.
45
+ 3. Skill pack; patch-policy tests for workflow-edit gating.
46
+ 4. Tests: schema discovery, multi-doc files, duplicate keys, unschema'd refusal.
47
+ 5. Docs updates.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "human-to-code",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Safely turn reviewed natural-language change contracts into validated code patches.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",