crawler

package
v0.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CategoryDoc      = "doc"
	CategoryBusiness = "business"
	CategorySupport  = "support"
)

Category constants for file classification.

Variables

This section is empty.

Functions

func CollectCode

func CollectCode(root string) (string, error)

CollectCode is the legacy API that returns a flat concatenated string. It wraps CollectProject for backward compatibility.

Types

type CollectedContent

type CollectedContent struct {
	Docs     []FileEntry // documentation files (highest priority)
	Business []FileEntry // core business logic
	Support  []FileEntry // tests, configs, migrations, generated code
}

CollectedContent holds project files grouped by priority tier.

func CollectProject

func CollectProject(root string) (*CollectedContent, error)

CollectProject walks the project tree and returns files grouped into docs, business logic, and support tiers. Documentation is prioritized for the AI to understand the project's purpose before analyzing code.

func (*CollectedContent) Flatten

func (c *CollectedContent) Flatten() string

Flatten concatenates all tiers into a single string (docs first, then business, then support).

func (*CollectedContent) Stats

func (c *CollectedContent) Stats() (docs, business, support int)

Stats returns a summary of collected content counts.

type FileEntry

type FileEntry struct {
	Path     string // relative path within the project
	Content  string
	Category string // "doc", "business", or "support"
}

FileEntry represents a single collected file with its content and category.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL