Repository navigation
feat: add on-demand code layouts (0.5.2) #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| # Architect: Design a Code Boundary | ||
|
|
||
| Use this optional code layout with `omp-flow-design` when a selected synthesis needs a concrete | ||
| code interface, data model, or ownership boundary. The Skill, linked decisions, and native | ||
| assignment remain authoritative. Reuse the assigned Design/interface output Concept; the headings | ||
| below are suggestions, not a mandatory schema or a separate Concept per invocation. | ||
|
|
||
| This is design, not implementation. Keep sketches in prose or Concept code blocks. Do not commit | ||
| source stubs, placeholder implementations, or an API merely to make the design look executable. | ||
| The layout supplies neither automatic sign-off nor permission to bypass human/QbD approval. | ||
|
|
||
| ## Show callers before signatures | ||
|
|
||
| 1. Restate the observable problem, binding requirements, non-goals, and evidence from the selected | ||
| synthesis. Name the concrete consequence the design must enable or prevent. | ||
| 2. Start with realistic caller examples: where the call happens, what information is available, | ||
| the useful result, and the failure the caller must handle. Include a lifecycle or asynchronous | ||
| example only when the target needs one. Do not invent consumers to justify an abstraction. | ||
| 3. Use those examples to derive the smallest useful public boundary, then sketch signatures or | ||
| messages. Explain each component's causal purpose in plain language. Prefer a deep boundary | ||
| that owns meaningful work and hides internal detail over shallow wrappers or exposed internals. | ||
|
|
||
| ## Make data and ownership authoritative | ||
|
|
||
| - Describe the relevant data shape and the meaning of its fields: required/optional values, units, | ||
| identity, validity, and lifetime where material. Distinguish authoritative state from derived or | ||
| cached views; avoid two competing sources of truth. | ||
| - Show access paths from creation or loading through readers, writers, transformations, persistence, | ||
| and disposal. Name the owner allowed to mutate state and the boundary where ownership transfers. | ||
| - Assign responsibility for validation, resource acquisition/release, and partial completion. | ||
| Explain ordering or concurrent access only where it affects this design; do not add machinery for | ||
| hypothetical requirements. | ||
| - Specify the public contract: inputs, outputs, important invariants, errors, and which failures | ||
| callers handle versus which the boundary prevents. Cover cancellation, cleanup, and side effects | ||
| when applicable, including what remains after failure. Never rely on an unexplained fallback. | ||
| - Keep private representation and incidental operations behind the boundary. Explain unavoidable | ||
| compatibility or migration obligations without introducing an unrequested parallel API. | ||
|
|
||
| ## Compare only material alternatives | ||
|
|
||
| Use the research evidence and caller examples to compare alternatives that could change the | ||
| selected boundary, correctness, cost, or maintainability. State the relevant trade-off and why the | ||
| chosen option solves the observed problem. There is no minimum candidate count, mandatory prototype, | ||
| or requirement to manufacture alternatives for a mechanical decision. Record consequential rejected | ||
| options and the evidence that would reopen them. | ||
|
|
||
| ## Plan verification and return signals | ||
|
|
||
| Map observable requirements and important invariants to specific checks: caller-level examples, | ||
| contract tests, failure/cleanup cases, or other evidence suited to the risk. Separate proposed | ||
| commands and expected observations from verification actually performed. Name any material unknown | ||
| and its owner; an unresolved blocking decision is not ready for decomposition. | ||
|
|
||
| State what observation would invalidate the design or its framing, such as an incompatible caller, | ||
| a violated ownership assumption, or an unmet binding constraint. Return that evidence to Main | ||
| through the assigned output for further research, framing, or design rather than suppressing it to | ||
| preserve the sketch. Main owns transitions and approval; the Architect does not approve its own gate. | ||
|
|
||
| ## Suggested output navigation | ||
|
|
||
| Adapt or omit sections as useful: | ||
|
|
||
| - **Problem and caller examples:** observable requirements, constraints, non-goals, and source links. | ||
| - **Boundary and data model:** proposed contract, authoritative values, access paths, and ownership. | ||
| - **Behavior and invariants:** normal operation, relevant failures, concurrency, and cleanup. | ||
| - **Trade-offs:** evidence-led choice, material alternatives, and compatibility obligations. | ||
| - **Verification and open decisions:** acceptance checks, return signals, and consequential unknowns. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| # How: Trace Code Behavior | ||
|
|
||
| Use this optional code layout with `omp-flow-research` when the question is how a concrete code | ||
| path works. The Skill and native assignment remain authoritative. Write into the assigned output | ||
| Concept; a small explanation can be inline there. The headings below are suggested navigation, | ||
| not a required schema, a separate Concept per invocation, or a workflow gate. | ||
|
|
||
| ## Bound the explanation | ||
|
|
||
| - Name the question, observed revision, and code anchor: entry point, symbol, or behavior. State | ||
| which decision or assumption the explanation can change. | ||
| - Read the implementation and its callers before relying on comments or tests. Follow only the | ||
| dependencies needed to explain the target; do not turn a local question into a repository tour. | ||
| - Use useful `file:line` references at that revision for consequential claims. Separate observed | ||
| behavior, inference, and unknowns; a function name is not evidence of what it does. | ||
|
|
||
| ## Follow behavior and ownership | ||
|
|
||
| 1. Establish each relevant component's responsibility and boundary. Identify who supplies inputs, | ||
| validates them, calls the next component, and consumes the result. | ||
| 2. Track data and state: authoritative values, derived copies, mutable fields, persistence, and | ||
| the owner allowed to change each. For resources, identify acquisition, transfer, lifetime, and | ||
| the party responsible for release. | ||
| 3. Trace an actual normal execution from the caller through significant branches and back to the | ||
| externally visible result. Include asynchronous handoffs and ordering when they affect behavior. | ||
| 4. Trace relevant error, cancellation, and cleanup paths separately. Show where failure originates, | ||
| how it propagates, which side effects survive, and what is released on partial completion. | ||
| If cancellation is unsupported, say so with evidence; if it was not investigated, say that | ||
| instead. Do not invent a cancellation or cleanup guarantee. | ||
| 5. Read relevant tests and contracts as supporting evidence. Record commands and results only when | ||
| exercised, and distinguish source-based reasoning from runtime observation. | ||
| 6. Explain gotchas that change a caller's expectations: hidden mutation, blocking work, ownership | ||
| transfer, ordering, failure after a side effect, or cleanup that depends on the caller. Include | ||
| only those supported by this target, not a generic risk inventory. | ||
|
|
||
| ## Scale to the question | ||
|
|
||
| Keep simple targets in the assigned Concept. For a complex target, identify only slices that can | ||
| be investigated independently, with their boundaries and the shared question they answer. | ||
| Only Main/coordinator may delegate those slices through the existing native operation contract: | ||
| Bundle, role, bounded objective, entry and output Concepts, actor ID, opaque receipt, and predecessor | ||
| when required. A dispatched child never spawns or redispatches. There is no fixed worker count or | ||
| mandatory decomposition. | ||
|
|
||
| ## Suggested output navigation | ||
|
|
||
| Adapt or omit sections that do not help the reader: | ||
|
|
||
| - **Anchor and scope:** question, revision, entry point, and relevant callers. | ||
| - **Responsibilities and ownership:** components, important values/resources, writers, and lifetimes. | ||
| - **Execution:** normal path and relevant error/cancel/cleanup branches, with code references; | ||
| a small sequence sketch or table is useful only if it clarifies the flow. | ||
| - **Gotchas and limits:** surprising behavior, evidence strength, and uninvestigated paths. | ||
| - **Conclusion:** the answer, its effect on the decision, and remaining consequential questions. | ||
|
|
||
| If observed behavior contradicts the framing or an accepted contract, preserve that evidence and | ||
| report the contradiction through the assigned output to Main. An explanation is not authority to | ||
| change code, expand scope, or transition the workflow. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a repository contains
.omp-flow/workflow/codeas a symlink (for example, from an untrusted checkout or an existing local link), these new managed entries cause bothinitandupdateto create or overwritehow.md,why.md,architect.md, andinterrogate.mdin the link target: their write paths usemkdirSync/writeFileSyncwithout calling the repository confinement guard. The prior workflow resources did not traverse this newcodeancestor, so this feature adds an external-write path; validate all managed destinations and fail before writing when an ancestor is linked.AGENTS.md reference: AGENTS.md:L101-L102
Useful? React with 👍 / 👎.