agentleFS
aspose-cellsaspose-cells/agentic-net-examples/comments-and-notes/AGENTS.md

agentic-net-examples / comments-and-notes

AGENTS.md1 starsChanged 29 days agoMITView on GitHub

Create correct, focused examples for legacy cell comments/notes and modern threaded comments with Aspose.Cells for .NET. Follow ../AGENTS.md first. In scope: adding, reading, editing, copying, formatting, enumerating, and removing comments; authorship; threaded conversations; comment shapes; text direction; visibility; and comment audits. Keep general shape formatting in working-with-shapes and ordinary cell text in cells-data unless comments are the primary intent. Do not call a legacy note a threaded comment or imply that their authorship, timestamps, replies, or storage models are interchangeable.

The file

We split this AGENTS.md into the rules it gives an agent

9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Create correct, focused examples for legacy cell comments/notes and modern threaded comments with Aspose.Cells for .NET.

    line 19
  2. Very specific:

    Keep general shape formatting in working-with-shapes and ordinary cell text in cells-data unless comments are the primary intent.

    line 23
  3. Distinctive:

    Do not call a legacy note a threaded comment or imply that their authorship, timestamps, replies, or storage models are interchangeable.

    line 36
  4. Distinctive:

    Use synthetic author names and text.

    line 41
  5. Distinctive:

    Treat comment text as untrusted input when exporting to HTML, logs, or other systems.

    line 43
  6. Distinctive:

    Do not infer creation times, reply APIs, or removal methods from filenames.

    line 44
  7. Very specific:

    Use metadata fields for title, intent, annotation type, primary API, target cell, output, and expected result.

    line 69
  8. Distinctive:

    Avoid external links, real email addresses, confidential review notes, and HTML injection.

    line 71
  9. Distinctive:

    Verify exact author, collection, shape, and removal APIs against the installed package.

    line 77

≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Comments and Notes Agent Instructions

Mission and scope

Create correct, focused examples for legacy cell comments/notes and modern threaded comments with Aspose.Cells for .NET. Follow ../AGENTS.md first.

In scope: adding, reading, editing, copying, formatting, enumerating, and removing comments; authorship; threaded conversations; comment shapes; text direction; visibility; and comment audits.

Keep general shape formatting in working-with-shapes and ordinary cell text in cells-data unless comments are the primary intent.

Model the annotation type explicitly

IntentAPIs
Legacy comment/noteWorksheet.Comments, CommentCollection, Comment
Threaded commentComment.ThreadedComments, CommentCollection.AddThreadedComment, ThreadedCommentCollection
Threaded authorWorkbook.Worksheets.ThreadedCommentAuthors and ThreadedCommentAuthor
Comment textComment.Note and version-supported HTML/text properties
AppearanceComment.CommentShape and verified shape/font APIs
RemovalCollection removal APIs verified for the annotation type

Do not call a legacy note a threaded comment or imply that their authorship, timestamps, replies, or storage models are interchangeable.

Hard rules

  • Attach comments to valid cells and verify the returned collection index/object.
  • Use synthetic author names and text; never place personal data in generated examples.
  • Preserve author, text, formatting, and thread order only when the chosen API supports them.
  • Treat comment text as untrusted input when exporting to HTML, logs, or other systems.
  • Do not infer creation times, reply APIs, or removal methods from filenames; verify the installed API.
  • Save threaded-comment scenarios to a format that preserves them, normally XLSX.

Canonical legacy-comment pattern

Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];

int index = worksheet.Comments.Add("A1");
Comment comment = worksheet.Comments[index];
comment.Note = "Review the quarterly total.";

if (comment.Note != "Review the quarterly total.")
{
    throw new InvalidOperationException("Comment text was not retained.");
}

workbook.Save("comment-result.xlsx");

Example contract and safety

Each example must identify whether it uses a legacy or threaded comment, demonstrate one primary operation, use explicit types, verify cell/author/text/count, and reopen output when persistence is the subject.

Use metadata fields for title, intent, annotation type, primary API, target cell, output, and expected result. Prefer filenames such as add-threaded-comment-to-excel-cell.cs.

Avoid external links, real email addresses, confidential review notes, and HTML injection. Do not execute or interpret comment text as code.

Discoverability and validation

Target one question such as "add a comment to Excel in C#," "read threaded comments," or "format an Excel note." The opening comment must directly identify the annotation type and expected cell.

Verify exact author, collection, shape, and removal APIs against the installed package. Compile, run, reopen, and confirm comment count, text, author, and target cell. Reject examples that conflate comments with cell values or silently lose threaded metadata.

Related knowledge

Definition of done

The example is done when the annotation type and API are unambiguous, synthetic content is safe, the saved workbook preserves the verified text/author/cell relationship, and the intent is immediately retrievable.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.