feat(issues): scripts and schema for issue records and comments (phase 1, part 1) #8
No reviewers
Labels
No labels
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
WulfScience-FOSS/wulf-dev!8
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/phase-1-issue-scripts"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part 1 of Phase 1: scripts and schema for issue records and comments
Brings the wulf-dev issue scripts and schema in line with ADR-WULF-006 (issue
records) and ADR-WULF-007 (issue comments). Part 2 (migration of the flat
files in other repos) and part 3 (
pr.shroadmap check) are separate PRs.Roadmap items P1-1 to P1-4 are ticked in their own commit.
Scripts and schema
issue-new.sh: allocates the number from the counterissues/.next, writesissues/open/NNNN--<slug>.yaml, updates the counter, never commits; rollsback when a write fails.
comment-new.sh(new): createsissues/comments/NNNN/<id>.mdfor anexisting issue, text from arguments or standard input, never commits.
issue-validate.sh: walks every path underissues/(state folders,names, numbers, counter, comment folders and files) and checks each issue
file against the schema;
[--] [ISSUES_DIR]; collected errors sorted inbyte order; exit 2 for configuration errors.
lib.sh: the shared root rule (own repo, or the superproject of thesubmodule
modules/wulf-dev, also when the consuming repo is itself asubmodule), state table loader, escaping, counter and character checks, the
no-root stop. A symlinked issues folder and unreadable paths have their own
messages.
issue.schema.json(state folders, numbers up to 9999999, nostatusorclosed),issue-states.json(state table, one place).pr.shandinstall-hooks.shnow sourcelib.sh: they stop with theno-root message outside a git repository and are immune to
CDPATH.Documents
seven-digit numbers, an issue file is never deleted; ADR-WULF-007 (issue
comments, new); ADR-WULF-008 (standards for code, tests and the design
document: no repetition, functional tests, one test per case, no
combination tests, one place for a fact).
docs/design/issue-scripts.md(DE-1 to DE-15, 727 lines); README rowsand root paragraph;
company/AGENTS.md"Issues" bullets and the rule thatcode, tests and design follow ADR-WULF-008.
Tests
tests/,test.sh; bats 1.11 or newer), each tied to adesign element, one registered test per case. Acceptance criteria for the
items verified by inspection in
tests/acceptance-criteria.md.skipped (the rollback-that-fails-as-well branches, verified by inspection).
Issues, audits and review
and triaged with the owner's notes as comment files. Closed: 0006 to 0047,
0050, 0051. Not fixed on purpose: 0048 (wont-fix), 0049 and 0052 to 0063
(deferred: other scripts, structure of tests, code and design, and two
low-impact review findings).
reports/audit-issue-scripts.md, last round: no newissues). Review 001 by a different model: no High or Medium finding, three
Low (one fixed, two deferred):
docs/reviews/phase-1-issue-scripts/review-001.Size
179 files, about 12,000 lines added: scripts 964 lines (the four issue
scripts), tests 4,362 lines plus 859 lines of helpers, design 727 lines, issue
records and comments 1,360, audit reports 3,002, review record 295.
Checks
bash test.sh: 936 tests, 0 failed, 3 skipped.pr.shagainst a real git system,sync-managed.sh.🤖 Generated with Claude Code