Repository navigation
Add OSOP session logging rule #219
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
Closed
Closed
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| --- | ||
| description: OSOP session logging - record AI coding sessions as structured .osop + .osoplog.yaml files for reproducibility and observability. Apply after completing multi-step tasks. | ||
| globs: | ||
| alwaysApply: true | ||
| --- | ||
| # OSOP Session Logging | ||
|
|
||
| After completing a significant task (multi-step work, not trivial one-liners), produce an **OSOP session log** so there is a structured, portable record of what was done. | ||
|
|
||
| 1. **Create a `.osop` file** describing the workflow you followed | ||
| 2. **Create a `.osoplog.yaml` file** recording what you actually did | ||
| 3. **Tell the user** to open both files at https://osop-editor.vercel.app | ||
|
|
||
| ## .osop format (workflow definition) | ||
|
|
||
| ```yaml | ||
| osop_version: "1.0" | ||
| id: "session-<short-description>" | ||
| name: "<What you did>" | ||
| description: "<1-2 sentence summary>" | ||
| version: "1.0.0" | ||
| tags: [windsurf, <relevant-tags>] | ||
|
|
||
| nodes: | ||
| - id: "<step-id>" | ||
| type: "<node-type>" # human, agent, mcp, cli, api, cicd, git, db, docker, infra, system, event, gateway, data | ||
| subtype: "<subtype>" # Optional: llm, explore, plan, worker, tool, test, commit, rest, script | ||
| name: "<Step Name>" | ||
| description: "<What this step does>" | ||
| security: | ||
| risk_level: "<low|medium|high|critical>" | ||
|
|
||
| edges: | ||
| - from: "<step-a>" | ||
| to: "<step-b>" | ||
| mode: "sequential" # sequential, parallel, conditional, fallback, error, spawn, loop, timeout | ||
| ``` | ||
|
|
||
| ## .osoplog.yaml format (execution record) | ||
|
|
||
| ```yaml | ||
| osoplog_version: "1.0" | ||
| run_id: "<uuid>" | ||
| workflow_id: "<matches .osop id>" | ||
| mode: "live" | ||
| status: "COMPLETED" | ||
|
|
||
| trigger: | ||
| type: "manual" | ||
| actor: "user" | ||
| timestamp: "<ISO timestamp>" | ||
|
|
||
| started_at: "<ISO timestamp>" | ||
| ended_at: "<ISO timestamp>" | ||
| duration_ms: <total ms> | ||
|
|
||
| runtime: | ||
| agent: "windsurf" | ||
|
coderabbitai[bot] marked this conversation as resolved.
Outdated
|
||
| model: "<model>" | ||
|
|
||
| node_records: | ||
| - node_id: "<step-id>" | ||
| node_type: "<type>" | ||
| attempt: 1 | ||
| status: "COMPLETED" | ||
| started_at: "<ISO>" | ||
| ended_at: "<ISO>" | ||
| duration_ms: <ms> | ||
| outputs: | ||
| <what you produced> | ||
| tools_used: | ||
| - { tool: "<tool-name>", calls: <n> } | ||
| reasoning: | ||
| question: "<what was decided>" | ||
| selected: "<chosen approach>" | ||
| confidence: <0.0-1.0> | ||
|
|
||
| result_summary: "<1-2 sentence summary>" | ||
| ``` | ||
|
|
||
| ## Node type mapping | ||
|
|
||
| | Agent Action | OSOP Node Type | Subtype | | ||
| |---|---|---| | ||
| | Read/explore files | `mcp` | `tool` | | ||
| | Edit/write files | `mcp` | `tool` | | ||
| | Run shell commands | `cli` | `script` | | ||
| | Run tests | `cicd` | `test` | | ||
| | Git operations | `git` | `commit` / `branch` / `pr` | | ||
| | Analyze/reason about code | `agent` | `llm` | | ||
| | Search codebase | `mcp` | `tool` | | ||
| | Ask user a question | `human` | `input` | | ||
| | User reviews/approves | `human` | `review` | | ||
| | API calls | `api` | `rest` | | ||
|
|
||
| ## Where to save | ||
|
|
||
| Save to `sessions/` in the project root: | ||
| - `sessions/YYYY-MM-DD-<short-desc>.osop` | ||
| - `sessions/YYYY-MM-DD-<short-desc>.osoplog.yaml` | ||
|
|
||
| ## When to generate | ||
|
|
||
| - After completing multi-step tasks (3+ distinct steps) | ||
| - After debugging sessions | ||
| - After feature implementations | ||
| - After refactoring work | ||
| - When the user asks "what did you do?" | ||
105 changes: 105 additions & 0 deletions
105
rules/osop-session-logging-cursorrules-prompt-file/.cursorrules
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,105 @@ | ||
| <!-- trigger: always --> | ||
|
|
||
| # OSOP Session Logging | ||
|
|
||
| After completing a significant task (multi-step work, not trivial one-liners), produce an **OSOP session log** so there is a structured, portable record of what was done. | ||
|
|
||
| 1. **Create a `.osop` file** describing the workflow you followed | ||
| 2. **Create a `.osoplog.yaml` file** recording what you actually did | ||
| 3. **Tell the user** to open both files at https://osop-editor.vercel.app | ||
|
|
||
| ## .osop format (workflow definition) | ||
|
|
||
| ```yaml | ||
| osop_version: "1.0" | ||
| id: "session-<short-description>" | ||
| name: "<What you did>" | ||
| description: "<1-2 sentence summary>" | ||
| version: "1.0.0" | ||
| tags: [windsurf, <relevant-tags>] | ||
|
coderabbitai[bot] marked this conversation as resolved.
Outdated
|
||
|
|
||
| nodes: | ||
| - id: "<step-id>" | ||
| type: "<node-type>" # human, agent, mcp, cli, api, cicd, git, db, docker, infra, system, event, gateway, data | ||
| subtype: "<subtype>" # Optional: llm, explore, plan, worker, tool, test, commit, rest, script | ||
| name: "<Step Name>" | ||
| description: "<What this step does>" | ||
| security: | ||
| risk_level: "<low|medium|high|critical>" | ||
|
|
||
| edges: | ||
| - from: "<step-a>" | ||
| to: "<step-b>" | ||
| mode: "sequential" # sequential, parallel, conditional, fallback, error, spawn, loop, timeout | ||
| ``` | ||
|
|
||
| ## .osoplog.yaml format (execution record) | ||
|
|
||
| ```yaml | ||
| osoplog_version: "1.0" | ||
| run_id: "<uuid>" | ||
| workflow_id: "<matches .osop id>" | ||
| mode: "live" | ||
| status: "COMPLETED" | ||
|
|
||
| trigger: | ||
| type: "manual" | ||
| actor: "user" | ||
| timestamp: "<ISO timestamp>" | ||
|
|
||
| started_at: "<ISO timestamp>" | ||
| ended_at: "<ISO timestamp>" | ||
| duration_ms: <total ms> | ||
|
|
||
| runtime: | ||
| agent: "windsurf" | ||
| model: "<model>" | ||
|
|
||
| node_records: | ||
|
coderabbitai[bot] marked this conversation as resolved.
Outdated
|
||
| - node_id: "<step-id>" | ||
| node_type: "<type>" | ||
| attempt: 1 | ||
| status: "COMPLETED" | ||
| started_at: "<ISO>" | ||
| ended_at: "<ISO>" | ||
| duration_ms: <ms> | ||
| outputs: | ||
| <what you produced> | ||
| tools_used: | ||
| - { tool: "<tool-name>", calls: <n> } | ||
| reasoning: | ||
| question: "<what was decided>" | ||
| selected: "<chosen approach>" | ||
| confidence: <0.0-1.0> | ||
|
|
||
| result_summary: "<1-2 sentence summary>" | ||
| ``` | ||
|
|
||
| ## Node type mapping | ||
|
|
||
| | Agent Action | OSOP Node Type | Subtype | | ||
| |---|---|---| | ||
| | Read/explore files | `mcp` | `tool` | | ||
| | Edit/write files | `mcp` | `tool` | | ||
| | Run shell commands | `cli` | `script` | | ||
| | Run tests | `cicd` | `test` | | ||
| | Git operations | `git` | `commit` / `branch` / `pr` | | ||
| | Analyze/reason about code | `agent` | `llm` | | ||
| | Search codebase | `mcp` | `tool` | | ||
| | Ask user a question | `human` | `input` | | ||
| | User reviews/approves | `human` | `review` | | ||
| | API calls | `api` | `rest` | | ||
|
|
||
| ## Where to save | ||
|
|
||
| Save to `sessions/` in the project root: | ||
| - `sessions/YYYY-MM-DD-<short-desc>.osop` | ||
| - `sessions/YYYY-MM-DD-<short-desc>.osoplog.yaml` | ||
|
|
||
| ## When to generate | ||
|
|
||
| - After completing multi-step tasks (3+ distinct steps) | ||
| - After debugging sessions | ||
| - After feature implementations | ||
| - After refactoring work | ||
| - When the user asks "what did you do?" | ||
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.
Uh oh!
There was an error while loading. Please reload this page.