pi-declaw 0.2.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 (70) hide show
  1. package/ARCHITECTURE.md +90 -0
  2. package/GLOSSARY.md +48 -0
  3. package/LICENSE +201 -0
  4. package/NOTICE +30 -0
  5. package/PLUGIN_GUIDE.md +142 -0
  6. package/README.md +161 -0
  7. package/SOURCES.md +139 -0
  8. package/index.ts +2 -0
  9. package/licenses/asd-ste100-skill-LICENSE +21 -0
  10. package/licenses/i-have-adhd-LICENSE +21 -0
  11. package/licenses/speak-like-you-eat-LICENSE +9 -0
  12. package/licenses/squirrel-mode-LICENSE +21 -0
  13. package/package.json +63 -0
  14. package/playground/README.md +64 -0
  15. package/playground/app.js +123 -0
  16. package/playground/assets/declaw-e.png +0 -0
  17. package/playground/assets/declaw-favicon.png +0 -0
  18. package/playground/assets/declaw-wordmark-charcoal.png +0 -0
  19. package/playground/assets/declaw-wordmark-white.png +0 -0
  20. package/playground/assets/geist.woff2 +0 -0
  21. package/playground/assets/licenses/Claudish-MIT.txt +21 -0
  22. package/playground/assets/licenses/Geist-NOTICE.txt +4 -0
  23. package/playground/assets/licenses/Geist-OFL.txt +93 -0
  24. package/playground/assets/licenses/asd-ste100-skill-LICENSE +21 -0
  25. package/playground/assets/licenses/i-have-adhd-LICENSE +21 -0
  26. package/playground/assets/licenses/paseo-plain-LICENSE +211 -0
  27. package/playground/assets/licenses/squirrel-mode-LICENSE +21 -0
  28. package/playground/build.ts +180 -0
  29. package/playground/credits.html +14 -0
  30. package/playground/diff.ts +65 -0
  31. package/playground/evidence.css +1 -0
  32. package/playground/index.html +96 -0
  33. package/playground/inline-diff.ts +131 -0
  34. package/playground/markdown.ts +239 -0
  35. package/playground/samples.json +244 -0
  36. package/playground/serve.ts +21 -0
  37. package/playground/styles.css +30 -0
  38. package/playground/unified.ts +136 -0
  39. package/src/adapters/command.ts +203 -0
  40. package/src/adapters/model.ts +53 -0
  41. package/src/adapters/pi.ts +56 -0
  42. package/src/adapters/settings.ts +117 -0
  43. package/src/application/rewrite.ts +39 -0
  44. package/src/domain/preservation.ts +62 -0
  45. package/src/domain/rewrite.ts +55 -0
  46. package/src/domain/styles.ts +169 -0
  47. package/src/extension.ts +50 -0
  48. package/src/plugin-api.ts +88 -0
  49. package/src/plugins/built-in/asd-ste100/plugin.ts +19 -0
  50. package/src/plugins/built-in/asd-ste100/prompt.ts +24 -0
  51. package/src/plugins/built-in/catalog.ts +17 -0
  52. package/src/plugins/built-in/i-have-adhd/plugin.ts +19 -0
  53. package/src/plugins/built-in/i-have-adhd/prompt.ts +20 -0
  54. package/src/plugins/built-in/index.ts +17 -0
  55. package/src/plugins/built-in/paseo-plain/plugin.ts +26 -0
  56. package/src/plugins/built-in/paseo-plain/upstream/Claudish-MIT.txt +21 -0
  57. package/src/plugins/built-in/paseo-plain/upstream/LICENSE +211 -0
  58. package/src/plugins/built-in/paseo-plain/upstream/NOTICE +16 -0
  59. package/src/plugins/built-in/paseo-plain/upstream/prompt.ts +351 -0
  60. package/src/plugins/built-in/paseo-plain/upstream/rewriter.ts +46 -0
  61. package/src/plugins/built-in/shared/adapted-rules.ts +28 -0
  62. package/src/plugins/built-in/shared/json-payload.ts +5 -0
  63. package/src/plugins/built-in/speak-like-you-eat/payload.ts +5 -0
  64. package/src/plugins/built-in/speak-like-you-eat/plugin.ts +26 -0
  65. package/src/plugins/built-in/speak-like-you-eat/prompt.ts +4 -0
  66. package/src/plugins/built-in/speak-like-you-eat/upstream/model-rewrite.ts +19 -0
  67. package/src/plugins/built-in/squirrel-mode/plugin.ts +19 -0
  68. package/src/plugins/built-in/squirrel-mode/prompt.ts +24 -0
  69. package/src/plugins/built-in/terse/plugin.ts +18 -0
  70. package/src/plugins/built-in/terse/prompt.ts +9 -0
