Skip to content
Draft
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
------------------------------------------------------------
This file is named: AgentsDocumentationTest.md
------------------------------------------------------------

ROLE
You generate complete and correct XML documentation for C# APIs.

------------------------------------------------------------
SCOPE RULES
------------------------------------------------------------

- Scope is defined by the user per task
- Scope is CLOSED once execution begins
- Do NOT include anything outside scope
- Do NOT infer related types or dependencies unless explicitly included
- Do not modify code logic
- Only add or update XML documentation

Default visibility mode: PUBLIC ONLY

Optional visibility modes:
- public only (default)
- public + internal
- public + internal + protected
- full (including private members)

------------------------------------------------------------
EXECUTION PIPELINE (STRICT ORDER)
------------------------------------------------------------

1. Scope lock
2. Type inventory
3. Member inventory
4. Documentation generation
5. Completeness verification
6. Unresolved report generation

------------------------------------------------------------
COMPLETENESS GUARANTEE
------------------------------------------------------------

A run is only valid if:

- All scoped types are processed
- All members are documented or marked unresolved
- Inventory matches output exactly

------------------------------------------------------------
TYPE INVENTORY (MANDATORY FIRST STEP)
------------------------------------------------------------

Before writing any documentation:

Identify ALL types in scope:

- classes
- structs
- records
- enums
- interfaces
- delegates (including Func<...> and Action<...>)

No documentation may be written until this list is complete.

------------------------------------------------------------
MEMBER INVENTORY (PER TYPE)
------------------------------------------------------------

For each type, enumerate ALL members:

- constants
- fields
- properties
- methods
- events

Each member MUST be explicitly listed before documentation begins.

------------------------------------------------------------
NO SKIPPING RULE
------------------------------------------------------------

- Every type must be processed
- Every member must be processed exactly once
- Similar or repetitive items MUST NOT be skipped or sampled
- Pattern-based omission is forbidden

------------------------------------------------------------
DOCUMENTATION RULES
------------------------------------------------------------

For every type and member:

- Write concise XML documentation
- Must reflect observable behavior only
- Do not guess behavior not present in code

Required content (as applicable):
- summary (intent only, no repetition of name)
- parameters
- return value
- exceptions (only if provable from code)
- nullability behavior
- side effects
- thread safety (if relevant)

------------------------------------------------------------
QUALITY RULES
------------------------------------------------------------

- No repetition of member names in summaries
- No vague verbs (handles, manages, processes)
- No implementation detail leakage
- Missing information must NOT be invented

If behavior is unclear:
"Behavior not determinable from implementation"

------------------------------------------------------------
COMPLETENESS VERIFICATION (MANDATORY FINAL STEP)
------------------------------------------------------------

After documentation:

- Re-scan scope
- Confirm every type is documented
- Confirm every member is documented
- Confirm no omissions vs inventory

If mismatch exists → task is incomplete

------------------------------------------------------------
HALLUCINATION CONTROL + UNCERTAINTY LOGGING
------------------------------------------------------------

STRICT RULE:
Do not fabricate or assume undocumented behavior.

If behavior cannot be determined from code:

- Mark as UNRESOLVED
- Do not attempt inference
- Do not substitute similar logic

CONTINUATION RULE:
Processing must continue even if unresolved items exist.

------------------------------------------------------------
UNCERTAINTY REPORT (REQUIRED OUTPUT)
------------------------------------------------------------

At completion, generate a report of all unresolved items:

Format:

### Unresolved Items

- Type: <TypeName>
Member: <MemberName>
Reason: <why it cannot be determined>

This report is REQUIRED even if empty.

------------------------------------------------------------
ANTI-REDUNDANCY RULE (STRICT)
------------------------------------------------------------

Do NOT generate XML documentation that only restates the code signature.

The following are explicitly forbidden:

- "This constructor creates an instance of class X"
- "This method returns a value of type X"
- "Gets or sets the X property"
- Any summary that repeats the member name or type without adding meaning

------------------------------------------------------------
DOCUMENTATION VALUE RULE
------------------------------------------------------------

Every summary MUST add at least one of the following:

- Intent (why it exists)
- Behavior (what it does beyond syntax)
- Constraint (rules on input/output)
- Side effect (state change, IO, events)
- Invariant (what it guarantees)

------------------------------------------------------------
OBVIOUSNESS SUPPRESSION RULE
------------------------------------------------------------

If documentation would only restate:
- the type name
- the member name
- or the language keyword meaning

THEN:
- suppress verbose output
- prefer minimal documentation
- or omit summary if allowed by policy

------------------------------------------------------------
SELF-CHECK BEFORE FINALIZING:
------------------------------------------------------------

If the summary can be removed without losing any new information,
it MUST be removed or rewritten.

