From a60d5fbc0054c44cc4cde7dba2ec183cf519c105 Mon Sep 17 00:00:00 2001 From: Affaan Mustafa Date: Thu, 2 Apr 2026 17:09:21 -0700 Subject: [PATCH] fix: port ci and markdown cleanup from backlog --- WORKING-CONTEXT.md | 3 ++ commands/orchestrate.md | 18 +++++------ commands/prp-pr.md | 2 +- skills/hexagonal-architecture/SKILL.md | 32 +++++++++---------- skills/remotion-video-creation/rules/3d.md | 2 +- .../rules/animations.md | 2 +- .../rules/compositions.md | 2 +- .../remotion-video-creation/rules/tailwind.md | 2 +- tests/scripts/install-apply.test.js | 11 +++++-- tests/scripts/repair.test.js | 4 ++- 10 files changed, 44 insertions(+), 34 deletions(-) diff --git a/WORKING-CONTEXT.md b/WORKING-CONTEXT.md index 2cc027cd..ed31f87b 100644 --- a/WORKING-CONTEXT.md +++ b/WORKING-CONTEXT.md @@ -112,3 +112,6 @@ Keep this file detailed for only the current sprint, blockers, and next actions. - 2026-04-01: Added `manim-video` as the reusable technical explainer lane and seeded it with a starter network-graph scene so launch and systems animations do not depend on one-off scratch scripts. - 2026-04-02: Re-extracted `social-graph-ranker` as a standalone primitive because the weighted bridge-decay model is reusable outside the full lead workflow. `lead-intelligence` now points to it for canonical graph ranking instead of carrying the full algorithm explanation inline, while `connections-optimizer` stays the broader operator layer for pruning, adds, and outbound review packs. - 2026-04-02: Applied the same consolidation rule to the writing lane. `brand-voice` remains the canonical voice system, while `content-engine`, `crosspost`, `article-writing`, and `investor-outreach` now keep only workflow-specific guidance instead of duplicating a second Affaan/ECC voice model or repeating the full ban list in multiple places. +- 2026-04-02: Closed fresh auto-generated bundle PRs `#1182` and `#1183` under the existing policy. Useful ideas from generator output must be ported manually into canonical repo surfaces instead of merging `.claude`/bundle PRs wholesale. +- 2026-04-02: Ported the safe one-file macOS observer fix from `#1164` directly into `main` as a POSIX `mkdir` fallback for `continuous-learning-v2` lazy-start locking, then closed the PR as superseded by direct port. +- 2026-04-02: Ported the safe core of `#1153` directly into `main`: markdownlint cleanup for orchestration/docs surfaces plus the Windows `USERPROFILE` and path-normalization fixes in `install-apply` / `repair` tests. Local validation after installing repo deps: `node tests/scripts/install-apply.test.js`, `node tests/scripts/repair.test.js`, and targeted `yarn markdownlint` all passed. diff --git a/commands/orchestrate.md b/commands/orchestrate.md index 69f94659..ba735c69 100644 --- a/commands/orchestrate.md +++ b/commands/orchestrate.md @@ -24,20 +24,20 @@ Apply the orchestration skills instead of maintaining a second workflow spec her - Keep handoffs structured, but let the skills define the maintained sequencing rules. Security Reviewer: [summary] -FILES CHANGED -------------- +### FILES CHANGED + [List all files modified] -TEST RESULTS ------------- +### TEST RESULTS + [Test pass/fail summary] -SECURITY STATUS ---------------- +### SECURITY STATUS + [Security findings] -RECOMMENDATION --------------- +### RECOMMENDATION + [SHIP / NEEDS WORK / BLOCKED] ``` @@ -111,7 +111,7 @@ Telemetry: This keeps planner, implementer, reviewer, and loop workers legible from the operator surface. -## Arguments +## Workflow Arguments $ARGUMENTS: - `feature ` - Full feature workflow diff --git a/commands/prp-pr.md b/commands/prp-pr.md index 41fe455d..6551e2e2 100644 --- a/commands/prp-pr.md +++ b/commands/prp-pr.md @@ -177,7 +177,7 @@ Next steps: ## Edge Cases -- **No `gh` CLI**: Stop with: "GitHub CLI (`gh`) is required. Install: https://cli.github.com/" +- **No `gh` CLI**: Stop with: "GitHub CLI (`gh`) is required. Install: " - **Not authenticated**: Stop with: "Run `gh auth login` first." - **Force push needed**: If remote has diverged and rebase was done, use `git push --force-with-lease` (never `--force`). - **Multiple PR templates**: If `.github/PULL_REQUEST_TEMPLATE/` has multiple files, list them and ask user to choose. diff --git a/skills/hexagonal-architecture/SKILL.md b/skills/hexagonal-architecture/SKILL.md index 29ab17c4..80e99bff 100644 --- a/skills/hexagonal-architecture/SKILL.md +++ b/skills/hexagonal-architecture/SKILL.md @@ -206,25 +206,25 @@ export const buildCreateOrderUseCase = (deps: { db: SqlClient; stripe: StripeCli Use the same boundary rules across ecosystems; only syntax and wiring style change. - **TypeScript/JavaScript** - - Ports: `application/ports/*` as interfaces/types. - - Use cases: classes/functions with constructor/argument injection. - - Adapters: `adapters/inbound/*`, `adapters/outbound/*`. - - Composition: explicit factory/container module (no hidden globals). + - Ports: `application/ports/*` as interfaces/types. + - Use cases: classes/functions with constructor/argument injection. + - Adapters: `adapters/inbound/*`, `adapters/outbound/*`. + - Composition: explicit factory/container module (no hidden globals). - **Java** - - Packages: `domain`, `application.port.in`, `application.port.out`, `application.usecase`, `adapter.in`, `adapter.out`. - - Ports: interfaces in `application.port.*`. - - Use cases: plain classes (Spring `@Service` is optional, not required). - - Composition: Spring config or manual wiring class; keep wiring out of domain/use-case classes. + - Packages: `domain`, `application.port.in`, `application.port.out`, `application.usecase`, `adapter.in`, `adapter.out`. + - Ports: interfaces in `application.port.*`. + - Use cases: plain classes (Spring `@Service` is optional, not required). + - Composition: Spring config or manual wiring class; keep wiring out of domain/use-case classes. - **Kotlin** - - Modules/packages mirror the Java split (`domain`, `application.port`, `application.usecase`, `adapter`). - - Ports: Kotlin interfaces. - - Use cases: classes with constructor injection (Koin/Dagger/Spring/manual). - - Composition: module definitions or dedicated composition functions; avoid service locator patterns. + - Modules/packages mirror the Java split (`domain`, `application.port`, `application.usecase`, `adapter`). + - Ports: Kotlin interfaces. + - Use cases: classes with constructor injection (Koin/Dagger/Spring/manual). + - Composition: module definitions or dedicated composition functions; avoid service locator patterns. - **Go** - - Packages: `internal//domain`, `application`, `ports`, `adapters/inbound`, `adapters/outbound`. - - Ports: small interfaces owned by the consuming application package. - - Use cases: structs with interface fields plus explicit `New...` constructors. - - Composition: wire in `cmd//main.go` (or dedicated wiring package), keep constructors explicit. + - Packages: `internal//domain`, `application`, `ports`, `adapters/inbound`, `adapters/outbound`. + - Ports: small interfaces owned by the consuming application package. + - Use cases: structs with interface fields plus explicit `New...` constructors. + - Composition: wire in `cmd//main.go` (or dedicated wiring package), keep constructors explicit. ## Anti-Patterns to Avoid diff --git a/skills/remotion-video-creation/rules/3d.md b/skills/remotion-video-creation/rules/3d.md index 9a2cca4a..6a0a2e05 100644 --- a/skills/remotion-video-creation/rules/3d.md +++ b/skills/remotion-video-creation/rules/3d.md @@ -83,4 +83,4 @@ const { width, height } = useVideoConfig(); -``` \ No newline at end of file +``` diff --git a/skills/remotion-video-creation/rules/animations.md b/skills/remotion-video-creation/rules/animations.md index dfd0eb43..c9cf69c4 100644 --- a/skills/remotion-video-creation/rules/animations.md +++ b/skills/remotion-video-creation/rules/animations.md @@ -26,4 +26,4 @@ export const FadeIn = () => { ``` CSS transitions or animations are FORBIDDEN - they will not render correctly. -Tailwind animation class names are FORBIDDEN - they will not render correctly. \ No newline at end of file +Tailwind animation class names are FORBIDDEN - they will not render correctly. diff --git a/skills/remotion-video-creation/rules/compositions.md b/skills/remotion-video-creation/rules/compositions.md index cd447130..22a1721c 100644 --- a/skills/remotion-video-creation/rules/compositions.md +++ b/skills/remotion-video-creation/rules/compositions.md @@ -143,4 +143,4 @@ export const RemotionRoot = () => { }; ``` -The function can return `props`, `durationInFrames`, `width`, `height`, `fps`, and codec-related defaults. It runs once before rendering begins. \ No newline at end of file +The function can return `props`, `durationInFrames`, `width`, `height`, `fps`, and codec-related defaults. It runs once before rendering begins. diff --git a/skills/remotion-video-creation/rules/tailwind.md b/skills/remotion-video-creation/rules/tailwind.md index 1d141064..a9e64c9b 100644 --- a/skills/remotion-video-creation/rules/tailwind.md +++ b/skills/remotion-video-creation/rules/tailwind.md @@ -8,4 +8,4 @@ You can and should use TailwindCSS in Remotion, if TailwindCSS is installed in t Don't use `transition-*` or `animate-*` classes - always animate using the `useCurrentFrame()` hook. -Tailwind must be installed and enabled first in a Remotion project - fetch using WebFetch for instructions. \ No newline at end of file +Tailwind must be installed and enabled first in a Remotion project - fetch using WebFetch for instructions. diff --git a/tests/scripts/install-apply.test.js b/tests/scripts/install-apply.test.js index 45bd44b2..234b22e2 100644 --- a/tests/scripts/install-apply.test.js +++ b/tests/scripts/install-apply.test.js @@ -25,9 +25,11 @@ function readJson(filePath) { const REPO_ROOT = path.join(__dirname, '..', '..'); function run(args = [], options = {}) { + const homeDir = options.homeDir || process.env.HOME; const env = { ...process.env, - HOME: options.homeDir || process.env.HOME, + HOME: homeDir, + USERPROFILE: homeDir, ...(options.env || {}), }; @@ -365,10 +367,13 @@ function runTests() { const settings = readJson(path.join(claudeRoot, 'settings.json')); const installedHooks = readJson(path.join(claudeRoot, 'hooks', 'hooks.json')); + const normSep = (s) => s.replace(/\\/g, '/'); + const expectedFragment = normSep(path.join(claudeRoot, 'scripts', 'hooks', 'auto-tmux-dev.js')); + const autoTmuxEntry = settings.hooks.PreToolUse.find(entry => entry.id === 'pre:bash:auto-tmux-dev'); assert.ok(autoTmuxEntry, 'settings.json should include the auto tmux hook'); assert.ok( - autoTmuxEntry.hooks[0].command.includes(path.join(claudeRoot, 'scripts', 'hooks', 'auto-tmux-dev.js')), + normSep(autoTmuxEntry.hooks[0].command).includes(expectedFragment), 'settings.json should use the installed Claude root for hook commands' ); assert.ok( @@ -379,7 +384,7 @@ function runTests() { const installedAutoTmuxEntry = installedHooks.hooks.PreToolUse.find(entry => entry.id === 'pre:bash:auto-tmux-dev'); assert.ok(installedAutoTmuxEntry, 'hooks/hooks.json should include the auto tmux hook'); assert.ok( - installedAutoTmuxEntry.hooks[0].command.includes(path.join(claudeRoot, 'scripts', 'hooks', 'auto-tmux-dev.js')), + normSep(installedAutoTmuxEntry.hooks[0].command).includes(expectedFragment), 'hooks/hooks.json should use the installed Claude root for hook commands' ); assert.ok( diff --git a/tests/scripts/repair.test.js b/tests/scripts/repair.test.js index fa0d983b..fc65ea76 100644 --- a/tests/scripts/repair.test.js +++ b/tests/scripts/repair.test.js @@ -38,9 +38,11 @@ function writeState(filePath, options) { } function runNode(scriptPath, args = [], options = {}) { + const homeDir = options.homeDir || process.env.HOME; const env = { ...process.env, - HOME: options.homeDir || process.env.HOME, + HOME: homeDir, + USERPROFILE: homeDir, }; try {