Skip to content

feat: add /docs site, restructure README, align skill with protocol#1

Merged
daibor merged 3 commits intomainfrom
feature/docs-site-and-skill-alignment
Apr 26, 2026
Merged

feat: add /docs site, restructure README, align skill with protocol#1
daibor merged 3 commits intomainfrom
feature/docs-site-and-skill-alignment

Conversation

@daibor
Copy link
Copy Markdown
Collaborator

@daibor daibor commented Apr 26, 2026

Summary

  • Add 9 docs under /docs/ (signal format, architecture, quick-start, build-a-sensor, multi-sensor, sensorhub, why-w2a, rfc-graph, CONTRIBUTING) so the README can stay focused on the landing-page experience and link out for depth.
  • Restructure the README quick-start around the Claude Code plugin path; demote SensorHub and "Missing a sensor?" to H3 subsections under Sensors; thin the hero-area horizontal rules from four to two.
  • Remove all w2a CLI pseudo-commands from docs and README — only capabilities that work today (npm publish, npm search w2a-sensor, plugin commands) are documented.
  • Align the build-w2a-sensor skill with the protocol:
    • Mandatory npm keywords block in the generated package.json (world2agent, w2a, w2a-sensor, sensor, agent, <source_type>) so npm search w2a-sensor actually surfaces sensors built with the skill.
    • source_event.schema property descriptions promoted to a SHOULD best practice; example payloads now carry description on every property.
    • event.type domain is documented as the abstract source space (messaging, repo, market, news, tasks), not the platform name — the platform identity already lives in source.source_type. All examples across docs and skill are updated accordingly (github.repo.trendingrepo.trending.entered, slack.message.mentionedmessaging.message.mentioned, etc.).
    • action must be a verb in past tense, not a gerund.