12 changes: 12 additions & 0 deletions Source/Krypton Components/Krypton.Docking/AgentsTasks/prompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
TASK:
- Standard-Toolkit\Source\Krypton Components\Krypton.Docking\AgentsTasks\AgentsDocumentationTest.md

SCOPE:
- Library: Standard-Toolkit\Source\Krypton Components\Krypton.Docking

VISIBILITY:
- public only

INSTRUCTIONS:
- follow AgentsDocumentationTest.md strictly

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
namespace Krypton.Docking;

/// <summary>
/// Extends the KryptonNavigator to work as a docking auto hidden group control.
/// Bar-tab navigator that hosts auto-hidden pages along a docking edge.
/// </summary>
[ToolboxItem(false)]
[DesignerCategory("code")]
Expand All @@ -22,15 +22,16 @@ public class KryptonAutoHiddenGroup : KryptonNavigator
{
#region Events
/// <summary>
/// Occurs when a page is becoming stored.
/// Raised before a page is replaced with a store placeholder so handlers can ensure its unique name remains valid for this auto-hidden location.
/// </summary>
public event EventHandler<UniqueNameEventArgs>? StoringPage;
#endregion

#region Identity
/// <summary>
/// Initialize a new instance of the KryptonAutoHiddenGroup class.
/// Configures bar-tab-only navigator appearance, tab orientation, and dock alignment for the specified edge.
/// </summary>
/// <param name="edge">Docking edge that determines bar orientation and control dock style.</param>
public KryptonAutoHiddenGroup(DockingEdge edge)
{
// Define appropriate appearance/behavior for an auto hidden group
Expand Down Expand Up @@ -76,7 +77,7 @@ public KryptonAutoHiddenGroup(DockingEdge edge)

#region Public
/// <summary>
/// Convert all pages into store placeholders.
/// Replaces every non-placeholder page with a <see cref="KryptonStorePage"/> that retains the same unique name.
/// </summary>
public void StoreAllPages()
{
Expand All @@ -96,9 +97,9 @@ public void StoreAllPages()
}

/// <summary>
/// Convert the named pages into store placeholders.
/// Replaces matching non-placeholder pages with store placeholders that keep the same unique names.
/// </summary>
/// <param name="uniqueNames">Array of page names.</param>
/// <param name="uniqueNames">Unique names of pages to store; when null, no pages are changed.</param>
public void StorePages(string[]? uniqueNames)
{
if (uniqueNames == null)
Expand All @@ -124,9 +125,9 @@ public void StorePages(string[]? uniqueNames)
}

/// <summary>
/// Convert matching placeholders into actual pages.
/// Swaps store placeholders for the supplied pages when unique names match.
/// </summary>
/// <param name="pages">Array of pages to restore.</param>
/// <param name="pages">Pages to restore into the group.</param>
public void RestorePages(KryptonPage[] pages)
{
foreach (KryptonPage page in pages)
Expand Down Expand Up @@ -166,4 +167,4 @@ protected override void OnTabCountChanged(EventArgs e)
}
}
#endregion
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
namespace Krypton.Docking;

/// <summary>
/// Extends the KryptonPanel to work as a panel for hosting KryptonAutoHiddenGroup controls.
/// Panel that stacks <see cref="KryptonAutoHiddenGroup"/> controls along a docking edge.
/// </summary>
[ToolboxItem(false)]
[DesignerCategory("code")]
Expand All @@ -28,9 +28,9 @@ public class KryptonAutoHiddenPanel : KryptonPanel

#region Identity
/// <summary>
/// Initialize a new instance of the KryptonAutoHiddenPanel class.
/// Applies inward-facing padding so auto-hidden tab groups sit inset from the client area.
/// </summary>
/// <param name="edge">Docking edge being managed.</param>
/// <param name="edge">Docking edge that determines which side receives extra padding.</param>
public KryptonAutoHiddenPanel(DockingEdge edge)
{
// Add extra padding between the child items and the side facing inwards
Expand All @@ -56,8 +56,10 @@ public KryptonAutoHiddenPanel(DockingEdge edge)

#region Public
/// <summary>
/// Retrieves the size of a rectangular area into which a control can be fitted.
/// Combines preferred sizes of child groups that have at least one visible page, respecting dock direction and padding.
/// </summary>
/// <param name="proposedSize">Layout constraint passed to each child group.</param>
/// <returns>Aggregate width and height needed to display qualifying child groups.</returns>
public override Size GetPreferredSize(Size proposedSize)
{
var width = 0;
Expand Down Expand Up @@ -107,4 +109,4 @@ public override Size GetPreferredSize(Size proposedSize)
return new Size(width, height);
}
#endregion
}
}
Loading
Loading