Skip to content

Commit f969f28

Browse files
committed
Update: add local skill validation workflow
1 parent 36cfa80 commit f969f28

8 files changed

Lines changed: 273 additions & 111 deletions

File tree

.github/workflows/quality.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
name: Skill Quality
22
on: [push, pull_request]
33
jobs:
4+
local-quality:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v4
8+
- uses: actions/setup-python@v5
9+
with:
10+
python-version: '3.x'
11+
- run: python3 tools/quick_validate.py skills/source --all
412
quality:
513
uses: OpenAEC-Foundation/Skill-Package-Workflow-Template/.github/workflows/skill-quality.yml@main

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Thumbs.db
3333
.env.local
3434
PROMPTS.md
3535
.claude/
36+
.hermes/
3637
*.code-workspace
3738

3839
# Node (if any JS tooling)

CONTRIBUTING.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,26 @@ date = frappe.utils.nowdate()
7272

7373
Before submitting:
7474

75-
1. Validate SKILL.md format:
75+
1. Validate one skill:
7676
```bash
77-
python tools/quick_validate.py skills/source/your-skill/
77+
python3 tools/quick_validate.py skills/source/category/your-skill/
7878
```
7979

80-
2. Check line count:
80+
2. Validate all skills:
8181
```bash
82-
wc -l skills/source/your-skill/SKILL.md # Must be <500
82+
python3 tools/quick_validate.py skills/source --all
8383
```
8484

85-
3. Verify all code examples work in ERPNext
85+
3. Keep every `SKILL.md` at maximum 500 lines, measured with:
86+
```bash
87+
python3 - <<'PY'
88+
from pathlib import Path
89+
p = Path('skills/source/category/your-skill/SKILL.md')
90+
print(len(p.read_text(encoding='utf-8').splitlines()))
91+
PY
92+
```
93+
94+
4. Verify all code examples work in ERPNext
8695
8796
## Commit Message Format
8897

SOURCES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
| Source | URL | Coverage | Last Verified |
1313
|--------|-----|----------|---------------|
1414
| Frappe Framework Docs | https://docs.frappe.io/framework | Core framework API, hooks, controllers | 2026-01-17 |
15+
| Frappe Framework Introduction | https://docs.frappe.io/framework/user/en/introduction | Framework overview, metadata-as-data model, Desk, permissions, REST API | 2026-06-24 |
1516
| Database API | https://docs.frappe.io/framework/user/en/api/database | frappe.db methods, query builder | 2026-01-17 |
1617
| Document API | https://docs.frappe.io/framework/user/en/api/document | frappe.get_doc, document lifecycle | 2026-01-17 |
1718
| Form API | https://docs.frappe.io/framework/user/en/api/form | Client-side form manipulation | 2026-01-17 |
@@ -55,6 +56,11 @@
5556
| Source | URL | Purpose | Last Verified |
5657
|--------|-----|---------|---------------|
5758
| Frappe Source | https://github.com/frappe/frappe | Source code verification | 2026-01-17 |
59+
| Frappe Docker | https://github.com/frappe/frappe_docker | Official Docker/container setup repository for Frappe apps | 2026-06-24 |
60+
| Frappe Docker Docs | https://frappe.github.io/frappe_docker/ | Published Docker setup documentation | 2026-06-24 |
61+
| Frappe Docker Getting Started | https://frappe.github.io/frappe_docker/getting-started.html | Docker architecture, repo layout, services, images, overrides | 2026-06-24 |
62+
| Frappe Docker Single Compose Setup | https://frappe.github.io/frappe_docker/01-getting-started/04-single-compose-setup.html | `pwd.yml` demo setup, services, volumes, adaptation notes | 2026-06-24 |
63+
| Frappe Docker Development | https://frappe.github.io/frappe_docker/05-development/01-development.html | Devcontainer and development bench workflow | 2026-06-24 |
5864
| ERPNext Releases | https://github.com/frappe/erpnext/releases | Version change tracking | 2026-01-17 |
5965
| Frappe Permissions | https://github.com/frappe/frappe/blob/develop/frappe/permissions.py | Permission internals | 2026-01-17 |
6066
| Document Model | https://github.com/frappe/frappe/blob/develop/frappe/model/document.py | Document lifecycle | 2026-01-17 |
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Frappe Source Verification — 2026-06-24
2+
3+
## Scope
4+
5+
Implemented structural validation and a minimal source audit for the requested official sources:
6+
7+
- `https://github.com/frappe/frappe_docker`
8+
- `https://docs.frappe.io/framework/user/en/introduction`
9+
10+
The validator checks repo structure only. It does **not** prove Frappe API correctness or Docker operational accuracy.
11+
12+
## Official URLs checked
13+
14+
All URLs below returned HTTP 200 on 2026-06-24.
15+
16+
| URL | Retrieved | Used for |
17+
|---|---:|---|
18+
| https://docs.frappe.io/framework/user/en/introduction | 2026-06-24 | Framework overview source entry: Python/JavaScript/MariaDB, metadata-as-data, Desk, permissions, REST API |
19+
| https://github.com/frappe/frappe_docker | 2026-06-24 | Official repository source entry for Docker/container setup |
20+
| https://frappe.github.io/frappe_docker/ | 2026-06-24 | Published Frappe Docker docs root source entry |
21+
| https://frappe.github.io/frappe_docker/getting-started.html | 2026-06-24 | Frappe Docker architecture/repo layout/services/images/overrides source entry |
22+
| https://frappe.github.io/frappe_docker/01-getting-started/04-single-compose-setup.html | 2026-06-24 | Single compose `pwd.yml` services/volumes/adaptation source entry |
23+
| https://frappe.github.io/frappe_docker/05-development/01-development.html | 2026-06-24 | Devcontainer/development workflow source entry |
24+
25+
## Changed factual claims
26+
27+
| File | Claim changed | Source URL | Reviewer check |
28+
|---|---|---|---|
29+
| `tools/quick_validate.py` | Validator is structural only and uses stdlib parsing, not PyYAML. | Repo-local implementation; no external Frappe claim. | Verified by code and `python3 tools/quick_validate.py skills/source --all`. |
30+
| `CONTRIBUTING.md` | Skill line limit is maximum 500 lines measured with Python `splitlines()`. | Repo-local policy reconciliation; no external Frappe claim. | Matches `tools/quick_validate.py`. |
31+
| `SOURCES.md` | Frappe Framework introduction is an approved source for high-level framework overview. | https://docs.frappe.io/framework/user/en/introduction | URL returned 200; source is official Frappe docs. |
32+
| `SOURCES.md` | `frappe_docker` repo and selected Frappe Docker docs are approved sources for Docker/container setup. | https://github.com/frappe/frappe_docker and `frappe.github.io/frappe_docker` pages above | URLs returned 200; sources are official repo/docs. |
33+
| `skills/source/ops/frappe-ops-website-deploy/SKILL.md` | Description now starts with `Use when` and keeps v15-v16 compatibility. | Repo-local skill trigger policy; no new external Frappe claim. | Verified by validator; compatibility remains `Frappe v15-v16, ERPNext v15-v16`. |
34+
| `skills/source/core/frappe-core-database/SKILL.md` | Reference file list was condensed to meet line limit. | Repo-local formatting only; no external Frappe claim changed. | Verified line count is <= 500. |
35+
36+
## Docker/deployment skill review
37+
38+
No Docker/deployment skill body claims were changed in this implementation. The `frappe_docker` URLs were added to `SOURCES.md` for future source-backed edits and to satisfy the requested verification scope.
39+
40+
## Validator limitations
41+
42+
- Checks frontmatter shape, required metadata, line count, skill names, references directory shape.
43+
- Allows legitimate compatibility ranges such as `Frappe v14-v16` and `Frappe v15-v16`.
44+
- Does not crawl documentation.
45+
- Does not prove every code example is correct.
46+
- Does not enforce language purity with a brittle word blocklist.
47+
48+
## Commands run
49+
50+
```bash
51+
# URL liveness checks
52+
curl -L -s -o /dev/null -w '%{http_code}\n' <url>
53+
54+
# Repo validation
55+
python3 tools/quick_validate.py skills/source --all
56+
57+
# Single-skill validation
58+
python3 tools/quick_validate.py skills/source/core/frappe-core-database
59+
```

