-
Notifications
You must be signed in to change notification settings - Fork 60
Agents #145
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
Open
DannyFi
wants to merge
25
commits into
main
Choose a base branch
from
agents
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Agents #145
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
dc30b49
fix: add skill & agent
DannyGet 09e38dc
fix: build
DannyGet 5311dfc
fix: doc agent
DannyGet a5842d1
fix: add agents
DannyGet d210ca2
update withdaw img and fix tx status desc (#143)
MarvelFisher 93f084c
Feat/fix content err (#144)
MarvelFisher c04cc86
fix: precommit for skill check
DannyGet 67b2a03
fix: harness workflow
DannyGet be65b9f
feat: LLM Wiki
DannyGet d71daa5
fix: skill doc_skill_id
DannyGet 0ed925c
fix: skill-trigger
DannyGet f619fa7
feat: Three-layer model (knowledge base, brain, connector)
DannyGet 7d36f71
fix: CONTRIBUTING.md
DannyGet d5f4443
fix: Working with Claude Code
DannyGet 800cbcc
fix: Claude Mandatory self-check
DannyGet 51544ad
fix: merge request ai review
DannyGet 7fd6ae9
fix: review
DannyGet a99b355
feat: mirror morph-l2/morph-skill as 'Morph Skill (external pack)' su…
StrawberryFlavor 9d19267
fix: review skill
DannyGet a9722cb
feat: update freshness
DannyGet b825355
feat: freshness & skill test trigger
DannyGet a1e79e2
fix: skill test --runs-per-query
DannyGet e06190d
fix: skill test --runs-per-query
DannyGet cc64d36
fix(docs): address PR #145 CodeRabbit review feedback
DannyGet 86a687a
fix: nav link
DannyGet 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| name: Skill feedback / drift report | ||
| description: Report that a morph-doc Skill (or its paired MDX) gave incorrect, stale, or unroutable guidance. | ||
| title: "[skill-drift] <skill-id>: <one-line summary>" | ||
| labels: | ||
| - skill-drift | ||
| assignees: [] | ||
| body: | ||
| - type: markdown | ||
| attributes: | ||
| value: | | ||
| Thanks for taking the time to flag a Skill drift. This template powers the | ||
| feedback loop for the **Docs-as-SKILL** contract described in | ||
| [`VISION.md`](https://github.com/morph-l2/morph-doc/blob/main/VISION.md). | ||
| The doc maintainer triages every `skill-drift` issue. | ||
|
|
||
| - type: input | ||
| id: skill-id | ||
| attributes: | ||
| label: Skill ID | ||
| description: Directory name under `skills/`, e.g. `morph-contracts`, `morph-js-sdk`. Leave blank if you are reporting an MDX page with no paired Skill. | ||
| placeholder: morph-contracts | ||
| validations: | ||
| required: false | ||
|
|
||
| - type: input | ||
| id: doc-path | ||
| attributes: | ||
| label: Related doc path | ||
| description: Path relative to repo root, e.g. `docs/build-on-morph/developer-resources/1-contracts.md`. Optional if unknown. | ||
| placeholder: docs/... | ||
| validations: | ||
| required: false | ||
|
|
||
| - type: dropdown | ||
| id: category | ||
| attributes: | ||
| label: Drift category | ||
| description: Pick the best fit; maintainers may relabel during triage. | ||
| options: | ||
| - Stale fact (address / chainId / RPC / token changed) | ||
| - Wrong routing (Skill triggered for unrelated question) | ||
| - Missing routing (question should match a Skill but did not) | ||
| - Executable snippet no longer runs | ||
| - Self-check item failed during real use | ||
| - Other | ||
| validations: | ||
| required: true | ||
|
|
||
| - type: textarea | ||
| id: what-happened | ||
| attributes: | ||
| label: What happened | ||
| description: Describe the prompt, the Skill that fired (if any), and the answer you received. | ||
| placeholder: | | ||
| Prompt: "...the user's question..." | ||
| Skill fired: morph-contracts | ||
| Answer given: "..." | ||
| What was wrong: "..." | ||
| validations: | ||
| required: true | ||
|
|
||
| - type: textarea | ||
| id: expected | ||
| attributes: | ||
| label: What you expected instead | ||
| placeholder: | | ||
| - Expected fact: ... | ||
| - Source of truth: ... | ||
| validations: | ||
| required: true | ||
|
|
||
| - type: input | ||
| id: source | ||
| attributes: | ||
| label: Authoritative source (optional) | ||
| description: Link or path to the canonical value (chain explorer, source code, JSON registry, etc.). | ||
| placeholder: https://... or morph-bridge/public/morph-list/src/mainnet/tokenList.json | ||
| validations: | ||
| required: false | ||
|
|
||
| - type: dropdown | ||
| id: agent | ||
| attributes: | ||
| label: Agent / IDE where this occurred | ||
| options: | ||
| - Cursor | ||
| - Claude Code | ||
| - OpenClaw | ||
| - Windsurf | ||
| - Codex | ||
| - Web chat | ||
| - Other | ||
| - Not applicable | ||
| validations: | ||
| required: false | ||
|
|
||
| - type: textarea | ||
| id: additional | ||
| attributes: | ||
| label: Additional context | ||
| description: Version info, chain (Mainnet / Hoodi), package versions, screenshots, etc. | ||
| validations: | ||
| required: false |
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,145 @@ | ||
| # Skill freshness bot (Phase 1) — see scripts/skill-freshness-bot.DESIGN.md | ||
| # | ||
| # - Does NOT run on pull_request (freshness stays warn-only in npm test). | ||
| # - Opens or updates a single tracking Issue on default branch when warnings exist. | ||
|
|
||
| name: skill-freshness-bot | ||
|
|
||
| on: | ||
| schedule: | ||
| # Mondays 09:00 UTC | ||
| - cron: '0 9 * * 1' | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| issues: write | ||
|
|
||
| jobs: | ||
| report: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Setup Node | ||
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | ||
| with: | ||
| node-version: '20' | ||
| cache: npm | ||
|
|
||
| - name: Generate freshness report | ||
| run: | | ||
| mkdir -p .local | ||
| node scripts/skill-freshness-report.mjs --json --out .local/skill-freshness-report.json | ||
|
|
||
| - name: Upload report artifact | ||
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | ||
| with: | ||
| name: skill-freshness-report | ||
| path: .local/skill-freshness-report.json | ||
| retention-days: 30 | ||
|
|
||
| - name: Sync tracking issue | ||
| uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7 | ||
| env: | ||
| REPORT_PATH: .local/skill-freshness-report.json | ||
| with: | ||
| script: | | ||
| const fs = require('fs'); | ||
| const report = JSON.parse(fs.readFileSync(process.env.REPORT_PATH, 'utf8')); | ||
| const owner = context.repo.owner; | ||
| const repo = context.repo.repo; | ||
| const titlePrefix = '[skill-freshness] Weekly re-verify queue'; | ||
| const botLabel = 'skill-freshness'; | ||
|
|
||
| const list = await github.rest.issues.listForRepo({ | ||
| owner, | ||
| repo, | ||
| state: 'all', | ||
| labels: botLabel, | ||
| per_page: 100, | ||
| }); | ||
| const existing = list.data.find((i) => i.title.startsWith(titlePrefix)); | ||
|
|
||
| if (report.warningCount === 0) { | ||
| if (existing) { | ||
| await github.rest.issues.createComment({ | ||
| owner, | ||
| repo, | ||
| issue_number: existing.number, | ||
| body: [ | ||
| '✅ **skill-freshness-bot**: no warnings in the latest scan.', | ||
| '', | ||
| `- Generated: \`${report.generatedAt}\``, | ||
| `- Skills scanned: ${report.skillCount}`, | ||
| '', | ||
| 'Closing this tracking issue. It will reopen on the next scheduled run if warnings return.', | ||
| ].join('\n'), | ||
| }); | ||
| await github.rest.issues.update({ | ||
| owner, | ||
| repo, | ||
| issue_number: existing.number, | ||
| state: 'closed', | ||
| }); | ||
| } | ||
| core.info('No freshness warnings; tracking issue closed or none needed.'); | ||
| return; | ||
| } | ||
|
|
||
| const tableHeader = | ||
| '| Skill | Code | last_verified | Age (days) |\n|-------|------|---------------|------------|'; | ||
| const tableRows = report.warnings.map((w) => { | ||
| const lv = w.lastVerified ?? '—'; | ||
| const age = w.ageDays ?? '—'; | ||
| return `| \`${w.skillId}\` | ${w.code} | ${lv} | ${age} |`; | ||
| }); | ||
|
|
||
| const body = [ | ||
| '## Skill freshness report', | ||
| '', | ||
| 'Automated scan from [`skill-freshness-bot`](.github/workflows/skill-freshness-bot.yml).', | ||
| 'Human-reported factual errors should still use the **skill-drift** issue template.', | ||
| '', | ||
| `**Threshold:** ${report.thresholdDays} days — see [VISION.md § Skill Verification Metadata](https://github.com/${owner}/${repo}/blob/main/VISION.md#skill-verification-metadata-freshness-contract)`, | ||
| '', | ||
| tableHeader, | ||
| ...tableRows, | ||
| '', | ||
| '### Maintainer checklist', | ||
| '', | ||
| '- [ ] Re-read each listed Skill against its `verified_against` paths', | ||
| '- [ ] Update `last_verified` to today (UTC `YYYY-MM-DD`) in the same PR as any fact fix', | ||
| '- [ ] Run `npm test`', | ||
| '', | ||
| `**Run:** ${context.serverUrl}/${owner}/${repo}/actions/runs/${context.runId}`, | ||
| `**Generated:** \`${report.generatedAt}\``, | ||
| `**Warnings:** ${report.warningCount} (${report.staleCount} stale)`, | ||
| ].join('\n'); | ||
|
|
||
| const title = `${titlePrefix} (${report.warningCount} warning${report.warningCount === 1 ? '' : 's'})`; | ||
|
|
||
| if (existing) { | ||
| await github.rest.issues.update({ | ||
| owner, | ||
| repo, | ||
| issue_number: existing.number, | ||
| title, | ||
| body, | ||
| state: 'open', | ||
| }); | ||
| core.info(`Updated issue #${existing.number}`); | ||
| return; | ||
| } | ||
|
|
||
| const created = await github.rest.issues.create({ | ||
| owner, | ||
| repo, | ||
| title, | ||
| body, | ||
| labels: [botLabel, 'bot'], | ||
| }); | ||
| core.info(`Created issue #${created.data.number}`); | ||
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,4 @@ | ||
| node __tests__/doc-skill-pairing.test.mjs | ||
| node __tests__/morph-doc-skill-inventory.test.mjs | ||
| node __tests__/skills-sidebar.test.mjs | ||
| npm run build |
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.
Uh oh!
There was an error while loading. Please reload this page.