patina-cli 3.11.0

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.
Files changed (180) hide show
  1. package/.patina.default.yaml +211 -0
  2. package/CHANGELOG.md +265 -0
  3. package/LICENSE +21 -0
  4. package/README.md +319 -0
  5. package/README_JA.md +254 -0
  6. package/README_KR.md +253 -0
  7. package/README_ZH.md +254 -0
  8. package/SKILL-MAX.md +455 -0
  9. package/SKILL.md +730 -0
  10. package/assets/brand/patina-icon.svg +9 -0
  11. package/assets/brand/patina-logo.svg +17 -0
  12. package/assets/social/patina-before-after.svg +46 -0
  13. package/assets/social/patina-og.svg +31 -0
  14. package/bin/patina.js +9 -0
  15. package/core/scoring.md +657 -0
  16. package/core/standalone-prompt.md +364 -0
  17. package/core/stylometry.md +754 -0
  18. package/core/voice.md +163 -0
  19. package/docs/AUTHENTICATION.md +105 -0
  20. package/docs/AUTHENTICATION_KR.md +105 -0
  21. package/docs/BRANDING.md +37 -0
  22. package/docs/CLI.md +80 -0
  23. package/docs/COMPARISON.md +38 -0
  24. package/docs/COOKBOOK.md +173 -0
  25. package/docs/DEMO.md +40 -0
  26. package/docs/ETHICS.md +27 -0
  27. package/docs/EXAMPLES.md +130 -0
  28. package/docs/EXAMPLES_KR.md +130 -0
  29. package/docs/EXIT-CODES.md +25 -0
  30. package/docs/FAQ.md +67 -0
  31. package/docs/FAQ_KR.md +65 -0
  32. package/docs/FLAG-PARITY.md +53 -0
  33. package/docs/GLOSSARY.md +123 -0
  34. package/docs/PATTERNS-EN.md +718 -0
  35. package/docs/PATTERNS-JA.md +706 -0
  36. package/docs/PATTERNS-KO.md +707 -0
  37. package/docs/PATTERNS-ZH.md +706 -0
  38. package/docs/PATTERNS.md +22 -0
  39. package/docs/ROADMAP.md +315 -0
  40. package/docs/audits/2026-05-deep-research.md +290 -0
  41. package/docs/benchmarks/detector-comparison.json +442 -0
  42. package/docs/benchmarks/detector-comparison.md +65 -0
  43. package/docs/benchmarks/latest.json +988 -0
  44. package/docs/benchmarks/latest.md +112 -0
  45. package/docs/integrations/docker.md +19 -0
  46. package/docs/integrations/github-action.md +59 -0
  47. package/docs/integrations/pre-commit.md +77 -0
  48. package/docs/integrations/release.md +43 -0
  49. package/docs/internal/HARNESS.md +14 -0
  50. package/docs/internal/README.md +14 -0
  51. package/docs/internal/WARP.md +23 -0
  52. package/docs/research/2025-rebaseline-plan.md +89 -0
  53. package/docs/research/ai-human-metrics.md +380 -0
  54. package/docs/social/gstack-cardnews.html +236 -0
  55. package/docs/social/gstack-cardnews.md +88 -0
  56. package/docs/social/gstack-thread.md +106 -0
  57. package/docs/social/patina-launch-copy.md +227 -0
  58. package/docs/superpowers/specs/2026-04-03-meaning-preservation-design.md +299 -0
  59. package/lexicon/ai-en.md +162 -0
  60. package/lexicon/ai-ko.md +159 -0
  61. package/package.json +100 -0
  62. package/patina-max/SKILL.md +523 -0
  63. package/patina-max/composite.py +457 -0
  64. package/patterns/en-communication.md +89 -0
  65. package/patterns/en-content.md +133 -0
  66. package/patterns/en-filler.md +113 -0
  67. package/patterns/en-language.md +163 -0
  68. package/patterns/en-structure.md +173 -0
  69. package/patterns/en-style.md +139 -0
  70. package/patterns/en-viral-hook.md +211 -0
  71. package/patterns/ja-communication.md +101 -0
  72. package/patterns/ja-content.md +153 -0
  73. package/patterns/ja-filler.md +123 -0
  74. package/patterns/ja-language.md +190 -0
  75. package/patterns/ja-structure.md +142 -0
  76. package/patterns/ja-style.md +147 -0
  77. package/patterns/ja-viral-hook.md +216 -0
  78. package/patterns/ko-communication.md +98 -0
  79. package/patterns/ko-content.md +154 -0
  80. package/patterns/ko-filler.md +105 -0
  81. package/patterns/ko-language.md +182 -0
  82. package/patterns/ko-structure.md +147 -0
  83. package/patterns/ko-style.md +146 -0
  84. package/patterns/ko-viral-hook.md +211 -0
  85. package/patterns/zh-communication.md +101 -0
  86. package/patterns/zh-content.md +153 -0
  87. package/patterns/zh-filler.md +118 -0
  88. package/patterns/zh-language.md +173 -0
  89. package/patterns/zh-structure.md +145 -0
  90. package/patterns/zh-style.md +159 -0
  91. package/patterns/zh-viral-hook.md +216 -0
  92. package/profiles/academic.md +53 -0
  93. package/profiles/blog.md +81 -0
  94. package/profiles/casual-conversation.md +105 -0
  95. package/profiles/code-comment.md +104 -0
  96. package/profiles/commit-message.md +99 -0
  97. package/profiles/default.md +62 -0
  98. package/profiles/email.md +52 -0
  99. package/profiles/formal.md +98 -0
  100. package/profiles/instructional.md +80 -0
  101. package/profiles/legal.md +57 -0
  102. package/profiles/marketing.md +56 -0
  103. package/profiles/medical.md +53 -0
  104. package/profiles/narrative.md +79 -0
  105. package/profiles/release-notes.md +98 -0
  106. package/profiles/social.md +56 -0
  107. package/profiles/technical.md +53 -0
  108. package/scripts/benchmark-report.mjs +252 -0
  109. package/scripts/check-release-metadata.mjs +48 -0
  110. package/scripts/detector-comparison.mjs +267 -0
  111. package/scripts/lint.mjs +40 -0
  112. package/scripts/precommit-score.mjs +31 -0
  113. package/scripts/prose-score.mjs +186 -0
  114. package/scripts/update-benchmark-ranges.mjs +108 -0
  115. package/src/api.js +330 -0
  116. package/src/auth.js +105 -0
  117. package/src/backends/claude-cli.js +112 -0
  118. package/src/backends/codex-cli.js +121 -0
  119. package/src/backends/contract.js +21 -0
  120. package/src/backends/gemini-cli.js +135 -0
  121. package/src/backends/index.js +159 -0
  122. package/src/cache.js +106 -0
  123. package/src/cli.js +1280 -0
  124. package/src/commands/doctor.js +229 -0
  125. package/src/commands/init.js +208 -0
  126. package/src/config.js +126 -0
  127. package/src/errors.js +53 -0
  128. package/src/features/index.js +96 -0
  129. package/src/features/lexicon.js +90 -0
  130. package/src/features/segment.js +49 -0
  131. package/src/features/stylometry.js +50 -0
  132. package/src/loader.js +103 -0
  133. package/src/logger.js +70 -0
  134. package/src/manifest.js +162 -0
  135. package/src/max-mode.js +207 -0
  136. package/src/ouroboros.js +233 -0
  137. package/src/output.js +480 -0
  138. package/src/prompt-builder.js +409 -0
  139. package/src/providers.js +100 -0
  140. package/src/scoring.js +531 -0
  141. package/src/security.js +133 -0
  142. package/tests/fixtures/suspect-zones/en/ai/en-ai-01.md +16 -0
  143. package/tests/fixtures/suspect-zones/en/ai/en-ai-02.md +16 -0
  144. package/tests/fixtures/suspect-zones/en/ai/en-ai-03.md +17 -0
  145. package/tests/fixtures/suspect-zones/en/ai/en-ai-04.md +15 -0
  146. package/tests/fixtures/suspect-zones/en/ai/en-ai-05.md +16 -0
  147. package/tests/fixtures/suspect-zones/en/ai/en-ai-06-chat-register.md +16 -0
  148. package/tests/fixtures/suspect-zones/en/natural/en-nat-01.md +15 -0
  149. package/tests/fixtures/suspect-zones/en/natural/en-nat-02.md +15 -0
  150. package/tests/fixtures/suspect-zones/en/natural/en-nat-03.md +15 -0
  151. package/tests/fixtures/suspect-zones/en/natural/en-nat-04.md +15 -0
  152. package/tests/fixtures/suspect-zones/en/natural/en-nat-05.md +15 -0
  153. package/tests/fixtures/suspect-zones/expected-ranges.json +939 -0
  154. package/tests/fixtures/suspect-zones/ja/ai/ja-ai-01.md +11 -0
  155. package/tests/fixtures/suspect-zones/ja/ai/ja-ai-02.md +11 -0
  156. package/tests/fixtures/suspect-zones/ja/ai/ja-ai-03.md +11 -0
  157. package/tests/fixtures/suspect-zones/ja/natural/ja-nat-01.md +11 -0
  158. package/tests/fixtures/suspect-zones/ja/natural/ja-nat-02.md +11 -0
  159. package/tests/fixtures/suspect-zones/ja/natural/ja-nat-03.md +11 -0
  160. package/tests/fixtures/suspect-zones/ko/ai/ko-ai-01.md +14 -0
  161. package/tests/fixtures/suspect-zones/ko/ai/ko-ai-02.md +16 -0
  162. package/tests/fixtures/suspect-zones/ko/ai/ko-ai-03.md +15 -0
  163. package/tests/fixtures/suspect-zones/ko/ai/ko-ai-04.md +15 -0
  164. package/tests/fixtures/suspect-zones/ko/ai/ko-ai-05.md +16 -0
  165. package/tests/fixtures/suspect-zones/ko/ai/ko-ai-06-chat-register.md +16 -0
  166. package/tests/fixtures/suspect-zones/ko/natural/ko-nat-01.md +15 -0
  167. package/tests/fixtures/suspect-zones/ko/natural/ko-nat-02.md +15 -0
  168. package/tests/fixtures/suspect-zones/ko/natural/ko-nat-03.md +15 -0
  169. package/tests/fixtures/suspect-zones/ko/natural/ko-nat-04.md +14 -0
  170. package/tests/fixtures/suspect-zones/ko/natural/ko-nat-05.md +15 -0
  171. package/tests/fixtures/suspect-zones/zh/ai/zh-ai-01.md +11 -0
  172. package/tests/fixtures/suspect-zones/zh/ai/zh-ai-02.md +11 -0
  173. package/tests/fixtures/suspect-zones/zh/ai/zh-ai-03.md +11 -0
  174. package/tests/fixtures/suspect-zones/zh/natural/zh-nat-01.md +11 -0
  175. package/tests/fixtures/suspect-zones/zh/natural/zh-nat-02.md +11 -0
  176. package/tests/fixtures/suspect-zones/zh/natural/zh-nat-03.md +11 -0
  177. package/tests/quality/README.md +121 -0
  178. package/tests/quality/benchmark.mjs +306 -0
  179. package/tests/quality/detectors.manual.example.json +31 -0
  180. package/tests/quality/dogfood.mjs +44 -0