Test plan

  • Verify all relative links in /docs/*.md and README.md resolve on GitHub
  • Run a sensor build via the updated build-w2a-sensor skill and confirm the generated package.json carries the expected keywords
  • Confirm every event.type example across docs and skill uses an abstract domain (no platform names)
  • Confirm no remaining references to w2a CLI pseudo-commands (w2a publish, w2a search, w2a add, npm init w2a-sensor)

🤖 Generated with Claude Code

- Add 9 docs under /docs/ (signal format, architecture, quick-start,
  build-a-sensor, multi-sensor, sensorhub, why-w2a, rfc-graph,
  CONTRIBUTING) so the README can stay focused on the landing-page
  experience and link out for depth.
- Restructure the README quick-start around the Claude Code plugin
  path; demote SensorHub and "Missing a sensor?" to H3 subsections
  under Sensors; thin the hero-area horizontal rules.
- Remove all `w2a` CLI pseudo-commands across docs and README — only
  capabilities that work today are described.
- Align build-w2a-sensor skill with the protocol: mandatory npm
  keywords for `npm search w2a-sensor` / SensorHub discovery,
  `source_event.schema` property descriptions as best practice,
  `event.type` `domain` is the abstract source space (not the
  platform name), action verbs in past tense.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sami-mp-ai sami-mp-ai changed the title Add /docs site, restructure README, align skill with protocol feat: add /docs site, restructure README, align skill with protocol Apr 26, 2026
@daibor daibor enabled auto-merge (squash) April 26, 2026 09:10
Comment thread README.md Outdated

<!-- Concept Video -->
<p align="center">
<a href="[YOUTUBE_VIDEO_LINK]">
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfilled placeholder links and missing asset[YOUTUBE_VIDEO_LINK] is a raw placeholder that will render as a broken link on GitHub. The image at ./assets/video-thumbnail.png (line 24) also references a directory that does not exist in the repo, so it will display as a broken image. Either fill in the URL and add the asset before merging, or comment the entire block out (like the Star History chart below it) until both are ready.

未填占位符与缺失资源[YOUTUBE_VIDEO_LINK] 是未替换的占位符,在 GitHub 上会显示为失效链接。第 24 行的图片路径 ./assets/video-thumbnail.png 引用了仓库中不存在的目录,会显示为损坏图片。请在合并前填入真实 URL 并添加对应资源,或像下方 Star History 图表一样将整个块注释掉,待两者就绪后再启用。

Comment thread README.md Outdated
<a href="https://machinepulse.ai">Website</a> ·
<a href="#quick-start">Quick Start</a> ·
<a href="#sensors">Sensors</a> ·
<a href="#sensorhub">SensorHub</a> ·
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nav anchor targets an H3, not the section heading#sensorhub resolves to the H3 ### SensorHub nested under ## Sensors. The nav bar likely intends to jump users to ## Sensors; if so, change this to <a href="#sensors">SensorHub</a>.

导航锚点指向 H3 而非节标题#sensorhub 解析到的是嵌套在 ## Sensors 下的三级标题 ### SensorHub。导航栏的本意可能是跳转到 ## Sensors 节,若如此,应改为 <a href="#sensors">SensorHub</a>

Comment thread README.md Outdated

## Community

[Website](https://machinepulse.ai/) · [Discord]([DISCORD_LINK]) · [X / Twitter](https://x.com/machinepulse) · [YouTube]([YOUTUBE_LINK])
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfilled placeholder links[DISCORD_LINK] and [YOUTUBE_LINK] are raw bracket placeholders that will render as broken href attributes. Fill these in or remove them before merging.

未填占位符链接[DISCORD_LINK][YOUTUBE_LINK] 是未替换的原始占位符,会渲染为含有失效 href 属性的字面文本。请在合并前填入真实链接或将其删除。

Comment thread docs/quick-start.md Outdated
// Your agent logic here
});

handler.on("repo.repo.starred", async (signal) => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

repo.repo.starred violates the domain.entity.action schema — the domain (repo) is repeated as the entity, yielding a nonsensical triple. The entity slot should name the thing that changed, not the domain again. A more correct form would be repo.star.added (entity = star, action = past-tense verb) or repo.stargazer.added. The same error appears in docs/signal-format.md line 116.

repo.repo.starred 违反了 domain.entity.action 规范 — domain (repo) 在 entity 位置被重复使用,产生了无意义的三元组。entity 槽应填写发生变化的事物,而非重复 domain。更正确的形式应为 repo.star.added(entity = star,action = 过去式动词)或 repo.stargazer.added。同样的错误出现在 docs/signal-format.md 第 116 行。

Comment thread docs/quick-start.md
// 2. Register listeners for each event type you care about
// `domain` is the abstract source space (`repo`), not the platform name —
// the platform identity is in `signal.source.source_type`.
handler.on("repo.trending.entered", async (signal) => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

repo.trending.entered is inconsistent with the skill's own conventionSKILL.md line 49 gives trending -> trending_entered as the recommended fix (underscore-joined compound). The docs use trending.entered (dot-separated), placing entered in the action slot with trending as entity. The entity trending is also a gerund, not a clear noun. The skill and docs should agree on the same convention.

repo.trending.entered 与技能自身的规范不一致SKILL.md 第 49 行给出的推荐修正是 trending -> trending_entered(下划线连接的复合形式)。但文档使用 trending.entered(点分隔形式),将 entered 放在 action 槽、trending 作为 entity。entity 槽的 trending 也是动名词,不是清晰的名词实体。技能文件与文档应就同一规范达成一致。

Comment thread docs/signal-format.md Outdated

Open namespace — sensors coin their own triples. Consumers pattern-match on this string, so the triples a sensor emits are part of its public contract; treat them as you would a public API.

`domain` is the **abstract source space** (`messaging`, `repo`, `market`, `calendar`), not the platform name. The platform identity already lives in `source.source_type` — keeping the two orthogonal is what lets one handler match the same semantic event across platforms: `handler.on("messaging.message.mentioned")` catches Slack, Discord, Lark, and Teams alike. A sensor for GitHub stars emits `repo.repo.starred` (with `source.source_type: "github"`), not `github.repo.starred`.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

repo.repo.starred used as a canonical example but violates the schema — this sentence gives repo.repo.starred as the example for a GitHub stars sensor, but that repeats repo as both domain and entity, directly contradicting the domain.entity.action rule. Consider replacing with repo.star.added (entity = the star object, action = past-tense verb).

repo.repo.starred 作为典型示例但违反了规范 — 此处以 repo.repo.starred 为例说明 GitHub stars 传感器的事件类型,但 repo 同时出现在 domain 和 entity 位置,与 domain.entity.action 规则直接矛盾。建议替换为格式正确的三元组,例如 repo.star.added(entity = star 对象,action = 过去式动词)。

Comment thread docs/signal-format.md
- ✅ `"llm-agents/perception gained 523 stars in 24h and hit #3 on Trending; relevant to your active research thread"`
- ❌ `"new event"` / `"PR update"` / `"price moved"` — vague, reject and rewrite.

`event.type` follows `domain.entity.action`:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The action past-tense rule is not documented here — the schema TypeScript and SKILL.md both specify that action must be a past-tense verb (created, updated, not create, creating, or trending). This rule is absent from this document, the primary reference for sensor authors. Please add a note such as: action must be a past-tense verb (e.g. created, threshold_crossed).

action 过去式规则在此处未作说明 — schema TypeScript 和 SKILL.md 均明确规定 action 必须是过去式动词(如 createdupdated,而非 createcreatingtrending)。但该规则在本文档(传感器作者的首要参考)中并未提及。请在此处补充说明:action 必须是过去式动词(如 createdthreshold_crossed)。

Comment thread docs/sensorhub.md Outdated
Install any sensor by package name:

```bash
npm install {PackageName}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{PackageName} is an unfilled template placeholder — users who copy-paste this command will get an npm error. Replace with a concrete example (e.g. npm install @world2agent/sensor-hackernews) or use the conventional angle-bracket style (npm install <package-name>) to signal substitution clearly.

{PackageName} 是未填写的模板占位符 — 用户复制粘贴此命令后会遇到 npm 报错。请替换为具体示例(如 npm install @world2agent/sensor-hackernews),或采用惯用的尖括号占位符风格(npm install <package-name>)以明确提示该处需要替换。

Comment thread docs/sensorhub.md

| Field | Source |
|-------|--------|
| npm package name | Developer submits |
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Developer submits rows lack a submission mechanism — these rows claim fields are developer-submitted, but nowhere in this document is there a link, form, or API explaining how to submit them. If SensorHub auto-indexes from npm keywords, the label is wrong. If there is a manual step, describe it or link to it. This also conflicts with line 6's claim that there is no separate publish step.

Developer submits 行缺少提交机制说明 — 这些表格行声称相关字段由开发者提交,但文档中没有任何链接、表单或 API 说明如何提交。若 SensorHub 从 npm 关键字自动索引,则该标注有误;若存在手动步骤,则需补充说明或提供链接。这与第 6 行所说的无需单独发布步骤也存在矛盾。

Comment thread docs/architecture.md
SensorHub is a discovery layer on top of npm. Every sensor is a standard npm package — SensorHub makes them easier to find.

```
Developer builds sensor → npm publish → submit to SensorHub
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Diagram contradicts sensorhub.md and the README — this shows npm publish -> submit to SensorHub implying a separate manual submission step. But sensorhub.md line 6 says there is no separate publish step, and the README says SensorHub auto-indexes after npm publish. The two documents should agree on whether a manual SensorHub submission is required.

此图与 sensorhub.md 及 README 存在矛盾 — 图中显示 npm publish -> submit to SensorHub,暗示需要单独的手动提交步骤。但 sensorhub.md 第 6 行写道无需单独发布步骤,README 也说 npm publish 后 SensorHub 会自动索引。两份文档应就是否需要手动提交 SensorHub 达成一致。

@github-actions

This comment has been minimized.

…flow

- README: point Website to world2agent.ai and SensorHub to /hub
- sensorhub.md: replace `{PackageName}` with `<package-name>`, document
  the manual SensorHub submission step (no auto-crawl from npm today)
- quick-start.md, signal-format.md: rename `repo.repo.starred` to
  `repo.star.added` to satisfy `domain.entity.action`
- signal-format.md: surface the past-tense `action` rule from schema.ts
- SKILL.md: drop the `trending` example to align with quick-start's
  `repo.trending.entered`

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment thread README.md
Comment on lines +23 to +25
<a href="https://world2agent.ai/assets/promo-w2a.mp4">
Watch the W2A Concept Video
</p>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unclosed <a> tag — missing </a> before </p>.
</a> 标签未关闭 — 在 </p> 之前缺少 </a>

The <a> opened on line 23 is never closed. While browsers may forgive this, it is invalid HTML and can cause rendering issues downstream (e.g. the entire rest of the page becoming a link).
第 23 行打开的 <a> 标签始终未关闭。虽然浏览器可能容忍此问题,但这是无效 HTML,可能导致后续渲染异常(例如页面其余内容全部变为链接)。

Suggested change
<a href="https://world2agent.ai/assets/promo-w2a.mp4">
Watch the W2A Concept Video
</p>
<a href="https://world2agent.ai/assets/promo-w2a.mp4">
Watch the W2A Concept Video
</a>
</p>

@github-actions
Copy link
Copy Markdown

Code Review — Incremental Push

1 new issue found; several prior issues fixed in this push.
此次推送修复了多个先前问题,但引入了 1 个新问题。


Fixed in this push (previously open threads):
本次推送已修复的问题(来自先前的开放评审线程):

  • repo.repo.starred corrected to repo.star.added in docs/quick-start.md and docs/signal-format.md.
    repo.repo.starred 已在 docs/quick-start.mddocs/signal-format.md 中更正为 repo.star.added
  • {PackageName} placeholder replaced with <package-name> in docs/sensorhub.md.
    docs/sensorhub.md 中的 {PackageName} 占位符已替换为 <package-name>
  • action past-tense rule now documented in docs/signal-format.md.
    action 过去式规则已在 docs/signal-format.md 中补充说明。
  • SensorHub submission link added, resolving the contradiction with docs/architecture.md.
    已添加 SensorHub 提交链接,消除了与 docs/architecture.md 之间的矛盾。

New issue (introduced in this push):
本次推送引入的新问题:

  • HighREADME.md lines 23–25: Unclosed <a> tag. A </a> is missing before </p>, making the HTML invalid. Suggestion posted inline.
    README.md 第 23–25 行:<a> 标签未关闭,</p> 之前缺少 </a>,导致 HTML 无效。已在行内评论中提供修改建议。

Still open (unchanged in this push):
仍未解决(本次推送未涉及):

  • README.md line ~129: [DISCORD_LINK] and [YOUTUBE_LINK] placeholders.
    README.md 第 129 行附近:[DISCORD_LINK][YOUTUBE_LINK] 仍为未填占位符。
  • docs/quick-start.md line 54: Entity trending in repo.trending.entered is a gerund, not a clear noun.
    docs/quick-start.md 第 54 行:repo.trending.entered 中的 trending 作为实体仍是动名词形式,而非清晰的名词。

Drop the Discord placeholder, set Twitter to @Karpo_AI, and point
YouTube at the actual channel URL.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@daibor daibor merged commit 2fe5083 into main Apr 26, 2026
@daibor daibor deleted the feature/docs-site-and-skill-alignment branch April 26, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants