Docs/add agent guidelines#994
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an Agent.md guidelines document intended to standardize how AI assistants and contributors create/update Dynamic Web TWAIN documentation in this repo.
Changes:
- Introduces repository-specific documentation contribution guidelines (scope, file placement, frontmatter templates, writing/linking/code snippet rules).
- Adds a pre-submit safety/accuracy checklist and “Do Not Do” guardrails.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ## File Placement | ||
|
|
||
| - FAQ pages live in `_articles/faq/`. | ||
| - General guides live in `_articles/general-usage/` or `_articles/extended-usage/`. |
There was a problem hiding this comment.
The “File Placement” section implies general guides should only go under _articles/general-usage/ or _articles/extended-usage/, but this repo also contains other guide-style sections (e.g. _articles/hello-world/, _articles/core-concepts/, _articles/indepth/, _articles/introduction/, _articles/knowledge-base/). Consider expanding this list or rewording to avoid contributors placing new pages in the wrong folder.
| - General guides live in `_articles/general-usage/` or `_articles/extended-usage/`. | |
| - Guide-style docs should be placed in the most appropriate existing section based on nearby content and folder conventions. Common locations include `_articles/general-usage/`, `_articles/extended-usage/`, `_articles/hello-world/`, `_articles/core-concepts/`, `_articles/indepth/`, `_articles/introduction/`, and `_articles/knowledge-base/`. |
| ```yaml | ||
| --- | ||
| layout: default-layout | ||
| noTitleIndex: true | ||
| needAutoGenerateSidebar: true | ||
| title: <question> | ||
| keywords: Dynamic Web TWAIN, <topic keywords> | ||
| breadcrumbText: <same as title> | ||
| description: <same as title, or concise variant> | ||
| date: YYYY-MM-DD HH:mm:ss +0800 | ||
| last_modified: YYYY-MM-DD HH:mm:ss +0800 | ||
| --- |
There was a problem hiding this comment.
The FAQ frontmatter template hard-codes the timezone/offset format as +0800, but existing FAQ pages use multiple offset formats (for example last_modified: ... -08:00 in _articles/faq/activeX-in-Edge-IE-mode.md). To prevent inconsistent metadata, consider making the template offset placeholder generic (e.g. ±HHMM / ±HH:MM) and explicitly instruct to match the exact date/offset format used by nearby files.
There was a problem hiding this comment.
@copilot apply changes based on this feedback
There was a problem hiding this comment.
Applied in commit b4aaa12.
The FAQ frontmatter template now uses a generic timezone/offset placeholder (±HHMM or ±HH:MM), and the note now explicitly instructs matching the exact datetime/offset format used by nearby files in the same folder.
| ## FAQ Content Pattern | ||
|
|
||
| For `_articles/faq/*.md`, match this structure: | ||
|
|
||
| 1. Category H1 (for example `# Addon`, `# Security`, `# Capture/Image Source`) | ||
| 2. Question H2 (`## ...?`) | ||
| 3. Direct answer first | ||
| 4. Steps or code sample if applicable | ||
| 5. Optional notes (`> [!NOTE]`) and related links |
There was a problem hiding this comment.
“FAQ Content Pattern” states all FAQ pages should use a category H1 and question as H2, but some existing FAQs use the question as the H1 (e.g. _articles/faq/admin-privileges-needed-to-install.md, _articles/faq/activeX-in-Edge-IE-mode.md). Consider softening this to a preferred pattern (or documenting both patterns) so the guideline matches current repo conventions.
Agent-Logs-Url: https://github.com/dynamsoft-docs/web-twain-docs/sessions/d9dd3db5-7aa6-4981-bb4f-b1c2182b8258 Co-authored-by: lyzhang0113 <35015690+lyzhang0113@users.noreply.github.com>
This pull request adds a new guidelines document,
Agent.md, to the repository. The document provides clear instructions and best practices for AI assistants (and contributors) when creating or updating documentation for the Dynamic Web TWAIN docs. It covers scope, file placement, frontmatter templates, writing style, linking, code snippets, and safety checks to ensure consistency and accuracy across documentation contributions.Key additions and themes:
Documentation Contribution Guidelines:
Agent.mdoutlining the scope, intent, and best practices for updating or creating documentation in thedynamsoft-docs/web-twain-docsrepo.Quality and Safety Checks: