diff --git a/AGENTS.md b/AGENTS.md index 62b065e..353fe91 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -121,6 +121,7 @@ For a multi-branch iteration: - Use one worktree and one named owner/subagent per branch. Tell every owner that other agents share the repository and it must not revert others' work. - Before starting assigned module work, every owner verifies its worktree is clean, fetches or uses the taskmaster-verified latest `main`, and fast-forwards its persistent branch to that exact main SHA. Do not build new work on a stale pre-integration branch, and do not use a merge that would rewrite or discard branch history. - A targeted repair uses a clean, isolated `work/fix//` branch and worktree from the taskmaster-verified current `main`. Do not use `work//fix/`: the persistent `work/` ref already occupies that Git ref prefix. +- Every targeted repair starts from the taskmaster-verified latest `main`, uses TDD RED → GREEN, adds Javadoc during implementation, records companion evidence, undergoes independent review, and uses a normal, non-force merge only when separately authorized. - Establish and commit the platform foundation before dependent persistence work. - Exchange only full immutable SHAs from clean worktrees; never merge a moving branch or ambiguous short SHA. - Preserve branch ownership. Request a producer-owned service/DTO boundary instead of reading its tables from a consumer. diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 6e66971..350b893 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -70,6 +70,8 @@ five persistent `work/` branches. Do not use `work//fix/` because the persistent `work/` ref already occupies that Git ref prefix. +Every targeted repair starts from the taskmaster-verified latest `main`, uses TDD RED → GREEN, adds Javadoc during implementation, records companion evidence, undergoes independent review, and uses a normal, non-force merge only when separately authorized. + ## 3. Start the development containers ### PostgreSQL 18.4 diff --git a/README.md b/README.md index f12babf..e8be202 100644 --- a/README.md +++ b/README.md @@ -132,6 +132,8 @@ taskmaster-verified current `main` named `work//fix/`: the persistent `work/` ref already uses that Git ref prefix. +Every targeted repair starts from the taskmaster-verified latest `main`, uses TDD RED → GREEN, adds Javadoc during implementation, records companion evidence, undergoes independent review, and uses a normal, non-force merge only when separately authorized. + Iteration 2 work must start from the merged Iteration 1 `main`, continue with strict RED-to-GREEN TDD, add Javadoc during implementation, and update the matching Markdown evidence record before each milestone commit. diff --git a/TESTING.md b/TESTING.md index 6697aec..1cf3015 100644 --- a/TESTING.md +++ b/TESTING.md @@ -126,6 +126,8 @@ Run that check from the clean targeted-fix branch named occupies that Git ref prefix. Record the expected RED and the matching GREEN shell output in the evidence record. +Every targeted repair starts from the taskmaster-verified latest `main`, uses TDD RED → GREEN, adds Javadoc during implementation, records companion evidence, undergoes independent review, and uses a normal, non-force merge only when separately authorized. + ## 4. Useful commands Run one test method: diff --git a/docs/superpowers/plans/2026-08-15-access-navigation-icon-intern-picker.md b/docs/superpowers/plans/2026-08-15-access-navigation-icon-intern-picker.md index 796baa9..4900915 100644 --- a/docs/superpowers/plans/2026-08-15-access-navigation-icon-intern-picker.md +++ b/docs/superpowers/plans/2026-08-15-access-navigation-icon-intern-picker.md @@ -14,6 +14,9 @@ feature-branch ownership areas. `main`. 3. State why `work//fix/` is invalid while its persistent `work/` ref exists. + +Every targeted repair starts from the taskmaster-verified latest `main`, uses TDD RED → GREEN, adds Javadoc during implementation, records companion evidence, undergoes independent review, and uses a normal, non-force merge only when separately authorized. + 4. Regenerate the local SRS after amending the existing operational requirement; do not add a requirement ID or a use case. 5. Prove GREEN with the executable six-guide regression that independently diff --git a/docs/superpowers/specs/2026-08-15-access-navigation-icon-intern-picker-design.md b/docs/superpowers/specs/2026-08-15-access-navigation-icon-intern-picker-design.md index 25fe773..c9fcf2c 100644 --- a/docs/superpowers/specs/2026-08-15-access-navigation-icon-intern-picker-design.md +++ b/docs/superpowers/specs/2026-08-15-access-navigation-icon-intern-picker-design.md @@ -23,6 +23,8 @@ The forbidden form is `work//fix/`. A repair owner preserves other worktrees, records RED and GREEN evidence, commits locally, and does not push or merge without separate authority. +Every targeted repair starts from the taskmaster-verified latest `main`, uses TDD RED → GREEN, adds Javadoc during implementation, records companion evidence, undergoes independent review, and uses a normal, non-force merge only when separately authorized. + ## Consequences - Persistent feature branches remain available for their iteration ownership. diff --git a/scripts/verify-fix-branch-workflow.cjs b/scripts/verify-fix-branch-workflow.cjs index bd77a9f..2a20cb5 100644 --- a/scripts/verify-fix-branch-workflow.cjs +++ b/scripts/verify-fix-branch-workflow.cjs @@ -5,6 +5,15 @@ const path = require('node:path'); const repositoryRoot = path.resolve(__dirname, '..'); const validForm = '`work/fix//`'; const invalidForm = '`work//fix/`'; +const requiredWorkflow = 'Every targeted repair starts from the taskmaster-verified latest `main`, uses TDD RED → GREEN, adds Javadoc during implementation, records companion evidence, undergoes independent review, and uses a normal, non-force merge only when separately authorized.'; +const workflowElements = [ + 'taskmaster-verified latest `main`', + 'TDD RED → GREEN', + 'Javadoc during implementation', + 'companion evidence', + 'independent review', + 'normal, non-force merge' +]; const documents = [ { file: 'AGENTS.md', @@ -40,6 +49,9 @@ function validate(contents) { const content = contents.get(file); if (count(content, validForm) !== 1) failures.push(`${file} must contain ${validForm} exactly once`); if (!content.includes(approved)) failures.push(`${file} is missing its approved branch workflow statement`); + if (count(content, requiredWorkflow) !== 1) { + failures.push(`${file} must contain the complete required targeted-repair workflow exactly once`); + } const outsideApprovedStatement = content.replace(approved, ''); if (outsideApprovedStatement.includes(validForm) || outsideApprovedStatement.includes(invalidForm)) { @@ -61,8 +73,24 @@ function readContents() { const contents = readContents(); validate(contents); +let workflowElementRejections = 0; + if (process.argv.includes('--self-test')) { for (const {file} of documents) { + for (const workflowElement of workflowElements) { + const missingWorkflowElement = new Map(contents); + missingWorkflowElement.set( + file, + contents.get(file).replace(requiredWorkflow, requiredWorkflow.replace(workflowElement, '')) + ); + assert.throws( + () => validate(missingWorkflowElement), + (error) => error instanceof Error + && error.message.includes(`${file} must contain the complete required targeted-repair workflow exactly once`) + ); + workflowElementRejections += 1; + } + const positiveRecommendation = new Map(contents); positiveRecommendation.set(file, `${contents.get(file)}\nUse ${invalidForm} for a targeted repair.\n`); assert.throws( @@ -75,5 +103,6 @@ if (process.argv.includes('--self-test')) { console.log(`Fix-branch workflow documentation: ${documents.length} approved statements validated`); if (process.argv.includes('--self-test')) { + console.log(`Targeted-repair workflow element removals: ${workflowElementRejections}/${workflowElements.length * documents.length} rejected`); console.log(`Positive nested branch recommendations: ${documents.length}/${documents.length} rejected`); }