Commit 174d704
chore(swarm): Stage B/C/D — proactive health, humanization, polish
Dogfood swarm Stage B audit (proactive lens) found 71 future-proofing,
observability, and defensive-coding gaps. Stage C/D amend addresses them
across all 5 owned domains.
Scripts UX (marketing/scripts/):
- --root <path> + MCPT_MARKETING_ROOT env (alternate marketing trees)
- --help, --version on all 3 scripts
- --json, --quiet, --verbose modes on validate.mjs
- atomic lockfile write (tmp + crypto.randomUUID + fs.rename)
- schemaVersion preflight check (I15) on every loaded document
- --max-evidence-bytes <N> guard (default 100 MiB)
- path-traversal errors split into specific named branches
- loadJson moved into _paths.mjs (single I/O surface)
- explicit "Evidence manifest: N entries" line + warn when proven claims
exist with empty manifest
Schema future-proofing (marketing/schema/):
- aliases[] on every IDed entity (downstream rename resolution)
- field-level deprecation pattern (JSON Schema 2019-09 deprecated: true)
- lastModified + contentHash optional shape fields
- x-* extension carve-out (forward-compat experimentation)
- messageChannel + pressContactMethod oneOf [closed-enum, x-pattern]
- $defs/graduation block for aspirational claims
- examples[] on 9 high-leverage types
- defaults on 3 enums
- top-level schemaVersion: "1" + version-aware $id (/schema/v1/...)
- projectForbiddenPhrases + projectPreferredNouns hooks on index
- aliases ["claim.zip-meta-map.246-tests"] on test-suite (concrete proof)
- graduation blocks on all 6 zip-meta-map aspirational claims with
blockedBy + targetDate
Test coverage (test/):
- 46 → 73 tests (+27)
- I12-extended scope negative test (audience+campaign forbidden phrases)
- gen-lock --check missing-lockfile and malformed-lockfile branches
- validate error envelopes: malformed JSON, manifest shape, traversal
- _paths leading-dot rejection tests
- schema-vs-runtime consistency invariant suite (pins drift)
- test/helpers/temp-tree.mjs extracted (no more inline tree builders)
- test:gen-lock, test:validate, test:hash-file, test:_paths, test:version,
test:watch, test:coverage scripts
CI release flow (.github/):
- workflows/release.yml — tag-driven, validates tag↔package.json,
CHANGELOG section gate, gh release create --generate-notes
- workflows/scorecard.yml — OSSF Scorecard, SHA-pinned, weekly
- $GITHUB_STEP_SUMMARY lines per gate
- npm ci retry on transient failures
- Node 20 back in matrix (auto-discovery script form works on 20+)
- CodeQL dropped PR trigger (over-eager for 300 LoC)
- PULL_REQUEST_TEMPLATE.md (Summary / Falsifiability / Test plan)
- ISSUE_TEMPLATE/bug.yml + feature.yml + config.yml
- .gitignore expanded (*.log, *.tgz, competing lockfiles, build caches)
Doc completeness (root):
- CONTRIBUTING.md (150 lines) — quick start, dev loop, adding tools/claims,
schema changes, forbidden phrases, honesty principles
- RELEASING.md (134 lines) — pre-release checks, version-bump rules,
7-step release sequence, hot-fix process
- ARCHITECTURE.md (155 lines) — why MarketIR, core invariants, data flow,
components, design rationale, extension points
- ROADMAP.md (74 lines) — currently shipped, pre-launch deps, v1.1 plans
- README de-duped (audit-date → SCORECARD, test-count → Testing section,
data-scope → SECURITY)
- README adds Consumer contract, Versioning policy, Troubleshooting,
Scripts reference
5 owned domains, exclusive file ownership enforced.
Final state: validate ✓ lock:check ✓ 73/73 tests ✓ fmt:check ✓
Schema 19,350 → 35,129 bytes (more strict, more flexible at extension points).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent e8f2612 commit 174d704
28 files changed
Lines changed: 2718 additions & 185 deletions
File tree
- .github
- ISSUE_TEMPLATE
- workflows
- marketing
- data/tools
- manifests
- schema
- scripts
- test
- helpers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
59 | 63 | | |
60 | 64 | | |
61 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
62 | 69 | | |
63 | 70 | | |
64 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
65 | 75 | | |
66 | 76 | | |
67 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | 6 | | |
9 | 7 | | |
| 8 | + | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
13 | | - | |
| 12 | + | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| |||
0 commit comments