> For the complete documentation index, see [llms.txt](https://docbox.ortusbooks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docbox.ortusbooks.com/output-formats/custom-output-strategy.md).

# Custom Output

🛠️ In addition to the mainstream output formats, you can extend DocBox's `AbstractTemplateStrategy` class to generate your own which implements the `IStrategy` class.

```javascript
/**
 * Strategy Interface for DocBox Documentation Generation
 * <br>
 * This interface defines the contract that all DocBox documentation strategies must implement.
 * Strategies are responsible for generating documentation output in various formats (HTML, JSON, XMI, etc.)
 * from the component metadata collected by DocBox.
 * <br>
 * <small><em>Copyright 2015 Ortus Solutions, Corp <a href="www.ortussolutions.com">www.ortussolutions.com</a></em></small>
 */
interface {

	/**
	 * Execute the documentation generation strategy
	 *
	 * This method receives the complete metadata query from DocBox and is responsible for:
	 * - Processing the component metadata
	 * - Generating the appropriate output format
	 * - Writing files to the configured output location
	 *
	 * @metadata Query object containing all component metadata with columns:
	 *            - package: The package name
	 *            - name: The component name
	 *            - metadata: The complete component metadata structure
	 *            - type: The component type (component, interface, etc.)
	 *            - extends: The extended component name (if any)
	 *            - implements: The implemented interfaces (if any)
	 *
	 * @return The strategy instance for method chaining
	 */
	IStrategy function run( required query metadata );

}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docbox.ortusbooks.com/output-formats/custom-output-strategy.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
