Documentation
¶
Overview ¶
Package browser provides browser automation for Aha operations not available via API.
Index ¶
- Variables
- func ListPredefinedTemplates() []string
- type Client
- func (c *Client) BaseURL() string
- func (c *Client) Browser() *rod.Browser
- func (c *Client) Close() error
- func (c *Client) Connect(ctx context.Context) error
- func (c *Client) CreatePredefinedTemplate(ctx context.Context, templateName string) error
- func (c *Client) CreateTemplate(ctx context.Context, config TemplateConfig) error
- func (c *Client) Login(ctx context.Context) error
- func (c *Client) Page() *rod.Page
- type Option
- type TemplateBlock
- type TemplateConfig
Constants ¶
This section is empty.
Variables ¶
var PredefinedTemplates = map[string]TemplateConfig{ "capability-stack": { Name: "Capability Stack", Description: "Layered capability model for product/platform planning", Rows: 4, Columns: 1, Blocks: []TemplateBlock{ {Name: "Experience Layer", Description: "User-facing capabilities and interfaces", Row: 0, Column: 0}, {Name: "Application Layer", Description: "Business logic and application services", Row: 1, Column: 0}, {Name: "Platform Layer", Description: "Shared platform capabilities and APIs", Row: 2, Column: 0}, {Name: "Infrastructure Layer", Description: "Infrastructure and foundational services", Row: 3, Column: 0}, }, }, "maturity-model": { Name: "Maturity Model", Description: "Capability maturity assessment grid", Rows: 5, Columns: 5, Blocks: []TemplateBlock{ {Name: "Domain", Description: "Capability domain", Row: 0, Column: 0}, {Name: "M1 - Initial", Description: "Ad-hoc, reactive", Row: 0, Column: 1}, {Name: "M2 - Managed", Description: "Documented, repeatable", Row: 0, Column: 2}, {Name: "M3 - Defined", Description: "Standardized, proactive", Row: 0, Column: 3}, {Name: "M4 - Measured", Description: "Quantified, controlled", Row: 0, Column: 4}, }, }, "opportunity-patton": { Name: "Opportunity Canvas (Patton)", Description: "Jeff Patton's 10-block opportunity assessment", Rows: 3, Columns: 3, Blocks: []TemplateBlock{ {Name: "Problems", Description: "What problems are we solving?", Row: 0, Column: 0}, {Name: "Users", Description: "Who has these problems?", Row: 0, Column: 1}, {Name: "Current Solutions", Description: "How do they solve it today?", Row: 0, Column: 2}, {Name: "Value Proposition", Description: "What's our unique solution?", Row: 1, Column: 0}, {Name: "User Value", Description: "What value do users get?", Row: 1, Column: 1}, {Name: "Business Value", Description: "What value does the business get?", Row: 1, Column: 2}, {Name: "Assumptions", Description: "What must be true?", Row: 2, Column: 0}, {Name: "Risks", Description: "What could go wrong?", Row: 2, Column: 1}, {Name: "Budget/Timeline", Description: "What resources are needed?", Row: 2, Column: 2}, }, }, "feature-canvas": { Name: "Feature Canvas (Efimov)", Description: "Nikita Efimov's feature planning canvas", Rows: 4, Columns: 2, Blocks: []TemplateBlock{ {Name: "Idea Statement", Description: "One-sentence feature description", Row: 0, Column: 0, ColSpan: 2}, {Name: "Situations", Description: "When/where does the problem occur?", Row: 1, Column: 0}, {Name: "Problems", Description: "What specific problems exist?", Row: 2, Column: 0}, {Name: "Value", Description: "What value does solving this provide?", Row: 3, Column: 0}, {Name: "Capabilities", Description: "What must the solution do?", Row: 1, Column: 1}, {Name: "Restrictions", Description: "What constraints exist?", Row: 2, Column: 1}, {Name: "Limitations", Description: "What's out of scope?", Row: 3, Column: 1}, }, }, }
PredefinedTemplates contains common canvas template configurations.
Functions ¶
func ListPredefinedTemplates ¶
func ListPredefinedTemplates() []string
ListPredefinedTemplates returns the names of all predefined templates.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps rod browser for Aha automation.
func NewClient ¶
NewClient creates a new browser automation client. It reads configuration from environment variables if not provided via options:
- AHA_SUBDOMAIN: Aha account subdomain
- AHA_EMAIL: Aha login email
- AHA_PASSWORD: Aha login password
func (*Client) CreatePredefinedTemplate ¶
CreatePredefinedTemplate creates one of the predefined templates.
func (*Client) CreateTemplate ¶
func (c *Client) CreateTemplate(ctx context.Context, config TemplateConfig) error
CreateTemplate creates a new strategic model template in Aha via browser automation. This requires the user to be logged in first.
type Option ¶
type Option func(*Client)
Option configures the browser client.
func WithCredentials ¶
WithCredentials sets email and password for authentication.
func WithHeadless ¶
WithHeadless sets whether to run browser in headless mode.
func WithSubdomain ¶
WithSubdomain sets the Aha subdomain.
func WithTimeout ¶
WithTimeout sets the default timeout for operations.
type TemplateBlock ¶
type TemplateBlock struct {
Name string // Block name/label
Description string // Block description/placeholder text
Row int // Row position (0-indexed)
Column int // Column position (0-indexed)
RowSpan int // Number of rows to span (default 1)
ColSpan int // Number of columns to span (default 1)
}
TemplateBlock defines a block in a strategic model template.
type TemplateConfig ¶
type TemplateConfig struct {
Name string // Template name
Description string // Template description
Rows int // Number of rows in grid
Columns int // Number of columns in grid
Blocks []TemplateBlock // Block definitions
}
TemplateConfig defines a strategic model template configuration.