Convert gitgram/ and aitimemachine/ from embedded git repos (which showed as opaque submodule gitlinks on GitHub) into fully-tracked first-party content. AITM now merges its 7 vendored repos as first-party engines: - memory: beads (Go task DAG) + context7 (docs SDK), unified into saved_contexts - git: vendored C git (bundled binary) + gitnexus (in-process code intelligence) - agentic: a2a (@a2a-js/sdk) + pal (AITM-managed Python subprocess) Includes the full session's product build: Gitgram web/mobile/backend features, AITM website/CLI/MCP, the unified memory layer, engine build tooling (scripts/build-engines.sh, Dockerfile, CI), docs (README, ENGINES.md, ARCHITECTURE.md), and extensive test suites. Build artifacts, node_modules, external/, and gemini-cli are gitignored. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
67 lines
1.7 KiB
Go
67 lines
1.7 KiB
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"strings"
|
|
|
|
"github.com/spf13/cobra"
|
|
"github.com/steveyegge/beads/internal/types"
|
|
"github.com/steveyegge/beads/internal/validation"
|
|
)
|
|
|
|
var quickCmd = &cobra.Command{
|
|
Use: "q [title]",
|
|
GroupID: "issues",
|
|
Short: "Quick capture: create issue and output only ID",
|
|
Long: `Quick capture creates an issue and outputs only the issue ID.
|
|
Designed for scripting and AI agent integration.
|
|
|
|
Example:
|
|
bd q "Fix login bug" # Outputs: bd-a1b2
|
|
ISSUE=$(bd q "New feature") # Capture ID in variable
|
|
bd q "Task" | xargs bd show # Pipe to other commands`,
|
|
Args: cobra.MinimumNArgs(1),
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
CheckReadonly("create")
|
|
|
|
title := strings.Join(args, " ")
|
|
|
|
// Get optional flags
|
|
priorityStr, _ := cmd.Flags().GetString("priority")
|
|
issueType, _ := cmd.Flags().GetString("type")
|
|
labels, _ := cmd.Flags().GetStringSlice("labels")
|
|
|
|
// Parse priority
|
|
priority, err := validation.ValidatePriority(priorityStr)
|
|
if err != nil {
|
|
FatalError("%v", err)
|
|
}
|
|
|
|
// Direct mode
|
|
issue := &types.Issue{
|
|
Title: title,
|
|
Status: types.StatusOpen,
|
|
Priority: priority,
|
|
IssueType: types.IssueType(issueType).Normalize(),
|
|
Labels: mergeCreateLabels(labels, nil),
|
|
}
|
|
|
|
ctx := rootCtx
|
|
if err := store.CreateIssue(ctx, issue, actor); err != nil {
|
|
FatalError("%v", err)
|
|
}
|
|
|
|
commandDidWrite.Store(true)
|
|
|
|
// Output only the ID
|
|
fmt.Println(issue.ID)
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
quickCmd.Flags().StringP("priority", "p", "2", "Priority (0-4 or P0-P4)")
|
|
quickCmd.Flags().StringP("type", "t", "task", "Issue type")
|
|
quickCmd.Flags().StringSliceP("labels", "l", []string{}, "Labels")
|
|
rootCmd.AddCommand(quickCmd)
|
|
}
|