-
Notifications
You must be signed in to change notification settings - Fork 2
update manifest naming convention #121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # Enhancements & Known Issues | ||
|
|
||
| Tracked improvements that don't warrant external issues. Check items off or remove them as they're resolved. | ||
|
|
||
| --- | ||
|
|
||
| ## Config Schema: `ignoreDirs` vs `ignorePaths` inconsistency | ||
|
|
||
| **Status:** Open | ||
| **Identified:** 2026-04-08 (during plugin reference doc review) | ||
| **Affects:** `fastedge-init` scaffolder, `fastedge-build` static pipeline | ||
|
|
||
| ### Problem | ||
|
|
||
| The init wizard (`src/cli/fastedge-init/create-config.ts`) generates static build configs using `ignoreDirs`: | ||
|
|
||
| ```js | ||
| // What fastedge-init writes to .fastedge/build-config.js | ||
| { | ||
| type: "static", | ||
| ignoreDirs: ["./node_modules"] | ||
| } | ||
| ``` | ||
|
|
||
| But the formal `AssetCacheConfig` type (`src/server/static-assets/asset-manifest/types.ts`) defines `ignorePaths` and `assetManifestPath`: | ||
|
|
||
| ```ts | ||
| interface AssetCacheConfig { | ||
| assetManifestPath: string; | ||
| ignorePaths: string[]; | ||
| // ... | ||
| } | ||
| ``` | ||
|
|
||
| The build pipeline silently accepts both — `create-manifest-file-map.ts` merges `ignoreDirs` and `ignorePaths` into one array. But this means: | ||
|
|
||
| 1. Configs generated by `fastedge-init` use a field name (`ignoreDirs`) not present in the formal type | ||
| 2. `assetManifestPath` is required in `AssetCacheConfig` but never emitted by `fastedge-init` | ||
| 3. Docs for each tool are accurate to their respective source, but contradict each other | ||
|
|
||
| ### Suggested Fix | ||
|
|
||
| Either: | ||
| - **Option A:** Update `create-config.ts` to emit `ignorePaths` + `assetManifestPath` (align init output with the formal type) | ||
| - **Option B:** Add `ignoreDirs` as an explicit field in `AssetCacheConfig` and make `assetManifestPath` optional | ||
|
|
||
| Option A is cleaner — one canonical field name, init output matches the type system. | ||
|
|
||
| ### Files Involved | ||
|
|
||
| - `src/cli/fastedge-init/create-config.ts` — generates the config (uses `ignoreDirs`) | ||
| - `src/server/static-assets/asset-manifest/types.ts` — defines `AssetCacheConfig` (uses `ignorePaths`) | ||
| - `src/server/static-assets/asset-manifest/create-manifest-file-map.ts` — consumes both (merges them) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| # Plugin Source Contract — Naming Conventions | ||
|
|
||
| This document describes the naming and structure conventions for `manifest.json` in this repo. These rules ensure the sync-reference-docs pipeline correctly maps source files to plugin reference docs and intent skills. | ||
|
|
||
| ## Reference File Structure | ||
|
|
||
| Reference files in the plugin repo are organized by app_type: | ||
|
|
||
| ``` | ||
| plugins/gcore-fastedge/skills/ | ||
| scaffold/reference/ | ||
| http/ # HTTP app blueprints | ||
| base-ts.md # Base skeleton | ||
| kv-store-ts.md # Feature blueprint | ||
| cdn/ # CDN app blueprints (future) | ||
| build-cli.md # Cross-cutting (no subfolder) | ||
| fastedge-docs/reference/ | ||
| http/ # HTTP app example patterns | ||
| examples-kv-store-js.md | ||
| cdn/ # CDN app example patterns (future) | ||
| sdk-reference-js.md # Cross-cutting (no subfolder) | ||
| ``` | ||
|
|
||
| ## File Naming Convention | ||
|
|
||
| **`{concept}-{lang}.md`** — concept first, language last. The subfolder provides the app_type context. | ||
|
|
||
| | Type | Pattern | Example | | ||
| |---|---|---| | ||
| | Base skeleton | `{appType}/base-{lang}.md` | `http/base-ts.md` | | ||
| | Feature blueprint | `{appType}/{concept}-{lang}.md` | `http/kv-store-ts.md` | | ||
| | Docs pattern | `{appType}/examples-{concept}-{lang}.md` | `http/examples-kv-store-js.md` | | ||
| | Cross-cutting SDK ref | `sdk-reference-{lang}.md` | `sdk-reference-js.md` | | ||
|
|
||
| ## Manifest target_mapping Rules | ||
|
|
||
| 1. **reference_file** paths must include the `http/` or `cdn/` subfolder for app_type-specific content | ||
| 2. **section** should be `null` for all entries (each file is owned by one repo — no splicing) | ||
| 3. **Dual-intent pattern**: each example gets two entries with the same `files` array: | ||
| - `{name}-blueprint` → `scaffold/reference/{appType}/{concept}-{lang}.md` | ||
| - `{name}-pattern` → `fastedge-docs/reference/{appType}/examples-{concept}-{lang}.md` | ||
|
godronus marked this conversation as resolved.
|
||
|
|
||
| ## Intent File Matching | ||
|
|
||
| The pipeline resolves intent files by extracting the path suffix after `reference/` from the `reference_file` path. It looks for that same relative path inside the plugin's intent directory for this repo. | ||
|
|
||
| Example: | ||
| - `reference_file`: `plugins/.../scaffold/reference/http/kv-store-ts.md` | ||
| - Path suffix: `http/kv-store-ts.md` | ||
| - Intent lookup: `agent-intent-skills/fastedge-sdk-js/http/kv-store-ts.md` | ||
|
|
||
| ## When Adding New Examples | ||
|
|
||
| 1. Add source entries (paired `-blueprint` and `-pattern`) to `manifest.json` | ||
| 2. Add target_mapping entries pointing to `{appType}/{concept}-{lang}.md` paths | ||
| 3. Request intent files be created in `fastedge-plugin` repo (or create via PR): | ||
| - `agent-intent-skills/fastedge-sdk-js/{appType}/{concept}-{lang}.md` (scaffold) | ||
| - `agent-intent-skills/fastedge-sdk-js/{appType}/examples-{concept}-{lang}.md` (docs) | ||
|
godronus marked this conversation as resolved.
|
||
| - Each should reference `../_scaffold-blueprint-base.md` or `../_docs-pattern-base.md` | ||
| 4. Create placeholder reference files at the target paths in the plugin repo | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.