@@ -0,0 +1,17 @@
1
+ ---
2
+ fixture_id: en-ai-03
3
+ language: en
4
+ class: ai
5
+ expected_hot: true
6
+ why_designed_this_way: |
7
+ Both burstiness AND MATTR. Sentence word counts: 12, 11, 12, 11, 12 → CV ≈ 0.045
8
+ (extremely uniform, well under 0.25). Core vocabulary cluster recycled throughout:
9
+ AI/model/tool, code/generate/output, developer/engineer, quality/accuracy — every
10
+ sentence restates the same conceptual pair with minor surface variation. MATTR
11
+ estimate ~0.43 (low band). Both signals fire simultaneously. No catalogued patterns:
12
+ no "revolutionize", no "game-changing", no excessive connectors, no bullet structures,
13
+ no chatbot meta-commentary.
14
+ topic: generative AI tools
15
+ ---
16
+
17
+ Generative AI tools are changing how developers approach code generation at work. These models produce code outputs that developers then review for accuracy and quality. AI-assisted code generation allows engineers to complete tasks faster than before. Developer teams that use AI tools report improvements in output quality over time. Code generated by AI models still requires engineer review to maintain overall quality.
@@ -0,0 +1,15 @@
1
+ ---
2
+ fixture_id: en-ai-04
3
+ language: en
4
+ class: ai
5
+ expected_hot: true
6
+ why_designed_this_way: |
7
+ Burstiness only. Sentence word counts: 13, 14, 13, 14, 13 → mean = 13.4, stddev ≈ 0.49,
8
+ CV ≈ 0.037 (extremely low). Content vocabulary is reasonably diverse — starter, ferment,
9
+ flour, crust, hydration, loaf, crumb — so MATTR stays mid-range (~0.66, not flagged).
10
+ Burstiness is the sole signal. No catalogued en patterns: no "it is important to note",
11
+ no "furthermore" stacking, no hype adjectives, no listicle structure, no chatbot framing.
12
+ topic: sourdough baking
13
+ ---
14
+
15
+ Sourdough baking begins with a starter culture that ferments flour and water over several days. Bakers feed the starter regularly to keep the fermentation process active and healthy. A well-maintained starter produces the gases that give sourdough its characteristic rise and open crumb. Getting the hydration level right is one of the most important variables when shaping a loaf. Experienced bakers adjust their flour ratios based on the season and ambient temperature changes.
@@ -0,0 +1,16 @@
1
+ ---
2
+ fixture_id: en-ai-05
3
+ language: en
4
+ class: ai
5
+ expected_hot: true
6
+ why_designed_this_way: |
7
+ MATTR only. Tight vocabulary cycling on: game/indie/title, developer/studio/team,
8
+ player/audience, release/launch — four pairs reused in every sentence. Estimated MATTR
9
+ ~0.46 (low band, under 0.55). Sentence lengths: 14, 12, 16, 11, 15 → CV ≈ 0.14
10
+ (not flagged by burstiness). Only MATTR fires. No catalogued patterns: no excessive
11
+ connectors, no "it is worth noting", no hype vocabulary like "groundbreaking", no
12
+ bullet-list structure, no chatbot closings.
13
+ topic: indie game dev
14
+ ---
15
+
16
+ Indie game developers often release titles without the backing of a major studio or publisher. Small indie teams build games that reflect the developer's personal vision rather than market trends. When an indie title finds an audience, the studio can fund its next game through player support alone. Many players seek out indie games precisely because small developer teams take creative risks. Indie releases have grown steadily as tools lower the barrier for solo developers to launch a title.
@@ -0,0 +1,16 @@
1
+ ---
2
+ fixture_id: en-ai-06-chat-register
3
+ language: en
4
+ class: ai
5
+ expected_hot: true
6
+ expected_metrics:
7
+ cv_band: low
8
+ mattr_band: high
9
+ lexicon_density_min: 0
10
+ lexicon_density_max: 80
11
+ why_designed_this_way: |
12
+ Sanitized Discord-style assistant prose. The claims are harmless and redistributable, while the sentence lengths stay deliberately even to pin a chat-register AI hot fixture.
13
+ topic: Discord bot project update
14
+ ---
15
+
16
+ The runtime bridge now forwards component-only bot messages into the workspace queue. The scheduler records each handoff before the generator starts a branch. The evaluator then checks the diff, the tests, and the repository status. This flow keeps the Discord thread readable while preserving the audit trail. Future runs should reuse the same channel binding and avoid duplicate listeners.
@@ -0,0 +1,15 @@
1
+ ---
2
+ fixture_id: en-nat-01
3
+ language: en
4
+ class: natural
5
+ expected_hot: false
6
+ why_designed_this_way: |
7
+ Paired with en-ai-01 (remote work). High burstiness: sentence word counts are
8
+ 4, 22, 8, 24, 6 → mean ≈ 12.8, stddev ≈ 8.6, CV ≈ 0.67 (high band, well above 0.50).
9
+ Sentence 1 and 5 are clipped; sentences 2 and 4 are long and digressive with embedded
10
+ clauses. MATTR is high (~0.78) because vocabulary spans distinct domains: three-hour block,
11
+ Slack pings, kitchen, Zoom, spouse, freelance, email at midnight. No hot signal fires.
12
+ topic: remote work
13
+ ---
14
+
15
+ I didn't plan it this way. What actually happened is I carved out a three-hour morning block where I don't open Slack, and that window has quietly become the most productive stretch I've had in years — which makes me feel vaguely guilty when my spouse walks through the kitchen mid-meeting and waves at my Zoom call. The laptop-is-always-open thing is genuinely bad, though. Going freelance meant I thought I'd have more control, and in some ways I do, but I wrote back to a client email at midnight last Tuesday and didn't even notice until I was brushing my teeth. That part I'm still working out.
@@ -0,0 +1,15 @@
1
+ ---
2
+ fixture_id: en-nat-02
3
+ language: en
4
+ class: natural
5
+ expected_hot: false
6
+ why_designed_this_way: |
7
+ Paired with en-ai-02 (urban cycling). Sentence word counts: 6, 20, 5, 18, 9 →
8
+ CV ≈ 0.56 (high band). Vocabulary is rich and non-repetitive: paint stripe, parking garage,
9
+ door zone, cargo bike, school run, pothole, rat-run, delivery trucks — no content cluster
10
+ recycled. MATTR estimate ~0.80 (high). Includes a short exclamatory sentence and one long
11
+ embedded-clause sentence. Colloquial register. Neither signal fires.
12
+ topic: urban cycling
13
+ ---
14
+
15
+ The lane is a paint stripe. I know the city spent actual money on it, but when the choice is between riding in the door zone or taking the parking garage driveway at speed, the stripe doesn't do much. Still ride, obviously. What changed my commute wasn't infrastructure at all — it was switching to a cargo bike for the school run, which sounds unhinged until you realize you're weaving through the rat-run backstreets twice a day anyway, and the extra width somehow makes drivers give you more space than the skinny road bike ever did. The potholes and delivery trucks are still there, just with better sightlines.
@@ -0,0 +1,15 @@
1
+ ---
2
+ fixture_id: en-nat-03
3
+ language: en
4
+ class: natural
5
+ expected_hot: false
6
+ why_designed_this_way: |
7
+ Paired with en-ai-03 (generative AI tools). Sentence word counts: 5, 21, 9, 19, 7 →
8
+ CV ≈ 0.56 (high band). Vocabulary is diverse: rubber duck, tab completion, autocomplete
9
+ hallucinated, grep, half-working, wrong library, two-hour hole — no content cluster reused.
10
+ MATTR estimate ~0.82 (high). Uses 1st-person voice, an aside, and colloquial register.
11
+ Neither burstiness nor MATTR fires.
12
+ topic: generative AI tools
13
+ ---
14
+
15
+ I still talk to a rubber duck sometimes. The shift happened gradually — tab completion became autocomplete, autocomplete started generating whole functions, and somewhere in there I stopped being surprised when it got things right, which is probably more alarming than the times it hallucinated a method from the wrong library version. It saves real time. But I've also spent two hours inside a hole that started with accepting a half-working suggestion I didn't fully read, and the grep-and-verify reflex I spent years building is now something I have to consciously switch back on. Worth it, mostly.
@@ -0,0 +1,15 @@
1
+ ---
2
+ fixture_id: en-nat-04
3
+ language: en
4
+ class: natural
5
+ expected_hot: false
6
+ why_designed_this_way: |
7
+ Paired with en-ai-04 (sourdough baking). Sentence word counts: 18, 5, 22, 7, 11 →
8
+ CV ≈ 0.55 (high band). Vocabulary spans distinct specifics: discard, fed twice a day,
9
+ bulk ferment, overnight cold proof, scoring, oven spring, flat hockey puck, kitchen smells
10
+ like a brewery — no cluster reused. MATTR estimate ~0.79 (high). Uses a humorous aside
11
+ and irregular rhythm. Neither signal fires.
12
+ topic: sourdough baking
13
+ ---
14
+
15
+ My starter is four years old and I've named it, which felt embarrassing to admit until I met three other people who'd done the same thing. She needs feeding twice a day during summer because the kitchen runs warm, and if I forget, the discard piles up and I feel a low-grade guilt that is frankly disproportionate for flour and water. The actual baking part — bulk ferment, a fold or two, overnight cold proof, scoring just before the oven — is meditative in a way I didn't expect. Gets it wrong sometimes. A flat hockey puck, kitchen smelling like a brewery, no oven spring, start again on Tuesday.
@@ -0,0 +1,15 @@
1
+ ---
2
+ fixture_id: en-nat-05
3
+ language: en
4
+ class: natural
5
+ expected_hot: false
6
+ why_designed_this_way: |
7
+ Paired with en-ai-05 (indie game dev). Sentence word counts: 7, 20, 4, 23, 9 →
8
+ CV ≈ 0.60 (high band). Vocabulary is rich and non-repetitive: itch.io page, wishlists,
9
+ content farm, vertical slice, porting deal, community update, Discord, full-time income,
10
+ solo — distinct concepts in each sentence with no recycled content cluster. MATTR
11
+ estimate ~0.81 (high). Uses a digressive aside and colloquial register. Neither signal fires.
12
+ topic: indie game dev
13
+ ---
14
+
15
+ The itch.io page went up before anything was really playable. What I learned fast is that wishlists on Steam behave like a slow leak you can't patch — they accumulate and bleed in equal measure, and the algorithm doesn't care that you've been posting community updates every week like a content farm of one. Solo. I shipped the vertical slice after eight months, got a porting deal offer I turned down because the terms were strange, and made enough in the first two weeks to cover three months of rent but not enough to stop doing the freelance work that was keeping the lights on. That math doesn't resolve cleanly; most people don't mention that part.