its-magic 0.1.2-9 → 0.1.2
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/README.md +1602 -755
- package/bin/its-magic.js +121 -11
- package/bin/postinstall.js +21 -0
- package/installer.ps1 +759 -0
- package/installer.py +981 -0
- package/installer.sh +649 -0
- package/package.json +18 -14
- package/scripts/check_intake_template_parity.py +284 -0
- package/scripts/doc_profile_lib.py +415 -0
- package/scripts/guard_installer_publish.py +88 -0
- package/scripts/intake_bug_routing_guard.py +67 -0
- package/scripts/intake_evidence_lib.py +802 -0
- package/scripts/intake_evidence_validate.py +73 -0
- package/scripts/materialize_codebase_map.py +184 -0
- package/scripts/remote_config_summary.py +243 -0
- package/template/.cursor/agents/curator.mdc +35 -0
- package/template/.cursor/agents/dev.mdc +29 -0
- package/template/.cursor/agents/po.mdc +141 -0
- package/template/.cursor/agents/qa.mdc +28 -0
- package/template/.cursor/agents/release.mdc +28 -0
- package/template/.cursor/agents/security.mdc +98 -0
- package/template/.cursor/agents/tech-lead.mdc +57 -0
- package/template/.cursor/commands/architecture.md +127 -0
- package/template/.cursor/commands/ask.md +55 -0
- package/template/.cursor/commands/auto.md +533 -0
- package/template/.cursor/commands/discovery.md +47 -0
- package/template/.cursor/commands/execute.md +343 -0
- package/template/.cursor/commands/intake.md +323 -0
- package/template/.cursor/commands/map-codebase.md +46 -0
- package/template/.cursor/commands/memory-audit.md +175 -0
- package/template/.cursor/commands/milestone-complete.md +51 -0
- package/template/.cursor/commands/milestone-start.md +59 -0
- package/template/.cursor/commands/pause.md +64 -0
- package/{.cursor/commands/gsd-phase-context.md → template/.cursor/commands/phase-context.md} +6 -2
- package/template/.cursor/commands/plan-verify.md +34 -0
- package/template/.cursor/commands/qa.md +226 -0
- package/template/.cursor/commands/quick.md +41 -0
- package/template/.cursor/commands/refresh-context.md +82 -0
- package/template/.cursor/commands/release.md +505 -0
- package/template/.cursor/commands/research.md +49 -0
- package/template/.cursor/commands/resume.md +67 -0
- package/template/.cursor/commands/security-review.md +81 -0
- package/template/.cursor/commands/sprint-plan.md +103 -0
- package/template/.cursor/commands/status-reconcile.md +95 -0
- package/template/.cursor/commands/verify-work.md +152 -0
- package/template/.cursor/dev-environment.json.example +22 -0
- package/{.cursor → template/.cursor}/hooks/README.md +3 -2
- package/{.cursor/hooks/gsd-hook.py → template/.cursor/hooks/hook.py} +15 -6
- package/template/.cursor/hooks.json +26 -0
- package/template/.cursor/remote.json +31 -0
- package/template/.cursor/rules/caveman.mdc +184 -0
- package/template/.cursor/rules/coding-standards.mdc +39 -0
- package/template/.cursor/rules/core.mdc +111 -0
- package/template/.cursor/rules/handoffs.mdc +27 -0
- package/template/.cursor/rules/quality.mdc +49 -0
- package/template/.cursor/scratchpad.local.example.md +323 -0
- package/template/.cursor/scratchpad.md +324 -0
- package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/SKILL.md +2 -2
- package/template/.cursorignore +6 -0
- package/template/.env.example +28 -0
- package/template/.github/workflows/ci.yml +194 -0
- package/{.github → template/.github}/workflows/deploy.yml +5 -2
- package/template/.its-magic-version +1 -0
- package/template/README.md +1602 -0
- package/template/decisions/DEC-0001.md +11 -0
- package/template/decisions/DEC-0002.md +11 -0
- package/template/docs/developer/README.md +44 -0
- package/template/docs/engineering/architecture.md +9 -0
- package/template/docs/engineering/artifact-ordering-policy.md +48 -0
- package/template/docs/engineering/artifact-ownership-policy.md +57 -0
- package/template/docs/engineering/auto-orchestration-reference.md +1211 -0
- package/{docs → template/docs}/engineering/codebase-map.md +0 -5
- package/template/docs/engineering/compatibility-report.md +20 -0
- package/template/docs/engineering/compatibility-signals.md +7 -0
- package/template/docs/engineering/component-scope-report.md +16 -0
- package/template/docs/engineering/component-scope.md +19 -0
- package/template/docs/engineering/context/installer-owned-paths.manifest +96 -0
- package/template/docs/engineering/context/readme-section-affinity.json +30 -0
- package/template/docs/engineering/decisions.md +16 -0
- package/template/docs/engineering/legacy-drift-audit.md +21 -0
- package/template/docs/engineering/manifests/components/api-gateway.manifest.yaml +12 -0
- package/template/docs/engineering/manifests/registry.manifest.yaml +20 -0
- package/template/docs/engineering/manifests/repo.manifest.yaml +11 -0
- package/template/docs/engineering/phase-context.md +16 -0
- package/template/docs/engineering/release-targets.json +123 -0
- package/template/docs/engineering/research.md +29 -0
- package/template/docs/engineering/runbook.md +2320 -0
- package/template/docs/engineering/runtime-connectivity.md +81 -0
- package/template/docs/engineering/security-review.md +33 -0
- package/template/docs/engineering/spec-pack/README.md +20 -0
- package/template/docs/engineering/state-archive/README.md +15 -0
- package/template/docs/engineering/state.md +20 -0
- package/template/docs/engineering/status-normalization-report.md +19 -0
- package/template/docs/engineering/token-cost-parity-manifest.md +16 -0
- package/template/docs/engineering/us-0084-remote-e2e.md +44 -0
- package/template/docs/product/acceptance.md +1 -0
- package/template/docs/product/backlog.md +5 -0
- package/template/docs/product/vision.md +11 -0
- package/template/docs/user-guides/README.md +40 -0
- package/{handoffs → template/handoffs}/dev_to_qa.md +0 -3
- package/{handoffs → template/handoffs}/po_to_tl.md +0 -3
- package/{handoffs → template/handoffs}/qa_to_dev.md +1 -2
- package/template/handoffs/release_notes.md +51 -0
- package/template/handoffs/release_queue.md +47 -0
- package/template/handoffs/release_to_dev.md +31 -0
- package/template/handoffs/releases/Sxxxx-release-notes.md +62 -0
- package/template/handoffs/resume_brief.md +14 -0
- package/{handoffs → template/handoffs}/tl_to_dev.md +0 -2
- package/template/handoffs/token_cost_runs/README.md +26 -0
- package/template/its_magic/.its-magic-version +1 -0
- package/template/its_magic/README.md +9 -0
- package/template/scripts/auto_outer_driver.py +521 -0
- package/template/scripts/caveman_compress_input.py +903 -0
- package/template/scripts/check_downstream_ci_guard.py +67 -0
- package/template/scripts/check_intake_template_parity.py +284 -0
- package/template/scripts/check_token_cost_parity.py +69 -0
- package/template/scripts/dev_environment_lib.py +463 -0
- package/template/scripts/doc_profile_lib.py +415 -0
- package/template/scripts/downstream_ci_guard_lib.py +222 -0
- package/template/scripts/enforce-triad-hot-surface.py +753 -0
- package/template/scripts/guard_installer_publish.py +88 -0
- package/template/scripts/intake_bug_resume_brief_refresh.py +303 -0
- package/template/scripts/intake_bug_routing_guard.py +67 -0
- package/template/scripts/intake_evidence_lib.py +802 -0
- package/template/scripts/intake_evidence_validate.py +73 -0
- package/template/scripts/materialize_codebase_map.py +184 -0
- package/template/scripts/pack_json_validate.py +130 -0
- package/template/scripts/project_readme_coverage_lib.py +417 -0
- package/template/scripts/readme_feature_coverage_lib.py +608 -0
- package/template/scripts/remote_config_summary.py +243 -0
- package/template/scripts/sync_push_gates.py +198 -0
- package/template/scripts/token_cost_compare.py +40 -0
- package/template/scripts/token_cost_lib.py +108 -0
- package/template/scripts/uat_probe_lib.py +868 -0
- package/template/scripts/validate-and-push.ps1 +280 -0
- package/template/scripts/validate-and-push.sh +243 -0
- package/template/scripts/validate_doc_profile.py +103 -0
- package/template/scripts/validate_project_readme_coverage.py +151 -0
- package/template/scripts/validate_readme_feature_coverage.py +140 -0
- package/template/sprints/S0001/progress.md +1 -0
- package/template/sprints/S0001/qa-findings.md +9 -0
- package/template/sprints/S0001/release-findings.md +24 -0
- package/template/sprints/S0001/sprint.md +9 -0
- package/template/sprints/S0001/summary.md +7 -0
- package/template/sprints/S0001/tasks.md +1 -0
- package/template/sprints/S0001/uat.json +6 -0
- package/template/sprints/S0001/uat.md +5 -0
- package/template/sprints/quick/Q0001/summary.md +1 -0
- package/{sprints → template/sprints}/quick/Q0001/task.json +0 -1
- package/.cursor/agents/curator.mdc +0 -21
- package/.cursor/agents/dev.mdc +0 -20
- package/.cursor/agents/po.mdc +0 -19
- package/.cursor/agents/qa.mdc +0 -19
- package/.cursor/agents/release.mdc +0 -19
- package/.cursor/agents/tech-lead.mdc +0 -21
- package/.cursor/commands/gsd-architecture.md +0 -29
- package/.cursor/commands/gsd-auto.md +0 -27
- package/.cursor/commands/gsd-discovery.md +0 -27
- package/.cursor/commands/gsd-execute.md +0 -32
- package/.cursor/commands/gsd-intake.md +0 -28
- package/.cursor/commands/gsd-map-codebase.md +0 -25
- package/.cursor/commands/gsd-milestone-complete.md +0 -24
- package/.cursor/commands/gsd-milestone-start.md +0 -26
- package/.cursor/commands/gsd-pause.md +0 -25
- package/.cursor/commands/gsd-plan-verify.md +0 -26
- package/.cursor/commands/gsd-qa.md +0 -28
- package/.cursor/commands/gsd-quick.md +0 -24
- package/.cursor/commands/gsd-refresh-context.md +0 -26
- package/.cursor/commands/gsd-release.md +0 -29
- package/.cursor/commands/gsd-research.md +0 -28
- package/.cursor/commands/gsd-resume.md +0 -26
- package/.cursor/commands/gsd-sprint-plan.md +0 -30
- package/.cursor/commands/gsd-verify-work.md +0 -25
- package/.cursor/hooks.json +0 -26
- package/.cursor/plans/cursor-gsd-team-kit_8cfee9b8.plan.md +0 -57
- package/.cursor/remote.json +0 -18
- package/.cursor/rules/gsd-core.mdc +0 -18
- package/.cursor/rules/gsd-handoffs.mdc +0 -10
- package/.cursor/rules/gsd-quality.mdc +0 -15
- package/.cursor/scratchpad.md +0 -34
- package/.github/workflows/ci.yml +0 -47
- package/decisions/DEC-0001.md +0 -21
- package/decisions/DEC-0002.md +0 -21
- package/docs/engineering/architecture.md +0 -354
- package/docs/engineering/decisions.md +0 -6
- package/docs/engineering/research.md +0 -11
- package/docs/engineering/runbook.md +0 -32
- package/docs/engineering/state.md +0 -33
- package/docs/product/acceptance.md +0 -6
- package/docs/product/backlog.md +0 -7
- package/docs/product/vision.md +0 -46
- package/gsd-installer.ps1 +0 -189
- package/gsd-installer.py +0 -195
- package/gsd-installer.sh +0 -201
- package/handoffs/release_notes.md +0 -14
- package/handoffs/resume_brief.md +0 -8
- package/milestones/M0001/milestone.json +0 -7
- package/milestones/M0001/phases.json +0 -9
- package/milestones/M0001/progress.md +0 -3
- package/milestones/M0001/summary.md +0 -3
- package/scripts/generate-release-notes.ps1 +0 -74
- package/scripts/generate-release-notes.sh +0 -63
- package/scripts/release-all.ps1 +0 -423
- package/scripts/release-all.sh +0 -226
- package/sprints/S0001/progress.md +0 -4
- package/sprints/S0001/qa-findings.md +0 -113
- package/sprints/S0001/sprint.md +0 -70
- package/sprints/S0001/summary.md +0 -46
- package/sprints/S0001/tasks.md +0 -35
- package/sprints/S0001/uat.json +0 -8
- package/sprints/S0001/uat.md +0 -8
- package/sprints/quick/Q0001/summary.md +0 -3
- /package/{.cursor/rules/gsd-escalation.mdc → template/.cursor/rules/escalation.mdc} +0 -0
- /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/acceptance.json +0 -0
- /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/acceptance.md +0 -0
- /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/architecture.json +0 -0
- /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/architecture.md +0 -0
- /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/decision.json +0 -0
- /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/decision.md +0 -0
- /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/handoff.json +0 -0
- /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/handoff.md +0 -0
- /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/milestone.json +0 -0
- /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/phase-context.json +0 -0
- /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/plan-verify.json +0 -0
- /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/sprint.json +0 -0
- /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/sprint.md +0 -0
- /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/story.json +0 -0
- /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/story.md +0 -0
- /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/uat.json +0 -0
- /package/{docs → template/docs}/engineering/context/phase-template.json +0 -0
- /package/{docs → template/docs}/engineering/dependencies.json +0 -0
- /package/{sprints → template/sprints}/S0001/plan-verify.json +0 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Validate project root README catalog coverage vs backlog (US-0097 / DEC-0083).
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
|
|
8
|
+
import argparse
|
|
9
|
+
import os
|
|
10
|
+
import sys
|
|
11
|
+
|
|
12
|
+
_SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
|
|
13
|
+
_REPO_ROOT = os.path.normpath(os.path.join(_SCRIPT_DIR, ".."))
|
|
14
|
+
|
|
15
|
+
if _REPO_ROOT not in sys.path:
|
|
16
|
+
sys.path.insert(0, _REPO_ROOT)
|
|
17
|
+
if _SCRIPT_DIR not in sys.path:
|
|
18
|
+
sys.path.insert(0, _SCRIPT_DIR)
|
|
19
|
+
|
|
20
|
+
import installer # noqa: E402
|
|
21
|
+
import project_readme_coverage_lib as prc # noqa: E402
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _enforce_flag(merged: dict) -> bool:
|
|
25
|
+
raw = (merged.get("PROJECT_README_ENFORCE") or "1").strip()
|
|
26
|
+
return raw == "1"
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def main() -> int:
|
|
30
|
+
parser = argparse.ArgumentParser(
|
|
31
|
+
description="Validate project README catalog coverage vs backlog (DEC-0083)."
|
|
32
|
+
)
|
|
33
|
+
parser.add_argument(
|
|
34
|
+
"--repo",
|
|
35
|
+
default=_REPO_ROOT,
|
|
36
|
+
help="Target repository root (default: parent of scripts/).",
|
|
37
|
+
)
|
|
38
|
+
parser.add_argument(
|
|
39
|
+
"--backlog",
|
|
40
|
+
default=None,
|
|
41
|
+
help="Backlog file (default: docs/product/backlog.md under --repo).",
|
|
42
|
+
)
|
|
43
|
+
parser.add_argument(
|
|
44
|
+
"--self-test",
|
|
45
|
+
action="store_true",
|
|
46
|
+
help="Run sentinel matrix + schema stability checks.",
|
|
47
|
+
)
|
|
48
|
+
parser.add_argument(
|
|
49
|
+
"--report",
|
|
50
|
+
action="store_true",
|
|
51
|
+
help="Emit stable JSON report to stdout.",
|
|
52
|
+
)
|
|
53
|
+
parser.add_argument(
|
|
54
|
+
"--audit-out",
|
|
55
|
+
metavar="PATH",
|
|
56
|
+
default=None,
|
|
57
|
+
help="Write gap audit artifact (JSON) to PATH.",
|
|
58
|
+
)
|
|
59
|
+
parser.add_argument(
|
|
60
|
+
"--enforce",
|
|
61
|
+
action="store_true",
|
|
62
|
+
help="Blocking mode (required for /release when PROJECT_README_ENFORCE=1).",
|
|
63
|
+
)
|
|
64
|
+
parser.add_argument(
|
|
65
|
+
"--no-kit-skip",
|
|
66
|
+
action="store_true",
|
|
67
|
+
help="Validate root even when FRAMEWORK_KIT_REPO=1.",
|
|
68
|
+
)
|
|
69
|
+
args = parser.parse_args()
|
|
70
|
+
|
|
71
|
+
if args.self_test:
|
|
72
|
+
try:
|
|
73
|
+
prc.self_test_sentinel_matrix()
|
|
74
|
+
prc.self_test_report_schema()
|
|
75
|
+
except AssertionError as exc:
|
|
76
|
+
print(f"self-test failed: {exc}", file=sys.stderr)
|
|
77
|
+
return 2
|
|
78
|
+
print("[PROJECT_README_COVERAGE_SELF_TEST_OK]")
|
|
79
|
+
return 0
|
|
80
|
+
|
|
81
|
+
target = os.path.abspath(args.repo)
|
|
82
|
+
backlog = args.backlog or os.path.join(target, "docs", "product", "backlog.md")
|
|
83
|
+
if not os.path.isfile(backlog):
|
|
84
|
+
print(
|
|
85
|
+
f"{prc.REASON_INPUT_INVALID}: backlog not found: {backlog}",
|
|
86
|
+
file=sys.stderr,
|
|
87
|
+
)
|
|
88
|
+
return 2
|
|
89
|
+
|
|
90
|
+
merged, _paths = installer.merge_scratchpad_layers(target)
|
|
91
|
+
enforce = args.enforce or _enforce_flag(merged)
|
|
92
|
+
|
|
93
|
+
if prc.is_framework_kit_repo(merged) and not args.no_kit_skip and not args.enforce:
|
|
94
|
+
report = {
|
|
95
|
+
"catalog_marker_present": False,
|
|
96
|
+
"coverage_missing": [],
|
|
97
|
+
"coverage_present": [],
|
|
98
|
+
"coverage_total": 0,
|
|
99
|
+
"framework_paths_excluded": list(prc.FRAMEWORK_PATHS_EXCLUDED),
|
|
100
|
+
"gaps": [],
|
|
101
|
+
"kit_repo_skipped": True,
|
|
102
|
+
"report_schema_version": prc.REPORT_SCHEMA_VERSION,
|
|
103
|
+
"repo_root": ".",
|
|
104
|
+
"status": "PASS",
|
|
105
|
+
}
|
|
106
|
+
stderr_lines: list[str] = []
|
|
107
|
+
else:
|
|
108
|
+
report, stderr_lines = prc.build_report(
|
|
109
|
+
target,
|
|
110
|
+
backlog,
|
|
111
|
+
enforce=enforce,
|
|
112
|
+
merged=merged,
|
|
113
|
+
no_kit_skip=args.no_kit_skip,
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
if args.audit_out:
|
|
117
|
+
audit_path = args.audit_out
|
|
118
|
+
if not os.path.isabs(audit_path):
|
|
119
|
+
audit_path = os.path.join(target, audit_path)
|
|
120
|
+
os.makedirs(os.path.dirname(audit_path) or ".", exist_ok=True)
|
|
121
|
+
audit_obj = {
|
|
122
|
+
"audit_schema_version": 1,
|
|
123
|
+
"coverage_total": report["coverage_total"],
|
|
124
|
+
"gaps": report["gaps"],
|
|
125
|
+
"items": report["coverage_present"] + report["coverage_missing"],
|
|
126
|
+
"status": report["status"],
|
|
127
|
+
}
|
|
128
|
+
with open(audit_path, "w", encoding="utf-8", newline="\n") as f:
|
|
129
|
+
f.write(prc.canonical_json(audit_obj))
|
|
130
|
+
|
|
131
|
+
blocking = bool(stderr_lines) or report["status"] != "PASS"
|
|
132
|
+
|
|
133
|
+
if args.report or not args.audit_out:
|
|
134
|
+
sys.stdout.write(prc.canonical_json(report))
|
|
135
|
+
|
|
136
|
+
if blocking and (args.enforce or args.report):
|
|
137
|
+
print(prc.REASON_BLOCKED, file=sys.stderr)
|
|
138
|
+
for line in stderr_lines:
|
|
139
|
+
print(line, file=sys.stderr)
|
|
140
|
+
return 1
|
|
141
|
+
|
|
142
|
+
if blocking:
|
|
143
|
+
for line in stderr_lines:
|
|
144
|
+
print(line, file=sys.stderr)
|
|
145
|
+
return 1 if args.enforce else 0
|
|
146
|
+
|
|
147
|
+
return 0
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
if __name__ == "__main__":
|
|
151
|
+
sys.exit(main())
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Validate README feature coverage vs backlog (US-0091 / DEC-0074).
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
|
|
8
|
+
import argparse
|
|
9
|
+
import os
|
|
10
|
+
import sys
|
|
11
|
+
|
|
12
|
+
_SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
|
|
13
|
+
_REPO_ROOT = os.path.normpath(os.path.join(_SCRIPT_DIR, ".."))
|
|
14
|
+
|
|
15
|
+
if _REPO_ROOT not in sys.path:
|
|
16
|
+
sys.path.insert(0, _REPO_ROOT)
|
|
17
|
+
if _SCRIPT_DIR not in sys.path:
|
|
18
|
+
sys.path.insert(0, _SCRIPT_DIR)
|
|
19
|
+
|
|
20
|
+
import installer # noqa: E402
|
|
21
|
+
import readme_feature_coverage_lib as rfc # noqa: E402
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _enforce_flag(merged: dict) -> bool:
|
|
25
|
+
raw = (merged.get("README_FEATURE_COVERAGE_ENFORCE") or "0").strip()
|
|
26
|
+
return raw == "1"
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def main() -> int:
|
|
30
|
+
parser = argparse.ArgumentParser(
|
|
31
|
+
description="Validate README feature coverage vs backlog (DEC-0074)."
|
|
32
|
+
)
|
|
33
|
+
parser.add_argument(
|
|
34
|
+
"--repo",
|
|
35
|
+
default=_REPO_ROOT,
|
|
36
|
+
help="Target repository root (default: parent of scripts/).",
|
|
37
|
+
)
|
|
38
|
+
parser.add_argument(
|
|
39
|
+
"--backlog",
|
|
40
|
+
default=None,
|
|
41
|
+
help="Backlog file (default: docs/product/backlog.md under --repo).",
|
|
42
|
+
)
|
|
43
|
+
parser.add_argument(
|
|
44
|
+
"--self-test",
|
|
45
|
+
action="store_true",
|
|
46
|
+
help="Run predicate matrix + schema stability checks.",
|
|
47
|
+
)
|
|
48
|
+
parser.add_argument(
|
|
49
|
+
"--report",
|
|
50
|
+
action="store_true",
|
|
51
|
+
help="Emit stable JSON report to stdout.",
|
|
52
|
+
)
|
|
53
|
+
parser.add_argument(
|
|
54
|
+
"--audit-out",
|
|
55
|
+
metavar="PATH",
|
|
56
|
+
default=None,
|
|
57
|
+
help="Write gap audit artifact (JSON) to PATH.",
|
|
58
|
+
)
|
|
59
|
+
parser.add_argument(
|
|
60
|
+
"--enforce",
|
|
61
|
+
action="store_true",
|
|
62
|
+
help="Blocking mode (required for /release when enforce=1).",
|
|
63
|
+
)
|
|
64
|
+
parser.add_argument(
|
|
65
|
+
"--no-template-parity",
|
|
66
|
+
action="store_true",
|
|
67
|
+
help="Skip active vs template/ README and script parity sub-check.",
|
|
68
|
+
)
|
|
69
|
+
args = parser.parse_args()
|
|
70
|
+
|
|
71
|
+
if args.self_test:
|
|
72
|
+
try:
|
|
73
|
+
rfc.self_test_predicate_matrix()
|
|
74
|
+
rfc.self_test_report_schema()
|
|
75
|
+
except AssertionError as exc:
|
|
76
|
+
print(f"self-test failed: {exc}", file=sys.stderr)
|
|
77
|
+
return 2
|
|
78
|
+
print("[README_FEATURE_COVERAGE_SELF_TEST_OK]")
|
|
79
|
+
return 0
|
|
80
|
+
|
|
81
|
+
target = os.path.abspath(args.repo)
|
|
82
|
+
backlog = args.backlog or os.path.join(target, "docs", "product", "backlog.md")
|
|
83
|
+
if not os.path.isfile(backlog):
|
|
84
|
+
print(f"{rfc.REASON_INPUT_INVALID}: backlog not found: {backlog}", file=sys.stderr)
|
|
85
|
+
return 2
|
|
86
|
+
|
|
87
|
+
merged, _paths = installer.merge_scratchpad_layers(target)
|
|
88
|
+
enforce = args.enforce or _enforce_flag(merged)
|
|
89
|
+
|
|
90
|
+
merged_profile = None if args.no_template_parity else merged
|
|
91
|
+
report, stderr_lines = rfc.build_report(
|
|
92
|
+
target,
|
|
93
|
+
backlog,
|
|
94
|
+
enforce=enforce,
|
|
95
|
+
merged=merged_profile,
|
|
96
|
+
skip_parity=args.no_template_parity,
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
if args.audit_out:
|
|
100
|
+
audit_path = args.audit_out
|
|
101
|
+
if not os.path.isabs(audit_path):
|
|
102
|
+
audit_path = os.path.join(target, audit_path)
|
|
103
|
+
os.makedirs(os.path.dirname(audit_path), exist_ok=True)
|
|
104
|
+
audit_obj = {
|
|
105
|
+
"audit_schema_version": 1,
|
|
106
|
+
"coverage_total": report["coverage_total"],
|
|
107
|
+
"gaps": report["gaps"],
|
|
108
|
+
"items": report["coverage_present"] + report["coverage_missing"],
|
|
109
|
+
"status": report["status"],
|
|
110
|
+
}
|
|
111
|
+
with open(audit_path, "w", encoding="utf-8", newline="\n") as f:
|
|
112
|
+
f.write(rfc.canonical_json(audit_obj))
|
|
113
|
+
|
|
114
|
+
blocking = bool(stderr_lines) or report["status"] != "PASS"
|
|
115
|
+
|
|
116
|
+
if args.report or not args.audit_out:
|
|
117
|
+
sys.stdout.write(rfc.canonical_json(report))
|
|
118
|
+
|
|
119
|
+
if blocking and (args.enforce or args.report):
|
|
120
|
+
print(rfc.REASON_BLOCKED, file=sys.stderr)
|
|
121
|
+
for line in sorted(set(stderr_lines)):
|
|
122
|
+
print(line, file=sys.stderr)
|
|
123
|
+
return 1
|
|
124
|
+
|
|
125
|
+
if blocking and args.audit_out and not args.report:
|
|
126
|
+
return 0
|
|
127
|
+
|
|
128
|
+
if blocking:
|
|
129
|
+
print(rfc.REASON_BLOCKED, file=sys.stderr)
|
|
130
|
+
for line in sorted(set(stderr_lines)):
|
|
131
|
+
print(line, file=sys.stderr)
|
|
132
|
+
return 1
|
|
133
|
+
|
|
134
|
+
if args.enforce:
|
|
135
|
+
print("[README_FEATURE_COVERAGE_VALIDATE_OK]")
|
|
136
|
+
return 0
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
if __name__ == "__main__":
|
|
140
|
+
raise SystemExit(main())
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Progress — Sprint S0001
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Release Findings — Sprint S0001
|
|
2
|
+
|
|
3
|
+
## Release gate status
|
|
4
|
+
|
|
5
|
+
- Result: PASS|BLOCKED
|
|
6
|
+
- Story: `US-xxxx`
|
|
7
|
+
- Gate order evaluated: `check-in test -> QA -> UAT -> finalize`
|
|
8
|
+
|
|
9
|
+
## Blocking findings
|
|
10
|
+
|
|
11
|
+
- Reason code:
|
|
12
|
+
- Summary:
|
|
13
|
+
- Evidence refs:
|
|
14
|
+
|
|
15
|
+
## Non-blocking findings
|
|
16
|
+
|
|
17
|
+
-
|
|
18
|
+
|
|
19
|
+
## Remediation and rerun criteria
|
|
20
|
+
|
|
21
|
+
1.
|
|
22
|
+
2.
|
|
23
|
+
|
|
24
|
+
- Re-run `/release` after remediation and update this file with final outcome.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Tasks — Sprint S0001
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Summary — Quick Task Q0001
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Curator agent"
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
You are the Curator. Keep context compact and artifacts current.
|
|
6
|
-
|
|
7
|
-
Inputs:
|
|
8
|
-
- `docs/engineering/state.md`
|
|
9
|
-
- `docs/engineering/decisions.md`
|
|
10
|
-
- Sprint summaries and handoffs
|
|
11
|
-
|
|
12
|
-
Outputs:
|
|
13
|
-
- Refreshed `docs/engineering/state.md`
|
|
14
|
-
- Refreshed `docs/engineering/decisions.md`
|
|
15
|
-
- Updated sprint summary
|
|
16
|
-
- `handoffs/resume_brief.md`
|
|
17
|
-
|
|
18
|
-
Rules:
|
|
19
|
-
- Avoid context bloat. Summarize and prune.
|
|
20
|
-
- Ensure pause/resume is reliable.
|
|
21
|
-
|
package/.cursor/agents/dev.mdc
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Developer agent"
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
You are the Dev. Implement tasks and maintain artifacts.
|
|
6
|
-
|
|
7
|
-
Inputs:
|
|
8
|
-
- `sprints/S0001/tasks.md`
|
|
9
|
-
- `handoffs/tl_to_dev.md`
|
|
10
|
-
|
|
11
|
-
Outputs:
|
|
12
|
-
- Code changes
|
|
13
|
-
- `sprints/S0001/summary.md`
|
|
14
|
-
- `docs/engineering/state.md`
|
|
15
|
-
- `handoffs/dev_to_qa.md` (when ready)
|
|
16
|
-
|
|
17
|
-
Rules:
|
|
18
|
-
- Implement one task at a time.
|
|
19
|
-
- Update summaries and state after each task.
|
|
20
|
-
|
package/.cursor/agents/po.mdc
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Product Owner agent"
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
You are the PO. Your job is to clarify requirements and persist them.
|
|
6
|
-
|
|
7
|
-
Inputs:
|
|
8
|
-
- User idea, constraints, target audience
|
|
9
|
-
|
|
10
|
-
Outputs:
|
|
11
|
-
- `docs/product/vision.md`
|
|
12
|
-
- `docs/product/backlog.md`
|
|
13
|
-
- `docs/product/acceptance.md`
|
|
14
|
-
- `handoffs/po_to_tl.md`
|
|
15
|
-
|
|
16
|
-
Rules:
|
|
17
|
-
- Ask targeted questions until acceptance is concrete.
|
|
18
|
-
- Never leave critical info only in chat.
|
|
19
|
-
|
package/.cursor/agents/qa.mdc
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "QA agent"
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
You are QA. Validate acceptance and report findings.
|
|
6
|
-
|
|
7
|
-
Inputs:
|
|
8
|
-
- `handoffs/dev_to_qa.md`
|
|
9
|
-
- `sprints/S0001/summary.md`
|
|
10
|
-
|
|
11
|
-
Outputs:
|
|
12
|
-
- `sprints/S0001/qa-findings.md`
|
|
13
|
-
- `handoffs/qa_to_dev.md` (if issues)
|
|
14
|
-
- `docs/engineering/state.md`
|
|
15
|
-
|
|
16
|
-
Rules:
|
|
17
|
-
- Provide a clear test plan and findings.
|
|
18
|
-
- Escalate critical issues via decision gate.
|
|
19
|
-
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Release agent"
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
You are Release. Prepare release notes and runbook commands.
|
|
6
|
-
|
|
7
|
-
Inputs:
|
|
8
|
-
- `sprints/S0001/summary.md`
|
|
9
|
-
- `docs/engineering/runbook.md`
|
|
10
|
-
|
|
11
|
-
Outputs:
|
|
12
|
-
- `handoffs/release_notes.md`
|
|
13
|
-
- `docs/engineering/runbook.md`
|
|
14
|
-
- `docs/engineering/state.md`
|
|
15
|
-
|
|
16
|
-
Rules:
|
|
17
|
-
- Ensure deploy commands are explicit before release.
|
|
18
|
-
- Keep release notes concise and actionable.
|
|
19
|
-
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Tech Lead agent"
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
You are the Tech Lead. Define architecture, risks, and sprint plan.
|
|
6
|
-
|
|
7
|
-
Inputs:
|
|
8
|
-
- `docs/product/*`
|
|
9
|
-
- `handoffs/po_to_tl.md`
|
|
10
|
-
|
|
11
|
-
Outputs:
|
|
12
|
-
- `docs/engineering/architecture.md`
|
|
13
|
-
- `docs/engineering/decisions.md`
|
|
14
|
-
- `docs/engineering/state.md`
|
|
15
|
-
- `sprints/S0001/*`
|
|
16
|
-
- `handoffs/tl_to_dev.md`
|
|
17
|
-
|
|
18
|
-
Rules:
|
|
19
|
-
- Document tradeoffs and decision gates.
|
|
20
|
-
- Keep architecture minimal and practical.
|
|
21
|
-
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "GSD architecture: define approach, risks, and decisions."
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# /gsd-architecture
|
|
6
|
-
|
|
7
|
-
## Subagents
|
|
8
|
-
- tech-lead
|
|
9
|
-
|
|
10
|
-
## Inputs
|
|
11
|
-
- Product vision and acceptance
|
|
12
|
-
- Constraints and risks
|
|
13
|
-
- `docs/engineering/research.md`
|
|
14
|
-
|
|
15
|
-
## Outputs (artifacts)
|
|
16
|
-
- `docs/engineering/architecture.md`
|
|
17
|
-
- `docs/engineering/decisions.md`
|
|
18
|
-
- `docs/engineering/state.md`
|
|
19
|
-
- `handoffs/po_to_tl.md` (read)
|
|
20
|
-
|
|
21
|
-
## Stop conditions
|
|
22
|
-
- Major tradeoff requires a decision
|
|
23
|
-
- Unknown feasibility or data migration risk
|
|
24
|
-
|
|
25
|
-
## Steps
|
|
26
|
-
1. Define the minimal architecture and key components.
|
|
27
|
-
2. Record tradeoffs in decisions log.
|
|
28
|
-
3. Update engineering state and readiness.
|
|
29
|
-
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "GSD auto: run phases sequentially until decision gate."
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# /gsd-auto
|
|
6
|
-
|
|
7
|
-
## Subagents
|
|
8
|
-
- curator
|
|
9
|
-
- tech-lead
|
|
10
|
-
|
|
11
|
-
## Inputs
|
|
12
|
-
- `AUTO_FLOW_MODE` and `PHASE_MODE` from `.cursor/scratchpad.md`
|
|
13
|
-
- Current product and engineering docs
|
|
14
|
-
|
|
15
|
-
## Outputs (artifacts)
|
|
16
|
-
- Updated phase artifacts for each step
|
|
17
|
-
- `docs/engineering/state.md`
|
|
18
|
-
- `handoffs/resume_brief.md` if stopped
|
|
19
|
-
|
|
20
|
-
## Stop conditions
|
|
21
|
-
- Decision gate triggered
|
|
22
|
-
- Missing critical input
|
|
23
|
-
|
|
24
|
-
## Steps
|
|
25
|
-
1. Read automation flags from scratchpad.
|
|
26
|
-
2. Run phases sequentially (intake -> discovery -> research -> architecture -> sprint plan -> plan verify -> execute -> QA -> verify work -> release -> refresh).
|
|
27
|
-
3. Stop at decision gate or missing info and write resume brief.
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "GSD discovery: collect design/UX inspiration and scope updates."
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# /gsd-discovery
|
|
6
|
-
|
|
7
|
-
## Subagents
|
|
8
|
-
- po
|
|
9
|
-
|
|
10
|
-
## Inputs
|
|
11
|
-
- Design/UX references
|
|
12
|
-
- Competitive/market notes
|
|
13
|
-
|
|
14
|
-
## Outputs (artifacts)
|
|
15
|
-
- `docs/product/vision.md`
|
|
16
|
-
- `docs/product/backlog.md`
|
|
17
|
-
- `handoffs/po_to_tl.md`
|
|
18
|
-
|
|
19
|
-
## Stop conditions
|
|
20
|
-
- Missing references
|
|
21
|
-
- Decision gate triggered
|
|
22
|
-
|
|
23
|
-
## Steps
|
|
24
|
-
1. Capture references and UX notes in vision.
|
|
25
|
-
2. Add new stories or updates to backlog.
|
|
26
|
-
3. Refresh the PO -> TL handoff.
|
|
27
|
-
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "GSD execute: implement tasks with artifacts and state updates."
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# /gsd-execute
|
|
6
|
-
|
|
7
|
-
## Subagents
|
|
8
|
-
- dev
|
|
9
|
-
|
|
10
|
-
## Inputs
|
|
11
|
-
- `sprints/S0001/tasks.md`
|
|
12
|
-
- `handoffs/tl_to_dev.md`
|
|
13
|
-
|
|
14
|
-
## Outputs (artifacts)
|
|
15
|
-
- Code changes
|
|
16
|
-
- `sprints/S0001/summary.md`
|
|
17
|
-
- `docs/engineering/state.md`
|
|
18
|
-
- `handoffs/dev_to_qa.md` (if ready)
|
|
19
|
-
|
|
20
|
-
## Stop conditions
|
|
21
|
-
- Decision gate triggered
|
|
22
|
-
- Missing task definition or unclear scope
|
|
23
|
-
|
|
24
|
-
## Steps
|
|
25
|
-
1. Implement one task at a time.
|
|
26
|
-
2. Update summary and engineering state.
|
|
27
|
-
3. Handoff to QA when ready.
|
|
28
|
-
4. If `AUTO_INSTALL_DEPS=1` in `.cursor/scratchpad.md`, install dependencies
|
|
29
|
-
via the appropriate package manager without prompting.
|
|
30
|
-
5. If `REMOTE_EXECUTION=1` and `.cursor/remote.json` is configured, use
|
|
31
|
-
remote/docker servers for heavy builds or tests when needed.
|
|
32
|
-
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "GSD intake: clarify idea and capture story + acceptance."
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# /gsd-intake
|
|
6
|
-
|
|
7
|
-
## Subagents
|
|
8
|
-
- po
|
|
9
|
-
|
|
10
|
-
## Inputs
|
|
11
|
-
- User idea (text or voice transcription)
|
|
12
|
-
- Constraints, audience, success criteria
|
|
13
|
-
|
|
14
|
-
## Outputs (artifacts)
|
|
15
|
-
- `docs/product/vision.md`
|
|
16
|
-
- `docs/product/backlog.md`
|
|
17
|
-
- `docs/product/acceptance.md`
|
|
18
|
-
- `handoffs/po_to_tl.md`
|
|
19
|
-
|
|
20
|
-
## Stop conditions
|
|
21
|
-
- Missing acceptance criteria or unclear scope
|
|
22
|
-
- Decision gate triggered (see escalation rule)
|
|
23
|
-
|
|
24
|
-
## Steps
|
|
25
|
-
1. Ask targeted questions until the story and acceptance are concrete.
|
|
26
|
-
2. Persist the story and acceptance in product docs.
|
|
27
|
-
3. Write a PO -> TL handoff with scope and risks.
|
|
28
|
-
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "GSD map codebase: analyze existing project before changes."
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# /gsd-map-codebase
|
|
6
|
-
|
|
7
|
-
## Subagents
|
|
8
|
-
- tech-lead
|
|
9
|
-
- curator
|
|
10
|
-
|
|
11
|
-
## Inputs
|
|
12
|
-
- Existing repository code and docs
|
|
13
|
-
|
|
14
|
-
## Outputs (artifacts)
|
|
15
|
-
- `docs/engineering/codebase-map.md`
|
|
16
|
-
- `docs/engineering/dependencies.json`
|
|
17
|
-
- `docs/engineering/state.md`
|
|
18
|
-
|
|
19
|
-
## Stop conditions
|
|
20
|
-
- Decision gate triggered
|
|
21
|
-
|
|
22
|
-
## Steps
|
|
23
|
-
1. Identify stack, structure, and key entry points.
|
|
24
|
-
2. Summarize architecture and conventions.
|
|
25
|
-
3. Capture dependencies and tooling.
|