chore: bootstrap project scaffolding

Add architecture doc (research-wiki/ARCHITECTURE.md), CLAUDE.md with
tiered SOP for Fable 5, adapted .claude skills/hooks/settings, package
skeleton (src/polygateway), pyproject with import-linter contracts,
Makefile, .env.example and smoke test.
This commit is contained in:
2026-07-20 00:49:10 -04:00
commit 3058f4c744
63 changed files with 7631 additions and 0 deletions
+89
View File
@@ -0,0 +1,89 @@
---
name: research-wiki
description: "Manage the project research knowledge base. Initialization, querying, statistics, and health checks. Trigger phrases: knowledge base, research wiki, wiki query, check the knowledge base."
argument-hint: [subcommand: init|query|stats|lint|ingest]
---
# Research Wiki Management
Manage the project research knowledge base: $ARGUMENTS
## Overview
Research Wiki is the project's single source of truth for knowledge. All research and development knowledge produced by skills is stored here.
### Entity Types (12)
| Entity | Directory | node_id Format | Primary Source Skill |
|---|---|---|---|
| paper | `papers/` | `paper:<slug>` | `research-lit` |
| idea | `ideas/` | `idea:<id>` | `idea-creator` |
| experiment | `experiments/` | `exp:<id>` | `run-experiment` (future) |
| claim | `claims/` | `claim:<id>` | `novelty-check` |
| gap | `gaps/` | `gap:<id>` | `research-lit` / `idea-creator` |
| design | `designs/` | `design:<id>` | `brainstorming` |
| finding | `findings/` | `finding:<id>` | `systematic-debugging` / `verification-before-completion` |
| adr | `adrs/` | `adr:<id>` | 架构决策记录 |
| plan | `plans/` | `plan:<id>` | `writing-plans` |
| review | `reviews/` | `review:<id>` | `requesting-code-review` / `receiving-code-review` |
| schema | `schemas/` | `schema:<id>` | `structured-logging` |
| metric | `metrics/` | `metric:<id>` | `structured-logging` / `harness-eval` |
### Key Files
| File | Purpose |
|---|---|
| `query_pack.md` | Compressed summary |
| `index.md` | Category index |
| `log.md` | Audit log |
| `graph/edges.json` | Relationship graph |
## Subcommands
### `/research-wiki init`
Initialize the wiki:
```bash
.claude/tools/research_wiki.py init research-wiki/
```
### `/research-wiki query "<topic>"`
Rebuild `query_pack.md`:
```bash
.claude/tools/research_wiki.py rebuild_query_pack research-wiki/
```
Then show the content to the user.
### `/research-wiki stats`
Show statistics:
```bash
.claude/tools/research_wiki.py stats research-wiki/
```
### `/research-wiki lint`
Run health checks:
```bash
.claude/tools/research_wiki.py lint research-wiki/
```
### `/research-wiki ingest "<title>" — arxiv: <id>`
Import a paper:
```bash
.claude/tools/research_wiki.py ingest_paper research-wiki/ --arxiv-id <id>
```
## Key Rules
- Other skills call `.claude/tools/research_wiki.py` directly; they do not go through this skill.
- If the wiki does not exist (`research-wiki/` directory is missing), all write operations are skipped silently.
- Failed ideas are always preserved in `query_pack`.