backspec 0.0.1__py3-none-any.whl
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.
- backspec/__init__.py +16 -0
- backspec/host/__init__.py +0 -0
- backspec/host/adapters/__init__.py +0 -0
- backspec/host/adapters/cache.py +103 -0
- backspec/host/adapters/cache_admin.py +64 -0
- backspec/host/adapters/capabilities_file.py +39 -0
- backspec/host/adapters/claude_code.py +77 -0
- backspec/host/adapters/codex.py +67 -0
- backspec/host/adapters/fake.py +39 -0
- backspec/host/adapters/filesystem.py +50 -0
- backspec/host/adapters/review_yaml.py +33 -0
- backspec/host/adapters/treesitter.py +130 -0
- backspec/host/cli.py +313 -0
- backspec/host/composition.py +211 -0
- backspec/kernel/__init__.py +0 -0
- backspec/kernel/llm.py +64 -0
- backspec/kernel/prompts.py +10 -0
- backspec/kernel/templates.py +12 -0
- backspec/kernel/text.py +23 -0
- backspec/kernel/usage.py +50 -0
- backspec/modules/__init__.py +0 -0
- backspec/modules/capabilities/__init__.py +0 -0
- backspec/modules/capabilities/domain.py +108 -0
- backspec/modules/capabilities/facade.py +48 -0
- backspec/modules/capabilities/ports.py +21 -0
- backspec/modules/capabilities/use_cases.py +63 -0
- backspec/modules/discovery/__init__.py +0 -0
- backspec/modules/discovery/domain.py +87 -0
- backspec/modules/discovery/facade.py +16 -0
- backspec/modules/discovery/ports.py +14 -0
- backspec/modules/discovery/use_cases.py +19 -0
- backspec/modules/evidence/__init__.py +0 -0
- backspec/modules/evidence/domain.py +276 -0
- backspec/modules/evidence/facade.py +24 -0
- backspec/modules/evidence/ports.py +12 -0
- backspec/modules/evidence/use_cases.py +128 -0
- backspec/modules/extraction/__init__.py +0 -0
- backspec/modules/extraction/facade.py +6 -0
- backspec/modules/extraction/use_cases.py +228 -0
- backspec/modules/lint/__init__.py +0 -0
- backspec/modules/lint/domain.py +152 -0
- backspec/modules/lint/facade.py +7 -0
- backspec/modules/lint/use_cases.py +16 -0
- backspec/modules/report/__init__.py +0 -0
- backspec/modules/report/domain.py +128 -0
- backspec/modules/report/dto.py +92 -0
- backspec/modules/report/facade.py +11 -0
- backspec/modules/report/renderers.py +220 -0
- backspec/modules/report/use_cases.py +127 -0
- backspec/modules/requirements/__init__.py +0 -0
- backspec/modules/requirements/domain.py +272 -0
- backspec/modules/requirements/facade.py +26 -0
- backspec/modules/requirements/use_cases.py +135 -0
- backspec/modules/review/__init__.py +0 -0
- backspec/modules/review/domain.py +129 -0
- backspec/modules/review/facade.py +32 -0
- backspec/modules/review/ports.py +15 -0
- backspec/modules/review/use_cases.py +89 -0
- backspec/modules/staleness/__init__.py +0 -0
- backspec/modules/staleness/domain.py +75 -0
- backspec/modules/staleness/facade.py +17 -0
- backspec/modules/staleness/ports.py +7 -0
- backspec/modules/staleness/use_cases.py +39 -0
- backspec/modules/triage/__init__.py +0 -0
- backspec/modules/triage/domain.py +144 -0
- backspec/modules/triage/facade.py +24 -0
- backspec/modules/triage/use_cases.py +79 -0
- backspec/prompts/assess.md +32 -0
- backspec/prompts/assign.md +18 -0
- backspec/prompts/consolidate.md +52 -0
- backspec/prompts/observe.md +52 -0
- backspec/prompts/orient.md +33 -0
- backspec/prompts/synthesise.md +97 -0
- backspec/prompts/triage.md +34 -0
- backspec/py.typed +0 -0
- backspec/templates/libre-baskerville-400.woff2 +0 -0
- backspec/templates/libre-baskerville-700.woff2 +0 -0
- backspec/templates/libre-baskerville-OFL.txt +93 -0
- backspec/templates/report.html +336 -0
- backspec-0.0.1.dist-info/METADATA +430 -0
- backspec-0.0.1.dist-info/RECORD +85 -0
- backspec-0.0.1.dist-info/WHEEL +4 -0
- backspec-0.0.1.dist-info/entry_points.txt +2 -0
- backspec-0.0.1.dist-info/licenses/LICENSE +21 -0
- backspec-0.0.1.dist-info/licenses/src/backspec/templates/libre-baskerville-OFL.txt +93 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2012 The Libre Baskerville Project Authors (https://github.com/impallari/Libre-Baskerville) LibreBaskerville-Italic[wght].ttf: Copyright 2012 The Libre Baskerville Project Authors (https://github.com/impallari/Libre-Baskerville)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
<title>__BACKSPEC_TITLE__</title>
|
|
2
|
+
<meta name="claude:viewport-fit-sides" content="cover">
|
|
3
|
+
<style>
|
|
4
|
+
/* Follows DESIGN.md (ThoughtStream): one quiet column, white space and hairlines, serif headings,
|
|
5
|
+
no shadows, no rounded corners. Each screen says one thing; detail opens only when asked for. */
|
|
6
|
+
@font-face { font-family: "Libre Baskerville"; font-weight: 400; font-style: normal; font-display: swap;
|
|
7
|
+
src: url(data:font/woff2;base64,__BACKSPEC_FONT:libre-baskerville-400.woff2__) format("woff2") }
|
|
8
|
+
@font-face { font-family: "Libre Baskerville"; font-weight: 700; font-style: normal; font-display: swap;
|
|
9
|
+
src: url(data:font/woff2;base64,__BACKSPEC_FONT:libre-baskerville-700.woff2__) format("woff2") }
|
|
10
|
+
:root {
|
|
11
|
+
--bg: #fafaf9; --surface: #f5f5f4; --raised: #efedeb; --ink: #1c1917; --muted: #57534e; --faint: #8a837d; --stone: #78716c;
|
|
12
|
+
--line: #e7e5e4; --line-mid: #d6d3d1;
|
|
13
|
+
--ok: #4d7c0f; --warn: #a16207; --bad: #b91c1c;
|
|
14
|
+
--ok-soft: #f0fdf4; --warn-soft: #fefce8; --bad-soft: #fef2f2; --ok-line: #bbf7d0; --warn-line: #fef08a; --bad-line: #fecaca;
|
|
15
|
+
--serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
|
|
16
|
+
--sans: Inter, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
|
|
17
|
+
--mono: "Source Code Pro", "Fira Code", ui-monospace, Menlo, Consolas, monospace;
|
|
18
|
+
}
|
|
19
|
+
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
|
|
20
|
+
--bg: #1c1917; --surface: #23201d; --raised: #2c2825; --ink: #f5f5f4; --muted: #b8b2ac; --faint: #8f8882; --stone: #a8a29e;
|
|
21
|
+
--line: #322e2b; --line-mid: #44403c;
|
|
22
|
+
--ok: #a3e635; --warn: #facc15; --bad: #fca5a5;
|
|
23
|
+
--ok-soft: #1f2a12; --warn-soft: #2e2710; --bad-soft: #331a1a; --ok-line: #3a4d1c; --warn-line: #57480f; --bad-line: #5c2626;
|
|
24
|
+
color-scheme: dark } }
|
|
25
|
+
:root[data-theme="dark"] {
|
|
26
|
+
--bg: #1c1917; --surface: #23201d; --raised: #2c2825; --ink: #f5f5f4; --muted: #b8b2ac; --faint: #8f8882; --stone: #a8a29e;
|
|
27
|
+
--line: #322e2b; --line-mid: #44403c;
|
|
28
|
+
--ok: #a3e635; --warn: #facc15; --bad: #fca5a5;
|
|
29
|
+
--ok-soft: #1f2a12; --warn-soft: #2e2710; --bad-soft: #331a1a; --ok-line: #3a4d1c; --warn-line: #57480f; --bad-line: #5c2626;
|
|
30
|
+
color-scheme: dark }
|
|
31
|
+
|
|
32
|
+
* { box-sizing: border-box; border-radius: 0 }
|
|
33
|
+
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.7 var(--sans); -webkit-text-size-adjust: 100% }
|
|
34
|
+
button, input { font: inherit; color: inherit }
|
|
35
|
+
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: left }
|
|
36
|
+
a { color: inherit }
|
|
37
|
+
:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--stone) }
|
|
38
|
+
.page { max-width: 728px; margin: 0 auto; padding-block: 36px 96px;
|
|
39
|
+
padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px));
|
|
40
|
+
display: flex; flex-direction: column; gap: 60px }
|
|
41
|
+
|
|
42
|
+
/* ---- masthead ---- */
|
|
43
|
+
.top { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; flex-wrap: wrap }
|
|
44
|
+
.overline { font: 600 11px/1.4 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 0 }
|
|
45
|
+
.top nav { display: flex; gap: 24px; font-size: 13px }
|
|
46
|
+
.top nav a { color: var(--muted); text-decoration: none; padding-bottom: 2px; border-bottom: 1px solid transparent }
|
|
47
|
+
.top nav a:hover { color: var(--ink) }
|
|
48
|
+
.top nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink) }
|
|
49
|
+
|
|
50
|
+
/* ---- headings and prose ---- */
|
|
51
|
+
#view { display: flex; flex-direction: column; gap: 48px; min-width: 0 }
|
|
52
|
+
.intro { display: flex; flex-direction: column; gap: 24px }
|
|
53
|
+
h1 { margin: 0; font: 700 40px/1.2 var(--serif); letter-spacing: -.02em; text-wrap: balance; overflow-wrap: anywhere }
|
|
54
|
+
h1.sub { font-size: 30px; line-height: 1.3; letter-spacing: -.015em }
|
|
55
|
+
h2 { margin: 0; font: 400 22px/1.4 var(--serif); letter-spacing: -.01em; text-wrap: balance }
|
|
56
|
+
.lede { margin: 0; font-size: 20px; line-height: 1.75; color: var(--muted); max-width: 34em }
|
|
57
|
+
.lede b { color: var(--ink); font-weight: 600 }
|
|
58
|
+
.lede a { color: var(--ink); text-decoration-color: var(--line-mid); text-underline-offset: 4px }
|
|
59
|
+
.lede a:hover { text-decoration-color: var(--ink) }
|
|
60
|
+
.back { font-size: 13px; color: var(--muted); text-decoration: none; align-self: flex-start }
|
|
61
|
+
.back:hover { color: var(--ink) }
|
|
62
|
+
.quiet { margin: 0; font-size: 15px; color: var(--muted) }
|
|
63
|
+
.caption { font-size: 13px; line-height: 1.5; letter-spacing: .01em; color: var(--faint) }
|
|
64
|
+
|
|
65
|
+
/* ---- search ---- */
|
|
66
|
+
.search { width: 100%; height: 48px; padding: 12px 16px; font-size: 15px; background: var(--bg); border: 1px solid var(--line-mid) }
|
|
67
|
+
.search::placeholder { color: var(--faint) }
|
|
68
|
+
.search:focus { outline: none; border-color: var(--stone); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--stone) }
|
|
69
|
+
|
|
70
|
+
/* ---- lists ---- */
|
|
71
|
+
.list { display: flex; flex-direction: column; border-top: 1px solid var(--line) }
|
|
72
|
+
.caprow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 24px; align-items: baseline; width: 100%;
|
|
73
|
+
padding: 24px 0; border-bottom: 1px solid var(--line); text-decoration: none }
|
|
74
|
+
.caprow:hover h2 { text-decoration: underline; text-decoration-color: var(--line-mid); text-underline-offset: 5px }
|
|
75
|
+
.caprow p { margin: 0; grid-column: 1; font-size: 15px; color: var(--muted) }
|
|
76
|
+
.caprow .n { justify-self: end; font: 400 22px/1.4 var(--serif); color: var(--faint); font-variant-numeric: tabular-nums }
|
|
77
|
+
.caprow .flag { grid-column: 2; justify-self: end; font-size: 13px; color: var(--warn) }
|
|
78
|
+
|
|
79
|
+
.req { border-bottom: 1px solid var(--line) }
|
|
80
|
+
.req > button { display: flex; flex-direction: column; gap: 8px; width: 100%; padding: 24px 0 }
|
|
81
|
+
.req > button:hover .statement { color: var(--ink) }
|
|
82
|
+
.statement { font-size: 17px; line-height: 1.65; color: var(--ink); overflow-wrap: anywhere }
|
|
83
|
+
.req[data-open="false"] .statement { color: var(--muted) }
|
|
84
|
+
.req[data-open="false"] > button:hover .statement, .req[data-weak="true"] .statement { color: var(--ink) }
|
|
85
|
+
.sub { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center }
|
|
86
|
+
.chip { font: 600 11px/1.4 var(--sans); letter-spacing: .04em; text-transform: uppercase; padding: 4px 10px; border: 1px solid var(--cl); background: var(--cs); color: var(--c) }
|
|
87
|
+
.detail { display: flex; flex-direction: column; gap: 36px; padding: 12px 0 48px }
|
|
88
|
+
.block { display: flex; flex-direction: column; gap: 12px; min-width: 0 }
|
|
89
|
+
.conds { margin: 0; padding-left: 20px; font-size: 15px; color: var(--muted); display: flex; flex-direction: column; gap: 6px }
|
|
90
|
+
.note { margin: 0; padding: 24px; background: var(--raised); font-size: 15px; line-height: 1.7 }
|
|
91
|
+
.scn { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 16px; font-size: 15px; margin: 0 }
|
|
92
|
+
.scn strong { grid-column: 1 / -1; font-weight: 600; margin-bottom: 4px }
|
|
93
|
+
.scn dt { color: var(--faint); font-size: 13px; line-height: 1.95 }
|
|
94
|
+
.scn dd { margin: 0; color: var(--muted) }
|
|
95
|
+
.cite { display: flex; flex-direction: column; gap: 6px; min-width: 0 }
|
|
96
|
+
.cite .where { font: 13px/1.5 var(--mono); color: var(--muted); overflow-wrap: anywhere }
|
|
97
|
+
.cite pre { margin: 0; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); padding: 12px 0; font: 14px/1.7 var(--mono) }
|
|
98
|
+
.cite code { display: grid; grid-template-columns: max-content 1fr; column-gap: 16px; padding-right: 16px; font: inherit }
|
|
99
|
+
.cite .ln { text-align: right; padding-left: 16px; color: var(--faint); user-select: none; font-variant-numeric: tabular-nums }
|
|
100
|
+
.cite .tx { white-space: pre }
|
|
101
|
+
.idline button { font: 13px/1.5 var(--mono); color: var(--faint) }
|
|
102
|
+
.idline button:hover { color: var(--ink) }
|
|
103
|
+
|
|
104
|
+
/* ---- coverage ---- */
|
|
105
|
+
.bar { display: flex; height: 6px; gap: 2px }
|
|
106
|
+
.bar i { display: block; height: 100%; min-width: 4px; background: var(--c) }
|
|
107
|
+
details { border-bottom: 1px solid var(--line) }
|
|
108
|
+
details:first-of-type { border-top: 1px solid var(--line) }
|
|
109
|
+
summary { display: flex; justify-content: space-between; gap: 24px; align-items: baseline; padding: 16px 0; cursor: pointer; list-style: none; font-size: 15px }
|
|
110
|
+
summary::-webkit-details-marker { display: none }
|
|
111
|
+
summary::after { content: "+"; color: var(--faint); font: 400 17px/1 var(--sans) }
|
|
112
|
+
details[open] > summary::after { content: "\2212" }
|
|
113
|
+
summary .n { color: var(--faint); margin-left: auto; font-variant-numeric: tabular-nums }
|
|
114
|
+
summary:hover { color: var(--ink) }
|
|
115
|
+
.rows { list-style: none; margin: 0; padding: 0 0 24px; display: flex; flex-direction: column; gap: 12px }
|
|
116
|
+
.rows li { display: flex; flex-direction: column; gap: 2px; min-width: 0 }
|
|
117
|
+
.rows .path { font: 13px/1.6 var(--mono); overflow-wrap: anywhere }
|
|
118
|
+
.rows .text { font-size: 15px; color: var(--muted) }
|
|
119
|
+
.facts { margin: 0; padding: 0 0 24px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 24px; font-size: 15px }
|
|
120
|
+
.facts dt { color: var(--faint) }
|
|
121
|
+
.facts dd { margin: 0; overflow-wrap: anywhere }
|
|
122
|
+
.section { display: flex; flex-direction: column; gap: 24px }
|
|
123
|
+
noscript p { font-size: 15px; color: var(--muted) }
|
|
124
|
+
|
|
125
|
+
@media (max-width: 560px) {
|
|
126
|
+
body { font-size: 16px }
|
|
127
|
+
.page { gap: 48px; padding-block: 24px 72px }
|
|
128
|
+
h1 { font-size: 32px } h1.sub { font-size: 26px }
|
|
129
|
+
.lede { font-size: 18px }
|
|
130
|
+
}
|
|
131
|
+
</style>
|
|
132
|
+
<!--BACKSPEC_BODY-->
|
|
133
|
+
<div class="page">
|
|
134
|
+
<header class="top">
|
|
135
|
+
<p class="overline">Requirements</p>
|
|
136
|
+
<nav id="nav" aria-label="Views">
|
|
137
|
+
<a href="#overview" data-view="overview">Overview</a>
|
|
138
|
+
<a href="#review" data-view="review">To review</a>
|
|
139
|
+
<a href="#coverage" data-view="coverage">Coverage</a>
|
|
140
|
+
</nav>
|
|
141
|
+
</header>
|
|
142
|
+
<main id="view"></main>
|
|
143
|
+
<noscript><p>This report needs JavaScript to draw itself. The data is embedded in this file as JSON.</p></noscript>
|
|
144
|
+
</div>
|
|
145
|
+
<script type="application/json" id="backspec-data">__BACKSPEC_DATA__</script>
|
|
146
|
+
<script>
|
|
147
|
+
(function () {
|
|
148
|
+
"use strict";
|
|
149
|
+
var D = JSON.parse(document.getElementById("backspec-data").textContent);
|
|
150
|
+
var caps = D.capabilities || [], reqs = D.requirements || [], files = (D.coverage && D.coverage.files) || [];
|
|
151
|
+
var NAME = { direct: "Supported", partial: "Partly supported", insufficient: "Not supported", conflicting: "Contradicted", not_assessed: "Not checked" };
|
|
152
|
+
var TONE = { partial: "warn", insufficient: "bad", conflicting: "bad", not_assessed: "warn" };
|
|
153
|
+
var NOTE = { partial: "What the cited code does not show", insufficient: "Why the cited code is not enough", conflicting: "Where the code disagrees" };
|
|
154
|
+
var STATES = [["extracted", "read, with evidence", "--ink"], ["no_requirements", "read, nothing found", "--stone"],
|
|
155
|
+
["candidates_rejected", "read, citations rejected", "--warn"], ["failed", "failed", "--bad"],
|
|
156
|
+
["triaged_out", "skipped as irrelevant", "--line-mid"], ["skipped", "not source code", "--line-mid"], ["excluded", "excluded by pattern", "--line-mid"]];
|
|
157
|
+
var state = { q: "", open: {} };
|
|
158
|
+
var capName = {}, slugOf = {}, capOf = {};
|
|
159
|
+
caps.forEach(function (c) { capName[c.id] = c.name; slugOf[c.id] = "cap-" + c.id.toLowerCase().replace(/[^a-z0-9]+/g, "-"); capOf[slugOf[c.id]] = c; });
|
|
160
|
+
var weak = reqs.filter(function (r) { return r.support !== "direct"; });
|
|
161
|
+
|
|
162
|
+
function el(tag, attrs, kids) {
|
|
163
|
+
var node = document.createElement(tag), k;
|
|
164
|
+
for (k in attrs || {}) {
|
|
165
|
+
if (attrs[k] == null || attrs[k] === false) continue;
|
|
166
|
+
if (k === "text") node.textContent = attrs[k];
|
|
167
|
+
else if (k === "on") for (var e in attrs.on) node.addEventListener(e, attrs.on[e]);
|
|
168
|
+
else if (k === "style") node.style.cssText = attrs[k];
|
|
169
|
+
else node.setAttribute(k, attrs[k]);
|
|
170
|
+
}
|
|
171
|
+
(kids || []).forEach(function (kid) { if (kid != null) node.appendChild(typeof kid === "string" ? document.createTextNode(kid) : kid); });
|
|
172
|
+
return node;
|
|
173
|
+
}
|
|
174
|
+
function plural(n, one, many) { return n + " " + (n === 1 ? one : (many || one + "s")); }
|
|
175
|
+
function tone(key) { var t = TONE[key] || "ok"; return "--c:var(--" + t + ");--cs:var(--" + t + "-soft);--cl:var(--" + t + "-line)"; }
|
|
176
|
+
function overline(text) { return el("p", { class: "overline", text: text }); }
|
|
177
|
+
function mine(c) { return reqs.filter(function (r) { return r.capability === c.id; }); }
|
|
178
|
+
|
|
179
|
+
/* ---- a requirement: one sentence, and everything else on request ---- */
|
|
180
|
+
function quoted(quote, first, last) {
|
|
181
|
+
var rows = String(quote).split("\n"), exact = rows.length === last - first + 1, cells = [];
|
|
182
|
+
rows.forEach(function (row, i) {
|
|
183
|
+
cells.push(el("span", { class: "ln", text: exact || i === 0 ? String(first + i) : "" }));
|
|
184
|
+
cells.push(el("span", { class: "tx", text: row }));
|
|
185
|
+
});
|
|
186
|
+
return cells;
|
|
187
|
+
}
|
|
188
|
+
function citation(e) {
|
|
189
|
+
var first = e.lines[0], last = e.lines[1];
|
|
190
|
+
return el("div", { class: "cite" }, [
|
|
191
|
+
el("span", { class: "where", text: e.path + ":" + first + (last !== first ? "–" + last : "") + (e.symbol ? " · " + e.symbol : "") }),
|
|
192
|
+
el("pre", {}, [el("code", {}, quoted(e.quote, first, last))])]);
|
|
193
|
+
}
|
|
194
|
+
function detail(r) {
|
|
195
|
+
var facts = [r.level + " level", r.scope === "cross_file" ? "spans several files" : null,
|
|
196
|
+
r.review && r.review !== "unreviewed" ? r.review.replace("_", " ") : null].filter(Boolean).join(" · ");
|
|
197
|
+
return el("div", { class: "detail" }, [
|
|
198
|
+
r.support_note && r.support !== "direct" ? el("div", { class: "block" }, [overline(NOTE[r.support] || "Note"), el("p", { class: "note", text: r.support_note })]) : null,
|
|
199
|
+
(r.conditions || []).length ? el("div", { class: "block" }, [overline("Conditions"), el("ul", { class: "conds" }, r.conditions.map(function (c) { return el("li", { text: c }); }))]) : null,
|
|
200
|
+
(r.scenarios || []).length ? el("div", { class: "block" }, [overline(r.scenarios.length === 1 ? "Scenario" : "Scenarios")].concat(r.scenarios.map(function (s) {
|
|
201
|
+
return el("dl", { class: "scn" }, [el("strong", { text: s.name }), el("dt", { text: "Given" }), el("dd", { text: s.given }),
|
|
202
|
+
el("dt", { text: "When" }), el("dd", { text: s.when }), el("dt", { text: "Then" }), el("dd", { text: s.then })]); }))) : null,
|
|
203
|
+
el("div", { class: "block" }, [overline("Evidence")].concat((r.evidence || []).map(citation))),
|
|
204
|
+
el("div", { class: "idline caption" }, [el("button", { title: "Copy the id", text: r.id, on: { click: function (ev) {
|
|
205
|
+
var b = ev.currentTarget; try { navigator.clipboard.writeText(r.id).then(function () { b.textContent = "copied"; setTimeout(function () { b.textContent = r.id; }, 900); }, function () {}); } catch (e) {} } } }),
|
|
206
|
+
" · " + facts])]);
|
|
207
|
+
}
|
|
208
|
+
function requirement(r, withCapability) {
|
|
209
|
+
var open = !!state.open[r.id], n = (r.evidence || []).length, isWeak = r.support !== "direct";
|
|
210
|
+
var paths = {}; (r.evidence || []).forEach(function (e) { paths[e.path] = 1; });
|
|
211
|
+
var where = plural(n, "citation") + (Object.keys(paths).length > 1 ? " in " + Object.keys(paths).length + " files" : "");
|
|
212
|
+
var row = el("article", { class: "req", id: r.id, "data-open": String(open), "data-weak": String(isWeak) }, [
|
|
213
|
+
el("button", { "aria-expanded": String(open), on: { click: function () { state.open[r.id] = !open; var fresh = requirement(r, withCapability); row.replaceWith(fresh); fresh.firstChild.focus({ preventScroll: true }); } } }, [
|
|
214
|
+
el("span", { class: "statement", text: r.statement }),
|
|
215
|
+
el("span", { class: "sub" }, [
|
|
216
|
+
isWeak ? el("span", { class: "chip", style: tone(r.support), text: NAME[r.support] || r.support }) : null,
|
|
217
|
+
el("span", { class: "caption", text: (withCapability ? (capName[r.capability] || r.capability) + " · " : "") + where })])])]);
|
|
218
|
+
if (open) row.appendChild(detail(r));
|
|
219
|
+
return row;
|
|
220
|
+
}
|
|
221
|
+
function reqList(list, withCapability) { return el("div", { class: "list" }, list.map(function (r) { return requirement(r, withCapability); })); }
|
|
222
|
+
|
|
223
|
+
/* ---- overview: the capabilities, nothing else ---- */
|
|
224
|
+
function overview(box) {
|
|
225
|
+
var read = files.filter(function (f) { return ["excluded", "skipped", "triaged_out"].indexOf(f.state) < 0; }).length;
|
|
226
|
+
var withReqs = caps.filter(function (c) { return mine(c).length; });
|
|
227
|
+
var lede = el("p", { class: "lede" }, [el("b", { text: plural(reqs.length, "requirement") }), " in " + plural(withReqs.length, "capability", "capabilities") +
|
|
228
|
+
", each traced to the lines of code that show it. backspec read " + read + " of " + plural(files.length, "file") + "."]);
|
|
229
|
+
if (weak.length) { lede.appendChild(document.createTextNode(" ")); lede.appendChild(el("a", { href: "#review", text: weak.length === 1 ? "One needs a second look." : weak.length + " need a second look." })); }
|
|
230
|
+
var results = el("div", { class: "section" });
|
|
231
|
+
function fill() {
|
|
232
|
+
results.textContent = "";
|
|
233
|
+
var q = state.q.trim().toLowerCase();
|
|
234
|
+
if (!q) {
|
|
235
|
+
results.appendChild(el("div", { class: "list" }, withReqs.map(function (c) {
|
|
236
|
+
var all = mine(c), flagged = all.filter(function (r) { return r.support !== "direct"; }).length;
|
|
237
|
+
return el("a", { class: "caprow", href: "#" + slugOf[c.id] }, [el("h2", { text: c.name }), el("span", { class: "n", text: String(all.length) }),
|
|
238
|
+
c.summary ? el("p", { text: c.summary }) : null, flagged ? el("span", { class: "flag", text: flagged + " to review" }) : null]); })));
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
var words = q.split(/\s+/), hits = reqs.filter(function (r) {
|
|
242
|
+
var hay = [r.statement, r.id, (r.conditions || []).join(" "), (r.evidence || []).map(function (e) { return e.path + " " + (e.symbol || ""); }).join(" ")].join(" ").toLowerCase();
|
|
243
|
+
return words.every(function (w) { return hay.indexOf(w) >= 0; }); });
|
|
244
|
+
results.appendChild(el("p", { class: "quiet", text: hits.length ? plural(hits.length, "requirement") + " found" : "Nothing matches. Search looks at statements, ids and file paths." }));
|
|
245
|
+
if (hits.length) results.appendChild(reqList(hits, true));
|
|
246
|
+
}
|
|
247
|
+
box.appendChild(el("div", { class: "intro" }, [el("h1", { text: D.title }), lede]));
|
|
248
|
+
box.appendChild(el("div", { class: "section" }, [
|
|
249
|
+
el("input", { class: "search", type: "search", placeholder: "Search requirements", "aria-label": "Search requirements", value: state.q,
|
|
250
|
+
on: { input: function (ev) { state.q = ev.target.value; fill(); } } }), results]));
|
|
251
|
+
fill();
|
|
252
|
+
if (!reqs.length) results.appendChild(el("p", { class: "quiet", text: "This run produced no requirements. Coverage shows what was read." }));
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/* ---- one capability ---- */
|
|
256
|
+
function capability(box, c) {
|
|
257
|
+
var all = mine(c);
|
|
258
|
+
box.appendChild(el("div", { class: "intro" }, [el("a", { class: "back", href: "#overview", text: "← All capabilities" }),
|
|
259
|
+
el("h1", { class: "sub", text: c.name }), c.summary ? el("p", { class: "lede", text: c.summary }) : null]));
|
|
260
|
+
box.appendChild(el("div", { class: "section" }, [el("p", { class: "quiet", text: plural(all.length, "requirement") + ". Open one to see its evidence." }), reqList(all, false)]));
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/* ---- to review ---- */
|
|
264
|
+
function fold(title, count, body, open) {
|
|
265
|
+
return el("details", { open: open ? "" : null }, [el("summary", {}, [el("span", { text: title }), el("span", { class: "n", text: String(count) })]), body]);
|
|
266
|
+
}
|
|
267
|
+
function review(box) {
|
|
268
|
+
var diag = D.diagnostics || {}, folds = [];
|
|
269
|
+
box.appendChild(el("div", { class: "intro" }, [el("h1", { class: "sub", text: "To review" }),
|
|
270
|
+
el("p", { class: "lede", text: weak.length ? "A second model checked every requirement against the code it cites. " + (weak.length === 1 ? "One was" : weak.length + " were") + " not fully supported."
|
|
271
|
+
: "A second model checked every requirement against the code it cites, and all of them held." })]));
|
|
272
|
+
if (weak.length) box.appendChild(reqList(weak, true));
|
|
273
|
+
var oq = diag.open_questions || {}, questions = [];
|
|
274
|
+
Object.keys(oq).forEach(function (k) { oq[k].forEach(function (q) { questions.push(el("li", {}, [el("span", { class: "text", text: q }), el("span", { class: "caption", text: capName[k] || k })])); }); });
|
|
275
|
+
if (questions.length) folds.push(fold("Questions the code does not answer", questions.length, el("ul", { class: "rows" }, questions)));
|
|
276
|
+
var lint = diag.lint || [];
|
|
277
|
+
if (lint.length) folds.push(fold("Wording and structure checks", lint.length, el("ul", { class: "rows" }, lint.map(function (f) {
|
|
278
|
+
return el("li", {}, [el("span", { class: "text", text: f.message }), el("span", { class: "caption", text: f.severity + " · " + f.code })]); }))));
|
|
279
|
+
var rej = diag.rejected || [];
|
|
280
|
+
if (rej.length) folds.push(fold("Observations whose citation did not check out", rej.length, el("ul", { class: "rows" }, rej.map(function (r) {
|
|
281
|
+
return el("li", {}, [el("span", { class: "text", text: r.statement }), el("span", { class: "caption", text: r.path + " · " + r.reason })]); }))));
|
|
282
|
+
if ((D.hidden || []).length) folds.push(fold("Rejected by a reviewer", D.hidden.length, el("ul", { class: "rows" }, D.hidden.map(function (r) { return el("li", {}, [el("span", { class: "text", text: r.statement })]); }))));
|
|
283
|
+
var failed = Object.assign({}, diag.failed_stages || {}, diag.failed_capabilities || {}, diag.unconsolidated || {}, diag.triage_unresolved || {}), names = Object.keys(failed);
|
|
284
|
+
if (names.length) folds.push(fold("Steps that failed", names.length, el("ul", { class: "rows" }, names.map(function (k) {
|
|
285
|
+
return el("li", {}, [el("span", { class: "text", text: capName[k] || k }), el("span", { class: "caption", text: String(failed[k]) })]); }))));
|
|
286
|
+
if (diag.dropped_scenarios) folds.push(fold("Scenarios left out for missing parts", diag.dropped_scenarios, el("p", { class: "quiet", style: "padding-bottom:24px", text: "A scenario is kept only when it is complete and cites a real observation." })));
|
|
287
|
+
if (folds.length) box.appendChild(el("div", { class: "section" }, [overline("Also worth knowing"), el("div", {}, folds)]));
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/* ---- coverage ---- */
|
|
291
|
+
function coverage(box) {
|
|
292
|
+
var run = D.run || {}, groups = STATES.map(function (s) { return [s, files.filter(function (f) { return f.state === s[0]; })]; }).filter(function (g) { return g[1].length; });
|
|
293
|
+
var read = files.filter(function (f) { return ["excluded", "skipped", "triaged_out"].indexOf(f.state) < 0; }).length;
|
|
294
|
+
box.appendChild(el("div", { class: "intro" }, [el("h1", { class: "sub", text: "Coverage" }),
|
|
295
|
+
el("p", { class: "lede" }, [el("b", { text: read + " of " + plural(files.length, "file") }), " were read. This shows where backspec looked. It does not show that everything in a file was found."]),
|
|
296
|
+
el("div", { class: "bar", role: "img", "aria-label": groups.map(function (g) { return g[1].length + " " + g[0][1]; }).join(", ") },
|
|
297
|
+
groups.map(function (g) { return el("i", { style: "flex:" + g[1].length + ";--c:var(" + g[0][2] + ")" }); }))]));
|
|
298
|
+
box.appendChild(el("div", {}, groups.map(function (g) {
|
|
299
|
+
return fold(g[0][1].charAt(0).toUpperCase() + g[0][1].slice(1), g[1].length, el("ul", { class: "rows" }, g[1].map(function (f) {
|
|
300
|
+
var said = f.observations ? plural(f.observations, "observation") + (f.cited_by ? ", cited by " + plural(f.cited_by, "requirement") : ", cited by none") : (f.reason || "");
|
|
301
|
+
return el("li", {}, [el("span", { class: "path", text: f.path }), said ? el("span", { class: "caption", text: said }) : null]); }))); })));
|
|
302
|
+
var more = [], unused = (D.coverage && D.coverage.unused_observations) || {}, names = Object.keys(unused).filter(function (k) { return unused[k]; });
|
|
303
|
+
if (names.length) more.push(fold("Evidence no requirement used", names.reduce(function (a, k) { return a + unused[k]; }, 0), el("ul", { class: "rows" }, names.map(function (k) {
|
|
304
|
+
return el("li", {}, [el("span", { class: "text", text: capName[k] || k }), el("span", { class: "caption", text: plural(unused[k], "unused observation") })]); }))));
|
|
305
|
+
var audit = D.coverage && D.coverage.triage_audit;
|
|
306
|
+
if (audit && audit.skipped) more.push(fold("Check on the skipped files", audit.audited + " of " + audit.skipped, el("p", { class: "quiet", style: "padding-bottom:24px",
|
|
307
|
+
text: plural(audit.audited, "skipped file") + (audit.audited === 1 ? " was" : " were") + " read anyway, and " + (audit.yielded ? audit.yielded + " held evidence." : "none held evidence.") +
|
|
308
|
+
(audit.miss_rate_interval ? " With a sample this size, between " + Math.round(audit.miss_rate_interval[0] * 100) + "% and " + Math.round(audit.miss_rate_interval[1] * 100) + "% of skipped files could hold evidence." : "") })));
|
|
309
|
+
var facts = [["Status", run.status + (run.stopped_after ? ", stopped after " + run.stopped_after : "") + (run.budget_reached ? ", token budget reached" : "")], ["Model backend", run.provider],
|
|
310
|
+
["Model calls", run.calls != null ? run.calls + (run.cached_calls ? " (and " + run.cached_calls + " from cache)" : "") : null],
|
|
311
|
+
["Tokens", run.input_tokens || run.output_tokens ? (run.input_tokens + run.output_tokens).toLocaleString() + (run.tokens_estimated ? " (estimated)" : "") : null],
|
|
312
|
+
["Cost", run.cost_usd ? "$" + run.cost_usd.toFixed(2) : null],
|
|
313
|
+
["Reused", run.reused_files ? plural(run.reused_files, "unchanged file") : null],
|
|
314
|
+
["Parsed", run.syntax_files ? run.syntax_files + " of " + (run.syntax_files + (run.text_files || 0)) + " files with tree-sitter" : null],
|
|
315
|
+
["Observations", (D.observations || []).length ? (D.observations || []).length + " verified" : null], ["backspec", run.tool_version]].filter(function (f) { return f[1] != null && f[1] !== "undefined"; });
|
|
316
|
+
more.push(fold("About this run", "", el("dl", { class: "facts" }, facts.reduce(function (a, f) { return a.concat([el("dt", { text: f[0] }), el("dd", { text: String(f[1]) })]); }, []))));
|
|
317
|
+
box.appendChild(el("div", { class: "section" }, [overline("More"), el("div", {}, more)]));
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/* ---- routing ---- */
|
|
321
|
+
function draw() {
|
|
322
|
+
var hash = (location.hash || "").slice(1), box = document.getElementById("view"), view = "overview";
|
|
323
|
+
box.textContent = "";
|
|
324
|
+
if (capOf[hash]) capability(box, capOf[hash]);
|
|
325
|
+
else if (hash === "review") { view = "review"; review(box); }
|
|
326
|
+
else if (hash === "coverage") { view = "coverage"; coverage(box); }
|
|
327
|
+
else overview(box);
|
|
328
|
+
Array.prototype.forEach.call(document.querySelectorAll("#nav a"), function (a) {
|
|
329
|
+
if (a.dataset.view === "review") a.textContent = weak.length ? "To review (" + weak.length + ")" : "To review";
|
|
330
|
+
if (a.dataset.view === view) a.setAttribute("aria-current", "page"); else a.removeAttribute("aria-current"); });
|
|
331
|
+
window.scrollTo(0, 0);
|
|
332
|
+
}
|
|
333
|
+
window.addEventListener("hashchange", draw);
|
|
334
|
+
draw();
|
|
335
|
+
})();
|
|
336
|
+
</script>
|