Vendor OpenClaw source as Adolf fork baseline
Some checks failed
ClawSweeper Dispatch / dispatch (push) Has been cancelled
CodeQL / Security High (actions) (push) Has been cancelled
CodeQL / Security High (channel-runtime-boundary) (push) Has been cancelled
CodeQL / Security High (core-auth-secrets) (push) Has been cancelled
CodeQL / Security High (mcp-process-tool-boundary) (push) Has been cancelled
CodeQL / Security High (network-ssrf-boundary) (push) Has been cancelled
CodeQL / Security High (plugin-trust-boundary) (push) Has been cancelled
CodeQL / Security High (process-exec-boundary) (push) Has been cancelled
Docs Sync Publish Repo / sync-publish-repo (push) Has been cancelled
Docs / docs (push) Has been cancelled
OpenClaw Stable Main Closeout / Resolve stable release closeout inputs (push) Has been cancelled
OpenClaw Stable Main Closeout / Verify stable main closeout (push) Has been cancelled
Workflow Sanity / no-tabs (push) Has been cancelled
Workflow Sanity / actionlint (push) Has been cancelled
Workflow Sanity / generated-doc-baselines (push) Has been cancelled
CI / runner-admission (push) Has been cancelled
CI / preflight (push) Has been cancelled
CI / security-fast (push) Has been cancelled
CI / pnpm-store-warmup (push) Has been cancelled
CI / build-artifacts (push) Has been cancelled
CI / native-i18n (push) Has been cancelled
CI / ${{ matrix.check_name }} (push) Has been cancelled
CI / ${{ matrix.checkName }} (push) Has been cancelled
CI / checks-node-compat-node22 (push) Has been cancelled
CI / check-bundled-channel-config-metadata (push) Has been cancelled
CI / check-dependencies (push) Has been cancelled
CI / check-guards (push) Has been cancelled
CI / check-lint (push) Has been cancelled
CI / check-prod-types (push) Has been cancelled
CI / check-shrinkwrap (push) Has been cancelled
CI / check-test-types (push) Has been cancelled
CI / check-additional-boundaries-a (push) Has been cancelled
CI / check-additional-boundaries-bcd (push) Has been cancelled
CI / check-additional-extension-bundled (push) Has been cancelled
CI / check-additional-extension-channels (push) Has been cancelled
CI / check-additional-extension-package-boundary (push) Has been cancelled
CI / check-additional-runtime-topology-architecture (push) Has been cancelled
CI / check-session-accessor-boundary (push) Has been cancelled
CI / check-session-transcript-reader-boundary (push) Has been cancelled
CI / check-docs (push) Has been cancelled
CI / skills-python (push) Has been cancelled
CI / macos-swift (push) Has been cancelled
CI / ios-build (push) Has been cancelled
CI / ci-timings-summary (push) Has been cancelled
Native App Locale Refresh / Refresh native fa (push) Has been cancelled
Native App Locale Refresh / Refresh native fr (push) Has been cancelled
Native App Locale Refresh / Refresh native hi (push) Has been cancelled
Native App Locale Refresh / Refresh native id (push) Has been cancelled
Native App Locale Refresh / Refresh native it (push) Has been cancelled
Native App Locale Refresh / Refresh native ja-JP (push) Has been cancelled
Control UI Locale Refresh / plan (push) Has been cancelled
Control UI Locale Refresh / Refresh ${{ matrix.locale }} (push) Has been cancelled
Control UI Locale Refresh / Commit control UI locale refresh (push) Has been cancelled
Live Media Runner Image / Build live media runner image (push) Has been cancelled
Native App Locale Refresh / Refresh native ar (push) Has been cancelled
Native App Locale Refresh / Refresh native de (push) Has been cancelled
Native App Locale Refresh / Refresh native es (push) Has been cancelled
Native App Locale Refresh / Refresh native ko (push) Has been cancelled
Native App Locale Refresh / Refresh native nl (push) Has been cancelled
Native App Locale Refresh / Refresh native pl (push) Has been cancelled
Native App Locale Refresh / Refresh native pt-BR (push) Has been cancelled
Native App Locale Refresh / Refresh native ru (push) Has been cancelled
Native App Locale Refresh / Refresh native sv (push) Has been cancelled
Native App Locale Refresh / Refresh native th (push) Has been cancelled
Native App Locale Refresh / Refresh native tr (push) Has been cancelled
Native App Locale Refresh / Refresh native uk (push) Has been cancelled
Native App Locale Refresh / Refresh native vi (push) Has been cancelled
Native App Locale Refresh / Refresh native zh-CN (push) Has been cancelled
Native App Locale Refresh / Refresh native zh-TW (push) Has been cancelled
Native App Locale Refresh / Commit native locale refresh (push) Has been cancelled
Plugin Init Scaffold Validation / Validate provider scaffold (push) Has been cancelled
Plugin NPM Release / preview_plugins_npm (push) Has been cancelled
Plugin NPM Release / Validate release publish approval (push) Has been cancelled
Plugin NPM Release / preview_plugin_pack (push) Has been cancelled
Plugin NPM Release / publish_plugins_npm (push) Has been cancelled
Sandbox Common Smoke / sandbox-common-smoke (push) Has been cancelled
Website Installer Sync / static (push) Has been cancelled
Website Installer Sync / linux-docker (push) Has been cancelled
Website Installer Sync / macos-installer (push) Has been cancelled
Website Installer Sync / windows-installer (push) Has been cancelled
Website Installer Sync / sync-website (push) Has been cancelled
Some checks failed
ClawSweeper Dispatch / dispatch (push) Has been cancelled
CodeQL / Security High (actions) (push) Has been cancelled
CodeQL / Security High (channel-runtime-boundary) (push) Has been cancelled
CodeQL / Security High (core-auth-secrets) (push) Has been cancelled
CodeQL / Security High (mcp-process-tool-boundary) (push) Has been cancelled
CodeQL / Security High (network-ssrf-boundary) (push) Has been cancelled
CodeQL / Security High (plugin-trust-boundary) (push) Has been cancelled
CodeQL / Security High (process-exec-boundary) (push) Has been cancelled
Docs Sync Publish Repo / sync-publish-repo (push) Has been cancelled
Docs / docs (push) Has been cancelled
OpenClaw Stable Main Closeout / Resolve stable release closeout inputs (push) Has been cancelled
OpenClaw Stable Main Closeout / Verify stable main closeout (push) Has been cancelled
Workflow Sanity / no-tabs (push) Has been cancelled
Workflow Sanity / actionlint (push) Has been cancelled
Workflow Sanity / generated-doc-baselines (push) Has been cancelled
CI / runner-admission (push) Has been cancelled
CI / preflight (push) Has been cancelled
CI / security-fast (push) Has been cancelled
CI / pnpm-store-warmup (push) Has been cancelled
CI / build-artifacts (push) Has been cancelled
CI / native-i18n (push) Has been cancelled
CI / ${{ matrix.check_name }} (push) Has been cancelled
CI / ${{ matrix.checkName }} (push) Has been cancelled
CI / checks-node-compat-node22 (push) Has been cancelled
CI / check-bundled-channel-config-metadata (push) Has been cancelled
CI / check-dependencies (push) Has been cancelled
CI / check-guards (push) Has been cancelled
CI / check-lint (push) Has been cancelled
CI / check-prod-types (push) Has been cancelled
CI / check-shrinkwrap (push) Has been cancelled
CI / check-test-types (push) Has been cancelled
CI / check-additional-boundaries-a (push) Has been cancelled
CI / check-additional-boundaries-bcd (push) Has been cancelled
CI / check-additional-extension-bundled (push) Has been cancelled
CI / check-additional-extension-channels (push) Has been cancelled
CI / check-additional-extension-package-boundary (push) Has been cancelled
CI / check-additional-runtime-topology-architecture (push) Has been cancelled
CI / check-session-accessor-boundary (push) Has been cancelled
CI / check-session-transcript-reader-boundary (push) Has been cancelled
CI / check-docs (push) Has been cancelled
CI / skills-python (push) Has been cancelled
CI / macos-swift (push) Has been cancelled
CI / ios-build (push) Has been cancelled
CI / ci-timings-summary (push) Has been cancelled
Native App Locale Refresh / Refresh native fa (push) Has been cancelled
Native App Locale Refresh / Refresh native fr (push) Has been cancelled
Native App Locale Refresh / Refresh native hi (push) Has been cancelled
Native App Locale Refresh / Refresh native id (push) Has been cancelled
Native App Locale Refresh / Refresh native it (push) Has been cancelled
Native App Locale Refresh / Refresh native ja-JP (push) Has been cancelled
Control UI Locale Refresh / plan (push) Has been cancelled
Control UI Locale Refresh / Refresh ${{ matrix.locale }} (push) Has been cancelled
Control UI Locale Refresh / Commit control UI locale refresh (push) Has been cancelled
Live Media Runner Image / Build live media runner image (push) Has been cancelled
Native App Locale Refresh / Refresh native ar (push) Has been cancelled
Native App Locale Refresh / Refresh native de (push) Has been cancelled
Native App Locale Refresh / Refresh native es (push) Has been cancelled
Native App Locale Refresh / Refresh native ko (push) Has been cancelled
Native App Locale Refresh / Refresh native nl (push) Has been cancelled
Native App Locale Refresh / Refresh native pl (push) Has been cancelled
Native App Locale Refresh / Refresh native pt-BR (push) Has been cancelled
Native App Locale Refresh / Refresh native ru (push) Has been cancelled
Native App Locale Refresh / Refresh native sv (push) Has been cancelled
Native App Locale Refresh / Refresh native th (push) Has been cancelled
Native App Locale Refresh / Refresh native tr (push) Has been cancelled
Native App Locale Refresh / Refresh native uk (push) Has been cancelled
Native App Locale Refresh / Refresh native vi (push) Has been cancelled
Native App Locale Refresh / Refresh native zh-CN (push) Has been cancelled
Native App Locale Refresh / Refresh native zh-TW (push) Has been cancelled
Native App Locale Refresh / Commit native locale refresh (push) Has been cancelled
Plugin Init Scaffold Validation / Validate provider scaffold (push) Has been cancelled
Plugin NPM Release / preview_plugins_npm (push) Has been cancelled
Plugin NPM Release / Validate release publish approval (push) Has been cancelled
Plugin NPM Release / preview_plugin_pack (push) Has been cancelled
Plugin NPM Release / publish_plugins_npm (push) Has been cancelled
Sandbox Common Smoke / sandbox-common-smoke (push) Has been cancelled
Website Installer Sync / static (push) Has been cancelled
Website Installer Sync / linux-docker (push) Has been cancelled
Website Installer Sync / macos-installer (push) Has been cancelled
Website Installer Sync / windows-installer (push) Has been cancelled
Website Installer Sync / sync-website (push) Has been cancelled
Adolf is a fork/vendored clone of github.com/openclaw/openclaw (v2026.6.11), free to diverge. Tree copied sans upstream .git; upstream remote added for future syncs. Node pinned to 24 (.nvmrc); engines already require >=22.19. Preserves docs/ARCHITECTURE.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LeqyaxJF2nbRXJtae2kNB2
This commit is contained in:
275
extensions/open-prose/skills/prose/lib/program-improver.prose
Normal file
275
extensions/open-prose/skills/prose/lib/program-improver.prose
Normal file
@@ -0,0 +1,275 @@
|
||||
# Program Improver
|
||||
# Analyzes inspection reports and proposes improvements to .prose source code
|
||||
#
|
||||
# Usage:
|
||||
# prose run @openprose/lib/program-improver
|
||||
#
|
||||
# Inputs:
|
||||
# inspection_path: Path to inspection binding
|
||||
# run_path: Path to the inspected run (to find program.prose)
|
||||
#
|
||||
# Output: PR to source repo if accessible, otherwise proposal file
|
||||
|
||||
input inspection_path: "Path to inspection output (bindings/inspection.md)"
|
||||
input run_path: "Path to the inspected run directory"
|
||||
|
||||
# ============================================================
|
||||
# Agents
|
||||
# ============================================================
|
||||
|
||||
agent locator:
|
||||
model: sonnet
|
||||
prompt: """
|
||||
You find the source location of .prose programs.
|
||||
|
||||
Check:
|
||||
- Registry reference in program header (e.g., @handle/slug)
|
||||
- Local file paths
|
||||
- Whether source repo is accessible for PRs
|
||||
"""
|
||||
|
||||
agent analyst:
|
||||
model: opus
|
||||
prompt: """
|
||||
You analyze OpenProse inspection reports for program improvement opportunities.
|
||||
|
||||
Look for:
|
||||
- Wrong model tier (using opus where sonnet suffices, or vice versa)
|
||||
- Missing error handling (no try/catch around risky operations)
|
||||
- Suboptimal control flow (sequential where parallel would work)
|
||||
- Context passing issues (passing too much, or missing context)
|
||||
- Unnecessary complexity (over-engineered for the task)
|
||||
- Missing parallelization (independent operations run sequentially)
|
||||
- Agent prompt issues (vague, missing constraints, wrong role)
|
||||
|
||||
Be specific. Quote evidence from inspection.
|
||||
"""
|
||||
|
||||
agent implementer:
|
||||
model: opus
|
||||
prompt: """
|
||||
You improve .prose programs while preserving their intent.
|
||||
|
||||
Rules:
|
||||
- Keep the same overall structure
|
||||
- Make minimal, targeted changes
|
||||
- Follow OpenProse idioms
|
||||
- Preserve comments and documentation
|
||||
- One logical improvement per change
|
||||
"""
|
||||
|
||||
agent pr_author:
|
||||
model: sonnet
|
||||
prompt: """
|
||||
You create branches and pull requests or write proposal files.
|
||||
"""
|
||||
|
||||
# ============================================================
|
||||
# Phase 1: Locate Program Source
|
||||
# ============================================================
|
||||
|
||||
let source_info = session: locator
|
||||
prompt: """
|
||||
Find the source of the inspected program.
|
||||
|
||||
Run path: {run_path}
|
||||
|
||||
Steps:
|
||||
1. Read {run_path}/program.prose
|
||||
2. Check header for registry reference (e.g., # from: @handle/slug)
|
||||
3. Check if it's a lib/ program (part of OpenProse)
|
||||
4. Determine if we can create a PR
|
||||
|
||||
Return JSON:
|
||||
{
|
||||
"program_name": "name from header or filename",
|
||||
"registry_ref": "@handle/slug or null",
|
||||
"source_type": "lib" | "local" | "registry" | "unknown",
|
||||
"source_path": "path to original source or null",
|
||||
"source_repo": "git repo URL or null",
|
||||
"can_pr": true/false,
|
||||
"program_content": "full program source"
|
||||
}
|
||||
"""
|
||||
context: run_path
|
||||
|
||||
# ============================================================
|
||||
# Phase 2: Analyze for Improvements
|
||||
# ============================================================
|
||||
|
||||
let analysis = session: analyst
|
||||
prompt: """
|
||||
Analyze this program and its inspection for improvement opportunities.
|
||||
|
||||
Program source:
|
||||
{source_info.program_content}
|
||||
|
||||
Inspection report: {inspection_path}
|
||||
|
||||
For each opportunity:
|
||||
- category: model-tier | error-handling | flow | context | complexity | parallel | prompts
|
||||
- description: what could be better
|
||||
- severity: low | medium | high
|
||||
- location: which part of program (agent name, phase, line range)
|
||||
- evidence: what in the inspection suggests this
|
||||
- proposed_fix: brief description of the change
|
||||
|
||||
Return JSON:
|
||||
{
|
||||
"program_name": "{source_info.program_name}",
|
||||
"opportunities": [...],
|
||||
"priority_order": [indices by impact]
|
||||
}
|
||||
"""
|
||||
context: { source_info, inspection_path }
|
||||
|
||||
if **no actionable opportunities found**:
|
||||
output result = {
|
||||
status: "no-improvements-needed",
|
||||
source_info: source_info,
|
||||
analysis: analysis,
|
||||
message: "Program executed well, no obvious improvements"
|
||||
}
|
||||
|
||||
# ============================================================
|
||||
# Phase 3: User Selection
|
||||
# ============================================================
|
||||
|
||||
input selection: """
|
||||
## Program Improvement Opportunities
|
||||
|
||||
Program: {source_info.program_name}
|
||||
Source: {source_info.source_type} ({source_info.source_path})
|
||||
Can PR: {source_info.can_pr}
|
||||
|
||||
### Opportunities Found:
|
||||
{analysis.opportunities}
|
||||
|
||||
---
|
||||
|
||||
Which improvements should I implement?
|
||||
- List by number
|
||||
- Or "all" for everything
|
||||
- Or "none" to skip
|
||||
"""
|
||||
|
||||
if **user selected none or wants to skip**:
|
||||
output result = {
|
||||
status: "skipped",
|
||||
source_info: source_info,
|
||||
analysis: analysis
|
||||
}
|
||||
|
||||
let selected = session "Parse selection"
|
||||
prompt: "Extract selected opportunity indices"
|
||||
context: { selection, analysis }
|
||||
|
||||
# ============================================================
|
||||
# Phase 4: Implement Changes
|
||||
# ============================================================
|
||||
|
||||
let implementation = session: implementer
|
||||
prompt: """
|
||||
Implement the selected improvements to this program.
|
||||
|
||||
Original program:
|
||||
{source_info.program_content}
|
||||
|
||||
Selected opportunities: {selected}
|
||||
Full analysis: {analysis}
|
||||
|
||||
Write the improved program. Make all selected changes.
|
||||
|
||||
Return JSON:
|
||||
{
|
||||
"improved_program": "full .prose source with improvements",
|
||||
"changes_made": [
|
||||
{
|
||||
"opportunity_index": N,
|
||||
"description": "what was changed",
|
||||
"lines_affected": "before/after summary"
|
||||
}
|
||||
],
|
||||
"branch_name": "program/{program_name}-improvements"
|
||||
}
|
||||
"""
|
||||
context: { source_info, selected, analysis }
|
||||
|
||||
# ============================================================
|
||||
# Phase 5: Create PR or Proposal
|
||||
# ============================================================
|
||||
|
||||
if **source_info.can_pr is true**:
|
||||
let pr = session: pr_author
|
||||
prompt: """
|
||||
Create a PR for this program improvement.
|
||||
|
||||
Source path: {source_info.source_path}
|
||||
Source repo: {source_info.source_repo}
|
||||
Branch: {implementation.branch_name}
|
||||
Changes: {implementation.changes_made}
|
||||
Improved program: {implementation.improved_program}
|
||||
|
||||
Steps:
|
||||
1. cd to repo containing source
|
||||
2. Create branch
|
||||
3. Write improved program to source path
|
||||
4. Commit with clear message
|
||||
5. Push and create PR
|
||||
|
||||
PR body should explain each improvement.
|
||||
|
||||
Return: { pr_url, branch, title }
|
||||
"""
|
||||
context: { source_info, implementation }
|
||||
permissions:
|
||||
bash: allow
|
||||
write: ["**/*.prose"]
|
||||
|
||||
output result = {
|
||||
status: "pr-created",
|
||||
source_info: source_info,
|
||||
analysis: analysis,
|
||||
implementation: implementation,
|
||||
pr: pr
|
||||
}
|
||||
|
||||
else:
|
||||
# Write proposal file since we can't PR
|
||||
let proposal_path = session: pr_author
|
||||
prompt: """
|
||||
Write a proposal file for this improvement.
|
||||
|
||||
Since we can't create a PR directly, write a proposal to:
|
||||
.prose/proposals/{source_info.program_name}-improvements.md
|
||||
|
||||
Include:
|
||||
# Improvement Proposal: {source_info.program_name}
|
||||
|
||||
## Original Source
|
||||
{source_info.source_path or source_info.registry_ref}
|
||||
|
||||
## Changes Proposed
|
||||
{implementation.changes_made}
|
||||
|
||||
## Improved Program
|
||||
```prose
|
||||
{implementation.improved_program}
|
||||
```
|
||||
|
||||
## How to Apply
|
||||
Instructions for manually applying or submitting upstream.
|
||||
|
||||
Return: { proposal_path }
|
||||
"""
|
||||
context: { source_info, implementation }
|
||||
permissions:
|
||||
write: [".prose/proposals/*.md"]
|
||||
|
||||
output result = {
|
||||
status: "proposal-written",
|
||||
source_info: source_info,
|
||||
analysis: analysis,
|
||||
implementation: implementation,
|
||||
proposal: proposal_path
|
||||
}
|
||||
Reference in New Issue
Block a user