Skip to content

Commit 0899ad5

Browse files
authored
Merge pull request #91 from Accenture/doc/guide-first-lookup-rule
Doc: guide-first lookup rule + system/AGENTS.md consumer starting point
2 parents 6220c96 + 8e9125f commit 0899ad5

3 files changed

Lines changed: 76 additions & 2 deletions

File tree

‎AGENTS.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
**Contributing to this repository?** Read [memory/PROTOCOL.md](memory/PROTOCOL.md) and follow it.
22

33
**Consuming Mercury Composable for Node.js as a dependency?** Skip the memory protocol — it is
4-
for repository contributors. Start at [README.md](README.md) — the quick start, function
5-
contract, configuration, and wire-format guide for writing polyglot functions consistently.
4+
for repository contributors. Start at [system/AGENTS.md](system/AGENTS.md) — the consumer
5+
starting point: guide index, key references, and efficient lookup strategy.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Session (2026-09-01T16:12:13.000Z)
2+
3+
**Agent:** Claude Code
4+
**Lightweight:** doc-only changes, no memory-relevant events.
5+
6+
Added `system/AGENTS.md` (consumer starting point — guide index, efficient lookup rule,
7+
key references) and updated root `AGENTS.md` consumer path to point there.
8+
Mirrors the `system/AGENTS.md` convention from mercury-composable and mercury (Rust).
9+
10+
PR: [#91](https://github.com/Accenture/mercury-nodejs/pull/91) — awaiting merge.
11+
12+
## Memory References
13+
14+
(none)

‎system/AGENTS.md‎

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Mercury Composable for Node.js — consumer starting point
2+
3+
> **Contributors working in this repository:** follow the root [AGENTS.md](../AGENTS.md)
4+
> (the agent-memory protocol) first — this file does not replace it. This scoped guide
5+
> serves AI tools that **consume the Node.js wrapper as a dependency** and need the fastest
6+
> correct starting point. It lives at the same path as the engine repos' consumer guide
7+
> (`system/AGENTS.md`), so one tool convention finds every Mercury repo.
8+
9+
## What this package is
10+
11+
`mercury-nodejs` is a lightweight Event-over-HTTP function host: write decoupled functions
12+
in JavaScript/TypeScript and let Mercury Composable engines (Java, Rust) orchestrate them
13+
from Event Script flows and MiniGraph knowledge graphs. Orchestration stays in the engines;
14+
this package contributes functions plus the engines' operational conventions (configuration,
15+
logging, trace, actuators).
16+
17+
## Starting point for consumer AI tools
18+
19+
The quickest path to a working function:
20+
21+
1. **`docs/llms.txt`** — the machine-readable map of this documentation site.
22+
2. **AI Agent Guide** (`docs/guides/ai-agent-guide.md`) — the complete authoring grammar
23+
on one page: contract, registration, composition, config keys, error rules.
24+
3. **Getting Started** (`docs/guides/getting-started.md`) — a running function in five
25+
minutes, called from an engine flow.
26+
27+
For Mercury engine questions (Event Script flows, Knowledge Graph models, REST automation,
28+
Kafka integration), use the engine's `docs/llms.txt` or ai-contract-provider skill — this
29+
wrapper's docs cover only the Node.js function surface.
30+
31+
## What lives in this repo
32+
33+
| Path | Role |
34+
|------|------|
35+
| `src/` | the `mercury-composable` package — `Platform`, `PostOffice`, `EventEnvelope`, actuator routes |
36+
| `examples/` | runnable reference functions |
37+
| `docs/` | the MkDocs guide site source |
38+
| `test/` | unit and integration tests |
39+
40+
## Key references (repo-relative)
41+
42+
- `docs/llms.txt` — machine-readable documentation map; start here for keyword lookup
43+
- `docs/guides/ai-agent-guide.md` — AI agent authoring grammar (the authoritative contract)
44+
- `docs/guides/function-patterns.md` — (headers, body) contract, async, never-block-the-loop
45+
- `docs/guides/join-event-script.md` — `yaml.event.over.http`, what the function sees
46+
- `docs/guides/join-knowledge-graph.md` — `graph.task` to a Node.js target
47+
- `docs/guides/configuration-reference.md` — every well-known config key
48+
- `docs/guides/http-surface-reference.md` — `/api/event` protocol, actuator shapes
49+
50+
## Efficient lookup
51+
52+
**For "how do I write / configure X" questions, start with the guide — not the source.**
53+
`docs/llms.txt` maps every guide page. Find the right page there first; read only the
54+
relevant section. Fall back to source only when the guide is genuinely silent on the
55+
specific behavior or you need to verify a subtle invariant. Guide-first costs 3–5× fewer
56+
tokens than source discovery.
57+
58+
When source reveals a genuine gap, raise an issue or PR against the upstream OSS project:
59+
- **Wrapper docs:** github.com/Accenture/mercury-nodejs
60+
- **Engine guides:** github.com/Accenture/mercury-composable

0 commit comments

Comments
 (0)