skills/source/core/frappe-core-database/SKILL.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -493,9 +493,7 @@ For complex queries (joins, aggregations, subqueries, cross-DB compatibility), s
493493
- **frappe.db.sql** — Very complex SQL not expressible in qb (ALWAYS parameterized)
494494

495495
## Reference Files
496-
497-
- **[methods-reference.md](references/methods-reference.md)** — Complete API signatures for all database and document methods
496+
- **[methods-reference.md](references/methods-reference.md)** — Complete API signatures for database and document methods
498497
- **[query-patterns.md](references/query-patterns.md)** — Query Builder patterns, subqueries, ImportMapper, custom functions
499498
- **[caching-patterns.md](references/caching-patterns.md)** — Redis cache, @redis_cache, hash operations, invalidation
500-
- **[examples.md](references/examples.md)** — Real-world patterns: CRUD, reports, batch processing, transactions
501-
- **[anti-patterns.md](references/anti-patterns.md)** — SQL injection, N+1, commit mistakes, and 10 more anti-patterns
499+
- **[examples.md](references/examples.md)** / **[anti-patterns.md](references/anti-patterns.md)** — CRUD, reports, batch processing, SQL injection, N+1, commit mistakes

skills/source/ops/frappe-ops-website-deploy/SKILL.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
---
22
name: frappe-ops-website-deploy
33
description: >
4-
Deploy HTML/CSS websites to ERPNext/Frappe (v15/v16) as Web Pages via the REST API.
5-
Use this skill whenever a user wants to host a website on ERPNext, deploy HTML mockups
6-
to Frappe, create Web Pages programmatically, configure Website Settings, or integrate
7-
Frappe's Discussion system as a forum. Also use when the user mentions "website on ERPNext",
8-
"Web Page API", "Page Builder", "Web Template", or wants to serve custom HTML from Frappe.
9-
Covers: Web Pages with Page Builder, custom Web Templates, Website Settings (navbar, footer),
10-
CSS management, Frappe Discussion integration, and deployment scripting.
4+
Use when deploying HTML/CSS websites to ERPNext/Frappe (v15/v16) as Web Pages via the REST API.
5+
Prevents broken Web Page rendering, wrong Page Builder usage, and missing Website Settings.
6+
Covers Web Pages with Page Builder, custom Web Templates, Website Settings, CSS management,
7+
Frappe Discussion integration, and deployment scripting. Keywords: website on ERPNext,
8+
Web Page API, Page Builder, Web Template, custom HTML, Frappe website deploy.
119
license: MIT
1210
compatibility: "Claude Code, Claude.ai Projects, Claude API. Frappe v15-v16, ERPNext v15-v16."
1311
metadata:

0 commit comments

Comments
 (0)