Skip to content

feat(flow): refactor flow architecture, debloat skills, add project-local skills engine and hierarchical OKF - #70

Merged
cofin merged 42 commits into
mainfrom
refactor_flow_skills_workflow
Aug 24, 2026
Merged

feat(flow): refactor flow architecture, debloat skills, add project-local skills engine and hierarchical OKF#70
cofin merged 42 commits into
mainfrom
refactor_flow_skills_workflow

Conversation

@cofin

@cofin cofin commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Overview

This PR refactors the Flow architecture to streamline cognitive load, introduce project-local tailored Flow skills for zero-setup team portability upon git clone, structure OKF bundles into hierarchical subdirectories, consolidate auxiliary skills into self-contained single-file manifests, and enforce direct Markdown frontmatter state synchronization.


Key Changes

1. Direct Markdown Frontmatter State Synchronization

  • Replaced the heavy transaction simulation model with deterministic direct Markdown frontmatter synchronization (tasks/*.md -> spec.md checklist markers: [ ], [~], [x] [<sha>], [!], [-]).
  • Reconciled exclusively via /flow:sync using standard file tools.

2. Project-Local Tailored Skills Engine (.agents/skills/flow*)

  • Added scaffolding templates under templates/agent/skills/ (flow, flow-planning, flow-execution, flow-completion, flow-sync-status) allowing repositories to optionally include tailored Flow skills that auto-load for any developer cloning the repo without requiring global plugins.
  • Built-in anchored customization blocks (<!-- project-customization: start -->) to preserve project modifications across version syncs.

3. Parallel Fact-Finding Research Swarm (@researcher)

  • Added parallel fact-finding @researcher subagent for /flow:research to fan out background codebase investigations without blocking interactive planning.
  • Deprecated legacy flow-reconciler agent in favor of direct file operations.

4. Git Safety Interceptor Hook

  • Added fast POSIX shell interceptor hooks/block-dangerous-git.sh and wired PreToolUse for Claude Code to block destructive Git operations (git reset --hard, git push -f, git clean -f, tag mutations).

5. Hierarchical OKF Knowledge Bundles

  • Restructured .agents/bundles/ into scope-derived subdirectories:
    • knowledge/architecture/
    • knowledge/data-model/
    • knowledge/domains/
    • knowledge/decisions/ (1-paragraph ADRs)
    • knowledge/rejections/ (Rejection Memory catalog)
    • archive/<year>/<flow_id>/ (compact year-partitioned archiving)
  • Enhanced YAML frontmatter tagging schema (type, scope, domain, parent, supersedes, tags).

6. Auxiliary Skills Consolidation

  • Consolidated all 12 auxiliary cognitive/reviewer skills into single-file, self-contained SKILL.md documents with standardized agents/openai.yaml manifests and required sections (## Workflow, ## Guardrails, ## Output, ## Validation, ## Example).
  • Removed orphaned references/ directories across all 12 auxiliary skills.

7. Linguistic Debloating & Standard Formatting

  • Debloated AGENTS.md and CLAUDE.md into lean pointer files (<60 lines).
  • Converted subagent prompts into concise ~15-25 line operational shims.
  • Banned em-dashes () across all framework documentation and enforced affirmative operational language.

Verification & Testing

  • 100% test pass rate across the full test suite: 568 passed, 2 skipped in 21.7s.
  • Multi-harness manifest validation (tools/validate.py): 0 violations across 20 skills, 18 commands, 24 agents.
  • Parity generators validated: sync-agent-surfaces.py, sync-command-surfaces.py, sync-rule-surfaces.py, sync-manifests.py, sync-local-skill-templates.py, and audit-skill-contracts.py.

cofin and others added 30 commits August 23, 2026 21:16
…ngine and hierarchical OKF

- Refactor Flow lifecycle routing to direct Markdown frontmatter state synchronization
- Consolidate all 12 auxiliary skills into single-file documents with OpenAI manifests
- Add project-local tailored Flow skills scaffolding (.agents/skills/flow*) for zero-setup team portability
- Add parallel fact-finding researcher agent and POSIX Git safety interceptor hook
- Structure OKF bundles into hierarchical subdirectories (architecture, data-model, domains, decisions, rejections)
- Debloat AGENTS.md, CLAUDE.md, and subagent prompts with affirmative operational language and zero em-dashes
- Validate 100% test pass rate across 568 tests and multi-harness parity generators
cofin added 12 commits August 24, 2026 13:15
The Claude PreToolUse hook now denies only Git operations it can literally
recognize and allows everything it cannot classify, so variables, globs,
pipes, redirections, quoted punctuation, and compound commands work again.
The standalone installer handles CRLF sources, and the execution docs follow
the journaled state contract.

- Deny push, reset --hard, non-dry-run clean, tag mutation, tag fetching or
  pruning through options, config, or environment, forced branch deletion, and
  alias-based aliases; allow unknown subcommands and dynamic commands.
- Close bypasses: bundled -D flags, --no-dry-run after -n, list-style tag
  options that do not imply --list, short and abbreviated tag fetch flags,
  case-insensitive git names, and .exe suffixes.
- Keep hook cost linear so large commands classify well within the timeout.
- Skip classification with a warning when jq is missing instead of blocking.
- Preserve source line endings in the installer merge, hash content
  independent of line endings, honor umask for installed files, and adopt a
  byte-identical pre-existing copy instead of refusing it.
- Route executor claim and close through journaled flow-state operations,
  drop the signed-commit requirement, restore complete and recover in the
  workflow template, and align finish guidance with the guardrail.
- Skip POSIX-only fifo and socket cases on platforms without them.
Plain pushes go through the host's own permission prompt. The guardrail keeps
denying force pushes, remote deletions, mirror and prune pushes, plus-refspecs,
and any push that touches tags.
A marketplace-only Codex install can now perform the optional standalone
project copy: the package generator renders the installer, the dependency
graph, and every source the graph references, so the installer's default
source root works from inside the package.

- Derive the shipped sources from the graph instead of a hand-kept list.
- Allow the new package entries in validation.
- Prove the package yields the same standalone install as the repository for
  every supported host.
- Point setup guidance at the package root as the installer's source root.
@cofin
cofin merged commit 4b6256a into main Aug 24, 2026
4 checks passed
@cofin
cofin deleted the refactor_flow_skills_workflow branch August 24, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant