bigpowers 2.73.2 → 2.73.3
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.
- package/.pi/package.json +1 -1
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/scripts/lib/trace-stories.py +9 -28
package/.pi/package.json
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [2.73.3](https://github.com/danielvm-git/bigpowers/compare/v2.73.2...v2.73.3) (2026-07-06)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **trace:** trim trace-stories.py under 300-line cap ([879bb8a](https://github.com/danielvm-git/bigpowers/commit/879bb8a87940a4bf337dfed7406359f744e09a31))
|
|
7
|
+
|
|
1
8
|
## [2.73.2](https://github.com/danielvm-git/bigpowers/compare/v2.73.1...v2.73.2) (2026-07-06)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -8,10 +8,7 @@ Usage: called by scripts/trace-stories.sh with positional args:
|
|
|
8
8
|
python3 scripts/lib/trace-stories.py <repo_root> <matrix_json> <trace_md>
|
|
9
9
|
<okf_dir> <strict> <mode>
|
|
10
10
|
|
|
11
|
-
Oracle tiers (
|
|
12
|
-
Tier 1: explicit story tag → confidence high
|
|
13
|
-
Tier 2: file-name heuristic match → confidence medium
|
|
14
|
-
Tier 3: epic capsule task reference → confidence low
|
|
11
|
+
Oracle tiers: Tier 1 explicit tag (high), Tier 2 file heuristic (medium), Tier 3 task ref (low).
|
|
15
12
|
"""
|
|
16
13
|
|
|
17
14
|
import json, os, re, subprocess, sys
|
|
@@ -26,9 +23,7 @@ OKF_DIR = Path(sys.argv[4])
|
|
|
26
23
|
STRICT = int(sys.argv[5])
|
|
27
24
|
MODE = sys.argv[6]
|
|
28
25
|
|
|
29
|
-
#
|
|
30
|
-
# 1. Parse YAML files → story inventory
|
|
31
|
-
# -----------------------------------------------------------------------
|
|
26
|
+
# --- 1. Parse YAML files → story inventory
|
|
32
27
|
_MIN_STORY_BASELINE = 50 # floor assertion: --strict FAILs if story count drops below this
|
|
33
28
|
_STRICT_UNIMPLEMENTED_STATUSES = frozenset({"backlog", "todo", "planned"})
|
|
34
29
|
|
|
@@ -45,9 +40,7 @@ release = _load_yaml(ROOT / "specs" / "release-plan.yaml")
|
|
|
45
40
|
exec_status = _load_yaml(ROOT / "specs" / "execution-status.yaml")
|
|
46
41
|
dev_status = exec_status.get("development_status", {})
|
|
47
42
|
|
|
48
|
-
#
|
|
49
|
-
# 2. Build story inventory
|
|
50
|
-
# -----------------------------------------------------------------------
|
|
43
|
+
# --- 2. Build story inventory
|
|
51
44
|
stories: dict[str, dict] = {}
|
|
52
45
|
epics = release.get("epics", [])
|
|
53
46
|
if not isinstance(epics, list):
|
|
@@ -82,9 +75,7 @@ for epic in epics:
|
|
|
82
75
|
"bcp": s.get("bcp", 0), "wsjf": float(ewsjf),
|
|
83
76
|
"description": s.get("description", "")}
|
|
84
77
|
|
|
85
|
-
#
|
|
86
|
-
# 3. Grep codebase for story tags
|
|
87
|
-
# -----------------------------------------------------------------------
|
|
78
|
+
# --- 3. Grep codebase for story tags
|
|
88
79
|
result = subprocess.run(
|
|
89
80
|
["grep", "-rn", "--include=*.md", "--include=*.sh", "--include=*.py",
|
|
90
81
|
"--include=*.js", "--include=*.ts", "--include=*.yaml", "--include=*.yml",
|
|
@@ -104,9 +95,7 @@ for line in result.stdout.splitlines():
|
|
|
104
95
|
tagged_sids.add(sid)
|
|
105
96
|
tag_index.setdefault(sid, []).append({"file": fpath, "line": fline})
|
|
106
97
|
|
|
107
|
-
#
|
|
108
|
-
# 4. Oracle tiers
|
|
109
|
-
# -----------------------------------------------------------------------
|
|
98
|
+
# --- 4. Oracle tiers
|
|
110
99
|
EXCLUDE_DIRS = {".git", "node_modules", ".cursor", ".gemini", ".pi", ".venv", "venv", ".tox", "__pycache__", "site-packages", ".mypy_cache", ".pytest_cache", ".ruff_cache"}
|
|
111
100
|
EXCLUDE_PREFIXES = ("specs/archive/", "specs/codebase-wiki/")
|
|
112
101
|
|
|
@@ -177,9 +166,7 @@ for sid, sinfo in sorted(stories.items()):
|
|
|
177
166
|
orphan_tags = [sid for sid in sorted(tagged_sids) if sid not in stories]
|
|
178
167
|
stale_tags = [sid for sid in sorted(tagged_sids) if sid in stories and dev_status.get(sid) == "done"]
|
|
179
168
|
|
|
180
|
-
#
|
|
181
|
-
# 5. Emit matrix JSON
|
|
182
|
-
# -----------------------------------------------------------------------
|
|
169
|
+
# --- 5. Emit matrix JSON
|
|
183
170
|
matrix = {
|
|
184
171
|
"generated_at": datetime.now(timezone.utc).isoformat(),
|
|
185
172
|
"matrix_version": "1.0",
|
|
@@ -200,9 +187,7 @@ matrix = {
|
|
|
200
187
|
MATRIX_JSON.parent.mkdir(parents=True, exist_ok=True)
|
|
201
188
|
MATRIX_JSON.write_text(json.dumps(matrix, indent=2), encoding="utf-8")
|
|
202
189
|
|
|
203
|
-
#
|
|
204
|
-
# 6. Emit TRACEABILITY_LATEST.md
|
|
205
|
-
# -----------------------------------------------------------------------
|
|
190
|
+
# --- 6. Emit TRACEABILITY_LATEST.md
|
|
206
191
|
lines = ["# Traceability Matrix", "",
|
|
207
192
|
f"**Generated:** {datetime.now(timezone.utc).strftime('%Y-%m-%d %H:%M:%S UTC')}",
|
|
208
193
|
f"**Total stories:** {len(stories)}",
|
|
@@ -237,9 +222,7 @@ if stale_tags:
|
|
|
237
222
|
TRACE_MD.parent.mkdir(parents=True, exist_ok=True)
|
|
238
223
|
TRACE_MD.write_text("\n".join(lines), encoding="utf-8")
|
|
239
224
|
|
|
240
|
-
#
|
|
241
|
-
# 7. Emit OKF bundle (specs/codebase-wiki/)
|
|
242
|
-
# -----------------------------------------------------------------------
|
|
225
|
+
# --- 7. Emit OKF bundle (specs/codebase-wiki/)
|
|
243
226
|
OKF_DIR.mkdir(parents=True, exist_ok=True)
|
|
244
227
|
idx_lines = ["---", "type: Index",
|
|
245
228
|
f"generated_at: {datetime.now(timezone.utc).isoformat()}",
|
|
@@ -278,9 +261,7 @@ for s in matrix_stories:
|
|
|
278
261
|
concept.append("")
|
|
279
262
|
(OKF_DIR / f"{s['id']}.md").write_text("\n".join(concept), encoding="utf-8")
|
|
280
263
|
|
|
281
|
-
#
|
|
282
|
-
# 8. Strict mode
|
|
283
|
-
# -----------------------------------------------------------------------
|
|
264
|
+
# --- 8. Strict mode
|
|
284
265
|
if STRICT:
|
|
285
266
|
# Floor assertion — anti-vacuity guard: if story count drops below baseline
|
|
286
267
|
# the matrix is degenerate and --strict must fail open.
|