Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 34 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ name: Publish
on:
push:
tags:
- 'v*'
- 'v*' # telogen (root package)
- 'react-v*' # telogen-react (packages/react)

jobs:
publish:
if: ${{ !startsWith(github.ref_name, 'react-v') }}
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down Expand Up @@ -49,3 +51,34 @@ jobs:
grep -q "^telogen v$PKG_VERSION$" /tmp/smoke/stdout.log
grep -q "generated by telogen v$PKG_VERSION" /tmp/smoke/out/llms.txt
echo "smoke: OK"

publish-react:
if: ${{ startsWith(github.ref_name, 'react-v') }}
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # for npm provenance

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org

- name: Tag matches package version
run: |
PKG_VERSION=$(node -p "require('./packages/react/package.json').version")
[ "react-v$PKG_VERSION" = "$GITHUB_REF_NAME" ] || { echo "tag $GITHUB_REF_NAME != package $PKG_VERSION"; exit 1; }

- name: Publish telogen-react to npm
working-directory: packages/react
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Smoke test (registry fetch)
run: |
sleep 15
npm view telogen-react version
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ content telogen currently can't reach, and maps each one to the spot you'd mark
it for extraction.

The file is a diagnostic map: it shows you *where* extractable content lives
inside your components. `<AIContent>` (from `@telogen/react`) and the CLI-side
inside your components. `<AIContent>` (from `telogen-react`) and the CLI-side
extraction that reads it both ship together in Phase 2 — once they do, marking
these spots will let telogen pick up that content on the next run.

Expand Down Expand Up @@ -265,7 +265,7 @@ export default async function Page() {
}
```

This is a deliberate boundary: telogen analyzes each route file on its own rather than resolving import chains, which keeps it fast and dependency-free. To see what you're missing, run `npx telogen` once and open the generated `ai-annotation-guide.md` — it maps the extractable content inside your components. `<AIContent>` (from `@telogen/react`) and the CLI-side support for reading it both ship together in Phase 2; until then, the guide at least tells you exactly where that content is.
This is a deliberate boundary: telogen analyzes each route file on its own rather than resolving import chains, which keeps it fast and dependency-free. To see what you're missing, run `npx telogen` once and open the generated `ai-annotation-guide.md` — it maps the extractable content inside your components. `<AIContent>` (from `telogen-react`) and the CLI-side support for reading it both ship together in Phase 2; until then, the guide at least tells you exactly where that content is.

**Pages that only call `redirect()` produce empty output.** This is expected — there is no content to extract.

Expand Down
34 changes: 34 additions & 0 deletions ROADMAP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Roadmap

What's planned after v0.1.5. Order reflects current priority; nothing here
is a commitment to a date. Ideas and votes welcome in
[Discussions](https://github.com/ggange/telogen/discussions).

## GitHub Action for auto-regeneration

A reusable Action: on push, run `npx telogen` and commit updated `llms.txt`
and `.md` files when they change. Keeps generated output in lockstep with
your source without a manual re-run — the answer to "won't this go stale?"

## `<AIContent>` — telogen-react

The [telogen-react](https://www.npmjs.com/package/telogen-react) package
will ship an `<AIContent>` React component (a Fragment passthrough — zero
DOM, zero layout impact) together with CLI-side extraction that follows
imports to read it. Marking content inside your components makes it visible
to telogen even where heuristics can't reach. The `ai-annotation-guide.md`
telogen generates today maps where annotation will be useful.

## One-hop import extraction

Extend extraction to follow imports one level deep — relative paths,
tsconfig/jsconfig `paths` aliases, and barrel files — so component-shell
pages (`return <Pricing />`) produce real content instead of an empty page.

## Build-platform plugins

Vercel and Netlify build plugins for zero-config generation on deploy.

## More routers

Remix and Astro support, as listed in the README.
76 changes: 0 additions & 76 deletions TODOS.md

This file was deleted.

2 changes: 1 addition & 1 deletion examples/demo/ai-annotation-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ reach — with the exact spot you'd mark each one for extraction.
impact.** Once it ships, it will mark content for telogen to include in per-route
`.md` files.

The `<AIContent>` component (from `@telogen/react`) and the CLI-side support for
The `<AIContent>` component (from `telogen-react`) and the CLI-side support for
reading it both ship together in telogen Phase 2 — neither exists yet, so the
suggestions below are a preview of where annotation will go, not something to use
today. Watch [github.com/ggange/telogen](https://github.com/ggange/telogen) for the
Expand Down
6 changes: 3 additions & 3 deletions packages/react/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @telogen/react
# telogen-react

> Companion package for [telogen](https://github.com/ggange/telogen). The `<AIContent>`
> component ships here with telogen Phase 2 — it is not published yet.
Expand All @@ -11,7 +11,7 @@ with it will let telogen pick it up on the next run.
## Planned API

```tsx
import { AIContent } from '@telogen/react';
import { AIContent } from 'telogen-react';

// Wraps any content to make it visible to AI agents via telogen
function Hero({ title }: { title: string }) {
Expand All @@ -30,6 +30,6 @@ extraction.
## Timeline

- `telogen` v0.1.0 — annotation guide tells you *where* to add `<AIContent>`
- `@telogen/react` v0.1.0 — ships the actual component (Phase 2)
- `telogen-react` v0.1.0 — ships the actual component (Phase 2)

Follow progress at [github.com/ggange/telogen](https://github.com/ggange/telogen).
2 changes: 1 addition & 1 deletion packages/react/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// @telogen/react v0.0.1 — companion package for telogen.
// telogen-react v0.0.1 — companion package for telogen.
// The AIContent component ships in v0.1.0 alongside telogen Phase 2.
// See https://github.com/ggange/telogen for timeline.
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@telogen/react",
"name": "telogen-react",
"version": "0.0.1",
"description": "AIContent component for telogen — companion package. The component ships with telogen Phase 2.",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion src/annotation-guide.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export function renderAnnotationGuide(files: FileAnnotations[]): string {
'impact.** Once it ships, it will mark content for telogen to include in per-route',
'`.md` files.',
'',
'The `<AIContent>` component (from `@telogen/react`) and the CLI-side support for',
'The `<AIContent>` component (from `telogen-react`) and the CLI-side support for',
'reading it both ship together in telogen Phase 2 — neither exists yet, so the',
'suggestions below are a preview of where annotation will go, not something to use',
'today. Watch [github.com/ggange/telogen](https://github.com/ggange/telogen) for the',
Expand Down
Loading