@@ -0,0 +1,211 @@
1
+ Copyright (c) 2025-present Mohamed Boudra
2
+
3
+ Portions of this software are licensed as follows:
4
+
5
+ * Third-party components incorporated into Paseo remain licensed under
6
+ the licenses provided by their respective copyright holders.
7
+ * Except for those third-party components, Paseo is licensed under the
8
+ Apache License, Version 2.0, reproduced below.
9
+
10
+
11
+ Apache License
12
+ Version 2.0, January 2004
13
+ http://www.apache.org/licenses/
14
+
15
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
16
+
17
+ 1. Definitions.
18
+
19
+ "License" shall mean the terms and conditions for use, reproduction,
20
+ and distribution as defined by Sections 1 through 9 of this document.
21
+
22
+ "Licensor" shall mean the copyright owner or entity authorized by
23
+ the copyright owner that is granting the License.
24
+
25
+ "Legal Entity" shall mean the union of the acting entity and all
26
+ other entities that control, are controlled by, or are under common
27
+ control with that entity. For the purposes of this definition,
28
+ "control" means (i) the power, direct or indirect, to cause the
29
+ direction or management of such entity, whether by contract or
30
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
31
+ outstanding shares, or (iii) beneficial ownership of such entity.
32
+
33
+ "You" (or "Your") shall mean an individual or Legal Entity
34
+ exercising permissions granted by this License.
35
+
36
+ "Source" form shall mean the preferred form for making modifications,
37
+ including but not limited to software source code, documentation
38
+ source, and configuration files.
39
+
40
+ "Object" form shall mean any form resulting from mechanical
41
+ transformation or translation of a Source form, including but
42
+ not limited to compiled object code, generated documentation,
43
+ and conversions to other media types.
44
+
45
+ "Work" shall mean the work of authorship, whether in Source or
46
+ Object form, made available under the License, as indicated by a
47
+ copyright notice that is included in or attached to the work
48
+ (an example is provided in the Appendix below).
49
+
50
+ "Derivative Works" shall mean any work, whether in Source or Object
51
+ form, that is based on (or derived from) the Work and for which the
52
+ editorial revisions, annotations, elaborations, or other modifications
53
+ represent, as a whole, an original work of authorship. For the purposes
54
+ of this License, Derivative Works shall not include works that remain
55
+ separable from, or merely link (or bind by name) to the interfaces of,
56
+ the Work and Derivative Works thereof.
57
+
58
+ "Contribution" shall mean any work of authorship, including
59
+ the original version of the Work and any modifications or additions
60
+ to that Work or Derivative Works thereof, that is intentionally
61
+ submitted to Licensor for inclusion in the Work by the copyright owner
62
+ or by an individual or Legal Entity authorized to submit on behalf of
63
+ the copyright owner. For the purposes of this definition, "submitted"
64
+ means any form of electronic, verbal, or written communication sent
65
+ to the Licensor or its representatives, including but not limited to
66
+ communication on electronic mailing lists, source code control systems,
67
+ and issue tracking systems that are managed by, or on behalf of, the
68
+ Licensor for the purpose of discussing and improving the Work, but
69
+ excluding communication that is conspicuously marked or otherwise
70
+ designated in writing by the copyright owner as "Not a Contribution."
71
+
72
+ "Contributor" shall mean Licensor and any individual or Legal Entity
73
+ on behalf of whom a Contribution has been received by Licensor and
74
+ subsequently incorporated within the Work.
75
+
76
+ 2. Grant of Copyright License. Subject to the terms and conditions of
77
+ this License, each Contributor hereby grants to You a perpetual,
78
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
79
+ copyright license to reproduce, prepare Derivative Works of,
80
+ publicly display, publicly perform, sublicense, and distribute the
81
+ Work and such Derivative Works in Source or Object form.
82
+
83
+ 3. Grant of Patent License. Subject to the terms and conditions of
84
+ this License, each Contributor hereby grants to You a perpetual,
85
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
86
+ (except as stated in this section) patent license to make, have made,
87
+ use, offer to sell, sell, import, and otherwise transfer the Work,
88
+ where such license applies only to those patent claims licensable
89
+ by such Contributor that are necessarily infringed by their
90
+ Contribution(s) alone or by combination of their Contribution(s)
91
+ with the Work to which such Contribution(s) was submitted. If You
92
+ institute patent litigation against any entity (including a
93
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
94
+ or a Contribution incorporated within the Work constitutes direct
95
+ or contributory patent infringement, then any patent licenses
96
+ granted to You under this License for that Work shall terminate
97
+ as of the date such litigation is filed.
98
+
99
+ 4. Redistribution. You may reproduce and distribute copies of the
100
+ Work or Derivative Works thereof in any medium, with or without
101
+ modifications, and in Source or Object form, provided that You
102
+ meet the following conditions:
103
+
104
+ (a) You must give any other recipients of the Work or
105
+ Derivative Works a copy of this License; and
106
+
107
+ (b) You must cause any modified files to carry prominent notices
108
+ stating that You changed the files; and
109
+
110
+ (c) You must retain, in the Source form of any Derivative Works
111
+ that You distribute, all copyright, patent, trademark, and
112
+ attribution notices from the Source form of the Work,
113
+ excluding those notices that do not pertain to any part of
114
+ the Derivative Works; and
115
+
116
+ (d) If the Work includes a "NOTICE" text file as part of its
117
+ distribution, then any Derivative Works that You distribute must
118
+ include a readable copy of the attribution notices contained
119
+ within such NOTICE file, excluding those notices that do not
120
+ pertain to any part of the Derivative Works, in at least one
121
+ of the following places: within a NOTICE text file distributed
122
+ as part of the Derivative Works; within the Source form or
123
+ documentation, if provided along with the Derivative Works; or,
124
+ within a display generated by the Derivative Works, if and
125
+ wherever such third-party notices normally appear. The contents
126
+ of the NOTICE file are for informational purposes only and
127
+ do not modify the License. You may add Your own attribution
128
+ notices within Derivative Works that You distribute, alongside
129
+ or as an addendum to the NOTICE text from the Work, provided
130
+ that such additional attribution notices cannot be construed
131
+ as modifying the License.
132
+
133
+ You may add Your own copyright statement to Your modifications and
134
+ may provide additional or different license terms and conditions
135
+ for use, reproduction, or distribution of Your modifications, or
136
+ for any such Derivative Works as a whole, provided Your use,
137
+ reproduction, and distribution of the Work otherwise complies with
138
+ the conditions stated in this License.
139
+
140
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
141
+ any Contribution intentionally submitted for inclusion in the Work
142
+ by You to the Licensor shall be under the terms and conditions of
143
+ this License, without any additional terms or conditions.
144
+ Notwithstanding the above, nothing herein shall supersede or modify
145
+ the terms of any separate license agreement you may have executed
146
+ with Licensor regarding such Contributions.
147
+
148
+ 6. Trademarks. This License does not grant permission to use the trade
149
+ names, trademarks, service marks, or product names of the Licensor,
150
+ except as required for reasonable and customary use in describing the
151
+ origin of the Work and reproducing the content of the NOTICE file.
152
+
153
+ 7. Disclaimer of Warranty. Unless required by applicable law or
154
+ agreed to in writing, Licensor provides the Work (and each
155
+ Contributor provides its Contributions) on an "AS IS" BASIS,
156
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
157
+ implied, including, without limitation, any warranties or conditions
158
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
159
+ PARTICULAR PURPOSE. You are solely responsible for determining the
160
+ appropriateness of using or redistributing the Work and assume any
161
+ risks associated with Your exercise of permissions under this License.
162
+
163
+ 8. Limitation of Liability. In no event and under no legal theory,
164
+ whether in tort (including negligence), contract, or otherwise,
165
+ unless required by applicable law (such as deliberate and grossly
166
+ negligent acts) or agreed to in writing, shall any Contributor be
167
+ liable to You for damages, including any direct, indirect, special,
168
+ incidental, or consequential damages of any character arising as a
169
+ result of this License or out of the use or inability to use the
170
+ Work (including but not limited to damages for loss of goodwill,
171
+ work stoppage, computer failure or malfunction, or any and all
172
+ other commercial damages or losses), even if such Contributor
173
+ has been advised of the possibility of such damages.
174
+
175
+ 9. Accepting Warranty or Additional Liability. While redistributing
176
+ the Work or Derivative Works thereof, You may choose to offer,
177
+ and charge a fee for, acceptance of support, warranty, indemnity,
178
+ or other liability obligations and/or rights consistent with this
179
+ License. However, in accepting such obligations, You may act only
180
+ on Your own behalf and on Your sole responsibility, not on behalf
181
+ of any other Contributor, and only if You agree to indemnify,
182
+ defend, and hold each Contributor harmless for any liability
183
+ incurred by, or claims asserted against, such Contributor by reason
184
+ of your accepting any such warranty or additional liability.
185
+
186
+ END OF TERMS AND CONDITIONS
187
+
188
+ APPENDIX: How to apply the Apache License to your work.
189
+
190
+ To apply the Apache License to your work, attach the following
191
+ boilerplate notice, with the fields enclosed by brackets "[]"
192
+ replaced with your own identifying information. (Don't include
193
+ the brackets!) The text should be enclosed in the appropriate
194
+ comment syntax for the file format. We also recommend that a
195
+ file or class name and description of purpose be included on the
196
+ same "printed page" as the copyright notice for easier
197
+ identification within third-party archives.
198
+
199
+ Copyright [yyyy] [name of copyright owner]
200
+
201
+ Licensed under the Apache License, Version 2.0 (the "License");
202
+ you may not use this file except in compliance with the License.
203
+ You may obtain a copy of the License at
204
+
205
+ http://www.apache.org/licenses/LICENSE-2.0
206
+
207
+ Unless required by applicable law or agreed to in writing, software
208
+ distributed under the License is distributed on an "AS IS" BASIS,
209
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
210
+ See the License for the specific language governing permissions and
211
+ limitations under the License.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Thiago Matajs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,180 @@
1
+ import { readFile, mkdir, writeFile, copyFile, cp, rm } from "node:fs/promises";
2
+ import { dirname, resolve } from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+ import { renderComparison } from "./markdown.ts";
5
+ import { renderUnifiedDiff } from "./unified.ts";
6
+ import { STYLE_IDS } from "../src/domain/styles.ts";
7
+
8
+ export const DEFAULT_CASE_ID = "verbose-explanation";
9
+
10
+ export interface Source {
11
+ label: string; url?: string; relationship: "Inspired by" | "Adapted from" | "Local preset";
12
+ }
13
+ export interface Recording {
14
+ runId: string; recordedAt: string; model: string; promptVersion: string;
15
+ context: "answer"; promptSource: "paseo-plain-v5" | "plain-lab-2" | "package-v4";
16
+ systemHash?: string;
17
+ }
18
+ export type Attribution = Omit<Source, "relationship"> & { relationship: Source["relationship"] | "Prompt from" };
19
+ export interface Snapshot {
20
+ version: 1 | 2; recordedAt: string; runId: string; model: string; thinking: "low";
21
+ promptVersion: string; synthetic: true;
22
+ modes: { id: string; label: string; description: string; source: Source }[];
23
+ cases: {
24
+ id: string; label: string; title: string; sourceTitle: string; request: string;
25
+ original: string; mustKeep: string[]; reviewFacts: string[]; pitfalls: string[];
26
+ variants: { mode: string; text: string; recording?: Recording }[];
27
+ }[];
28
+ }
29
+ const sourceDir = dirname(fileURLToPath(import.meta.url));
30
+ const CASES = ["local-vs-prod", "verbose-explanation", "ordered-recovery", "comparison-table"];
31
+ const LEGACY_MODES = STYLE_IDS.filter(id => id !== "slye");
32
+ export const escapeHtml = (s: string) => s.replace(/[&<>"']/g, c => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" })[c]!);
33
+ export const countWords = (text: string) => text.trim() ? text.trim().split(/\s+/u).length : 0;
34
+ export function scriptJson(value: unknown): string {
35
+ return JSON.stringify(value).replace(/[<>&\u2028\u2029]/g, c => `\\u${c.charCodeAt(0).toString(16).padStart(4, "0")}`);
36
+ }
37
+ function assertText(value: unknown, name: string): asserts value is string {
38
+ if (typeof value !== "string" || !value.trim() || value.length > 32_000) throw new Error(`Invalid ${name}: expected nonempty text, at most 32,000 characters`);
39
+ }
40
+ export function validateSnapshot(value: unknown): asserts value is Snapshot {
41
+ if (!value || typeof value !== "object") throw new Error("Invalid snapshot");
42
+ const s = value as Snapshot;
43
+ if (![1, 2].includes(s.version) || s.synthetic !== true || s.thinking !== "low") throw new Error("Expected a synthetic snapshot with low thinking");
44
+ const modes = s.version === 2 ? STYLE_IDS : LEGACY_MODES;
45
+ for (const key of ["recordedAt", "runId", "model", "promptVersion"] as const) assertText(s[key], key);
46
+ if (!Number.isFinite(Date.parse(s.recordedAt))) throw new Error("Invalid recording date");
47
+ if (!Array.isArray(s.modes) || JSON.stringify(s.modes.map(m => m.id)) !== JSON.stringify(modes)) throw new Error("Expected the packaged styles in order");
48
+ for (const mode of s.modes) {
49
+ assertText(mode.label, "mode label"); assertText(mode.description, "mode description");
50
+ const source = mode.source;
51
+ if (!source || !["Inspired by", "Adapted from", "Local preset"].includes(source.relationship)) throw new Error("Invalid source relationship");
52
+ assertText(source.label, "source label");
53
+ if (source.url !== undefined) {
54
+ assertText(source.url, "source URL");
55
+ const url = new URL(source.url);
56
+ if (url.protocol !== "https:" || url.hostname !== "github.com" || url.username || url.password || url.port) throw new Error("Expected HTTPS github.com source URL without credentials");
57
+ }
58
+ if (mode.id === "terse" && (source.relationship !== "Local preset" || source.url !== undefined)) throw new Error("Terse must be a local preset without a URL");
59
+ }
60
+ if (!Array.isArray(s.cases) || JSON.stringify(s.cases.map(c => c.id)) !== JSON.stringify(CASES)) throw new Error("Expected the four curated cases in order");
61
+ for (const c of s.cases) {
62
+ for (const key of ["label", "title", "sourceTitle", "request", "original"] as const) assertText(c[key], key);
63
+ for (const key of ["mustKeep", "reviewFacts", "pitfalls"] as const) {
64
+ if (!Array.isArray(c[key])) throw new Error(`Invalid ${key}`);
65
+ c[key].forEach(t => assertText(t, key));
66
+ }
67
+ if (!Array.isArray(c.variants) || JSON.stringify(c.variants.map(v => v.mode)) !== JSON.stringify(modes)) throw new Error(`Incomplete variants: ${c.id}`);
68
+ c.variants.forEach(v => {
69
+ assertText(v.text, "saved rewrite");
70
+ if (s.version === 2 && (v.recording?.promptSource !== "package-v4" || !/^[a-f0-9]{64}$/.test(v.recording.systemHash ?? ""))) throw new Error("Current demos require packaged-engine recordings and prompt hashes for every style");
71
+ if (v.recording !== undefined) {
72
+ const r = v.recording;
73
+ if (!r || r.context !== "answer" || !["paseo-plain-v5", "plain-lab-2", "package-v4"].includes(r.promptSource) ||
74
+ (r.promptSource !== "package-v4" && v.mode !== "plain")) throw new Error("Expected a recognized package recording");
75
+ for (const key of ["recordedAt", "runId", "model", "promptVersion"] as const) assertText(r[key], `recording ${key}`);
76
+ if (!Number.isFinite(Date.parse(r.recordedAt))) throw new Error("Invalid variant recording date");
77
+ }
78
+ });
79
+ }
80
+ }
81
+ export function renderAttribution(source: Attribution): string {
82
+ if (source.relationship === "Local preset") return "Local preset";
83
+ return `${escapeHtml(source.relationship)} ${source.url ? `<a href="${escapeHtml(source.url)}">${escapeHtml(source.label)}</a>` : escapeHtml(source.label)}`;
84
+ }
85
+ export function compileSnapshot(snapshot: Snapshot) {
86
+ validateSnapshot(snapshot);
87
+ return {
88
+ version: snapshot.version, recordedAt: snapshot.recordedAt, runId: snapshot.runId,
89
+ defaultCaseId: DEFAULT_CASE_ID,
90
+ model: snapshot.model, promptVersion: snapshot.promptVersion, thinking: snapshot.thinking, synthetic: true,
91
+ modes: snapshot.modes,
92
+ cases: snapshot.cases.map(c => ({
93
+ id: c.id, label: c.label, title: c.title, request: c.request, original: c.original,
94
+ originalWords: countWords(c.original),
95
+ variants: c.variants.map(v => {
96
+ const comparison = renderComparison(c.original, v.text);
97
+ const source = snapshot.modes.find(m => m.id === v.mode)!.source;
98
+ const attribution: Attribution = v.recording?.promptSource === "paseo-plain-v5"
99
+ ? { label: "scowalt/paseo-plain", url: "https://github.com/scowalt/paseo-plain", relationship: "Prompt from" }
100
+ : { ...source, ...(v.mode === "plain" && v.recording?.promptSource !== "package-v4" ? { relationship: "Inspired by" as const } : {}) };
101
+ return {
102
+ mode: v.mode, text: v.text, words: countWords(v.text),
103
+ ...(v.recording ? { recording: { ...v.recording } } : {}),
104
+ attribution, attributionHtml: renderAttribution(attribution),
105
+ ...comparison,
106
+ ...renderUnifiedDiff(comparison.beforeHtml, comparison.afterHtml),
107
+ missingExactText: c.mustKeep.filter(text => !v.text.includes(text)),
108
+ };
109
+ }),
110
+ })),
111
+ };
112
+ }
113
+ export function renderEvidence(snapshot: Snapshot, compiled = compileSnapshot(snapshot)): string {
114
+ const esc = escapeHtml;
115
+ const sections = snapshot.cases.map((c, i) => {
116
+ const compiledCase = compiled.cases[i];
117
+ return `<section id="${esc(c.id)}"><h2>${esc(c.label)}</h2><p>${esc(c.sourceTitle)}</p>
118
+ <details><summary>Request, review facts, and known pitfalls</summary><h3>Request</h3><p>${esc(c.request)}</p><h3>Review facts</h3><ul>${c.reviewFacts.map(f => `<li>${esc(f)}</li>`).join("")}</ul><h3>Watch for</h3><ul>${c.pitfalls.map(f => `<li>${esc(f)}</li>`).join("")}</ul></details>
119
+ ${compiledCase.variants.map(v => `<details class="evidence-variant"><summary>${esc(snapshot.modes.find(m => m.id === v.mode)!.label)} <span>${compiledCase.originalWords} → ${v.words} words</span></summary>
120
+ <p class="source-attribution">${v.attributionHtml}</p>
121
+ <p>${esc((v.recording ?? snapshot).model)} · ${esc((v.recording ?? snapshot).recordedAt)} · ${esc((v.recording ?? snapshot).promptVersion)} · Run: ${esc((v.recording ?? snapshot).runId)}${v.recording ? ` · Context: ${esc(v.recording.context)} · Prompt source: ${esc(v.recording.promptSource)}` : " · Legacy snapshot recording"}</p>
122
+ <p class="check-note">${v.missingExactText.length ? `Missing exact strings: ${v.missingExactText.map(esc).join(", ")}` : "Required exact strings present. This is not a semantic-fidelity verdict."} ${v.changed ? "" : "Output is identical to the original."}</p>
123
+ <div class="evidence-pair"><div><h3>Original</h3><div class="prose">${v.beforeHtml}</div></div><div><h3>${esc(snapshot.modes.find(m => m.id === v.mode)!.label)}</h3><div class="prose">${v.afterHtml}</div></div></div></details>`).join("")}</section>`;
124
+ }).join("\n");
125
+ return `<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'self'; font-src 'self'; base-uri 'none'; form-action 'none'"><title>Declaw — recorded evidence</title><link rel="stylesheet" href="styles.css"><link rel="stylesheet" href="evidence.css"></head><body class="evidence-page" data-inspecting="true"><main><a class="back-link" href="index.html">← Back to playground</a><h1>Recorded evidence.</h1><p>Four synthetic inputs. ${snapshot.cases.reduce((total, c) => total + c.variants.length, 0)} saved model outputs, preserved verbatim. This static view keeps the review facts next to the comparisons; the private lab remains separate.</p><p>Recording details are listed per output. Older outputs use the snapshot’s original recording details.</p><p>Strike-through marks source deletions; underlines mark rewrite additions. Moves can appear on both sides. Formatting-only edits may not be marked. Exact strings and word counts cannot establish equivalent meaning.</p><p><a href="samples.json" download>Download the source snapshot</a></p><nav aria-label="Evidence examples">${snapshot.cases.map(c => `<a href="#${esc(c.id)}">${esc(c.label)}</a>`).join("")}</nav>${sections}</main></body></html>`;
126
+ }
127
+ export function renderCredits(snapshot: Snapshot, template: string): string {
128
+ const plain = snapshot.cases.flatMap(c => c.variants.filter(v => v.mode === "plain"));
129
+ const packaged = snapshot.version === 2 && plain.length > 0 && plain.every(v => v.recording?.promptSource === "package-v4");
130
+ const legacy = plain.some(v => !v.recording || v.recording.promptSource === "plain-lab-2");
131
+ const provenance = packaged
132
+ ? "These recordings use the installed package’s six styles, shared meaning-preservation rules and exact-text protection. Paseo Plain and Speak Like You Eat combine pinned source prompts with those shared rules."
133
+ : legacy
134
+ ? "This snapshot includes Plain recordings from an earlier local prompt, not Scott’s exact writing prompt. The historical four-call upstream comparison failed fidelity review and was not promoted. Each output’s attribution identifies its source."
135
+ : "Plain recordings marked “Prompt from” use the pinned upstream writing prompt. Each output’s recording details identify its source.";
136
+ const replacements = {
137
+ "<!-- RECORDING_PROVENANCE -->": `<p>${provenance} See <a href="evidence.html">recorded evidence</a>. Source identity does not guarantee preserved meaning.</p>`,
138
+ "<!-- SLYE_CREDIT -->": snapshot.modes.some(m => m.id === "slye")
139
+ ? '<p>Speak Like You Eat uses the stable v1.1.0 prompt from <a href="https://github.com/wtfzambo/speak-like-you-eat">wtfzambo/speak-like-you-eat</a>, with the package’s shared preservation rules. <a href="assets/licenses/speak-like-you-eat-LICENSE">MIT license</a>.</p>' : "",
140
+ };
141
+ for (const [marker, text] of Object.entries(replacements)) {
142
+ if (template.split(marker).length !== 2) throw new Error(`Expected one credits marker: ${marker}`);
143
+ template = template.replace(marker, () => text);
144
+ }
145
+ return template;
146
+ }
147
+ export async function build(outputDir = resolve(sourceDir, "../dist/playground")): Promise<string> {
148
+ const source = await readFile(resolve(sourceDir, "samples.json"), "utf8");
149
+ const snapshot: unknown = JSON.parse(source);
150
+ validateSnapshot(snapshot);
151
+ const compiled = compileSnapshot(snapshot);
152
+ const first = compiled.cases.find(c => c.id === DEFAULT_CASE_ID)!, variant = first.variants[0];
153
+ let html = await readFile(resolve(sourceDir, "index.html"), "utf8");
154
+ const replacements: Record<string, string> = {
155
+ "<!-- INITIAL_SOURCE -->": variant.beforeHtml,
156
+ "<!-- INITIAL_REWRITE -->": variant.afterHtml,
157
+ "<!-- INITIAL_ATTRIBUTION -->": variant.attributionHtml,
158
+ "<!-- MODE_BUTTONS -->": snapshot.modes.map((mode, index) => `<button class="rail-button" data-mode="${escapeHtml(mode.id)}" aria-pressed="${index === 0}" data-interactive disabled><svg class="icon" aria-hidden="true"><use href="#${({ plain: 'i-document', terse: 'i-prose', adhd: 'i-action', squirrel: 'i-branch', ste: 'i-code', slye: 'i-document' } as Record<string, string>)[mode.id]}"/></svg>${escapeHtml(mode.label)}</button>`).join('\n'),
159
+ };
160
+ for (const [marker, text] of Object.entries(replacements)) {
161
+ if (html.split(marker).length !== 2) throw new Error(`Expected one template marker: ${marker}`);
162
+ html = html.replace(marker, () => text);
163
+ }
164
+ await mkdir(outputDir, { recursive: true });
165
+ await writeFile(resolve(outputDir, "index.html"), html);
166
+ await writeFile(resolve(outputDir, "data.js"), `"use strict";\nglobalThis.PLAIN_DEMO = ${scriptJson(compiled)};\n`);
167
+ await writeFile(resolve(outputDir, "samples.json"), source);
168
+ await writeFile(resolve(outputDir, "evidence.html"), renderEvidence(snapshot, compiled));
169
+ await writeFile(resolve(outputDir, ".nojekyll"), "");
170
+ await writeFile(resolve(outputDir, "credits.html"), renderCredits(snapshot, await readFile(resolve(sourceDir, "credits.html"), "utf8")));
171
+ for (const file of ["styles.css", "app.js", "evidence.css"]) await copyFile(resolve(sourceDir, file), resolve(outputDir, file));
172
+ // Remove the retired hold/lock controller from existing build directories too.
173
+ await rm(resolve(outputDir, "interaction.js"), { force: true });
174
+ await cp(resolve(sourceDir, "assets"), resolve(outputDir, "assets"), { recursive: true });
175
+ await copyFile(resolve(sourceDir, "../licenses/speak-like-you-eat-LICENSE"), resolve(outputDir, "assets/licenses/speak-like-you-eat-LICENSE"));
176
+ return outputDir;
177
+ }
178
+ if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
179
+ build().then(path => console.log(`Static playground: ${path}/index.html`)).catch(error => { console.error(error); process.exitCode = 1; });
180
+ }
@@ -0,0 +1,14 @@
1
+ <!doctype html>
2
+ <html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'self'; font-src 'self'; base-uri 'none'; form-action 'none'"><title>Credits — Declaw</title><link rel="stylesheet" href="styles.css"><link rel="stylesheet" href="evidence.css"></head>
3
+ <body class="evidence-page"><main>
4
+ <a class="back-link" href="index.html">Back to Declaw</a>
5
+ <h1>Credits</h1>
6
+ <p>Paseo Plain: <a href="https://github.com/scowalt/paseo-plain">Scott’s scowalt/paseo-plain</a>. The extension vendors its pinned v5 prompt, which includes wording adapted from <a href="https://github.com/gvzdv/claudish-to-english">Claudish to English</a> by Mike Gvozdev. <a href="assets/licenses/paseo-plain-LICENSE">Apache-2.0 license</a>; <a href="assets/licenses/Claudish-MIT.txt">Claudish MIT license</a>.</p>
7
+ <!-- RECORDING_PROVENANCE -->
8
+ <p>I Have ADHD, Squirrel Mode, and ASD-STE100 use adapted writing rules, not the complete upstream tools. Terse is a local preset. Attribution does not imply endorsement.</p>
9
+ <!-- SLYE_CREDIT -->
10
+ <p>I Have ADHD adapts <a href="https://github.com/ayghri/i-have-adhd">ayghri/i-have-adhd</a>. <a href="assets/licenses/i-have-adhd-LICENSE">MIT license</a>.</p>
11
+ <p>Squirrel Mode adapts <a href="https://github.com/thgMatajs/squirrel-mode">thgMatajs/squirrel-mode</a>. <a href="assets/licenses/squirrel-mode-LICENSE">MIT license</a>.</p>
12
+ <p>ASD-STE100 adapts <a href="https://github.com/danyuchn/asd-ste100-skill">danyuchn/asd-ste100-skill</a>. <a href="assets/licenses/asd-ste100-skill-LICENSE">MIT license</a>. It is STE-inspired, not certified STE.</p>
13
+ <p>Typeface: <a href="https://github.com/vercel/geist-font">Geist</a>. <a href="assets/licenses/Geist-OFL.txt">SIL Open Font License</a>.</p>
14
+ </main></body></html>
@@ -0,0 +1,65 @@
1
+ export interface DiffPart { kind: "equal" | "remove" | "add"; text: string }
2
+ export interface WordDiff { parts: DiffPart[]; granularity: "word" | "block" }
3
+
4
+ const MAX_CHARS = 100_000;
5
+ const MAX_CELLS = 2_000_000; // At most 8 MiB for the alignment table.
6
+ const tokens = (text: string) => text.match(/\s+|[\p{L}\p{N}_]+|[^\s\p{L}\p{N}_]/gu) ?? [];
7
+
8
+ /** Lossless word/punctuation/whitespace diff. Moves appear as removal + addition.
9
+ * Large inputs fall back to coarse changed blocks rather than unbounded LCS work.
10
+ * Filtering out additions reconstructs before; filtering out removals reconstructs after.
11
+ */
12
+ export function diffWords(before: string, after: string): WordDiff {
13
+ const parts: DiffPart[] = [];
14
+ const append = (kind: DiffPart["kind"], text: string) => {
15
+ if (!text) return;
16
+ const last = parts.at(-1);
17
+ if (last?.kind === kind) last.text += text;
18
+ else parts.push({ kind, text });
19
+ };
20
+ if (before === after) {
21
+ append("equal", before);
22
+ return { parts, granularity: "word" };
23
+ }
24
+ if (before.length + after.length > MAX_CHARS) {
25
+ append("remove", before);
26
+ append("add", after);
27
+ return { parts, granularity: "block" };
28
+ }
29
+ const left = tokens(before), right = tokens(after);
30
+ let prefix = 0, suffix = 0;
31
+ while (prefix < left.length && prefix < right.length && left[prefix] === right[prefix]) prefix++;
32
+ while (suffix < left.length - prefix && suffix < right.length - prefix &&
33
+ left[left.length - suffix - 1] === right[right.length - suffix - 1]) suffix++;
34
+ append("equal", left.slice(0, prefix).join(""));
35
+ const a = left.slice(prefix, left.length - suffix), b = right.slice(prefix, right.length - suffix);
36
+ const columns = b.length + 1;
37
+ const cells = (a.length + 1) * columns;
38
+ let granularity: WordDiff["granularity"] = "word";
39
+ if (cells > MAX_CELLS) {
40
+ append("remove", a.join(""));
41
+ append("add", b.join(""));
42
+ granularity = "block";
43
+ } else {
44
+ const lengths = new Uint32Array(cells);
45
+ for (let i = a.length - 1; i >= 0; i--) {
46
+ for (let j = b.length - 1; j >= 0; j--) {
47
+ lengths[i * columns + j] = a[i] === b[j]
48
+ ? 1 + lengths[(i + 1) * columns + j + 1]
49
+ : Math.max(lengths[(i + 1) * columns + j], lengths[i * columns + j + 1]);
50
+ }
51
+ }
52
+ let i = 0, j = 0;
53
+ while (i < a.length || j < b.length) {
54
+ if (i < a.length && j < b.length && a[i] === b[j]) {
55
+ append("equal", a[i++]); j++;
56
+ } else if (i < a.length && (j === b.length || lengths[(i + 1) * columns + j] >= lengths[i * columns + j + 1])) {
57
+ append("remove", a[i++]);
58
+ } else {
59
+ append("add", b[j++]);
60
+ }
61
+ }
62
+ }
63
+ append("equal", suffix ? left.slice(-suffix).join("") : "");
64
+ return { parts, granularity };
65
+ }
@@ -0,0 +1 @@
1
+ .evidence-page main{display:block;max-width:1200px;margin:auto;padding:40px 28px 80px;line-height:1.7}.evidence-page h1{font-size:36px;letter-spacing:-.03em;font-weight:580;margin:28px 0 12px}.evidence-page main>p{max-width:80ch;color:var(--muted)}.back-link{font-size:14px;color:var(--accent);text-underline-offset:4px}.evidence-page nav{display:flex;flex-wrap:wrap;gap:12px 24px;margin:30px 0 45px}.evidence-page nav a{padding-block:8px;min-height:44px}.evidence-page section{margin:42px 0;scroll-margin-top:24px}.evidence-page section>h2{font-size:26px;letter-spacing:-.025em;font-weight:550;margin-bottom:8px}.evidence-page section>p{margin-top:0;color:var(--muted)}.evidence-page details{border-top:1px solid var(--line);padding:10px 0}.evidence-page summary{padding:10px 0;min-height:44px;cursor:pointer}.evidence-page summary span{font-size:12px;color:var(--muted);margin-left:15px}.evidence-pair{display:grid;grid-template-columns:1fr 1fr;gap:42px;padding:12px 0 28px}.evidence-pair>div{min-width:0}.evidence-pair>div>h3{font-size:13px;color:var(--muted);margin:0 0 24px;font-weight:500}.evidence-pair .prose{margin:0}.check-note{font-size:12px;color:var(--muted);max-width:85ch}.evidence-page details>ul{max-width:80ch;color:var(--muted)}@media(max-width:760px){.evidence-page main{padding:24px 20px 50px;height:auto}.evidence-page h1{font-size:30px}.evidence-pair{grid-template-columns:1fr;gap:32px}.evidence-pair .prose{font-size:15px}}
@@ -0,0 +1,96 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
6
+ <meta name="theme-color" content="#111214">
7
+ <meta name="description" content="Declaw: compare an original AI answer with a clearer rewrite.">
8
+ <meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'self'; style-src 'self'; font-src 'self'; img-src 'self' data:; connect-src 'none'; base-uri 'none'; form-action 'none'">
9
+ <title>Declaw</title>
10
+ <link rel="icon" type="image/png" href="assets/declaw-favicon.png">
11
+ <link rel="preload" href="assets/geist.woff2" as="font" type="font/woff2" crossorigin>
12
+ <link rel="stylesheet" href="styles.css">
13
+ <script src="data.js" defer></script>
14
+ <script src="app.js" defer></script>
15
+ </head>
16
+ <body data-side="rewrite" data-view="reading">
17
+ <!-- User revision supersedes the original comp's scale and inspection mechanics.
18
+ Show the writing, not an explanation of the demo. Small Control Rail; no hero
19
+ or method popup. One Show changes toggle reveals a unified block/word diff.
20
+ Mobile uses native page scrolling. Source and saved outputs remain unchanged. -->
21
+ <a class="skip-link" href="#workspace">Skip to answer</a>
22
+ <svg class="icon-definitions" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><defs>
23
+ <symbol id="i-document" viewBox="0 0 24 24"><path d="M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9zM14 3v6h6M8 13h8M8 17h6"/></symbol>
24
+ <symbol id="i-prose" viewBox="0 0 24 24"><path d="M4 5h16M4 10h16M4 15h16M4 20h10"/></symbol>
25
+ <symbol id="i-steps" viewBox="0 0 24 24"><path d="m3 5 2 2 3-4m3 2h10M3 12l2 2 3-4m3 2h10M3 19l2 2 3-4m3 2h10"/></symbol>
26
+ <symbol id="i-compare" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="16" rx="2"/><path d="M12 4v16M3 10h18"/></symbol>
27
+ <symbol id="i-action" viewBox="0 0 24 24"><path d="m8 4 11 8-11 8z"/></symbol>
28
+ <symbol id="i-branch" viewBox="0 0 24 24"><path d="M6 5v10a4 4 0 0 0 4 4h2M6 11h7a5 5 0 0 0 5-5"/><circle cx="6" cy="4" r="2"/><circle cx="18" cy="4" r="2"/><circle cx="14" cy="19" r="2"/></symbol>
29
+ <symbol id="i-code" viewBox="0 0 24 24"><path d="m7 7-5 5 5 5m10-10 5 5-5 5m-3-14-4 18"/></symbol>
30
+ <symbol id="i-diff" viewBox="0 0 24 24"><path d="M4 7h6M7 4v6M14 7h6M4 17h6M14 17h6M3 12h18"/></symbol>
31
+ <symbol id="i-copy" viewBox="0 0 24 24"><rect x="8" y="8" width="12" height="13" rx="2"/><path d="M15 8V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h3"/></symbol>
32
+ <symbol id="i-external" viewBox="0 0 24 24"><path d="M14 4h6v6M20 4l-9 9M18 13v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h5"/></symbol>
33
+ </defs></svg>
34
+ <div class="app-shell">
35
+ <aside class="rail" aria-label="Examples and reading modes">
36
+ <h1 class="wordmark"><img src="assets/declaw-wordmark-white.png" width="1315" height="234" alt="Declaw"></h1>
37
+ <nav class="rail-group" aria-label="Examples" data-picker-group>
38
+ <h2>Examples</h2>
39
+ <button class="rail-button" data-case="local-vs-prod" aria-pressed="false" data-interactive disabled><svg class="icon" aria-hidden="true"><use href="#i-document"/></svg>Status update</button>
40
+ <button class="rail-button" data-case="verbose-explanation" aria-pressed="true" data-interactive disabled><svg class="icon" aria-hidden="true"><use href="#i-prose"/></svg>Long-form prose</button>
41
+ <button class="rail-button" data-case="ordered-recovery" aria-pressed="false" data-interactive disabled><svg class="icon" aria-hidden="true"><use href="#i-steps"/></svg>Recovery procedure</button>
42
+ <button class="rail-button" data-case="comparison-table" aria-pressed="false" data-interactive disabled><svg class="icon" aria-hidden="true"><use href="#i-compare"/></svg>Tradeoffs</button>
43
+ </nav>
44
+ <nav class="rail-group modes" aria-label="Reading modes" data-picker-group>
45
+ <h2>Mode</h2>
46
+ <!-- MODE_BUTTONS -->
47
+ </nav>
48
+ <div class="rail-footer">
49
+ <a class="action-link primary-link" href="https://github.com/jzlosman/declaw#install" target="_blank" rel="noreferrer">Try Declaw in Pi <svg class="icon" aria-hidden="true"><use href="#i-external"/></svg></a>
50
+ <a class="action-link" href="https://github.com/jzlosman/declaw" target="_blank" rel="noreferrer">View source on GitHub <svg class="icon" aria-hidden="true"><use href="#i-external"/></svg></a>
51
+ <a class="credits-link" href="credits.html">Credits</a>
52
+ </div>
53
+ </aside>
54
+ <main>
55
+ <header class="mobile-controls">
56
+ <h1 class="wordmark"><img src="assets/declaw-e.png" width="227" height="228" alt="Declaw"></h1>
57
+ <select id="example-select" aria-label="Example" data-interactive disabled><option value="verbose-explanation">Long-form prose</option></select>
58
+ <select id="mode-select" aria-label="Reading mode" data-interactive disabled><option value="plain">Paseo Plain</option></select>
59
+ </header>
60
+ <section class="workspace" id="workspace" tabindex="-1" aria-label="Answer comparison">
61
+ <div class="workspace-toolbar">
62
+ <h2 id="case-label">Long-form prose</h2>
63
+ <button class="diff-toggle" data-diff aria-pressed="false" aria-controls="unified-panel" data-interactive disabled><svg class="icon" aria-hidden="true"><use href="#i-diff"/></svg><span id="diff-label">Show changes</span></button>
64
+ </div>
65
+ <p class="source-attribution" id="source-attribution"><!-- INITIAL_ATTRIBUTION --></p>
66
+ <div class="mobile-tabs" role="tablist" aria-label="Answer">
67
+ <button id="tab-original" role="tab" data-side="original" aria-selected="false" aria-controls="original-panel" tabindex="-1" data-interactive disabled>Original</button>
68
+ <button id="tab-rewrite" role="tab" data-side="rewrite" aria-selected="true" aria-controls="rewrite-panel" data-interactive disabled>Rewrite</button>
69
+ </div>
70
+ <div class="documents">
71
+ <section class="document-panel original-panel" id="original-panel" aria-labelledby="original-label">
72
+ <header class="document-header"><h3 id="original-label">Original</h3><button class="icon-button copy-button" data-copy="original" aria-label="Copy original Markdown" title="Copy original Markdown" data-interactive disabled><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg></button></header>
73
+ <div class="reading-scroll" id="original-scroll" tabindex="0" aria-label="Original answer"><div class="prose" id="original-content"><!-- INITIAL_SOURCE --></div></div>
74
+ </section>
75
+ <section class="document-panel rewrite-panel" id="rewrite-panel" aria-labelledby="rewrite-label">
76
+ <header class="document-header"><h3 id="rewrite-label">Paseo Plain</h3><span class="unchanged-note" id="unchanged-note" hidden>Unchanged</span><button class="icon-button copy-button" data-copy="rewrite" aria-label="Copy rewritten Markdown" title="Copy rewritten Markdown" data-interactive disabled><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg></button></header>
77
+ <div class="reading-scroll" id="rewrite-scroll" tabindex="0" aria-label="Rewritten answer"><div class="prose" id="rewrite-content"><!-- INITIAL_REWRITE --></div></div>
78
+ </section>
79
+ </div>
80
+ <section id="unified-panel" class="unified-panel" aria-labelledby="unified-label" hidden>
81
+ <header class="document-header"><h3 id="unified-label">Changes</h3><div class="diff-legend"><span class="removed-key">Removed</span><span class="added-key">Added</span></div><span id="no-changes" class="unchanged-note" hidden>No wording changes</span></header>
82
+ <div class="reading-scroll" id="unified-scroll" tabindex="0" aria-label="Combined removals and additions"><div id="unified-content" class="unified-content"></div></div>
83
+ </section>
84
+ </section>
85
+ <div class="mobile-links">
86
+ <a class="action-link primary-link" href="https://github.com/jzlosman/declaw#install" target="_blank" rel="noreferrer">Try Declaw in Pi <svg class="icon" aria-hidden="true"><use href="#i-external"/></svg></a>
87
+ <a class="action-link" href="https://github.com/jzlosman/declaw" target="_blank" rel="noreferrer">View source on GitHub <svg class="icon" aria-hidden="true"><use href="#i-external"/></svg></a>
88
+ </div>
89
+ <a class="credits-link mobile-credits" href="credits.html">Credits</a>
90
+ <noscript><p class="fallback">Enable JavaScript to switch examples. <a href="evidence.html">View all examples</a>.</p></noscript>
91
+ <p class="fallback" id="fatal-error" hidden>Examples could not load. <a href="evidence.html">Open the static version</a>.</p>
92
+ </main>
93
+ </div>
94
+ <p class="sr-only" id="announcer" role="status" aria-live="polite" aria-atomic="true"></p>
95
+ </body>
96
+ </html>