Skip to content

Commit 0ccd286

Browse files
authored
Merge pull request #63 from tokenhost/issue-62/pr-01-docs-scaffolding
[Issue 62 1/8] Docs scaffolding and sprint contract
2 parents 8f228cd + b9342e7 commit 0ccd286

5 files changed

Lines changed: 175 additions & 0 deletions

AGENTS.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,23 @@ Tests:
2525
- CI requires `static` and `integration-local` on PRs to `master`.
2626
- Canonical generated app coverage includes contract and UI scaffold verification.
2727

28+
## Active sprint: Native hashtag indexing + Filecoin image uploads
29+
30+
Source of truth for the current sprint:
31+
- GitHub issue: `#62`
32+
- Ticket draft: `docs/tickets/011-native-hashtag-indexing-and-filecoin-image-uploads.md`
33+
34+
Required living docs for this sprint:
35+
- Work log: `docs/worklogs/native-hashtag-indexing-and-filecoin-image-uploads.md`
36+
- Working note / spec delta: `docs/spec-deltas/native-hashtag-indexing-and-filecoin-image-uploads.md`
37+
- Memo / blog draft: `docs/native-hashtag-indexing-and-filecoin-image-uploads-memo.md`
38+
39+
Execution rules:
40+
- Deliver the sprint as 8 stacked PRs aligned to the ticket phases.
41+
- AI may prepare PRs, but PRs must not be merged until human approval.
42+
- The sprint ticket closes only when all 8 PRs are merged.
43+
- Any platform behavior change in this sprint must either update `SPEC.md` in the same change or be recorded in the working note/spec-delta document before merge.
44+
2845
## Phase 0 (NOW): Remediation of current snapshot (stability + security)
2946

3047
Goal: make the current builder reproducible, safe-by-default, and testable before deeper rewrites.

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ Token Host Builder is a schema-to-dapp generator framework for EVM CRUD apps.
55
Canonical product behavior is defined in `SPEC.md`.
66
Execution backlog and current gap-tracking is in `AGENTS.md`.
77

8+
## Active sprint
9+
10+
Current sprint source of truth:
11+
- GitHub issue: `#62`
12+
- Ticket draft: `docs/tickets/011-native-hashtag-indexing-and-filecoin-image-uploads.md`
13+
14+
Companion docs for the sprint:
15+
- `docs/worklogs/native-hashtag-indexing-and-filecoin-image-uploads.md`
16+
- `docs/spec-deltas/native-hashtag-indexing-and-filecoin-image-uploads.md`
17+
- `docs/native-hashtag-indexing-and-filecoin-image-uploads-memo.md`
18+
819
## Legacy template status
920

1021
- `tokenhost-web-template/` is retired from this repo.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Memo Draft: Native Hashtag Indexing + Filecoin Image Uploads
2+
3+
## Working title
4+
5+
Making Token Host feel native for media and discovery: on-chain hashtag indexes and Filecoin-backed image posts
6+
7+
## Purpose
8+
9+
This memo is a living summary of the sprint behind issue `#62`. It is intentionally more narrative than the work log or spec-delta note so it can be reused later as:
10+
- an engineering summary,
11+
- a product memo,
12+
- a release note input,
13+
- or the basis for a public blog post.
14+
15+
## Problem
16+
17+
Token Host could already model `image` fields and generic query indexes in theory, but two practical gaps remained:
18+
- image creation/editing still behaved like a raw string field in the generated UI,
19+
- hashtag-based feeds required app-specific modeling workarounds instead of a native platform primitive.
20+
21+
## Chosen direction
22+
23+
We are addressing the problem at the platform layer:
24+
- native tokenized secondary indexes for hashtags,
25+
- native generated-UI upload behavior for `image` fields,
26+
- and a provider/runner abstraction so Filecoin Onchain Cloud can be used without hardcoding one hosting topology.
27+
28+
## Key design choices
29+
30+
### Platform-first indexing
31+
32+
We are not treating hashtags as a demo-specific relational pattern. Instead, the sprint adds a native tokenized index capability to Token Host so future apps can reuse the same primitive.
33+
34+
### Upload interface over provider detail
35+
36+
The generated UI should only know how to ask Token Host to upload a file and receive a canonical URL/CID. It should not know provider details or runner topology.
37+
38+
### Bounded behavior is part of the feature
39+
40+
For on-chain tokenized indexes, correctness is not enough. The feature is only acceptable if gas and query behavior stay bounded and testable.
41+
42+
## Status
43+
44+
In progress.
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Working Note / Spec Delta: Native Hashtag Indexing + Filecoin Image Uploads
2+
3+
Issue: `#62`
4+
Ticket draft: `docs/tickets/011-native-hashtag-indexing-and-filecoin-image-uploads.md`
5+
6+
## Purpose
7+
8+
This file is the working note for the sprint and the temporary home for spec deltas that are not yet fully folded into `SPEC.md`.
9+
10+
If implementation changes platform behavior and `SPEC.md` has not yet been updated, that behavior must be described here before merge.
11+
12+
## Current direction
13+
14+
### 1. Native tokenized query indexes
15+
16+
Working direction for this sprint:
17+
- extend THS query-index modeling in a backward-compatible way,
18+
- preserve `indexes.index: [{ field }]` as equality index behavior,
19+
- add an opt-in tokenized index mode for supported `string` fields,
20+
- ship one tokenizer in v1: hashtag extraction.
21+
22+
### 2. Upload architecture
23+
24+
Working direction for this sprint:
25+
- generated UI should depend only on a stable Token Host upload interface,
26+
- Filecoin Onchain Cloud should sit behind that interface as one provider implementation,
27+
- runner choice should remain a deployment concern rather than a schema concern.
28+
29+
Initial runner modes under consideration:
30+
- `process`
31+
- `remote`
32+
- future `worker`
33+
- future `sdk`
34+
35+
### 3. Boundedness and gas predictability
36+
37+
This sprint adds the following requirement beyond the current explicit spec text:
38+
- tokenized index generation must define hard limits so write gas stays predictable in practice.
39+
40+
Planned bounds to make explicit in implementation and then fold into `SPEC.md`:
41+
- maximum tokens extracted per indexed field on create/update
42+
- maximum token length
43+
- maximum page size for token/equality accessors
44+
- maximum list scan depth
45+
46+
## Open questions
47+
48+
1. Should tokenized index options live directly in `indexes.index[]`, or should the schema split equality and tokenized index families more explicitly?
49+
2. Should bounded limits be configurable per chain, fixed by generator version, or partly configurable with hard caps?
50+
3. Should upload runner mode live in manifest extensions, local preview config, generated app env, or a combination?
51+
4. Should local-dev chain selection and fallback behavior be codified in `SPEC.md`, CLI docs, or both?
52+
53+
## Merge rule
54+
55+
Before merging behavior that depends on any unresolved item above:
56+
- either resolve it in `SPEC.md`,
57+
- or replace the open item here with a concrete written rule and corresponding tests.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Work Log: Native Hashtag Indexing + Filecoin Image Uploads
2+
3+
Issue: `#62`
4+
Ticket draft: `docs/tickets/011-native-hashtag-indexing-and-filecoin-image-uploads.md`
5+
6+
## Purpose
7+
8+
Chronological execution log for the platform-first microblog workstream. This file records:
9+
- decisions,
10+
- shipped changes,
11+
- validation evidence,
12+
- follow-ups and open risks.
13+
14+
## Entries
15+
16+
### 2026-03-23
17+
18+
#### Planning and sprint freeze
19+
- Opened GitHub issue `#62` from the local ticket draft.
20+
- Confirmed the sprint source of truth is the GitHub issue plus the in-repo ticket draft.
21+
- Confirmed implementation will proceed as 8 stacked PRs and must not be merged by AI without human approval.
22+
23+
#### Architecture direction frozen
24+
- Chose platform-first implementation over app-specific workaround.
25+
- Decided not to model hashtags primarily as `Tag` / `PostTag` collections.
26+
- Decided to add native tokenized secondary indexes in THS/generator/runtime.
27+
- Decided generated UI must treat `image` as a first-class upload field rather than a raw string input.
28+
29+
#### Upload architecture direction frozen
30+
- Decided generated UI will talk to a stable Token Host upload interface.
31+
- Decided Filecoin Onchain Cloud is one upload provider implementation, not a special-case UI path.
32+
- Decided the provider implementation must remain runner-agnostic:
33+
- `process`
34+
- `remote`
35+
- later `worker`
36+
- later `sdk`
37+
- Decided the default funding model for the Filecoin Onchain Cloud provider is `appPays`.
38+
39+
#### Performance and boundedness requirements frozen
40+
- Decided bounded token/scan behavior is a release requirement, not a nice-to-have.
41+
- Planned explicit gas/perf validation rather than relying only on algorithmic reasoning.
42+
43+
#### Next steps
44+
- Add sprint scaffolding docs and backlog references.
45+
- Extend THS query-index shape for native tokenized indexes.
46+
- Implement equality indexes before hashtag token indexes so the generator surface stays layered.

0 commit comments

Comments
 (0)