Skip to content

Docs/add agent guidelines#994

Open
lyzhang0113 wants to merge 3 commits into
previewfrom
docs/add-agent-guidelines
Open

Docs/add agent guidelines#994
lyzhang0113 wants to merge 3 commits into
previewfrom
docs/add-agent-guidelines

Conversation

@lyzhang0113
Copy link
Copy Markdown
Collaborator

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:

  • Introduced Agent.md outlining the scope, intent, and best practices for updating or creating documentation in the dynamsoft-docs/web-twain-docs repo.
  • Provided detailed rules for file placement, including where FAQ, guide, and API reference pages should be located.
  • Added frontmatter templates for FAQ and non-FAQ docs to ensure consistency in metadata and formatting.
  • Defined a standard FAQ content pattern and writing style guidelines, emphasizing technical accuracy, conciseness, and adherence to existing terminology.

Quality and Safety Checks:

  • Included a checklist for verifying method names, error codes, links, and ensuring only intended files are changed before submitting documentation updates.
  • Listed explicit "Do Not Do" items to avoid common mistakes such as unrelated file edits, unnecessary

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread Agent.md
## File Placement

- FAQ pages live in `_articles/faq/`.
- General guides live in `_articles/general-usage/` or `_articles/extended-usage/`.
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- 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/`.

Copilot uses AI. Check for mistakes.
Comment thread Agent.md
Comment on lines +31 to +42
```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
---
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread Agent.md
Comment on lines +63 to +71
## 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
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

“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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants