sllmwiki 1.2.0__tar.gz

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.

Potentially problematic release.


This version of sllmwiki might be problematic. Click here for more details.

Files changed (148) hide show
  1. sllmwiki-1.2.0/LICENSE +201 -0
  2. sllmwiki-1.2.0/NOTICE +4 -0
  3. sllmwiki-1.2.0/PKG-INFO +141 -0
  4. sllmwiki-1.2.0/README.md +122 -0
  5. sllmwiki-1.2.0/pyproject.toml +63 -0
  6. sllmwiki-1.2.0/setup.cfg +4 -0
  7. sllmwiki-1.2.0/src/sllmwiki/__init__.py +8 -0
  8. sllmwiki-1.2.0/src/sllmwiki/__main__.py +7 -0
  9. sllmwiki-1.2.0/src/sllmwiki/cli.py +31 -0
  10. sllmwiki-1.2.0/src/sllmwiki/commands/__init__.py +1 -0
  11. sllmwiki-1.2.0/src/sllmwiki/commands/book.py +371 -0
  12. sllmwiki-1.2.0/src/sllmwiki/commands/check_upstream.py +112 -0
  13. sllmwiki-1.2.0/src/sllmwiki/commands/cited_sections.py +96 -0
  14. sllmwiki-1.2.0/src/sllmwiki/commands/contributors.py +204 -0
  15. sllmwiki-1.2.0/src/sllmwiki/commands/doctor.py +100 -0
  16. sllmwiki-1.2.0/src/sllmwiki/commands/fetch_source.py +195 -0
  17. sllmwiki-1.2.0/src/sllmwiki/commands/finish_narrative.py +163 -0
  18. sllmwiki-1.2.0/src/sllmwiki/commands/init.py +396 -0
  19. sllmwiki-1.2.0/src/sllmwiki/commands/manifest.py +110 -0
  20. sllmwiki-1.2.0/src/sllmwiki/commands/narrative_format.py +178 -0
  21. sllmwiki-1.2.0/src/sllmwiki/commands/publish.py +412 -0
  22. sllmwiki-1.2.0/src/sllmwiki/commands/reading_plan.py +91 -0
  23. sllmwiki-1.2.0/src/sllmwiki/commands/release.py +219 -0
  24. sllmwiki-1.2.0/src/sllmwiki/commands/review_checklist.py +60 -0
  25. sllmwiki-1.2.0/src/sllmwiki/commands/search.py +88 -0
  26. sllmwiki-1.2.0/src/sllmwiki/commands/tag_tree.py +72 -0
  27. sllmwiki-1.2.0/src/sllmwiki/commands/wiki_check.py +191 -0
  28. sllmwiki-1.2.0/src/sllmwiki/lib/__init__.py +1 -0
  29. sllmwiki-1.2.0/src/sllmwiki/lib/book.py +624 -0
  30. sllmwiki-1.2.0/src/sllmwiki/lib/bookbuild.py +328 -0
  31. sllmwiki-1.2.0/src/sllmwiki/lib/citations.py +135 -0
  32. sllmwiki-1.2.0/src/sllmwiki/lib/compat.py +397 -0
  33. sllmwiki-1.2.0/src/sllmwiki/lib/config.py +215 -0
  34. sllmwiki-1.2.0/src/sllmwiki/lib/convert.py +58 -0
  35. sllmwiki-1.2.0/src/sllmwiki/lib/epub.py +281 -0
  36. sllmwiki-1.2.0/src/sllmwiki/lib/fetch.py +115 -0
  37. sllmwiki-1.2.0/src/sllmwiki/lib/figures.py +216 -0
  38. sllmwiki-1.2.0/src/sllmwiki/lib/footer.py +28 -0
  39. sllmwiki-1.2.0/src/sllmwiki/lib/gitrepo.py +26 -0
  40. sllmwiki-1.2.0/src/sllmwiki/lib/html2md.py +281 -0
  41. sllmwiki-1.2.0/src/sllmwiki/lib/language.py +184 -0
  42. sllmwiki-1.2.0/src/sllmwiki/lib/layout.py +94 -0
  43. sllmwiki-1.2.0/src/sllmwiki/lib/manifest.py +164 -0
  44. sllmwiki-1.2.0/src/sllmwiki/lib/markers.py +171 -0
  45. sllmwiki-1.2.0/src/sllmwiki/lib/mdlinks.py +46 -0
  46. sllmwiki-1.2.0/src/sllmwiki/lib/metadata.py +138 -0
  47. sllmwiki-1.2.0/src/sllmwiki/lib/narrativecheck.py +200 -0
  48. sllmwiki-1.2.0/src/sllmwiki/lib/numbering.py +129 -0
  49. sllmwiki-1.2.0/src/sllmwiki/lib/pdf.py +712 -0
  50. sllmwiki-1.2.0/src/sllmwiki/lib/plaintext.py +110 -0
  51. sllmwiki-1.2.0/src/sllmwiki/lib/policy.py +80 -0
  52. sllmwiki-1.2.0/src/sllmwiki/lib/quotes.py +95 -0
  53. sllmwiki-1.2.0/src/sllmwiki/lib/readingplan.py +103 -0
  54. sllmwiki-1.2.0/src/sllmwiki/lib/release.py +107 -0
  55. sllmwiki-1.2.0/src/sllmwiki/lib/runstats.py +115 -0
  56. sllmwiki-1.2.0/src/sllmwiki/lib/schema.py +161 -0
  57. sllmwiki-1.2.0/src/sllmwiki/lib/search.py +125 -0
  58. sllmwiki-1.2.0/src/sllmwiki/lib/tagpages.py +60 -0
  59. sllmwiki-1.2.0/src/sllmwiki/lib/tagtree.py +84 -0
  60. sllmwiki-1.2.0/src/sllmwiki/lib/templates.py +198 -0
  61. sllmwiki-1.2.0/src/sllmwiki/lib/tex.py +261 -0
  62. sllmwiki-1.2.0/src/sllmwiki/lib/toml.py +177 -0
  63. sllmwiki-1.2.0/src/sllmwiki/lib/util.py +106 -0
  64. sllmwiki-1.2.0/src/sllmwiki/lib/wikiindex.py +101 -0
  65. sllmwiki-1.2.0/src/sllmwiki/lib/wikiyaml.py +280 -0
  66. sllmwiki-1.2.0/src/sllmwiki/lib/xrefs.py +81 -0
  67. sllmwiki-1.2.0/src/sllmwiki/templates/book/_static/book-html.css +52 -0
  68. sllmwiki-1.2.0/src/sllmwiki/templates/book/_static/book.css +64 -0
  69. sllmwiki-1.2.0/src/sllmwiki/templates/book/conf.py +48 -0
  70. sllmwiki-1.2.0/src/sllmwiki/templates/languages/en.md +124 -0
  71. sllmwiki-1.2.0/src/sllmwiki/templates/languages/zh-Hans.md +119 -0
  72. sllmwiki-1.2.0/src/sllmwiki/templates/narratives/.markdownlint.jsonc +6 -0
  73. sllmwiki-1.2.0/src/sllmwiki/templates/narratives/case_study/guide.md +47 -0
  74. sllmwiki-1.2.0/src/sllmwiki/templates/narratives/case_study/template.md +42 -0
  75. sllmwiki-1.2.0/src/sllmwiki/templates/narratives/comparison/guide.md +42 -0
  76. sllmwiki-1.2.0/src/sllmwiki/templates/narratives/comparison/template.md +40 -0
  77. sllmwiki-1.2.0/src/sllmwiki/templates/narratives/concept_brief_overview/guide.md +45 -0
  78. sllmwiki-1.2.0/src/sllmwiki/templates/narratives/concept_brief_overview/template.md +32 -0
  79. sllmwiki-1.2.0/src/sllmwiki/templates/narratives/shared-guide.md +48 -0
  80. sllmwiki-1.2.0/src/sllmwiki/templates/narratives/shared-skeleton.md +51 -0
  81. sllmwiki-1.2.0/src/sllmwiki/templates/narratives/shared.md +39 -0
  82. sllmwiki-1.2.0/src/sllmwiki/templates/narratives/survey/guide.md +41 -0
  83. sllmwiki-1.2.0/src/sllmwiki/templates/narratives/survey/template.md +38 -0
  84. sllmwiki-1.2.0/src/sllmwiki/templates/narratives/technical_brief_overview/guide.md +49 -0
  85. sllmwiki-1.2.0/src/sllmwiki/templates/narratives/technical_brief_overview/template.md +42 -0
  86. sllmwiki-1.2.0/src/sllmwiki/templates/release-book.yml +25 -0
  87. sllmwiki-1.2.0/src/sllmwiki/templates/review-checklist.yml +17 -0
  88. sllmwiki-1.2.0/src/sllmwiki/templates/wiki/.claude/settings.json +13 -0
  89. sllmwiki-1.2.0/src/sllmwiki/templates/wiki/AGENTS.md +12 -0
  90. sllmwiki-1.2.0/src/sllmwiki/templates/wiki/CLAUDE.md +1 -0
  91. sllmwiki-1.2.0/src/sllmwiki/templates/wiki/Config.toml +27 -0
  92. sllmwiki-1.2.0/src/sllmwiki/templates/wiki/README.md +26 -0
  93. sllmwiki-1.2.0/src/sllmwiki/templates/wiki/gitignore +5 -0
  94. sllmwiki-1.2.0/src/sllmwiki/templates/wiki/sllmwiki/.obsidian/graph.json +15 -0
  95. sllmwiki-1.2.0/src/sllmwiki/templates/wiki-checks.yml +17 -0
  96. sllmwiki-1.2.0/src/sllmwiki.egg-info/PKG-INFO +141 -0
  97. sllmwiki-1.2.0/src/sllmwiki.egg-info/SOURCES.txt +146 -0
  98. sllmwiki-1.2.0/src/sllmwiki.egg-info/dependency_links.txt +1 -0
  99. sllmwiki-1.2.0/src/sllmwiki.egg-info/entry_points.txt +2 -0
  100. sllmwiki-1.2.0/src/sllmwiki.egg-info/top_level.txt +1 -0
  101. sllmwiki-1.2.0/tests/test_book.py +392 -0
  102. sllmwiki-1.2.0/tests/test_bookbuild.py +488 -0
  103. sllmwiki-1.2.0/tests/test_built_on.py +53 -0
  104. sllmwiki-1.2.0/tests/test_check_book.py +138 -0
  105. sllmwiki-1.2.0/tests/test_check_upstream.py +87 -0
  106. sllmwiki-1.2.0/tests/test_check_yaml.py +78 -0
  107. sllmwiki-1.2.0/tests/test_citations.py +85 -0
  108. sllmwiki-1.2.0/tests/test_cited_sections.py +62 -0
  109. sllmwiki-1.2.0/tests/test_cli.py +50 -0
  110. sllmwiki-1.2.0/tests/test_compat.py +289 -0
  111. sllmwiki-1.2.0/tests/test_config.py +135 -0
  112. sllmwiki-1.2.0/tests/test_contributors.py +85 -0
  113. sllmwiki-1.2.0/tests/test_doctor.py +85 -0
  114. sllmwiki-1.2.0/tests/test_epub.py +89 -0
  115. sllmwiki-1.2.0/tests/test_eval_fixture.py +47 -0
  116. sllmwiki-1.2.0/tests/test_fetch_policy.py +169 -0
  117. sllmwiki-1.2.0/tests/test_fetch_source.py +229 -0
  118. sllmwiki-1.2.0/tests/test_figures.py +120 -0
  119. sllmwiki-1.2.0/tests/test_helpers.py +93 -0
  120. sllmwiki-1.2.0/tests/test_html2md.py +94 -0
  121. sllmwiki-1.2.0/tests/test_init.py +342 -0
  122. sllmwiki-1.2.0/tests/test_instructions.py +141 -0
  123. sllmwiki-1.2.0/tests/test_language.py +190 -0
  124. sllmwiki-1.2.0/tests/test_layout.py +72 -0
  125. sllmwiki-1.2.0/tests/test_manifest.py +152 -0
  126. sllmwiki-1.2.0/tests/test_markers_finish.py +258 -0
  127. sllmwiki-1.2.0/tests/test_mdlinks_footer.py +59 -0
  128. sllmwiki-1.2.0/tests/test_metadata.py +110 -0
  129. sllmwiki-1.2.0/tests/test_narrative_format.py +187 -0
  130. sllmwiki-1.2.0/tests/test_numbering.py +92 -0
  131. sllmwiki-1.2.0/tests/test_pdf.py +195 -0
  132. sllmwiki-1.2.0/tests/test_plaintext.py +105 -0
  133. sllmwiki-1.2.0/tests/test_plugin_files.py +48 -0
  134. sllmwiki-1.2.0/tests/test_publish.py +353 -0
  135. sllmwiki-1.2.0/tests/test_quotes.py +42 -0
  136. sllmwiki-1.2.0/tests/test_release.py +288 -0
  137. sllmwiki-1.2.0/tests/test_run.py +51 -0
  138. sllmwiki-1.2.0/tests/test_runstats.py +85 -0
  139. sllmwiki-1.2.0/tests/test_schema.py +104 -0
  140. sllmwiki-1.2.0/tests/test_search.py +154 -0
  141. sllmwiki-1.2.0/tests/test_tagtree.py +73 -0
  142. sllmwiki-1.2.0/tests/test_templates.py +220 -0
  143. sllmwiki-1.2.0/tests/test_tex.py +117 -0
  144. sllmwiki-1.2.0/tests/test_toml.py +79 -0
  145. sllmwiki-1.2.0/tests/test_util.py +86 -0
  146. sllmwiki-1.2.0/tests/test_wiki_check.py +194 -0
  147. sllmwiki-1.2.0/tests/test_wikiyaml.py +168 -0
  148. sllmwiki-1.2.0/tests/test_xrefs.py +51 -0
sllmwiki-1.2.0/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Mengjia Sun
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
sllmwiki-1.2.0/NOTICE ADDED
@@ -0,0 +1,4 @@
1
+ Structural LLM Wiki
2
+ Copyright 2026 Mengjia Sun
3
+
4
+ This product is licensed under the Apache License, Version 2.0 (see LICENSE).
@@ -0,0 +1,141 @@
1
+ Metadata-Version: 2.4
2
+ Name: sllmwiki
3
+ Version: 1.2.0
4
+ Summary: The Structural LLM Wiki's commands: what the sllmwiki Claude Code plugin runs to keep a wiki of cited narratives in git.
5
+ Author: Mengjia Sun
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/mengjiasun1992/structural-llm-wiki
8
+ Project-URL: Documentation, https://github.com/mengjiasun1992/structural-llm-wiki/blob/mainline/docs/manual.md
9
+ Project-URL: Issues, https://github.com/mengjiasun1992/structural-llm-wiki/issues
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Environment :: Console
13
+ Classifier: Topic :: Documentation
14
+ Requires-Python: >=3.9
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ License-File: NOTICE
18
+ Dynamic: license-file
19
+
20
+ # {📖} Structural LLM Wiki
21
+
22
+ ![Structural LLM Wiki. You ask your agent one question, "How does the gateway retry?", and your agent does the rest: 1, it finds and saves the sources, a paper, code, a web page, a design doc; 2, it writes the answer, an open book in braces, every claim tied by a thread to its source; 3, it opens one pull request on project-foobar-sllmwiki.git; 4, you review and merge; 5, each release attaches the wiki as a book, in PDF, EPUB and HTML. The repository is git, which your group and their agents clone, share and grow. Answers you can check; written to teach; knowledge that compounds; stays true as sources change; reviewed like code; kept in git, shared as a book.](docs/images/hero.svg)
23
+
24
+ [![Claude Code plugin](https://img.shields.io/badge/Claude%20Code-plugin-d97757.svg)](#setup)
25
+ [![License: Apache 2.0](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
26
+ [![Python 3.9+](https://img.shields.io/badge/python-3.9%2B-blue.svg)](#setup)
27
+ [![Scripts](https://github.com/mengjiasun1992/structural-llm-wiki/actions/workflows/check-scripts.yml/badge.svg?branch=mainline)](https://github.com/mengjiasun1992/structural-llm-wiki/actions/workflows/check-scripts.yml?query=branch%3Amainline)
28
+ [![Book](https://github.com/mengjiasun1992/structural-llm-wiki/actions/workflows/check-book.yml/badge.svg?branch=mainline)](https://github.com/mengjiasun1992/structural-llm-wiki/actions/workflows/check-book.yml?query=branch%3Amainline)
29
+
30
+ **Your group's knowledge, researched by your coding agent, cited to the exact source, and reviewed like code.**
31
+
32
+ An agent skill, packaged as a Claude Code plugin, that turns a git repository into a wiki your coding agent researches and keeps current. You ask a question. It saves the *sources* that answer it, verbatim copies of code, design docs, specifications, papers or web pages, and writes a *narrative*: an account, told in order, of what happened or how something works, every claim linked to the section of a source that supports it. Each run arrives as one pull request you review. It builds on Andrej Karpathy's [LLM wiki pattern](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f) and adds what a group needs: claims you can check, review before anything lands, and a book at each release.
33
+
34
+ **See one.** Every narrative in [the demo wiki](https://github.com/mengjiasun1992/sllmwiki-demo) was researched and written by an unattended run, and arrived as a pull request to review. Three recent runs, one question each:
35
+
36
+ | Question | Model | Kind | Sources saved | Narrative | Time | Tokens | Pull request |
37
+ |---|---|---|---|---|---|---|---|
38
+ | [How does Raft elect a leader and keep every server's log consistent?](https://github.com/mengjiasun1992/sllmwiki-demo/blob/main/sllmwiki/narratives/how-does-raft-elect-a-leader-and-keep-every-servers-log-consistent.md) | Opus 5.5 | how it works | 3 (99 KB): two dissertation chapters, etcd's README | 1,799 words | 10 min | 6.0M in, 51K out | [#22](https://github.com/mengjiasun1992/sllmwiki-demo/pull/22) |
39
+ | [What are the classic failure modes of large distributed systems, and their mitigations?](https://github.com/mengjiasun1992/sllmwiki-demo/blob/main/sllmwiki/narratives/what-are-the-classic-failure-modes-of-large-scale-distributed-systems-and-their-mitigations.md) | Opus 5.5 | survey | 4 (43 KB), and 2 papers as links | 1,937 words | 8 min | 8.7M in, 42K out | [#23](https://github.com/mengjiasun1992/sllmwiki-demo/pull/23) |
40
+ | [How does classic attention compare with paged attention?](https://github.com/mengjiasun1992/sllmwiki-demo/blob/main/sllmwiki/narratives/how-does-classic-attention-compare-with-paged-attention-in-transformers.md) | Haiku 5.5 | comparison | 4 (290 KB), and 1 paper as a link | 982 words | 7 min | 4.6M in, 57K out | [#24](https://github.com/mengjiasun1992/sllmwiki-demo/pull/24) |
41
+
42
+ Each run reports its own time and tokens in its pull request. The tokens count the main session only, and about 98% of the input is cached. Start at [the demo's index](https://github.com/mengjiasun1992/sllmwiki-demo/blob/main/sllmwiki/.SLLMWIKI_INDICES.md), or download its book as a PDF, EPUB or HTML file from [its latest release](https://github.com/mengjiasun1992/sllmwiki-demo/releases/latest).
43
+
44
+ ## Setup
45
+
46
+ You need an agent that runs [Agent Skills](https://agentskills.io), such as [Claude Code](https://docs.claude.com/en/docs/claude-code), plus git and Python 3.9 or later; the first run installs the rest, the plugin's code (the [`sllmwiki` package](https://pypi.org/project/sllmwiki/), into the plugin's own folder) and anything missing, with your package manager. [`gh`](https://cli.github.com), signed in, is recommended: it opens the pull requests (without it, the skill prints a link to open each one yourself). The wiki's CI checks and its book need the wiki hosted on GitHub.
47
+
48
+ 1. Create an empty repository (for example `project-foobar-sllmwiki`), clone it and start Claude Code in it.
49
+ 2. Install the plugin into it:
50
+
51
+ ```bash
52
+ claude plugin marketplace add mengjiasun1992/structural-llm-wiki --scope project
53
+ claude plugin install sllmwiki@structural-llm-wiki --scope project
54
+ ```
55
+
56
+ 3. Run `/sllmwiki:init`. It asks a few preferences (language, source policy, the book), lays out the wiki, installs its CI checks and makes the first commit. Rerun it after a plugin update.
57
+ 4. Ask your first questions: `/sllmwiki:build "How does our gateway route requests?" "Why does it retry?"`
58
+
59
+ **Join a wiki:** clone it, start Claude Code inside, trust the folder and accept the `sllmwiki` plugin it offers. **Other agents** (Codex, Cursor, Copilot): `npx skills add mengjiasun1992/structural-llm-wiki -g` with the [`skills` CLI](https://skills.sh) and `pipx install sllmwiki` (the version the skill's `SKILL.md` names), then ask in your own words ("lint the gateway narratives").
60
+
61
+ <details>
62
+ <summary>Installing git, Python and gh</summary>
63
+
64
+ ```bash
65
+ brew install git python gh # macOS
66
+ winget install Git.Git Python.Python.3.13 GitHub.cli # Windows
67
+ sudo apt-get install -y git python3 gh # Debian / Ubuntu
68
+ gh auth login && gh auth setup-git # then, everywhere
69
+ ```
70
+
71
+ </details>
72
+
73
+ ## Why use it
74
+
75
+ - **Builders** need to understand a system before they change it, but the why is in a design doc that drifted and a chat thread nobody can find, and an AI's answer can't say which parts it read and which it guessed.
76
+ - **Tech leads** need what the group knows to outlive who knows it. Onboarding runs through the same few seniors, and nobody can say which docs are still true.
77
+ - **Researchers** have more papers than time, and LLM summaries cite sections that don't say what they claim.
78
+
79
+ What the wiki does about it:
80
+
81
+ - **Every claim can be checked.** Each one cites the exact section of a saved source, one click away. What no source states is marked as the narrative's own reasoning (`[→]`) or as a gap (`[?]`), never filled with a guess. Lint checks every claim and quotation against the section it cites.
82
+ - **Nothing lands unreviewed.** The agent researches on its own and delivers one pull request: a checklist on top, the decisions it couldn't make, and what the run cost. Your seniors review instead of writing from scratch.
83
+ - **Knowledge compounds.** One narrative per question, kept in git. A new answer builds on what the wiki already explains, and the next person who asks gets the reviewed answer.
84
+ - **Answers stay true.** Each narrative records the source versions it read. When code or a doc changes, exactly the narratives that rest on it are flagged.
85
+ - **It teaches.** The answer's shape fits the question, written for a reader new to the topic; describe your own kind, such as a postmortem or a ten-minute primer on a paper.
86
+ - **It knows who to ask.** Each topic lists the people behind its code and docs, ranked by evidence from git history and code owners.
87
+ - **A book with every release.** The whole wiki as a PDF, an EPUB or one HTML file, chapters in teaching order, diagrams and math drawn as on GitHub: an onboarding pack, current as of that day.
88
+
89
+ ![Every kind of question gets the shape that teaches it. What is X? In short, then rigorously, and its edge cases. How does X work? One real example, walked through with its numbers. Principles of X? The field mapped first, then each idea in brief. X or Y? Every option compared, and the rule for when each wins. What happened? The timeline, the chain of causes, and the lessons. Your own kind? A postmortem, a primer: a template you describe.](docs/images/answer-shapes.svg)
90
+
91
+ It's all plain Markdown and YAML in git: browse it on GitHub, open it in Obsidian, or use it from any agent that supports Agent Skills. Scripts do everything mechanical, so your tokens go to judgment.
92
+
93
+ ## Usage
94
+
95
+ ![Four moments, from your side. Ask anything: an answer in seconds, each claim cited, and who to ask. Grow it by asking: it researches while you're away, and you review one pull request; nothing lands till you merge. It stays true: when a source changes, exactly the answers that rest on it are flagged, and the rest stay untouched. Share it as a book: each release, such as v2026.10.24, attaches the whole wiki as a PDF to print and share, an EPUB for e-readers and phones, and one HTML file for a browser; read it offline, or hand it on.](docs/images/four-moments.svg)
96
+
97
+ | I want to… | Run |
98
+ |---|---|
99
+ | Set up a wiki (start here, in an empty repository) | `/sllmwiki:init` |
100
+ | Ask the wiki: a cited answer in seconds, or a DRAFT and an offer to research it | `/sllmwiki:query "How does the gateway retry failed backends?"` |
101
+ | Research questions unattended: sources saved, a cited answer each, one pull request to review | `/sllmwiki:build "How does the gateway route requests?" "Why does it retry?"` |
102
+ | Publish the wiki as a book (PDF, EPUB, HTML) in a dated release | `/sllmwiki:release` |
103
+
104
+ Everything else, ask in your own words: "Lint the gateway narratives", "Who knows the gateway?", "Make a template for postmortems of our incidents", or "What can sllmwiki do?".
105
+
106
+ **[The manual](docs/manual.md)** has the rest: reviewing a run, what's in your wiki, templates, citations, books, settings, languages, Obsidian, teams, and an FAQ.
107
+
108
+ ## Licenses and your data
109
+
110
+ The skill is open source under the [Apache License 2.0](LICENSE); your wiki is yours, and each source stays its authors', kept with its URL and license, quoted briefly, never fetched past a login or paywall. Narratives are written by an LLM: every claim is cited, but review each pull request before you merge it. The plugin runs on your machine and its authors collect nothing ([Privacy](PRIVACY.md)). The details: [the manual, §12](docs/manual.md#12-licenses-sources-and-your-responsibility).
111
+
112
+ ## Design
113
+
114
+ [docs/structural_llm_wiki_design.md](docs/structural_llm_wiki_design.md) has the architecture and the decisions behind it, and [docs/book_design.md](docs/book_design.md) the book a release attaches. [docs/skill_execution_plan.md](docs/skill_execution_plan.md) and [docs/book_execution_plan.md](docs/book_execution_plan.md) say how each was built.
115
+
116
+ ## Developing
117
+
118
+ ```text
119
+ plugin/ the plugin: instructions only
120
+ ├── skills/sllmwiki/ the skill: SKILL.md, workflows/, steps/
121
+ └── commands/ Claude Code commands: init, query, build, release
122
+ src/sllmwiki/ the sllmwiki package: every command, lib/, templates/
123
+ tests/ unit tests for the package
124
+ src/actions/ the GitHub actions a wiki's CI calls
125
+ src/tools/ development and CI tools (eval-plugin.sh, check-yaml, check-book)
126
+ evals/ behavior evals, run through src/tools/eval-plugin.sh
127
+ docs/ the manual, the designs, their plans, and their figures
128
+ ```
129
+
130
+ `AGENTS.md` has the rules for changing this repository: tests with every logic change and coverage at 95% or above, instruction word budgets, evals for behavior changes. Run the tests, and try the plugin from a checkout:
131
+
132
+ ```bash
133
+ python3 -m venv .venv && . .venv/bin/activate
134
+ python3 -m pip install -e . "coverage[toml]==7.6.10"
135
+ python3 tests/run.py --coverage
136
+ claude --plugin-dir plugin # runs the sllmwiki on PATH: this checkout's
137
+ ```
138
+
139
+ ## License
140
+
141
+ Copyright 2026 Mengjia Sun. Licensed under the [Apache License, Version 2.0](LICENSE); see [NOTICE](NOTICE).
@@ -0,0 +1,122 @@
1
+ # {📖} Structural LLM Wiki
2
+
3
+ ![Structural LLM Wiki. You ask your agent one question, "How does the gateway retry?", and your agent does the rest: 1, it finds and saves the sources, a paper, code, a web page, a design doc; 2, it writes the answer, an open book in braces, every claim tied by a thread to its source; 3, it opens one pull request on project-foobar-sllmwiki.git; 4, you review and merge; 5, each release attaches the wiki as a book, in PDF, EPUB and HTML. The repository is git, which your group and their agents clone, share and grow. Answers you can check; written to teach; knowledge that compounds; stays true as sources change; reviewed like code; kept in git, shared as a book.](docs/images/hero.svg)
4
+
5
+ [![Claude Code plugin](https://img.shields.io/badge/Claude%20Code-plugin-d97757.svg)](#setup)
6
+ [![License: Apache 2.0](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
7
+ [![Python 3.9+](https://img.shields.io/badge/python-3.9%2B-blue.svg)](#setup)
8
+ [![Scripts](https://github.com/mengjiasun1992/structural-llm-wiki/actions/workflows/check-scripts.yml/badge.svg?branch=mainline)](https://github.com/mengjiasun1992/structural-llm-wiki/actions/workflows/check-scripts.yml?query=branch%3Amainline)
9
+ [![Book](https://github.com/mengjiasun1992/structural-llm-wiki/actions/workflows/check-book.yml/badge.svg?branch=mainline)](https://github.com/mengjiasun1992/structural-llm-wiki/actions/workflows/check-book.yml?query=branch%3Amainline)
10
+
11
+ **Your group's knowledge, researched by your coding agent, cited to the exact source, and reviewed like code.**
12
+
13
+ An agent skill, packaged as a Claude Code plugin, that turns a git repository into a wiki your coding agent researches and keeps current. You ask a question. It saves the *sources* that answer it, verbatim copies of code, design docs, specifications, papers or web pages, and writes a *narrative*: an account, told in order, of what happened or how something works, every claim linked to the section of a source that supports it. Each run arrives as one pull request you review. It builds on Andrej Karpathy's [LLM wiki pattern](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f) and adds what a group needs: claims you can check, review before anything lands, and a book at each release.
14
+
15
+ **See one.** Every narrative in [the demo wiki](https://github.com/mengjiasun1992/sllmwiki-demo) was researched and written by an unattended run, and arrived as a pull request to review. Three recent runs, one question each:
16
+
17
+ | Question | Model | Kind | Sources saved | Narrative | Time | Tokens | Pull request |
18
+ |---|---|---|---|---|---|---|---|
19
+ | [How does Raft elect a leader and keep every server's log consistent?](https://github.com/mengjiasun1992/sllmwiki-demo/blob/main/sllmwiki/narratives/how-does-raft-elect-a-leader-and-keep-every-servers-log-consistent.md) | Opus 5.5 | how it works | 3 (99 KB): two dissertation chapters, etcd's README | 1,799 words | 10 min | 6.0M in, 51K out | [#22](https://github.com/mengjiasun1992/sllmwiki-demo/pull/22) |
20
+ | [What are the classic failure modes of large distributed systems, and their mitigations?](https://github.com/mengjiasun1992/sllmwiki-demo/blob/main/sllmwiki/narratives/what-are-the-classic-failure-modes-of-large-scale-distributed-systems-and-their-mitigations.md) | Opus 5.5 | survey | 4 (43 KB), and 2 papers as links | 1,937 words | 8 min | 8.7M in, 42K out | [#23](https://github.com/mengjiasun1992/sllmwiki-demo/pull/23) |
21
+ | [How does classic attention compare with paged attention?](https://github.com/mengjiasun1992/sllmwiki-demo/blob/main/sllmwiki/narratives/how-does-classic-attention-compare-with-paged-attention-in-transformers.md) | Haiku 5.5 | comparison | 4 (290 KB), and 1 paper as a link | 982 words | 7 min | 4.6M in, 57K out | [#24](https://github.com/mengjiasun1992/sllmwiki-demo/pull/24) |
22
+
23
+ Each run reports its own time and tokens in its pull request. The tokens count the main session only, and about 98% of the input is cached. Start at [the demo's index](https://github.com/mengjiasun1992/sllmwiki-demo/blob/main/sllmwiki/.SLLMWIKI_INDICES.md), or download its book as a PDF, EPUB or HTML file from [its latest release](https://github.com/mengjiasun1992/sllmwiki-demo/releases/latest).
24
+
25
+ ## Setup
26
+
27
+ You need an agent that runs [Agent Skills](https://agentskills.io), such as [Claude Code](https://docs.claude.com/en/docs/claude-code), plus git and Python 3.9 or later; the first run installs the rest, the plugin's code (the [`sllmwiki` package](https://pypi.org/project/sllmwiki/), into the plugin's own folder) and anything missing, with your package manager. [`gh`](https://cli.github.com), signed in, is recommended: it opens the pull requests (without it, the skill prints a link to open each one yourself). The wiki's CI checks and its book need the wiki hosted on GitHub.
28
+
29
+ 1. Create an empty repository (for example `project-foobar-sllmwiki`), clone it and start Claude Code in it.
30
+ 2. Install the plugin into it:
31
+
32
+ ```bash
33
+ claude plugin marketplace add mengjiasun1992/structural-llm-wiki --scope project
34
+ claude plugin install sllmwiki@structural-llm-wiki --scope project
35
+ ```
36
+
37
+ 3. Run `/sllmwiki:init`. It asks a few preferences (language, source policy, the book), lays out the wiki, installs its CI checks and makes the first commit. Rerun it after a plugin update.
38
+ 4. Ask your first questions: `/sllmwiki:build "How does our gateway route requests?" "Why does it retry?"`
39
+
40
+ **Join a wiki:** clone it, start Claude Code inside, trust the folder and accept the `sllmwiki` plugin it offers. **Other agents** (Codex, Cursor, Copilot): `npx skills add mengjiasun1992/structural-llm-wiki -g` with the [`skills` CLI](https://skills.sh) and `pipx install sllmwiki` (the version the skill's `SKILL.md` names), then ask in your own words ("lint the gateway narratives").
41
+
42
+ <details>
43
+ <summary>Installing git, Python and gh</summary>
44
+
45
+ ```bash
46
+ brew install git python gh # macOS
47
+ winget install Git.Git Python.Python.3.13 GitHub.cli # Windows
48
+ sudo apt-get install -y git python3 gh # Debian / Ubuntu
49
+ gh auth login && gh auth setup-git # then, everywhere
50
+ ```
51
+
52
+ </details>
53
+
54
+ ## Why use it
55
+
56
+ - **Builders** need to understand a system before they change it, but the why is in a design doc that drifted and a chat thread nobody can find, and an AI's answer can't say which parts it read and which it guessed.
57
+ - **Tech leads** need what the group knows to outlive who knows it. Onboarding runs through the same few seniors, and nobody can say which docs are still true.
58
+ - **Researchers** have more papers than time, and LLM summaries cite sections that don't say what they claim.
59
+
60
+ What the wiki does about it:
61
+
62
+ - **Every claim can be checked.** Each one cites the exact section of a saved source, one click away. What no source states is marked as the narrative's own reasoning (`[→]`) or as a gap (`[?]`), never filled with a guess. Lint checks every claim and quotation against the section it cites.
63
+ - **Nothing lands unreviewed.** The agent researches on its own and delivers one pull request: a checklist on top, the decisions it couldn't make, and what the run cost. Your seniors review instead of writing from scratch.
64
+ - **Knowledge compounds.** One narrative per question, kept in git. A new answer builds on what the wiki already explains, and the next person who asks gets the reviewed answer.
65
+ - **Answers stay true.** Each narrative records the source versions it read. When code or a doc changes, exactly the narratives that rest on it are flagged.
66
+ - **It teaches.** The answer's shape fits the question, written for a reader new to the topic; describe your own kind, such as a postmortem or a ten-minute primer on a paper.
67
+ - **It knows who to ask.** Each topic lists the people behind its code and docs, ranked by evidence from git history and code owners.
68
+ - **A book with every release.** The whole wiki as a PDF, an EPUB or one HTML file, chapters in teaching order, diagrams and math drawn as on GitHub: an onboarding pack, current as of that day.
69
+
70
+ ![Every kind of question gets the shape that teaches it. What is X? In short, then rigorously, and its edge cases. How does X work? One real example, walked through with its numbers. Principles of X? The field mapped first, then each idea in brief. X or Y? Every option compared, and the rule for when each wins. What happened? The timeline, the chain of causes, and the lessons. Your own kind? A postmortem, a primer: a template you describe.](docs/images/answer-shapes.svg)
71
+
72
+ It's all plain Markdown and YAML in git: browse it on GitHub, open it in Obsidian, or use it from any agent that supports Agent Skills. Scripts do everything mechanical, so your tokens go to judgment.
73
+
74
+ ## Usage
75
+
76
+ ![Four moments, from your side. Ask anything: an answer in seconds, each claim cited, and who to ask. Grow it by asking: it researches while you're away, and you review one pull request; nothing lands till you merge. It stays true: when a source changes, exactly the answers that rest on it are flagged, and the rest stay untouched. Share it as a book: each release, such as v2026.10.24, attaches the whole wiki as a PDF to print and share, an EPUB for e-readers and phones, and one HTML file for a browser; read it offline, or hand it on.](docs/images/four-moments.svg)
77
+
78
+ | I want to… | Run |
79
+ |---|---|
80
+ | Set up a wiki (start here, in an empty repository) | `/sllmwiki:init` |
81
+ | Ask the wiki: a cited answer in seconds, or a DRAFT and an offer to research it | `/sllmwiki:query "How does the gateway retry failed backends?"` |
82
+ | Research questions unattended: sources saved, a cited answer each, one pull request to review | `/sllmwiki:build "How does the gateway route requests?" "Why does it retry?"` |
83
+ | Publish the wiki as a book (PDF, EPUB, HTML) in a dated release | `/sllmwiki:release` |
84
+
85
+ Everything else, ask in your own words: "Lint the gateway narratives", "Who knows the gateway?", "Make a template for postmortems of our incidents", or "What can sllmwiki do?".
86
+
87
+ **[The manual](docs/manual.md)** has the rest: reviewing a run, what's in your wiki, templates, citations, books, settings, languages, Obsidian, teams, and an FAQ.
88
+
89
+ ## Licenses and your data
90
+
91
+ The skill is open source under the [Apache License 2.0](LICENSE); your wiki is yours, and each source stays its authors', kept with its URL and license, quoted briefly, never fetched past a login or paywall. Narratives are written by an LLM: every claim is cited, but review each pull request before you merge it. The plugin runs on your machine and its authors collect nothing ([Privacy](PRIVACY.md)). The details: [the manual, §12](docs/manual.md#12-licenses-sources-and-your-responsibility).
92
+
93
+ ## Design
94
+
95
+ [docs/structural_llm_wiki_design.md](docs/structural_llm_wiki_design.md) has the architecture and the decisions behind it, and [docs/book_design.md](docs/book_design.md) the book a release attaches. [docs/skill_execution_plan.md](docs/skill_execution_plan.md) and [docs/book_execution_plan.md](docs/book_execution_plan.md) say how each was built.
96
+
97
+ ## Developing
98
+
99
+ ```text
100
+ plugin/ the plugin: instructions only
101
+ ├── skills/sllmwiki/ the skill: SKILL.md, workflows/, steps/
102
+ └── commands/ Claude Code commands: init, query, build, release
103
+ src/sllmwiki/ the sllmwiki package: every command, lib/, templates/
104
+ tests/ unit tests for the package
105
+ src/actions/ the GitHub actions a wiki's CI calls
106
+ src/tools/ development and CI tools (eval-plugin.sh, check-yaml, check-book)
107
+ evals/ behavior evals, run through src/tools/eval-plugin.sh
108
+ docs/ the manual, the designs, their plans, and their figures
109
+ ```
110
+
111
+ `AGENTS.md` has the rules for changing this repository: tests with every logic change and coverage at 95% or above, instruction word budgets, evals for behavior changes. Run the tests, and try the plugin from a checkout:
112
+
113
+ ```bash
114
+ python3 -m venv .venv && . .venv/bin/activate
115
+ python3 -m pip install -e . "coverage[toml]==7.6.10"
116
+ python3 tests/run.py --coverage
117
+ claude --plugin-dir plugin # runs the sllmwiki on PATH: this checkout's
118
+ ```
119
+
120
+ ## License
121
+
122
+ Copyright 2026 Mengjia Sun. Licensed under the [Apache License, Version 2.0](LICENSE); see [NOTICE](NOTICE).
@@ -0,0 +1,63 @@
1
+ # The sllmwiki package (src/sllmwiki/), which the plugin installs and runs as `sllmwiki <command>`,
2
+ # and the lint and coverage configuration for it and src/tools/.
3
+ # The scripts use only the standard library and support Python 3.9.
4
+
5
+ [build-system]
6
+ requires = ["setuptools>=77"]
7
+ build-backend = "setuptools.build_meta"
8
+
9
+ [project]
10
+ name = "sllmwiki"
11
+ dynamic = ["version"]
12
+ description = "The Structural LLM Wiki's commands: what the sllmwiki Claude Code plugin runs to keep a wiki of cited narratives in git."
13
+ readme = "README.md"
14
+ requires-python = ">=3.9"
15
+ license = "Apache-2.0"
16
+ license-files = ["LICENSE", "NOTICE"]
17
+ authors = [{ name = "Mengjia Sun" }]
18
+ dependencies = [] # the standard library only
19
+ classifiers = [
20
+ "Programming Language :: Python :: 3",
21
+ "Operating System :: OS Independent",
22
+ "Environment :: Console",
23
+ "Topic :: Documentation",
24
+ ]
25
+
26
+ [project.urls]
27
+ Homepage = "https://github.com/mengjiasun1992/structural-llm-wiki"
28
+ Documentation = "https://github.com/mengjiasun1992/structural-llm-wiki/blob/mainline/docs/manual.md"
29
+ Issues = "https://github.com/mengjiasun1992/structural-llm-wiki/issues"
30
+
31
+ [project.scripts]
32
+ sllmwiki = "sllmwiki.cli:main"
33
+
34
+ [tool.setuptools.dynamic]
35
+ version = { attr = "sllmwiki.__version__" }
36
+
37
+ [tool.setuptools.packages.find]
38
+ where = ["src"]
39
+ include = ["sllmwiki*"]
40
+
41
+ [tool.setuptools.package-data]
42
+ # the templates: what init installs (dotfiles included), the narrative templates and language packs, the book's
43
+ sllmwiki = ["templates/**/*", "templates/**/.*", "templates/**/.*/*", "templates/**/.*/**/*"]
44
+
45
+ [tool.ruff]
46
+ target-version = "py39"
47
+ line-length = 200
48
+
49
+ [tool.ruff.lint]
50
+ # pyflakes and pycodestyle errors (the defaults), plus bugbear for likely bugs.
51
+ select = ["E4", "E7", "E9", "F", "B"]
52
+ # E741 (ambiguous name): the scripts name a line `l` throughout, by convention.
53
+ ignore = ["E741"]
54
+
55
+ [tool.coverage.run]
56
+ # Line coverage of the skill's scripts; the tests live in tests/.
57
+ source = ["src/sllmwiki"]
58
+ omit = ["*/__init__.py"]
59
+
60
+ [tool.coverage.report]
61
+ fail_under = 95
62
+ show_missing = true
63
+ skip_covered = true
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,8 @@
1
+ """sllmwiki: the Structural LLM Wiki's code. The plugin's instructions run it as
2
+ `sllmwiki <command>`; a wiki's GitHub Actions run it from this repository at the tag."""
3
+
4
+ import os
5
+
6
+ __version__ = '1.2.0' # the plugin's version too (.claude-plugin/plugin.json); a test keeps them equal
7
+
8
+ TEMPLATES = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates') # what init installs, the narrative templates, the book's
@@ -0,0 +1,7 @@
1
+ """python3 -m sllmwiki <command> ...: the same as the sllmwiki command."""
2
+
3
+ import sys
4
+
5
+ from sllmwiki.cli import main
6
+
7
+ sys.exit(main())
@@ -0,0 +1,31 @@
1
+ """sllmwiki: the Structural LLM Wiki's commands.
2
+
3
+ sllmwiki <command> [<args>] run one; sllmwiki <command> --help explains it
4
+ sllmwiki --version this package's version, the plugin's too
5
+ """
6
+
7
+ import importlib
8
+ import sys
9
+
10
+ from sllmwiki import __version__
11
+ from sllmwiki.lib.util import setup_stdio
12
+
13
+ COMMANDS = ('book', 'check-upstream', 'cited-sections', 'contributors', 'doctor', 'fetch-source', 'finish-narrative', 'init', 'manifest',
14
+ 'narrative-format', 'publish', 'reading-plan', 'release', 'review-checklist', 'search', 'tag-tree', 'wiki-check')
15
+
16
+
17
+ def main(argv=None):
18
+ """Run `sllmwiki <command> <args>`; its exit code. 2 for an unknown command."""
19
+ argv = sys.argv[1:] if argv is None else list(argv)
20
+ setup_stdio()
21
+ if argv[:1] == ['--version']:
22
+ print(f'sllmwiki {__version__}')
23
+ return 0
24
+ if not argv or argv[0] in ('-h', '--help'):
25
+ print(__doc__.strip() + '\n\ncommands: ' + ', '.join(COMMANDS))
26
+ return 0 if argv else 2
27
+ if argv[0] not in COMMANDS:
28
+ print(f"sllmwiki: no command {argv[0]!r}; the commands: {', '.join(COMMANDS)}", file=sys.stderr)
29
+ return 2
30
+ module = importlib.import_module('sllmwiki.commands.' + argv[0].replace('-', '_'))
31
+ return module.main(argv[1:])
@@ -0,0 +1 @@
1
+ """One module per `sllmwiki <command>`, each with main(argv)."""