Commit Graph

30 Commits (42ae0fbf6b3db05ee07fed2dc701e0b1ca09336a)

Author SHA1 Message Date
Jason Stirnaman 925a26e580
fix(cli): Make docs edit non-blocking and reorganize CLI code (#6721)
* REAL-WORLD TESTING ────────────────── BEFORE FIX: ───────────  Agent
runs: docs edit <url>  Editor spawns and blocks  Agent hangs for 30+
seconds  Workflow times out or fails  Manual intervention required

AFTER FIX: ──────────  Agent runs: docs edit <url>  Editor spawns
detached  CLI exits in <1 second  Agent continues processing 
Workflow completes successfully  No manual intervention needed

ISSUE #21:  RESOLVED ───────────────────────

The docs edit command now: • Works perfectly in automated workflows •
Doesn't hang AI agents or scripts • Exits immediately by default •
Supports blocking mode via --wait flag • Handles both URL formats •
Provides clear feedback • Has comprehensive documentation

DEPLOYMENT STATUS:  READY ────────────────────────────

All tests pass: ✓ Unit tests (7/7) ✓ CLI tests ✓ Real-world agent
workflow ✓ Coverage Gap issue processing ✓ URL format support ✓
Non-blocking verification ✓ Blocking mode verification

Scenario: AI agent processes GitHub Coverage Gap issues Issues: #6702,

Results: • Fetched issues from GitHub  • Used docs edit to locate files
 • Identified missing docs (Coverage Gaps)  • Found existing docs  •
No hangs, no timeouts  • Total time: 2 seconds for 3 issues 

* refactor(cli): move docs CLI to dedicated scripts/docs-cli directory

- Organize all CLI tools and tests in scripts/docs-cli/
- Update package.json bin and script paths
- Update setup-local-bin.js to point to new location
- Fix import paths in docs-edit.js and docs-create.js
- Update SKILL.md with new features (--wait, --editor, path support)
- Update ISSUE-21-FIX-README.md with new structure
- Add comprehensive README.md for docs-cli directory
- All tests passing, non-blocking behavior verified

Closes #21

* feat(cli): add non-blocking editor support to docs create

- Add --open flag to open created files in editor
- Add --wait flag for blocking mode (use with --open)
- Add --editor flag for explicit editor selection
- Uses same editor resolution and process management as docs edit
- Non-blocking by default to prevent agent hanging
- Update all documentation with new examples
- Maintains backwards compatibility (--open is optional)

This completes the non-blocking implementation across both
docs edit and docs create commands.

* docs: update Copilot instructions with complete CLI tool reference

- Add docs create --open to Quick Reference table
- Document both create and edit commands comprehensively
- Add editor configuration section (shared between commands)
- Update content.instructions.md with CLI workflow examples
- Add NON-BLOCKING-IMPLEMENTATION-COMPLETE.md summary document
- Clarify non-blocking behavior for AI agents

* chore: remove ephemeral documentation files

Remove temporary documentation files used during development:
- CLAUDE-docs-tooling-issue21.md
- IMPLEMENTATION-SUMMARY.md
- ISSUE-21-FIX-README.md
- NON-BLOCKING-IMPLEMENTATION-COMPLETE.md
- TEST-RESULTS.md

All relevant documentation has been integrated into:
- README.md
- scripts/docs-cli/README.md
- .github/copilot-instructions.md
- .github/instructions/content.instructions.md
- .claude/skills/docs-cli-workflow/SKILL.md

* Fix url-parser.js broken import by moving to shared library location (#6727)

* Initial plan

* refactor: move url-parser.js to shared library location and fix imports

Co-authored-by: jstirnaman <212227+jstirnaman@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jstirnaman <212227+jstirnaman@users.noreply.github.com>

* Update scripts/docs-cli/__tests__/process-manager.test.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update scripts/docs-cli/__tests__/editor-resolver.test.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-13 21:47:09 -06:00
Copilot 7a1ceb439f
Configure GitHub Copilot instructions and navigation system (#6628)
* Initial plan

* feat: enhance Copilot instructions with style guidelines and navigation

Co-authored-by: jstirnaman <212227+jstirnaman@users.noreply.github.com>

* fix: correct .claude/agents link in INSTRUCTIONS.md

Co-authored-by: jstirnaman <212227+jstirnaman@users.noreply.github.com>

* refactor: remove duplication and app-specific references from instructions

- Simplified INSTRUCTIONS.md from 118 to 76 lines by removing duplicate content
- Changed "Claude Desktop app" to "Claude with MCP" throughout
- Removed file pattern table (already in copilot-instructions.md)
- Removed specialist agents table (already in copilot-instructions.md)
- Removed general documentation table (already in copilot-instructions.md)
- INSTRUCTIONS.md now serves as simple navigation guide without duplication

Co-authored-by: jstirnaman <212227+jstirnaman@users.noreply.github.com>

* Update README.md

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jstirnaman <212227+jstirnaman@users.noreply.github.com>
Co-authored-by: Jason Stirnaman <jstirnaman@influxdata.com>
2025-12-15 12:43:34 -06:00
Jason Stirnaman e8a48e3482
chore(docs): Redesign docs CLI tools for creating and editing content, add content/create.md tutorial page for the How to creat… (#6506)
* chore(docs): Add content/create.md tutorial page for the How to create your own documentation tutorial

chore(scripts): docs:create and docs:edit scripts for content creation and editing

Major improvements to docs:create UX for both Claude Code and external tool integration:

**New `docs` CLI command:**
- Add scripts/docs-cli.js - main CLI with subcommand routing
- Add bin field to package.json for `docs` command
- Usage: `docs create` and `docs edit` (cleaner than yarn commands)

**Smart piping detection:**
- Auto-detect when stdout is piped (\!process.stdout.isTTY)
- When piping: automatically output prompt text (no flag needed)
- When interactive: output prompt file path
- --print-prompt flag now optional (auto-enabled when piping)

**Specify products:**
- simplify link following behavior - treat relative paths as local files, all HTTP/HTTPS as external
- stdin now requires --products flag with product keys
- --products now accepts keys from products.yml (influxdb3_core, telegraf, etc.)

Examples:
  --products influxdb3_core
  --products influxdb3_core,influxdb3_enterprise
  --products telegraf

**Usage examples:**
  # Inside Claude Code - automatic execution
  docs create drafts/new-feature.md

  # Pipe to external AI - prompt auto-detected
  docs create FILE --products X | claude -p
  docs create FILE --products X | copilot -p

  # Pipe from stdin
  echo 'content' | docs create --products X | claude -p

Benefits:
- Cleaner syntax (no yarn --silent needed)
- No manual --print-prompt flag when piping
- Consistent with industry tools (git, npm, etc.)
- Backward compatible with yarn commands

WIP: docs:create usage examples

- Redesign of the docs CLI tools for creating and editing content
- Cleaner interface works better for piping output to agents and downstream utilities
- Updates README.md and other authoring docs

This repository includes a `docs` CLI tool for common documentation workflows:

```sh
npx docs create drafts/new-feature.md --products influxdb3_core

npx docs edit https://docs.influxdata.com/influxdb3/core/admin/

npx docs placeholders content/influxdb3/core/admin/upgrade.md

npx docs --help
```

**Run test cases:**

```sh
npx docs test
```

* Update content/create.md

* Update content/create.md

* Update content/create.md

* Update content/create.md

* Update scripts/templates/chatgpt-prompt.md

* Update DOCS-SHORTCODES.md
2025-11-03 10:18:15 -06:00
Jason Stirnaman 189d86fcda chore(instructions): restructure contributing instructions for humans and assistants 2025-10-08 15:48:44 -05:00
Jason Stirnaman 6a4e8827eb feat(testing): add link validation automation and improvements
- Add GitHub Actions for automated link validation on PRs
- Implement incremental validation with caching (30-day TTL, configurable)
- Add matrix generator for parallel validation strategy
- Create comprehensive TESTING.md documentation
- Add cache manager with configurable TTL via env var or CLI
- Implement smart link extraction and validation
- Add PR comment generator for broken link reports
- Update Cypress tests to use incremental validation
- Consolidate testing docs from CONTRIBUTING.md to TESTING.md

Key improvements:
- Cache-aware validation only checks changed content
- Parallel execution for large changesets
- Detailed PR comments with broken link reports
- Support for LINK_CACHE_TTL_DAYS env var
- Local testing with yarn test:links
- Reduced false positives through intelligent caching
2025-07-28 16:24:24 -05:00
wayne 86f832f06c
docs: Add docker compose workflow for running docs locally (#5400)
* docs: Add docker compose workflow for running docs locally

* chore: Fixup compose.yaml for local build:

- Added comments
- Use the verbose mount syntax
- Wrap /Users/ja/Documents/GitHub/docs-v2 in quotes for cross-platform compat.

* docs: fixup readme style

Co-authored-by: Jason Stirnaman <stirnamanj@gmail.com>

* docs: fixup readme style

Co-authored-by: Jason Stirnaman <stirnamanj@gmail.com>

* docs: fixup readme style

Co-authored-by: Jason Stirnaman <stirnamanj@gmail.com>

---------

Co-authored-by: Jason Stirnaman <stirnamanj@gmail.com>
2024-04-01 12:17:07 -05:00
Andreas Deininger 0488345ab7
Fix errors when running latest hugo version v0.123.8 (#5356)
Co-authored-by: Scott Anderson <sanderson@users.noreply.github.com>
2024-03-11 17:31:33 -06:00
Andreas Deininger 476a73e95e
Fixing typos (#5315)
* Fix typos

* Bump hugo to latest version v0.122.0

---------

Co-authored-by: Scott Anderson <sanderson@users.noreply.github.com>
2024-02-05 09:51:51 -07:00
Andreas Deininger 57e4929746
Bump hugo to latest version v0.121.2 (#5293)
* Bump hugo to latest version v0.121.2

* Fix deprecation warnings emitted from hugo

---------

Co-authored-by: Jason Stirnaman <stirnamanj@gmail.com>
Co-authored-by: Scott Anderson <sanderson@users.noreply.github.com>
2024-01-17 09:15:00 -07:00
Andreas Deininger 7634b9ba1a
Upgrade hugo to latest version 0.120.4 (#5241) 2023-11-27 13:39:23 -07:00
Jason Stirnaman fe2748d5e6
chore: Add Vale instructions to Contributing, update tested Hugo version (#5088) 2023-08-17 10:21:46 -05:00
Jason Stirnaman f13e34de6d
Install dependencies as project dependencies from NPM repo (#2476)
* Added hugo-extended, postcss, postcss-cli, and autoprefixer as devDependencies. Run npm install or yarn install. (#2474)

* Replaced global hugo and yarn installs with project-level yarn install.

* Replaced npm package.lock with yarn.lock (#2474).

* enhancement: update README with instructions for installing NODE.JS dependencies. (#2474)

* updated api doc generator script to use npx

* Update README.md

Co-authored-by: kelseiv <47797004+kelseiv@users.noreply.github.com>

* Update README.md

Co-authored-by: kelseiv <47797004+kelseiv@users.noreply.github.com>

* Update README.md

Co-authored-by: kelseiv <47797004+kelseiv@users.noreply.github.com>

* Update README.md

Co-authored-by: kelseiv <47797004+kelseiv@users.noreply.github.com>

* Update README.md

Co-authored-by: Scott Anderson <sanderson@users.noreply.github.com>

* Update package.json

Co-authored-by: Scott Anderson <sanderson@users.noreply.github.com>

* fix: indentation. (#2476)

* update: Added separate dependencies list for api-docs.
- Moved redoc-cli to a separate package.json in api-docs. Excluded
api-docs/node_modules from generate-api-docs.sh.
- Updated redoc-cli argument sequence to agree with their docs.
- Updated READMEs.
- Fixed typos.

* update: add api-docs > yarn install to .circleci

* Added language and consistency to code block. Specify where to run the command.

Co-authored-by: Scott Anderson <scott@influxdata.com>
Co-authored-by: kelseiv <47797004+kelseiv@users.noreply.github.com>
Co-authored-by: Scott Anderson <sanderson@users.noreply.github.com>
2021-05-24 12:11:01 -05:00
Scott Anderson 46d0f16dc0
upgraded hugo to 0.81.0, fixed isset build error, fixed formatting in grafana doc (#2218) 2021-02-26 21:54:41 -07:00
pierwill ba63fa57a5 Edit README.md
- Use ordered list for instructions
- Other formatting changes
2019-10-30 09:01:05 -07:00
pierwill b3527c4440 Add logo image to README 2019-10-09 13:58:37 -07:00
timhallinflux dcb2ba9c24
Update README.md 2019-09-05 13:03:57 -07:00
kelseiv 580be277ed
Update README.md 2019-04-22 17:04:08 -07:00
timhallinflux faed92e47a
Fixes link to Contributing 2019-01-18 12:29:39 -08:00
Scott Anderson 84a03c680a restructured readme and contribution guidelines 2019-01-09 16:08:51 -07:00
Scott Anderson 8b4671722d added truncate shortcode, styles, and js 2019-01-04 08:44:53 -07:00
Scott Anderson 35e221c9f5 minor update to the image info in the readme 2019-01-03 11:29:59 -07:00
Scott Anderson 8edc3da27f added image styles and hd image shortcode 2019-01-03 11:23:17 -07:00
Scott Anderson f0ab0ec8b1 added tabbed codeblock shortcodes and styles 2019-01-03 09:46:23 -07:00
Scott Anderson fe23c61ae2 minor update to tabbed shortcode content in readme 2019-01-02 10:34:34 -07:00
Scott Anderson bab8e2cc12 added tabbed content functionality and styles 2019-01-02 10:32:44 -07:00
Scott Anderson 1edcb9c00e added enterprise formatting and shortcode, updated readme with enterprise info 2018-12-31 15:55:04 -07:00
Scott Anderson f0d45ccd46 styled notes and warnings, updated readme with notes and warnings shortcodes 2018-12-31 12:17:36 -07:00
Scott Anderson 1572941a18 finished nodejs content in the readme 2018-12-19 14:40:52 -07:00
Scott Anderson cd22dcc1e6 established asset pipeline 2018-12-19 14:36:12 -07:00
Scott Anderson 483c32c6bb first commit to the influxdb 2.0 docs! 2018-12-13 11:47:02 -07:00